summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--l10ntools/source/cfgmerge.cxx2
-rw-r--r--rsc/source/parser/rscinit.cxx4
-rw-r--r--rsc/source/res/rscclass.cxx2
-rw-r--r--rsc/source/res/rscflag.cxx4
-rw-r--r--rsc/source/res/rscmgr.cxx2
-rw-r--r--rsc/source/res/rscrange.cxx4
-rw-r--r--rsc/source/rscpp/cpp.h20
-rw-r--r--rsc/source/rscpp/cpp1.c46
-rw-r--r--rsc/source/rscpp/cpp2.c50
-rw-r--r--rsc/source/rscpp/cpp3.c32
-rw-r--r--rsc/source/rscpp/cpp4.c34
-rw-r--r--rsc/source/rscpp/cpp5.c10
-rw-r--r--rsc/source/rscpp/cpp6.c72
-rw-r--r--rsc/source/rscpp/cppdef.h50
-rw-r--r--tools/inc/tools/agapi.hxx4
-rw-r--r--tools/inc/tools/agitem.hxx4
-rw-r--r--tools/inc/tools/debug.hxx4
-rw-r--r--tools/inc/tools/dynary.hxx12
-rw-r--r--tools/inc/tools/eacopier.hxx2
-rw-r--r--tools/inc/tools/postsys.h10
-rw-r--r--tools/inc/tools/wintypes.hxx4
-rw-r--r--vcl/inc/vcl/abstdlg.hxx2
-rw-r--r--vcl/inc/vcl/accel.h6
-rw-r--r--vcl/inc/vcl/accel.hxx54
-rw-r--r--vcl/inc/vcl/accmgr.hxx8
-rw-r--r--vcl/inc/vcl/alpha.hxx42
-rw-r--r--vcl/inc/vcl/animate.hxx86
-rw-r--r--vcl/inc/vcl/apptypes.hxx24
-rw-r--r--vcl/inc/vcl/bitmap.hxx256
-rw-r--r--vcl/inc/vcl/bitmapex.hxx94
-rw-r--r--vcl/inc/vcl/bmpacc.hxx78
-rw-r--r--vcl/inc/vcl/brdwin.hxx188
-rw-r--r--vcl/inc/vcl/btndlg.hxx56
-rw-r--r--vcl/inc/vcl/button.hxx128
-rw-r--r--vcl/inc/vcl/canvasbitmap.hxx2
-rw-r--r--vcl/inc/vcl/cmdevt.hxx214
-rw-r--r--vcl/inc/vcl/combobox.h8
-rw-r--r--vcl/inc/vcl/combobox.hxx98
-rw-r--r--vcl/inc/vcl/ctrl.hxx10
-rw-r--r--vcl/inc/vcl/cursor.hxx18
-rw-r--r--vcl/inc/vcl/cvtgrf.hxx8
-rw-r--r--vcl/inc/vcl/cvtsvm.hxx6
-rw-r--r--vcl/inc/vcl/dbggui.hxx2
-rw-r--r--vcl/inc/vcl/decoview.hxx74
-rw-r--r--vcl/inc/vcl/dialog.hxx28
-rw-r--r--vcl/inc/vcl/dockingarea.hxx2
-rw-r--r--vcl/inc/vcl/dockwin.hxx132
-rw-r--r--vcl/inc/vcl/edit.hxx40
-rw-r--r--vcl/inc/vcl/event.hxx192
-rw-r--r--vcl/inc/vcl/evntpost.hxx4
-rw-r--r--vcl/inc/vcl/field.hxx210
-rw-r--r--vcl/inc/vcl/fixbrd.hxx16
-rw-r--r--vcl/inc/vcl/fixed.hxx26
-rw-r--r--vcl/inc/vcl/floatwin.hxx126
-rw-r--r--vcl/inc/vcl/fntstyle.hxx2
-rw-r--r--vcl/inc/vcl/font.hxx28
-rw-r--r--vcl/inc/vcl/gdimtf.hxx64
-rw-r--r--vcl/inc/vcl/gfxlink.hxx38
-rw-r--r--vcl/inc/vcl/glyphcache.hxx22
-rw-r--r--vcl/inc/vcl/gradient.hxx50
-rw-r--r--vcl/inc/vcl/graph.h8
-rw-r--r--vcl/inc/vcl/graph.hxx44
-rw-r--r--vcl/inc/vcl/group.hxx6
-rw-r--r--vcl/inc/vcl/hatch.hxx16
-rw-r--r--vcl/inc/vcl/help.hxx64
-rw-r--r--vcl/inc/vcl/helpwin.hxx16
-rw-r--r--vcl/inc/vcl/i18nhelp.hxx2
-rw-r--r--vcl/inc/vcl/idlemgr.hxx2
-rw-r--r--vcl/inc/vcl/ilstbox.hxx302
-rw-r--r--vcl/inc/vcl/image.h42
-rw-r--r--vcl/inc/vcl/image.hxx52
-rw-r--r--vcl/inc/vcl/imgcons.hxx10
-rw-r--r--vcl/inc/vcl/imgctrl.hxx2
-rw-r--r--vcl/inc/vcl/impbmp.hxx24
-rw-r--r--vcl/inc/vcl/impfont.hxx12
-rw-r--r--vcl/inc/vcl/impgraph.hxx52
-rw-r--r--vcl/inc/vcl/impoct.hxx16
-rw-r--r--vcl/inc/vcl/impprn.hxx8
-rw-r--r--vcl/inc/vcl/inputctx.hxx22
-rw-r--r--vcl/inc/vcl/jobset.h10
-rw-r--r--vcl/inc/vcl/jobset.hxx4
-rw-r--r--vcl/inc/vcl/keycod.hxx44
-rw-r--r--vcl/inc/vcl/keycodes.hxx250
-rw-r--r--vcl/inc/vcl/lineinfo.hxx22
-rw-r--r--vcl/inc/vcl/longcurr.hxx26
-rw-r--r--vcl/inc/vcl/lstbox.h8
-rw-r--r--vcl/inc/vcl/lstbox.hxx116
-rw-r--r--vcl/inc/vcl/mapmod.hxx12
-rw-r--r--vcl/inc/vcl/menu.hxx280
-rw-r--r--vcl/inc/vcl/menubtn.hxx12
-rw-r--r--vcl/inc/vcl/metaact.hxx112
-rw-r--r--vcl/inc/vcl/metric.hxx34
-rw-r--r--vcl/inc/vcl/mnemonic.hxx8
-rw-r--r--vcl/inc/vcl/morebtn.hxx14
-rw-r--r--vcl/inc/vcl/msgbox.hxx18
-rw-r--r--vcl/inc/vcl/octree.hxx48
-rw-r--r--vcl/inc/vcl/outdev.h30
-rw-r--r--vcl/inc/vcl/outdev.hxx392
-rw-r--r--vcl/inc/vcl/outfont.hxx12
-rw-r--r--vcl/inc/vcl/pdfextoutdevdata.hxx14
-rw-r--r--vcl/inc/vcl/pdfwriter.hxx32
-rw-r--r--vcl/inc/vcl/pointr.hxx4
-rw-r--r--vcl/inc/vcl/polyscan.hxx20
-rw-r--r--vcl/inc/vcl/ppdparser.hxx8
-rw-r--r--vcl/inc/vcl/print.hxx144
-rw-r--r--vcl/inc/vcl/printergfx.hxx6
-rw-r--r--vcl/inc/vcl/prntypes.hxx74
-rw-r--r--vcl/inc/vcl/ptrstyle.hxx2
-rw-r--r--vcl/inc/vcl/regband.hxx26
-rw-r--r--vcl/inc/vcl/region.h16
-rw-r--r--vcl/inc/vcl/region.hxx46
-rw-r--r--vcl/inc/vcl/salbmp.hxx6
-rw-r--r--vcl/inc/vcl/salbtype.hxx324
-rw-r--r--vcl/inc/vcl/salctype.hxx10
-rw-r--r--vcl/inc/vcl/salframe.hxx102
-rw-r--r--vcl/inc/vcl/salgdi.hxx96
-rw-r--r--vcl/inc/vcl/salgtype.hxx14
-rw-r--r--vcl/inc/vcl/salinst.hxx18
-rw-r--r--vcl/inc/vcl/salmenu.hxx18
-rw-r--r--vcl/inc/vcl/salnativewidgets.hxx16
-rw-r--r--vcl/inc/vcl/salobj.hxx28
-rw-r--r--vcl/inc/vcl/salprn.hxx34
-rw-r--r--vcl/inc/vcl/salptype.hxx8
-rw-r--r--vcl/inc/vcl/saltimer.hxx2
-rw-r--r--vcl/inc/vcl/salvd.hxx2
-rw-r--r--vcl/inc/vcl/salwtype.hxx234
-rw-r--r--vcl/inc/vcl/scrbar.hxx28
-rw-r--r--vcl/inc/vcl/seleng.hxx100
-rw-r--r--vcl/inc/vcl/settings.hxx616
-rw-r--r--vcl/inc/vcl/slider.hxx28
-rwxr-xr-xvcl/inc/vcl/smartid.hxx24
-rw-r--r--vcl/inc/vcl/sndstyle.hxx2
-rw-r--r--vcl/inc/vcl/spin.h8
-rw-r--r--vcl/inc/vcl/spin.hxx26
-rw-r--r--vcl/inc/vcl/spinfld.hxx8
-rw-r--r--vcl/inc/vcl/split.hxx10
-rw-r--r--vcl/inc/vcl/splitwin.hxx144
-rw-r--r--vcl/inc/vcl/status.hxx118
-rw-r--r--vcl/inc/vcl/stdtext.hxx6
-rw-r--r--vcl/inc/vcl/strhelper.hxx6
-rw-r--r--vcl/inc/vcl/svapp.hxx146
-rw-r--r--vcl/inc/vcl/svcompat.hxx22
-rw-r--r--vcl/inc/vcl/svdata.hxx110
-rw-r--r--vcl/inc/vcl/symbol.hxx2
-rw-r--r--vcl/inc/vcl/syschild.hxx8
-rw-r--r--vcl/inc/vcl/syswin.hxx94
-rw-r--r--vcl/inc/vcl/tabctrl.hxx106
-rw-r--r--vcl/inc/vcl/tabdlg.hxx2
-rw-r--r--vcl/inc/vcl/tabpage.hxx2
-rw-r--r--vcl/inc/vcl/taskpanelist.hxx10
-rwxr-xr-x[-rw-r--r--]vcl/inc/vcl/textlayout.hxx2
-rw-r--r--vcl/inc/vcl/timer.hxx12
-rw-r--r--vcl/inc/vcl/toolbox.h32
-rw-r--r--vcl/inc/vcl/toolbox.hxx390
-rw-r--r--vcl/inc/vcl/vclenum.hxx2
-rw-r--r--vcl/inc/vcl/vclevent.hxx26
-rw-r--r--vcl/inc/vcl/virdev.hxx22
-rw-r--r--vcl/inc/vcl/wall.hxx18
-rw-r--r--vcl/inc/vcl/wall2.hxx2
-rw-r--r--vcl/inc/vcl/windata.hxx6
-rw-r--r--vcl/inc/vcl/window.h82
-rw-r--r--vcl/inc/vcl/window.hxx612
-rw-r--r--vcl/inc/vcl/wrkwin.hxx34
-rw-r--r--vcl/source/app/dbggui.cxx172
-rw-r--r--vcl/source/app/help.cxx124
-rw-r--r--vcl/source/app/i18nhelp.cxx10
-rw-r--r--vcl/source/app/idlemgr.cxx20
-rw-r--r--vcl/source/app/salvtables.cxx10
-rw-r--r--vcl/source/app/session.cxx8
-rwxr-xr-xvcl/source/app/settings.cxx198
-rw-r--r--vcl/source/app/stdtext.cxx4
-rw-r--r--vcl/source/app/svapp.cxx216
-rw-r--r--vcl/source/app/svdata.cxx18
-rw-r--r--vcl/source/app/svmain.cxx38
-rw-r--r--vcl/source/app/svmainhook.cxx12
-rw-r--r--vcl/source/app/timer.cxx64
-rw-r--r--vcl/source/app/unohelp.cxx2
-rw-r--r--vcl/source/app/unohelp2.cxx4
-rw-r--r--vcl/source/app/vclevent.cxx8
-rw-r--r--vcl/source/control/button.cxx322
-rw-r--r--vcl/source/control/combobox.cxx252
-rw-r--r--vcl/source/control/ctrl.cxx24
-rw-r--r--vcl/source/control/edit.cxx238
-rw-r--r--vcl/source/control/field.cxx254
-rw-r--r--vcl/source/control/field2.cxx542
-rw-r--r--vcl/source/control/fixbrd.cxx24
-rw-r--r--vcl/source/control/fixed.cxx120
-rw-r--r--vcl/source/control/group.cxx30
-rw-r--r--vcl/source/control/ilstbox.cxx670
-rw-r--r--vcl/source/control/imgctrl.cxx12
-rw-r--r--vcl/source/control/longcurr.cxx128
-rw-r--r--vcl/source/control/lstbox.cxx214
-rw-r--r--vcl/source/control/menubtn.cxx10
-rw-r--r--vcl/source/control/morebtn.cxx8
-rw-r--r--vcl/source/control/scrbar.cxx142
-rw-r--r--vcl/source/control/slider.cxx98
-rw-r--r--vcl/source/control/spinbtn.cxx68
-rw-r--r--vcl/source/control/spinfld.cxx106
-rw-r--r--vcl/source/control/tabctrl.cxx290
-rw-r--r--vcl/source/fontsubset/gsub.cxx134
-rw-r--r--vcl/source/fontsubset/sft.cxx2
-rw-r--r--vcl/source/gdi/alpha.cxx58
-rw-r--r--vcl/source/gdi/animate.cxx200
-rw-r--r--vcl/source/gdi/bitmap.cxx234
-rw-r--r--vcl/source/gdi/bitmap2.cxx266
-rw-r--r--vcl/source/gdi/bitmap3.cxx362
-rw-r--r--vcl/source/gdi/bitmap4.cxx154
-rw-r--r--vcl/source/gdi/bitmapex.cxx134
-rw-r--r--vcl/source/gdi/bmpacc.cxx30
-rw-r--r--vcl/source/gdi/bmpacc2.cxx8
-rw-r--r--vcl/source/gdi/bmpacc3.cxx24
-rw-r--r--vcl/source/gdi/bmpconv.cxx4
-rw-r--r--vcl/source/gdi/bmpfast.cxx34
-rw-r--r--vcl/source/gdi/cvtgrf.cxx22
-rw-r--r--vcl/source/gdi/cvtsvm.cxx614
-rw-r--r--vcl/source/gdi/font.cxx76
-rw-r--r--vcl/source/gdi/gdimtf.cxx288
-rw-r--r--vcl/source/gdi/gfxlink.cxx40
-rw-r--r--vcl/source/gdi/gradient.cxx26
-rw-r--r--vcl/source/gdi/graph.cxx72
-rw-r--r--vcl/source/gdi/graphictools.cxx20
-rw-r--r--vcl/source/gdi/hatch.cxx10
-rw-r--r--vcl/source/gdi/image.cxx84
-rw-r--r--vcl/source/gdi/imgcons.cxx110
-rw-r--r--vcl/source/gdi/impanmvw.cxx42
-rw-r--r--vcl/source/gdi/impanmvw.hxx30
-rw-r--r--vcl/source/gdi/impbmp.cxx16
-rw-r--r--vcl/source/gdi/impgraph.cxx186
-rw-r--r--vcl/source/gdi/impimage.cxx66
-rw-r--r--vcl/source/gdi/impprn.cxx50
-rw-r--r--vcl/source/gdi/impvect.cxx192
-rw-r--r--vcl/source/gdi/impvect.hxx14
-rw-r--r--vcl/source/gdi/jobset.cxx42
-rw-r--r--vcl/source/gdi/lineinfo.cxx12
-rw-r--r--vcl/source/gdi/mapmod.cxx26
-rw-r--r--vcl/source/gdi/metaact.cxx110
-rw-r--r--vcl/source/gdi/metric.cxx36
-rw-r--r--vcl/source/gdi/octree.cxx84
-rw-r--r--vcl/source/gdi/outdev.cxx276
-rw-r--r--vcl/source/gdi/outdev2.cxx138
-rw-r--r--vcl/source/gdi/outdev3.cxx384
-rw-r--r--vcl/source/gdi/outdev4.cxx126
-rw-r--r--vcl/source/gdi/outdev5.cxx2
-rw-r--r--vcl/source/gdi/outdev6.cxx102
-rw-r--r--vcl/source/gdi/outdevnative.cxx40
-rw-r--r--vcl/source/gdi/outmap.cxx78
-rw-r--r--vcl/source/gdi/pdfextoutdevdata.cxx2
-rw-r--r--vcl/source/gdi/pdfwriter.cxx18
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx64
-rw-r--r--vcl/source/gdi/pdfwriter_impl.hxx12
-rw-r--r--vcl/source/gdi/pngread.cxx230
-rw-r--r--vcl/source/gdi/pngwrite.cxx140
-rw-r--r--vcl/source/gdi/polyscan.cxx32
-rw-r--r--vcl/source/gdi/print.cxx240
-rw-r--r--vcl/source/gdi/print2.cxx42
-rw-r--r--vcl/source/gdi/print3.cxx50
-rw-r--r--vcl/source/gdi/regband.cxx86
-rw-r--r--vcl/source/gdi/region.cxx264
-rw-r--r--vcl/source/gdi/salgdilayout.cxx64
-rw-r--r--vcl/source/gdi/salmisc.cxx24
-rw-r--r--vcl/source/gdi/salnativewidgets-none.cxx30
-rw-r--r--vcl/source/gdi/svcompat.cxx6
-rwxr-xr-x[-rw-r--r--]vcl/source/gdi/textlayout.cxx8
-rw-r--r--vcl/source/gdi/virdev.cxx56
-rw-r--r--vcl/source/gdi/wall.cxx58
-rw-r--r--vcl/source/glyphs/gcach_ftyp.cxx226
-rw-r--r--vcl/source/glyphs/gcach_ftyp.hxx6
-rwxr-xr-x[-rw-r--r--]vcl/source/glyphs/gcach_layout.cxx2
-rwxr-xr-x[-rw-r--r--]vcl/source/glyphs/gcach_rbmp.cxx6
-rw-r--r--vcl/source/glyphs/gcach_vdev.cxx10
-rw-r--r--vcl/source/glyphs/gcach_vdev.hxx2
-rw-r--r--vcl/source/glyphs/glyphcache.cxx4
-rw-r--r--vcl/source/glyphs/graphite_adaptors.cxx2
-rw-r--r--vcl/source/helper/canvasbitmap.cxx48
-rw-r--r--vcl/source/helper/canvastools.cxx20
-rw-r--r--vcl/source/helper/lazydelete.cxx2
-rwxr-xr-xvcl/source/helper/smartid.cxx56
-rw-r--r--vcl/source/helper/strhelper.cxx16
-rw-r--r--vcl/source/helper/threadex.cxx4
-rw-r--r--vcl/source/helper/xconnection.cxx2
-rw-r--r--vcl/source/window/accel.cxx162
-rw-r--r--vcl/source/window/accmgr.cxx50
-rw-r--r--vcl/source/window/brdwin.cxx196
-rw-r--r--vcl/source/window/btndlg.cxx68
-rw-r--r--vcl/source/window/cmdevt.cxx16
-rw-r--r--vcl/source/window/cursor.cxx32
-rw-r--r--vcl/source/window/decoview.cxx62
-rw-r--r--vcl/source/window/dialog.cxx118
-rw-r--r--vcl/source/window/dlgctrl.cxx246
-rw-r--r--vcl/source/window/dockingarea.cxx14
-rw-r--r--vcl/source/window/dockmgr.cxx226
-rw-r--r--vcl/source/window/dockwin.cxx142
-rw-r--r--vcl/source/window/floatwin.cxx122
-rw-r--r--vcl/source/window/keycod.cxx30
-rw-r--r--vcl/source/window/keyevent.cxx4
-rw-r--r--vcl/source/window/menu.cxx1276
-rw-r--r--vcl/source/window/mnemonic.cxx48
-rw-r--r--vcl/source/window/mnemonicengine.cxx2
-rw-r--r--vcl/source/window/mouseevent.cxx2
-rw-r--r--vcl/source/window/msgbox.cxx66
-rw-r--r--vcl/source/window/printdlg.cxx52
-rw-r--r--vcl/source/window/scrwnd.cxx38
-rw-r--r--vcl/source/window/scrwnd.hxx16
-rw-r--r--vcl/source/window/seleng.cxx60
-rw-r--r--vcl/source/window/split.cxx28
-rw-r--r--vcl/source/window/splitwin.cxx578
-rw-r--r--vcl/source/window/status.cxx270
-rw-r--r--vcl/source/window/syschild.cxx30
-rw-r--r--vcl/source/window/syswin.cxx106
-rw-r--r--vcl/source/window/tabdlg.cxx10
-rw-r--r--vcl/source/window/tabpage.cxx12
-rw-r--r--vcl/source/window/taskpanelist.cxx46
-rw-r--r--vcl/source/window/toolbox.cxx948
-rw-r--r--vcl/source/window/toolbox2.cxx552
-rw-r--r--vcl/source/window/window.cxx1148
-rw-r--r--vcl/source/window/window2.cxx260
-rw-r--r--vcl/source/window/winproc.cxx302
-rw-r--r--vcl/source/window/wrkwin.cxx66
-rw-r--r--vcl/win/inc/salbmp.h12
-rw-r--r--vcl/win/inc/saldata.hxx58
-rw-r--r--vcl/win/inc/salframe.h80
-rw-r--r--vcl/win/inc/salgdi.h78
-rw-r--r--vcl/win/inc/salinst.h24
-rw-r--r--vcl/win/inc/salmenu.h8
-rw-r--r--vcl/win/inc/salobj.h10
-rw-r--r--vcl/win/inc/salprn.h44
-rw-r--r--vcl/win/inc/salsys.h2
-rw-r--r--vcl/win/inc/saltimer.h2
-rw-r--r--vcl/win/inc/salvd.h8
-rw-r--r--vcl/win/inc/wincomp.hxx6
-rw-r--r--vcl/win/source/app/saldata.cxx12
-rw-r--r--vcl/win/source/app/salinfo.cxx6
-rw-r--r--vcl/win/source/app/salinst.cxx44
-rw-r--r--vcl/win/source/app/salshl.cxx8
-rw-r--r--vcl/win/source/app/saltimer.cxx6
-rw-r--r--vcl/win/source/gdi/salbmp.cxx42
-rw-r--r--vcl/win/source/gdi/salgdi.cxx102
-rw-r--r--vcl/win/source/gdi/salgdi2.cxx12
-rw-r--r--vcl/win/source/gdi/salgdi3.cxx44
-rw-r--r--vcl/win/source/gdi/salnativewidgets-luna.cxx30
-rw-r--r--vcl/win/source/gdi/salprn.cxx104
-rw-r--r--vcl/win/source/gdi/salvd.cxx8
-rwxr-xr-x[-rw-r--r--]vcl/win/source/gdi/winlayout.cxx2
-rw-r--r--vcl/win/source/gdi/wntgdi.cxx6
-rw-r--r--vcl/win/source/window/salframe.cxx268
-rw-r--r--vcl/win/source/window/salmenu.cxx10
-rw-r--r--vcl/win/source/window/salobj.cxx28
347 files changed, 14477 insertions, 14477 deletions
diff --git a/l10ntools/source/cfgmerge.cxx b/l10ntools/source/cfgmerge.cxx
index 3f27fe60a493..a0b40332edca 100644
--- a/l10ntools/source/cfgmerge.cxx
+++ b/l10ntools/source/cfgmerge.cxx
@@ -488,7 +488,7 @@ int CfgParser::ExecuteAnalyzedToken( int nToken, char *pToken )
ByteString sTemp( sToken );
sTemp.ToUpperAscii();
bLocalize = (( sTemp.Search( "CFG:TYPE=\"STRING\"" ) != STRING_NOTFOUND ) &&
- ( sTemp.Search( "CFG:LOCALIZED=\"sal_True\"" ) != STRING_NOTFOUND ));
+ ( sTemp.Search( "CFG:LOCALIZED=\"TRUE\"" ) != STRING_NOTFOUND ));
}
}
else if ( sTokenName == "label" ) {
diff --git a/rsc/source/parser/rscinit.cxx b/rsc/source/parser/rscinit.cxx
index 88eeed419175..a65756502968 100644
--- a/rsc/source/parser/rscinit.cxx
+++ b/rsc/source/parser/rscinit.cxx
@@ -207,8 +207,8 @@ void RscTypCont::Init()
aNmTb.Put( "writeifset", WRITEIFSET, (long)0 );
/* Werte fuer Aufzaehlungstypen */
- aNmTb.Put( "sal_True", BOOLEAN, (long)sal_True );
- aNmTb.Put( "sal_False", BOOLEAN, (long)sal_False );
+ aNmTb.Put( "TRUE", BOOLEAN, (long)sal_True );
+ aNmTb.Put( "FALSE", BOOLEAN, (long)sal_False );
/* Vordefinierte HilfeId's */
aNmTb.Put( "HELP_INDEX", NUMBER, OOO_HELP_INDEX );
diff --git a/rsc/source/res/rscclass.cxx b/rsc/source/res/rscclass.cxx
index 4c3380af8c39..3df83a72c7be 100644
--- a/rsc/source/res/rscclass.cxx
+++ b/rsc/source/res/rscclass.cxx
@@ -1067,7 +1067,7 @@ void RscClass::WriteRcCtor( FILE * fOutput, RscTypCont * pTC )
fprintf( fOutput, "\tsal_uInt32\tnObjMask;\n" );
fprintf( fOutput, "\tsal_uInt32\tnOffset = 0;\n" );
fprintf( fOutput, "\tBYTE *\tpResData;\n\n" );
- fprintf( fOutput, "\tpResData = (sal_uInt8 *)GetClassRes();\n\n" );
+ fprintf( fOutput, "\tpResData = (tBYTE *)GetClassRes();\n\n" );
fprintf( fOutput, "\tnObjMask = *(sal_uInt32*)pResData;\n" );
fprintf( fOutput, "\tnOffset += 4;\n\n" );
diff --git a/rsc/source/res/rscflag.cxx b/rsc/source/res/rscflag.cxx
index a1844c5a057c..48c583a3ff8e 100644
--- a/rsc/source/res/rscflag.cxx
+++ b/rsc/source/res/rscflag.cxx
@@ -445,9 +445,9 @@ void RscClient::WriteSrc( const RSCINST & rInst, FILE * fOutput,
RscTypCont *, sal_uInt32, const char * )
{
if( pRefClass->IsSet( rInst, nConstId ) )
- fprintf( fOutput, "sal_True" );
+ fprintf( fOutput, "TRUE" );
else
- fprintf( fOutput, "sal_False" );
+ fprintf( fOutput, "FALSE" );
}
/*************************************************************************
diff --git a/rsc/source/res/rscmgr.cxx b/rsc/source/res/rscmgr.cxx
index da8f19b68685..69a989c1683b 100644
--- a/rsc/source/res/rscmgr.cxx
+++ b/rsc/source/res/rscmgr.cxx
@@ -453,7 +453,7 @@ ERRTYPE RscMgr::WriteHxxHeader( const RSCINST & rInst, FILE * fOutput,
if( aError.IsOk() )
{
fprintf( fOutput, "public:\n " );
- fprintf( fOutput, "%s%s bFreeRes = sal_True )",
+ fprintf( fOutput, "%s%s bFreeRes = TRUE )",
MakeName( pTC, rInst.pClass,
rId.GetName() ).GetBuffer(),
(rInst.pClass->aCallParType).GetBuffer() );
diff --git a/rsc/source/res/rscrange.cxx b/rsc/source/res/rscrange.cxx
index 69fcb1b73d6a..78fa86b6fa48 100644
--- a/rsc/source/res/rscrange.cxx
+++ b/rsc/source/res/rscrange.cxx
@@ -774,9 +774,9 @@ void RscBool::WriteSrc( const RSCINST & rInst, FILE * fOutput,
GetNumber( rInst, &l );
if( l )
- fprintf( fOutput, "sal_True" );
+ fprintf( fOutput, "TRUE" );
else
- fprintf( fOutput, "sal_False" );
+ fprintf( fOutput, "FALSE" );
}
//=======================================================================
diff --git a/rsc/source/rscpp/cpp.h b/rsc/source/rscpp/cpp.h
index 3c8102d1b614..11327d4fb9d1 100644
--- a/rsc/source/rscpp/cpp.h
+++ b/rsc/source/rscpp/cpp.h
@@ -26,9 +26,9 @@
************************************************************************/
-#ifndef sal_True
-#define sal_True 1
-#define sal_False 0
+#ifndef TRUE
+#define TRUE 1
+#define FALSE 0
#endif
/* in cpp1.c: file-pointer auf stdout oder file */
@@ -150,9 +150,9 @@ extern FILE *pDefOut; /* ER */
/*
* These bits are set in ifstack[]
*/
-#define WAS_COMPILING 1 /* sal_True if compile set at entry */
-#define ELSE_SEEN 2 /* sal_True when #else processed */
-#define TRUE_SEEN 4 /* sal_True when #if sal_True processed */
+#define WAS_COMPILING 1 /* TRUE if compile set at entry */
+#define ELSE_SEEN 2 /* TRUE when #else processed */
+#define TRUE_SEEN 4 /* TRUE when #if TRUE processed */
/*
* Define bits for the basic types and their adjectives
@@ -256,8 +256,8 @@ extern int line; /* Current line number */
extern int wrongline; /* Force #line to cc pass 1 */
extern char type[]; /* Character classifier */
extern char token[IDMAX + 1]; /* Current input token */
-extern int instring; /* sal_True if scanning string */
-extern int inmacro; /* sal_True if scanning #define */
+extern int instring; /* TRUE if scanning string */
+extern int inmacro; /* TRUE if scanning #define */
extern int errors; /* Error counter */
extern int recursion; /* Macro depth counter */
extern char ifstack[BLK_NEST]; /* #if information */
@@ -277,8 +277,8 @@ extern char *workp; /* Free space in work */
#if OSL_DEBUG_LEVEL > 1
extern int debug; /* Debug level */
/* ER dump & evaluate #define's */
-extern int bDumpDefs; /* sal_True if #define's dump req. */
-extern int bIsInEval; /* sal_True if #define dumping now */
+extern int bDumpDefs; /* TRUE if #define's dump req. */
+extern int bIsInEval; /* TRUE if #define dumping now */
#ifdef EVALDEFS
extern char EvalBuf[NEVALBUF + 1]; /* evaluation buffer */
extern int nEvalOff; /* offset to free buffer pos */
diff --git a/rsc/source/rscpp/cpp1.c b/rsc/source/rscpp/cpp1.c
index ace0206c7d9b..1eb7561a2db0 100644
--- a/rsc/source/rscpp/cpp1.c
+++ b/rsc/source/rscpp/cpp1.c
@@ -66,10 +66,10 @@ char token[IDMAX + 1]; /* Current input token */
int errors; /* cpp error counter */
FILEINFO *infile = NULL; /* Current input file */
#if OSL_DEBUG_LEVEL > 1
-int debug; /* sal_True if debugging now */
-int bDumpDefs; /* sal_True if #define's dump req. */
+int debug; /* TRUE if debugging now */
+int bDumpDefs; /* TRUE if #define's dump req. */
#ifdef EVALDEFS
-int bIsInEval; /* sal_True if #define eval now */
+int bIsInEval; /* TRUE if #define eval now */
char EvalBuf[NEVALBUF + 1]; /* evaluation buffer */
int nEvalOff = 0; /* offset to free buffer pos */
#endif
@@ -85,10 +85,10 @@ int nEvalOff = 0; /* offset to free buffer pos */
* currently: it is a hook for an eventual invocation flag.)
*/
int recursion; /* Infinite recursion counter */
-int rec_recover = sal_True; /* Unwind recursive macros */
+int rec_recover = TRUE; /* Unwind recursive macros */
/*
- * instring is set sal_True when a string is scanned. It modifies the
+ * instring is set TRUE when a string is scanned. It modifies the
* behavior of the "get next character" routine, causing all characters
* to be passed to the caller (except <DEF_MAGIC>). Note especially that
* comments and \<newline> are not removed from the source. (This
@@ -103,8 +103,8 @@ int rec_recover = sal_True; /* Unwind recursive macros */
* instring and inmarcor are parameters to the get() routine which
* were made global for speed.
*/
-int instring = sal_False; /* sal_True if scanning string */
-int inmacro = sal_False; /* sal_True if #defining a macro */
+int instring = FALSE; /* TRUE if scanning string */
+int inmacro = FALSE; /* TRUE if #defining a macro */
/*
* work[] and workp are used to store one piece of text in a temporay
@@ -119,7 +119,7 @@ char work[NWORK + 1]; /* Work buffer */
char *workp; /* Work buffer pointer */
/*
- * keepcomments is set sal_True by the -C option. If sal_True, comments
+ * keepcomments is set TRUE by the -C option. If TRUE, comments
* are written directly to the output stream. This is needed if
* the output from cpp is to be passed to lint (which uses commands
* embedded in comments). cflag contains the permanent state of the
@@ -133,21 +133,21 @@ char *workp; /* Work buffer pointer */
* __FILE__, and __DATE__. If nflag > 1, absolutely no symbols
* are predefined.
*/
-int keepcomments = sal_False; /* Write out comments flag */
-int cflag = sal_False; /* -C option (keep comments) */
-int eflag = sal_False; /* -E option (never fail) */
+int keepcomments = FALSE; /* Write out comments flag */
+int cflag = FALSE; /* -C option (keep comments) */
+int eflag = FALSE; /* -E option (never fail) */
int nflag = 0; /* -N option (no predefines) */
/*
* ifstack[] holds information about nested #if's. It is always
* accessed via *ifptr. The information is as follows:
* WAS_COMPILING state of compiling flag at outer level.
- * ELSE_SEEN set sal_True when #else seen to prevent 2nd #else.
- * TRUE_SEEN set sal_True when #if or #elif succeeds
- * ifstack[0] holds the compiling flag. It is sal_True if compilation
- * is currently enabled. Note that this must be initialized sal_True.
+ * ELSE_SEEN set TRUE when #else seen to prevent 2nd #else.
+ * TRUE_SEEN set TRUE when #if or #elif succeeds
+ * ifstack[0] holds the compiling flag. It is TRUE if compilation
+ * is currently enabled. Note that this must be initialized TRUE.
*/
-char ifstack[BLK_NEST] = { sal_True }; /* #if information */
+char ifstack[BLK_NEST] = { TRUE }; /* #if information */
char *ifptr = ifstack; /* -> current ifstack[] */
/*
@@ -211,7 +211,7 @@ void InitCpp1()
workp = NULL;
for( i = 0; i < BLK_NEST; i++ )
- ifstack[ i ] = sal_True;
+ ifstack[ i ] = TRUE;
ifptr = ifstack;
pCppOut = stdout;
@@ -227,9 +227,9 @@ void InitCpp1()
nEvalOff = 0;
#endif
#endif
- rec_recover = sal_True;
+ rec_recover = TRUE;
infile = NULL;
- instring = inmacro = keepcomments = cflag = eflag = sal_False;
+ instring = inmacro = keepcomments = cflag = eflag = FALSE;
nflag = 0;
incend = incdir;
sharpfilename = NULL;
@@ -426,7 +426,7 @@ void cppmain()
}
/*
* This loop is started "from the top" at the beginning of each line
- * wrongline is set sal_True in many places if it is necessary to write
+ * wrongline is set TRUE in many places if it is necessary to write
* a #line record. (But we don't write them when expanding macros.)
*
* The counter variable has two different uses: at
@@ -446,7 +446,7 @@ void cppmain()
if (c == '\n') /* If line's all blank, */
++counter; /* Do nothing now */
else if (c == '#') { /* Is 1st non-space '#' */
- keepcomments = sal_False; /* Don't pass comments */
+ keepcomments = FALSE; /* Don't pass comments */
counter = control(counter); /* Yes, do a #command */
keepcomments = (cflag && compiling);
}
@@ -542,7 +542,7 @@ void cppmain()
end_line: if (c == '\n') { /* Compiling at EOL? */
PUTCHAR('\n'); /* Output newline, if */
if (infile->fp == NULL) /* Expanding a macro, */
- wrongline = sal_True; /* Output # line later */
+ wrongline = TRUE; /* Output # line later */
}
} /* Continue until EOF */
#ifdef EVALDEFS
@@ -612,5 +612,5 @@ void sharp()
}
}
PUTCHAR('\n');
- wrongline = sal_False;
+ wrongline = FALSE;
}
diff --git a/rsc/source/rscpp/cpp2.c b/rsc/source/rscpp/cpp2.c
index c421308654e5..68d1d2dc72ba 100644
--- a/rsc/source/rscpp/cpp2.c
+++ b/rsc/source/rscpp/cpp2.c
@@ -189,7 +189,7 @@ dump_line: skipnl(); /* Ignore rest of line */
free(infile->progname); /* if it's allocated. */
infile->progname = savestring(tp);
}
- wrongline = sal_True; /* Force output later */
+ wrongline = TRUE; /* Force output later */
break;
case L_include:
@@ -212,9 +212,9 @@ dump_line: skipnl(); /* Ignore rest of line */
*ifptr |= ELSE_SEEN;
if ((*ifptr & WAS_COMPILING) != 0) {
if (compiling || (*ifptr & TRUE_SEEN) != 0)
- compiling = sal_False;
+ compiling = FALSE;
else {
- compiling = sal_True;
+ compiling = TRUE;
}
}
break;
@@ -227,7 +227,7 @@ else_seen_err: cerror("#%s may not follow #else", token);
goto dump_line;
}
if ((*ifptr & (WAS_COMPILING | TRUE_SEEN)) != WAS_COMPILING) {
- compiling = sal_False; /* Done compiling stuff */
+ compiling = FALSE; /* Done compiling stuff */
goto dump_line; /* Skip this clause */
}
doif(L_if);
@@ -248,7 +248,7 @@ nest_err: cerror("#%s must be in an #if", token);
goto dump_line;
}
if (!compiling && (*ifptr & WAS_COMPILING) != 0)
- wrongline = sal_True;
+ wrongline = TRUE;
compiling = ((*ifptr & WAS_COMPILING) != 0);
--ifptr;
break;
@@ -323,7 +323,7 @@ void doif(int hash)
* Process an #if, #ifdef, or #ifndef. The latter two are straightforward,
* while #if needs a subroutine of its own to evaluate the expression.
*
- * doif() is called only if compiling is sal_True. If false, compilation
+ * doif() is called only if compiling is TRUE. If false, compilation
* is always supressed, so we don't need to evaluate anything. This
* supresses unnecessary warnings.
*/
@@ -337,7 +337,7 @@ void doif(int hash)
}
if (hash == L_if) {
unget();
- found = (eval() != 0); /* Evaluate expr, != 0 is sal_True */
+ found = (eval() != 0); /* Evaluate expr, != 0 is TRUE */
hash = L_ifdef; /* #if is now like #ifdef */
}
else {
@@ -346,11 +346,11 @@ void doif(int hash)
found = (lookid(c) != NULL); /* Look for it in symbol table */
}
if (found == (hash == L_ifdef)) {
- compiling = sal_True;
+ compiling = TRUE;
*ifptr |= TRUE_SEEN;
}
else {
- compiling = sal_False;
+ compiling = FALSE;
}
return;
@@ -391,7 +391,7 @@ void doinclude()
if (delim == '<')
delim = '>';
workp = work;
- instring = sal_True; /* Accept all characters */
+ instring = TRUE; /* Accept all characters */
#ifdef CONTROL_COMMENTS_NOT_ALLOWED
while ((c = get()) != '\n' && c != EOF_CHAR)
save(c); /* Put it away. */
@@ -408,7 +408,7 @@ void doinclude()
save(c);
#endif
*workp = EOS; /* Terminate filename */
- instring = sal_False;
+ instring = FALSE;
#if HOST == SYS_VMS
/*
* Assume the default .h filetype.
@@ -439,7 +439,7 @@ openinclude(char* filename, int searchlocal)
* doinclude() above, but was written as a separate subroutine for
* programmer convenience. It searches the list of directories
* and actually opens the file, linking it into the list of
- * active files. Returns sal_True if the file was opened, sal_False
+ * active files. Returns TRUE if the file was opened, FALSE
* if openinclude() fails. No error message is printed.
*/
{
@@ -475,7 +475,7 @@ openinclude(char* filename, int searchlocal)
}
#endif
if (openfile(tmpname))
- return (sal_True);
+ return (TRUE);
}
/*
* Look in any directories specified by -I command line
@@ -502,10 +502,10 @@ openinclude(char* filename, int searchlocal)
sprintf(tmpname, "%s%s", *incptr, filename);
#endif
if (openfile(tmpname))
- return (sal_True);
+ return (TRUE);
}
}
- return (sal_False);
+ return (FALSE);
}
FILE_LOCAL int
@@ -513,26 +513,26 @@ hasdirectory(char* source, char* result)
/*
* If a device or directory is found in the source filename string, the
* node/device/directory part of the string is copied to result and
- * hasdirectory returns sal_True. Else, nothing is copied and it returns sal_False.
+ * hasdirectory returns TRUE. Else, nothing is copied and it returns FALSE.
*/
{
#if HOST == SYS_UNIX
register char *tp;
if ((tp = strrchr(source, '/')) == NULL)
- return (sal_False);
+ return (FALSE);
else {
strncpy(result, source, tp - source + 1);
result[tp - source + 1] = EOS;
- return (sal_True);
+ return (TRUE);
}
#else
#if HOST == SYS_VMS
if (vmsparse(source, NULLST, result)
&& result[0] != EOS)
- return (sal_True);
+ return (TRUE);
else {
- return (sal_False);
+ return (FALSE);
}
#else
/*
@@ -542,11 +542,11 @@ hasdirectory(char* source, char* result)
if ((tp = strrchr(source, ']')) == NULL
&& (tp = strrchr(source, ':')) == NULL)
- return (sal_False);
+ return (FALSE);
else {
strncpy(result, source, tp - source + 1);
result[tp - source + 1] = EOS;
- return (sal_True);
+ return (TRUE);
}
#endif
#endif
@@ -569,7 +569,7 @@ char *result; /* Size is at least NAM$C_MAXRSS + 1 */
/*
* Parse the source string, applying the default (properly, using
* the system parse routine), storing it in result.
- * sal_True if it parsed, sal_False on error.
+ * TRUE if it parsed, FALSE on error.
*
* If defstring is NULL, there are no defaults and result gets
* (just) the node::[directory] part of the string (possibly "")
@@ -617,9 +617,9 @@ char *result; /* Size is at least NAM$C_MAXRSS + 1 */
rp[nam.nam$b_ver] = EOS;
}
}
- return (sal_True);
+ return (TRUE);
}
- return (sal_False);
+ return (FALSE);
}
#endif
diff --git a/rsc/source/rscpp/cpp3.c b/rsc/source/rscpp/cpp3.c
index 02a59efa8ea4..e9c03cdd4874 100644
--- a/rsc/source/rscpp/cpp3.c
+++ b/rsc/source/rscpp/cpp3.c
@@ -69,14 +69,14 @@ openfile(char* filename)
if ( debug || !bDumpDefs )
perror(filename);
#endif
- return (sal_False);
+ return (FALSE);
}
#if OSL_DEBUG_LEVEL > 1
if (debug)
fprintf(stderr, "Reading from \"%s\"\n", filename);
#endif
addfile(fp, filename);
- return (sal_True);
+ return (TRUE);
}
void addfile(FILE* fp, char* filename)
@@ -96,7 +96,7 @@ void addfile(FILE* fp, char* filename)
file->fp = fp; /* Better remember FILE * */
file->buffer[0] = EOS; /* Initialize for first read */
line = 1; /* Working on line 1 now */
- wrongline = sal_True; /* Force out initial #line */
+ wrongline = TRUE; /* Force out initial #line */
}
void setincdirs()
@@ -128,9 +128,9 @@ void setincdirs()
#endif
#if HOST == SYS_RSX
- extern int $$rsts; /* sal_True on RSTS/E */
- extern int $$pos; /* sal_True on PRO-350 P/OS */
- extern int $$vms; /* sal_True on VMS compat. */
+ extern int $$rsts; /* TRUE on RSTS/E */
+ extern int $$pos; /* TRUE on PRO-350 P/OS */
+ extern int $$vms; /* TRUE on VMS compat. */
if ($$pos) { /* P/OS? */
*incend++ = "SY:[ZZDECUSC]"; /* C #includes */
@@ -230,7 +230,7 @@ dooptions(int argc, char** argv)
char *arg;
SIZES *sizp; /* For -S */
int size; /* For -S */
- int isdatum; /* sal_False for -S* */
+ int isdatum; /* FALSE for -S* */
int endtest; /* For -S */
for (i = j = 1; i < argc; i++) {
@@ -246,8 +246,8 @@ dooptions(int argc, char** argv)
c = toupper(c);
switch (c) { /* Command character */
case 'C': /* Keep comments */
- cflag = sal_True;
- keepcomments = sal_True;
+ cflag = TRUE;
+ keepcomments = TRUE;
break;
case 'D': /* Define symbol */
@@ -266,13 +266,13 @@ dooptions(int argc, char** argv)
/*
* Now, save the word and its definition.
*/
- dp = defendel(argv[i] + 2, sal_False);
+ dp = defendel(argv[i] + 2, FALSE);
dp->repl = savestring(ap);
dp->nargs = DEF_NOARGS;
break;
case 'E': /* Ignore non-fatal */
- eflag = sal_True; /* errors. */
+ eflag = TRUE; /* errors. */
break;
case 'I': /* Include directory */
@@ -317,7 +317,7 @@ dooptions(int argc, char** argv)
#if HOST != SYS_UNIX
/* zap_uc(ap);*/
#endif
- if (defendel(ap, sal_True) == NULL)
+ if (defendel(ap, TRUE) == NULL)
cwarn("\"%s\" wasn't defined", ap);
break;
@@ -386,7 +386,7 @@ readoptions(char* filename, char*** pfargv)
if ( debug || !bDumpDefs )
perror(filename);
#endif
- return (sal_False);
+ return (FALSE);
}
do
{
@@ -480,7 +480,7 @@ void initdefines()
if (nflag == 0) {
for (pp = preset; *pp != NULL; pp++) {
if (*pp[0] != EOS) {
- dp = defendel(*pp, sal_False);
+ dp = defendel(*pp, FALSE);
dp->repl = savestring("1");
dp->nargs = DEF_NOARGS;
}
@@ -494,14 +494,14 @@ void initdefines()
*/
if (nflag < 2) {
for (pp = magic, i = DEF_NOARGS; *pp != NULL; pp++) {
- dp = defendel(*pp, sal_False);
+ dp = defendel(*pp, FALSE);
dp->nargs = --i;
}
#if OK_DATE
/*
* Define __DATE__ as today's date.
*/
- dp = defendel("__DATE__", sal_False);
+ dp = defendel("__DATE__", FALSE);
dp->repl = tp = getmem(27);
dp->nargs = DEF_NOARGS;
time( (time_t*)&tvec);
diff --git a/rsc/source/rscpp/cpp4.c b/rsc/source/rscpp/cpp4.c
index 612d6873241d..b8f90ab4f7ed 100644
--- a/rsc/source/rscpp/cpp4.c
+++ b/rsc/source/rscpp/cpp4.c
@@ -91,16 +91,16 @@ void dodefine()
{
register int c;
register DEFBUF *dp; /* -> new definition */
- int isredefine; /* sal_True if redefined */
+ int isredefine; /* TRUE if redefined */
char *old = 0; /* Remember redefined */
if (type[(c = skipws())] != LET)
goto bad_define;
- isredefine = sal_False; /* Set if redefining */
+ isredefine = FALSE; /* Set if redefining */
if ((dp = lookid(c)) == NULL) /* If not known now */
- dp = defendel(token, sal_False); /* Save the name */
+ dp = defendel(token, FALSE); /* Save the name */
else { /* It's known: */
- isredefine = sal_True; /* Remember this fact */
+ isredefine = TRUE; /* Remember this fact */
old = dp->repl; /* Remember replacement */
dp->repl = NULL; /* No replacement now */
}
@@ -132,7 +132,7 @@ void dodefine()
if (type[c] == SPA) /* At whitespace? */
c = skipws(); /* Not any more. */
workp = work; /* Replacement put here */
- inmacro = sal_True; /* Keep \<newline> now */
+ inmacro = TRUE; /* Keep \<newline> now */
while (c != EOF_CHAR && c != '\n') { /* Compile macro body */
#if OK_CONCAT
#if COMMENT_INVISIBLE
@@ -184,7 +184,7 @@ void dodefine()
case BSH: /* Backslash */
save('\\');
if ((c = get()) == '\n')
- wrongline = sal_True;
+ wrongline = TRUE;
save(c);
break;
@@ -204,7 +204,7 @@ void dodefine()
}
c = get();
}
- inmacro = sal_False; /* Stop newline hack */
+ inmacro = FALSE; /* Stop newline hack */
unget(); /* For control check */
if (workp > work && workp[-1] == ' ') /* Drop trailing blank */
workp--;
@@ -234,7 +234,7 @@ void dodefine()
bad_define:
cerror("#define syntax error", NULLST);
- inmacro = sal_False; /* Stop <newline> hack */
+ inmacro = FALSE; /* Stop <newline> hack */
}
void checkparm(int c, DEFBUF* dp)
@@ -285,7 +285,7 @@ register DEFBUF *dp;
* ANSI Standard C language.
*/
save(delim);
- instring = sal_True;
+ instring = TRUE;
while ((c = get()) != delim
&& c != '\n'
&& c != EOF_CHAR) {
@@ -297,7 +297,7 @@ register DEFBUF *dp;
save(get());
}
}
- instring = sal_False;
+ instring = FALSE;
if (c != delim)
cerror("Unterminated string in macro body", NULLST);
save(c);
@@ -349,7 +349,7 @@ void doundef()
cerror("Illegal #undef argument", NULLST);
else {
scanid(c); /* Get name to token[] */
- if (defendel(token, sal_True) == NULL) {
+ if (defendel(token, TRUE) == NULL) {
#ifdef STRICT_UNDEF
cwarn("Symbol \"%s\" not defined in #undef", token);
#endif
@@ -459,7 +459,7 @@ void expand(DEFBUF* tokenp)
if (tokenp->nargs < 0)
cfatal("Bug: Illegal __ macro \"%s\"", tokenp->name);
while ((c = skipws()) == '\n') /* Look for (, skipping */
- wrongline = sal_True; /* spaces and newlines */
+ wrongline = TRUE; /* spaces and newlines */
if (c != '(') {
/*
* If the programmer writes
@@ -491,7 +491,7 @@ void expand(DEFBUF* tokenp)
FILE_LOCAL int
expcollect()
/*
- * Collect the actual parameters for this macro. sal_True if ok.
+ * Collect the actual parameters for this macro. TRUE if ok.
*/
{
register int c;
@@ -499,7 +499,7 @@ expcollect()
for (;;) {
paren = 0; /* Collect next arg. */
while ((c = skipws()) == '\n') /* Skip over whitespace */
- wrongline = sal_True; /* and newlines. */
+ wrongline = TRUE; /* and newlines. */
if (c == ')') { /* At end of all args? */
/*
* Note that there is a guard byte in parm[]
@@ -514,7 +514,7 @@ expcollect()
for (;; c = cget()) { /* Collect arg's bytes */
if (c == EOF_CHAR) {
cerror("end of file within macro argument", NULLST);
- return (sal_False); /* Sorry. */
+ return (FALSE); /* Sorry. */
}
else if (c == '\\') { /* Quote next character */
charput(c); /* Save the \ for later */
@@ -537,7 +537,7 @@ expcollect()
else if (c == ',' && paren == 0) /* Comma delimits args */
break;
else if (c == '\n') /* Newline inside arg? */
- wrongline = sal_True; /* We'll need a #line */
+ wrongline = TRUE; /* We'll need a #line */
charput(c); /* Store this one */
} /* Collect an argument */
charput(EOS); /* Terminate argument */
@@ -546,7 +546,7 @@ expcollect()
fprintf( pCppOut, "parm[%d] = \"%s\"\n", nargs, parlist[nargs - 1]);
#endif
} /* Collect all args. */
- return (sal_True); /* Normal return */
+ return (TRUE); /* Normal return */
}
FILE_LOCAL
diff --git a/rsc/source/rscpp/cpp5.c b/rsc/source/rscpp/cpp5.c
index 7472a462fb15..70f05543c465 100644
--- a/rsc/source/rscpp/cpp5.c
+++ b/rsc/source/rscpp/cpp5.c
@@ -91,7 +91,7 @@ static char opdope[OP_MAX] = {
typedef struct optab {
char op; /* Operator */
char prec; /* Its precedence */
- char skip; /* Short-circuit: sal_True to skip */
+ char skip; /* Short-circuit: TRUE to skip */
} OPTAB;
static int evalue; /* Current value from evallex() */
@@ -222,7 +222,7 @@ eval()
* evaleval Evaluate the current operator, given the values on
* the value stack. Returns a pointer to the (new)
* value stack.
- * For compatiblity with older cpp's, this return returns 1 (sal_True)
+ * For compatiblity with older cpp's, this return returns 1 (TRUE)
* if a syntax error is detected.
*/
{
@@ -609,7 +609,7 @@ nogood: unget();
FILE_LOCAL int
bittest(int value)
/*
- * sal_True if value is zero or exactly one bit is set in value.
+ * TRUE if value is zero or exactly one bit is set in value.
*/
{
#if (4096 & ~(-4096)) == 0
@@ -674,7 +674,7 @@ evalchar(int skip)
register int value;
register int count;
- instring = sal_True;
+ instring = TRUE;
if ((c = cget()) == '\\') {
switch ((c = cget())) {
case 'a': /* New in Standard */
@@ -766,7 +766,7 @@ evalchar(int skip)
value += c;
#endif
}
- instring = sal_False;
+ instring = FALSE;
return (value);
}
diff --git a/rsc/source/rscpp/cpp6.c b/rsc/source/rscpp/cpp6.c
index 209ee4217067..fd2a2a9a0dd7 100644
--- a/rsc/source/rscpp/cpp6.c
+++ b/rsc/source/rscpp/cpp6.c
@@ -44,8 +44,8 @@
* never expanded.
* macroid() reads the next token (C identifier) into token[].
* If it is a #defined macro, it is expanded, and
- * macroid() returns sal_True, otherwise, sal_False.
- * catenate() Does the dirty work of token concatenation, sal_True if it did.
+ * macroid() returns TRUE, otherwise, FALSE.
+ * catenate() Does the dirty work of token concatenation, TRUE if it did.
* scanstring() Reads a string from the input stream, calling
* a user-supplied function for each character.
* This function may be output() to write the
@@ -273,9 +273,9 @@ catenate()
/*
* A token was just read (via macroid).
* If the next character is TOK_SEP, concatenate the next token
- * return sal_True -- which should recall macroid after refreshing
+ * return TRUE -- which should recall macroid after refreshing
* macroid's argument. If it is not TOK_SEP, unget() the character
- * and return sal_False.
+ * and return FALSE.
*/
{
register int c;
@@ -284,7 +284,7 @@ catenate()
#if OK_CONCAT
if (get() != TOK_SEP) { /* Token concatenation */
unget();
- return (sal_False);
+ return (FALSE);
}
else {
token1 = savestring(token); /* Save first token */
@@ -327,10 +327,10 @@ catenate()
*/
free(token1); /* Free up memory */
ungetstring(work); /* Unget the new thing, */
- return (sal_True);
+ return (TRUE);
}
#else
- return (sal_False); /* Not supported */
+ return (FALSE); /* Not supported */
#endif
}
@@ -345,12 +345,12 @@ void (*outfun)() /* BP */
/*
* Scan off a string. Warning if terminated by newline or EOF.
* outfun() outputs the character -- to a buffer if in a macro.
- * sal_True if ok, sal_False if error.
+ * TRUE if ok, FALSE if error.
*/
{
register int c;
- instring = sal_True; /* Don't strip comments */
+ instring = TRUE; /* Don't strip comments */
(*outfun)(delim);
while ((c = get()) != delim
&& c != '\n'
@@ -361,15 +361,15 @@ void (*outfun)() /* BP */
if (c == '\\')
(*outfun)(get());
}
- instring = sal_False;
+ instring = FALSE;
if (c == delim) {
(*outfun)(c);
- return (sal_True);
+ return (TRUE);
}
else {
cerror("Unterminated string", NULLST);
unget();
- return (sal_False);
+ return (FALSE);
}
}
@@ -389,13 +389,13 @@ register void (*outfun)() /* BP */
int expseen; /* 'e' seen in floater */
int signseen; /* '+' or '-' seen */
int octal89; /* For bad octal test */
- int dotflag; /* sal_True if '.' was seen */
+ int dotflag; /* TRUE if '.' was seen */
- expseen = sal_False; /* No exponent seen yet */
- signseen = sal_True; /* No +/- allowed yet */
- octal89 = sal_False; /* No bad octal yet */
+ expseen = FALSE; /* No exponent seen yet */
+ signseen = TRUE; /* No +/- allowed yet */
+ octal89 = FALSE; /* No bad octal yet */
radix = 10; /* Assume decimal */
- if ((dotflag = (c == '.')) != sal_False) { /* . something? */
+ if ((dotflag = (c == '.')) != FALSE) { /* . something? */
(*outfun)('.'); /* Always out the dot */
if (type[(c = get())] != DIG) { /* If not a float numb, */
unget(); /* Rescan strange char */
@@ -420,25 +420,25 @@ register void (*outfun)() /* BP */
if (radix != 16 && (c == 'e' || c == 'E')) {
if (expseen) /* Already saw 'E'? */
break; /* Exit loop, bad nbr. */
- expseen = sal_True; /* Set exponent seen */
- signseen = sal_False; /* We can read '+' now */
+ expseen = TRUE; /* Set exponent seen */
+ signseen = FALSE; /* We can read '+' now */
radix = 10; /* Decimal exponent */
}
else if (radix != 16 && c == '.') {
if (dotflag) /* Saw dot already? */
break; /* Exit loop, two dots */
- dotflag = sal_True; /* Remember the dot */
+ dotflag = TRUE; /* Remember the dot */
radix = 10; /* Decimal fraction */
}
else if (c == '+' || c == '-') { /* 1.0e+10 */
if (signseen) /* Sign in wrong place? */
break; /* Exit loop, not nbr. */
- /* signseen = sal_True; */ /* Remember we saw it */
+ /* signseen = TRUE; */ /* Remember we saw it */
}
else { /* Check the digit */
switch (c) {
case '8': case '9': /* Sometimes wrong */
- octal89 = sal_True; /* Do check later */
+ octal89 = TRUE; /* Do check later */
case '0': case '1': case '2': case '3':
case '4': case '5': case '6': case '7':
break; /* Always ok */
@@ -452,7 +452,7 @@ register void (*outfun)() /* BP */
} /* End of switch */
} /* End general case */
(*outfun)(c); /* Accept the character */
- signseen = sal_True; /* Don't read sign now */
+ signseen = TRUE; /* Don't read sign now */
c = get(); /* Read another char */
} /* End of scan loop */
/*
@@ -481,14 +481,14 @@ done: if (dotflag || expseen) { /* Floating point? */
case 'L':
if (dotflag)
goto nomore;
- dotflag = sal_True;
+ dotflag = TRUE;
break;
case 'u':
case 'U':
if (expseen)
goto nomore;
- expseen = sal_True;
+ expseen = TRUE;
break;
default:
@@ -607,10 +607,10 @@ lookid(int c)
DEFBUF *
defendel(char* name, int delete)
/*
- * Enter this name in the lookup table (delete = sal_False)
- * or delete this name (delete = sal_True).
- * Returns a pointer to the define block (delete = sal_False)
- * Returns NULL if the symbol wasn't defined (delete = sal_True).
+ * Enter this name in the lookup table (delete = FALSE)
+ * or delete this name (delete = TRUE).
+ * Returns a pointer to the define block (delete = FALSE)
+ * Returns NULL if the symbol wasn't defined (delete = TRUE).
*/
{
register DEFBUF *dp;
@@ -839,7 +839,7 @@ newline:
* is skipping over blank lines and will do a
* #line at its convenience.
*/
- wrongline = sal_True; /* Need a #line now */
+ wrongline = TRUE; /* Need a #line now */
}
}
}
@@ -880,11 +880,11 @@ newline:
if (instring) /* Strings just return */
return (c); /* the character. */
else if (c == '/') { /* Comment? */
- instring = sal_True; /* So get() won't loop */
+ instring = TRUE; /* So get() won't loop */
/*MM c++ comments */
/*MM*/ c = get();
/*MM*/ if ((c != '*') && (c != '/')) { /* Next byte '*'? */
- instring = sal_False; /* Nope, no comment */
+ instring = FALSE; /* Nope, no comment */
unget(); /* Push the char. back */
return ('/'); /* Return the slash */
}
@@ -917,7 +917,7 @@ newline:
case '*':
if ((c = get()) != '/') /* If comment doesn't */
goto test; /* end, look at next */
- instring = sal_False; /* End of comment, */
+ instring = FALSE; /* End of comment, */
if (keepcomments) { /* Put out the comment */
cput(c); /* terminator, too */
}
@@ -950,7 +950,7 @@ newline:
case '\n': /* we'll need a #line */
if (!keepcomments)
- wrongline = sal_True; /* later... */
+ wrongline = TRUE; /* later... */
default: /* Anything else is */
break; /* Just a character */
} /* End switch */
@@ -965,7 +965,7 @@ newline:
if( EOF_CHAR == c )
return (EOF_CHAR);
else if( '\n' == c ){
- instring = sal_False; /* End of comment, */
+ instring = FALSE; /* End of comment, */
return( c );
}
}
@@ -973,7 +973,7 @@ newline:
} /* End if in comment */
else if (!inmacro && c == '\\') { /* If backslash, peek */
if ((c = get()) == '\n') { /* for a <nl>. If so, */
- wrongline = sal_True;
+ wrongline = TRUE;
goto newline;
}
else { /* Backslash anything */
diff --git a/rsc/source/rscpp/cppdef.h b/rsc/source/rscpp/cppdef.h
index 196dfbe65cf9..cdbf07766c8f 100644
--- a/rsc/source/rscpp/cppdef.h
+++ b/rsc/source/rscpp/cppdef.h
@@ -26,12 +26,12 @@
************************************************************************/
/*
- * This redundant definition of sal_True and sal_False works around
+ * This redundant definition of TRUE and FALSE works around
* a limitation of Decus C.
*/
-#ifndef sal_True
-#define sal_True 1
-#define sal_False 0
+#ifndef TRUE
+#define TRUE 1
+#define FALSE 0
#endif
/*
@@ -96,16 +96,16 @@
* to be marked "static" even though they are referenced
* by "extern" statements elsewhere.
*
- * OK_DOLLAR Should be set sal_True if $ is a valid alphabetic character
+ * OK_DOLLAR Should be set TRUE if $ is a valid alphabetic character
* in identifiers (default), or zero if $ is invalid.
- * Default is sal_True.
+ * Default is TRUE.
*
- * OK_CONCAT Should be set sal_True if # may be used to concatenate
+ * OK_CONCAT Should be set TRUE if # may be used to concatenate
* tokens in macros (per the Ansi Draft Standard) or
- * sal_False for old-style # processing (needed if cpp is
+ * FALSE for old-style # processing (needed if cpp is
* to process assembler source code).
*
- * OK_DATE Predefines the compilation date if set sal_True.
+ * OK_DATE Predefines the compilation date if set TRUE.
* Not permitted by the Nov. 12, 1984 Draft Standard.
*
* S_CHAR etc. Define the sizeof the basic TARGET machine word types.
@@ -192,14 +192,14 @@
*/
#ifndef OLD_PREPROCESSOR
-#define OLD_PREPROCESSOR sal_False
+#define OLD_PREPROCESSOR FALSE
#endif
#if OLD_PREPROCESSOR
-#define OK_DOLLAR sal_False
-#define OK_CONCAT sal_True
-#define COMMENT_INVISIBLE sal_True
-#define STRING_FORMAL sal_True
+#define OK_DOLLAR FALSE
+#define OK_CONCAT TRUE
+#define COMMENT_INVISIBLE TRUE
+#define STRING_FORMAL TRUE
#define IDMAX 63 /* actually, seems to be unlimited */
#endif
@@ -219,14 +219,14 @@
#endif
/*
- * BIG_ENDIAN is set sal_True on machines (such as the IBM 360 series)
+ * BIG_ENDIAN is set TRUE on machines (such as the IBM 360 series)
* where 'ab' stores 'a' in the high-bits and 'b' in the low-bits.
- * It is set sal_False on machines (such as the PDP-11 and Vax-11)
+ * It is set FALSE on machines (such as the PDP-11 and Vax-11)
* where 'ab' stores 'a' in the low-bits and 'b' in the high-bits.
* (Or is it the other way around?) -- Warning: BIG_ENDIAN code is untested.
*/
#ifndef BIG_ENDIAN
-#define BIG_ENDIAN sal_False
+#define BIG_ENDIAN FALSE
#endif
/*
@@ -236,7 +236,7 @@
* expansions. This was removed from the Draft Ansi Standard.
*/
#ifndef COMMENT_INVISIBLE
-#define COMMENT_INVISIBLE sal_False
+#define COMMENT_INVISIBLE FALSE
#endif
/*
@@ -245,27 +245,27 @@
* Standard and a limited recognition capability added.
*/
#ifndef STRING_FORMAL
-#define STRING_FORMAL sal_False
+#define STRING_FORMAL FALSE
#endif
/*
* OK_DOLLAR enables use of $ as a valid "letter" in identifiers.
* This is a permitted extension to the Ansi Standard and is required
- * for e.g., VMS, RSX-11M, etc. It should be set sal_False if cpp is
+ * for e.g., VMS, RSX-11M, etc. It should be set FALSE if cpp is
* used to preprocess assembler source on Unix systems. OLD_PREPROCESSOR
- * sets OK_DOLLAR sal_False for that reason.
+ * sets OK_DOLLAR FALSE for that reason.
*/
#ifndef OK_DOLLAR
-#define OK_DOLLAR sal_True
+#define OK_DOLLAR TRUE
#endif
/*
* OK_CONCAT enables (one possible implementation of) token concatenation.
* If cpp is used to preprocess Unix assembler source, this should be
- * set sal_False as the concatenation character, #, is used by the assembler.
+ * set FALSE as the concatenation character, #, is used by the assembler.
*/
#ifndef OK_CONCAT
-#define OK_CONCAT sal_True
+#define OK_CONCAT TRUE
#endif
/*
@@ -274,7 +274,7 @@
* by the Draft Ansi Standard.
*/
#ifndef OK_DATE
-#define OK_DATE sal_True
+#define OK_DATE TRUE
#endif
/*
diff --git a/tools/inc/tools/agapi.hxx b/tools/inc/tools/agapi.hxx
index 9c71bd35c6cc..994f0124529a 100644
--- a/tools/inc/tools/agapi.hxx
+++ b/tools/inc/tools/agapi.hxx
@@ -41,7 +41,7 @@ protected:
friend class ChannelList;
AgentItem* pChannelAgent;
- virtual BOOL StartAgent() = 0;
+ virtual sal_Bool StartAgent() = 0;
AgentApi(AgentItem* pAgent) { pChannelAgent = pAgent; }
@@ -51,7 +51,7 @@ public:
virtual void InitAgent() = 0;
virtual void ShutDownAgent() = 0;
- virtual BOOL NewDataPermission(const String& rChannelName) = 0;
+ virtual sal_Bool NewDataPermission(const String& rChannelName) = 0;
virtual void NewData(const String& rChannelName,
const INetURLObject& rURL) = 0;
virtual void NotifyChannelObjFile(const INetURLObject& rURL,
diff --git a/tools/inc/tools/agitem.hxx b/tools/inc/tools/agitem.hxx
index 3177bdffa0a8..ce9ce66df49a 100644
--- a/tools/inc/tools/agitem.hxx
+++ b/tools/inc/tools/agitem.hxx
@@ -43,8 +43,8 @@ public:
virtual AgentApi* GetApi() const = 0;
virtual ChApi* GetChApi() const = 0;
- virtual void SetIsActive(BOOL bNew) = 0;
- virtual BOOL IsActive() const = 0;
+ virtual void SetIsActive(sal_Bool bNew) = 0;
+ virtual sal_Bool IsActive() const = 0;
};
#endif //_AGITEM_HXX
diff --git a/tools/inc/tools/debug.hxx b/tools/inc/tools/debug.hxx
index b8aa1c8b59fe..c257f4f6d485 100644
--- a/tools/inc/tools/debug.hxx
+++ b/tools/inc/tools/debug.hxx
@@ -199,9 +199,9 @@ typedef USHORT DbgChannelId;
*/
TOOLS_DLLPUBLIC DbgChannelId DbgRegisterUserChannel( DbgPrintLine pProc );
-inline BOOL DbgFilterMessage( const char* pMsg )
+inline sal_Bool DbgFilterMessage( const char* pMsg )
{
- return (BOOL)(long) DbgFunc( DBG_FUNC_FILTERMESSAGE, (void*)pMsg );
+ return (sal_Bool)(long) DbgFunc( DBG_FUNC_FILTERMESSAGE, (void*)pMsg );
}
inline int DbgIsAllErrorOut()
diff --git a/tools/inc/tools/dynary.hxx b/tools/inc/tools/dynary.hxx
index 1693be40e435..5efca20cb06e 100644
--- a/tools/inc/tools/dynary.hxx
+++ b/tools/inc/tools/dynary.hxx
@@ -55,15 +55,15 @@ public:
ULONG GetIndex( const void* p ) const
{ return Container::GetPos( p ); }
ULONG GetIndex( const void* p, ULONG nStartIndex,
- BOOL bForward = TRUE ) const
+ sal_Bool bForward = TRUE ) const
{ return Container::GetPos( p, nStartIndex, bForward ); }
DynArray& operator =( const DynArray& rAry )
{ Container::operator =( rAry ); return *this; }
- BOOL operator ==( const DynArray& rAry ) const
+ sal_Bool operator ==( const DynArray& rAry ) const
{ return Container::operator ==( rAry ); }
- BOOL operator !=( const DynArray& rAry ) const
+ sal_Bool operator !=( const DynArray& rAry ) const
{ return Container::operator !=( rAry ); }
};
@@ -92,7 +92,7 @@ public: \
ULONG GetIndex( const Type p ) const \
{ return DynArray::GetIndex( (const void*)p ); } \
ULONG GetIndex( const Type p, ULONG nStartIndex, \
- BOOL bForward = TRUE ) const \
+ sal_Bool bForward = TRUE ) const \
{ return DynArray::GetIndex( (const void*)p, \
nStartIndex, \
bForward ); } \
@@ -101,9 +101,9 @@ public: \
{ DynArray::operator =( rClassName ); \
return *this; } \
\
- BOOL operator ==( const ClassName& rAry ) const \
+ sal_Bool operator ==( const ClassName& rAry ) const \
{ return DynArray::operator ==( rAry ); } \
- BOOL operator !=( const ClassName& rAry ) const \
+ sal_Bool operator !=( const ClassName& rAry ) const \
{ return DynArray::operator !=( rAry ); } \
};
diff --git a/tools/inc/tools/eacopier.hxx b/tools/inc/tools/eacopier.hxx
index c80eeb0d35cc..b046877b3952 100644
--- a/tools/inc/tools/eacopier.hxx
+++ b/tools/inc/tools/eacopier.hxx
@@ -40,7 +40,7 @@ public:
static EA_Copier* Get();
virtual ~EA_Copier();
- virtual BOOL Copy( const SvFileStream& rFrom, const SvFileStream& rTo ) const = 0;
+ virtual sal_Bool Copy( const SvFileStream& rFrom, const SvFileStream& rTo ) const = 0;
};
#endif
diff --git a/tools/inc/tools/postsys.h b/tools/inc/tools/postsys.h
index 3b7e37a4c23b..994f86ae35b5 100644
--- a/tools/inc/tools/postsys.h
+++ b/tools/inc/tools/postsys.h
@@ -33,8 +33,8 @@
#undef PolyPolygon
#undef Polygon
#undef Rectangle
-#undef BYTE
-#undef BOOL
+#undef sal_uInt8
+#undef sal_Bool
#undef DELETE
/* Hilfe-Ids umbenennen */
@@ -232,9 +232,9 @@
extern "C"
{
-WIN_BOOL WINAPI WIN_Rectangle( HDC hDC, int X1, int Y1, int X2, int Y2 );
-WIN_BOOL WINAPI WIN_Polygon( HDC hDC, CONST POINT * ppt, int ncnt );
-WIN_BOOL WINAPI WIN_PolyPolygon( HDC hDC, CONST POINT * ppt, LPINT npcnt, int ncnt );
+ BOOL WINAPI WIN_Rectangle( HDC hDC, int X1, int Y1, int X2, int Y2 );
+ BOOL WINAPI WIN_Polygon( HDC hDC, CONST POINT * ppt, int ncnt );
+ BOOL WINAPI WIN_PolyPolygon( HDC hDC, CONST POINT * ppt, LPINT npcnt, int ncnt );
}
#endif
diff --git a/tools/inc/tools/wintypes.hxx b/tools/inc/tools/wintypes.hxx
index 8f13af8fd842..a9165e8c2179 100644
--- a/tools/inc/tools/wintypes.hxx
+++ b/tools/inc/tools/wintypes.hxx
@@ -34,7 +34,7 @@
// - Window-Types -
// ----------------
-typedef USHORT WindowType;
+typedef sal_uInt16 WindowType;
#define WINDOW_BASE 0x0100
#define WINDOW_FIRST (WINDOW_BASE + 0x30)
#define WINDOW_MESSBOX (WINDOW_FIRST)
@@ -317,7 +317,7 @@ enum TriState { STATE_NOCHECK, STATE_CHECK, STATE_DONTKNOW };
// - ButtonDialog-Types -
// ----------------------
-typedef USHORT StandardButtonType;
+typedef sal_uInt16 StandardButtonType;
#define BUTTON_OK ((StandardButtonType)0)
#define BUTTON_CANCEL ((StandardButtonType)1)
#define BUTTON_YES ((StandardButtonType)2)
diff --git a/vcl/inc/vcl/abstdlg.hxx b/vcl/inc/vcl/abstdlg.hxx
index 1d4e08991bda..dffcb644589a 100644
--- a/vcl/inc/vcl/abstdlg.hxx
+++ b/vcl/inc/vcl/abstdlg.hxx
@@ -41,7 +41,7 @@ class VCL_DLLPUBLIC VclAbstractDialog
{
public:
virtual short Execute() = 0;
- //virtual void Show( BOOL bVisible = TRUE, USHORT nFlags = 0 ) = 0;
+ //virtual void Show( sal_Bool bVisible = sal_True, sal_uInt16 nFlags = 0 ) = 0;
virtual ~VclAbstractDialog();
};
diff --git a/vcl/inc/vcl/accel.h b/vcl/inc/vcl/accel.h
index e726d04e7c99..284868748c89 100644
--- a/vcl/inc/vcl/accel.h
+++ b/vcl/inc/vcl/accel.h
@@ -42,11 +42,11 @@ class Accelerator;
class ImplAccelEntry
{
public:
- USHORT mnId;
+ sal_uInt16 mnId;
KeyCode maKeyCode;
Accelerator* mpAccel;
Accelerator* mpAutoAccel;
- BOOL mbEnabled;
+ sal_Bool mbEnabled;
};
// -----------------
@@ -54,6 +54,6 @@ public:
// -----------------
// in KEYCOD.CXX
-void ImplGetKeyCode( KeyFuncType eFunc, USHORT& rCode1, USHORT& rCode2, USHORT& rCode3, USHORT& rCode4 );
+void ImplGetKeyCode( KeyFuncType eFunc, sal_uInt16& rCode1, sal_uInt16& rCode2, sal_uInt16& rCode3, sal_uInt16& rCode4 );
#endif // _SV_ACCEL_H
diff --git a/vcl/inc/vcl/accel.hxx b/vcl/inc/vcl/accel.hxx
index ad2f03dfd942..511737acc930 100644
--- a/vcl/inc/vcl/accel.hxx
+++ b/vcl/inc/vcl/accel.hxx
@@ -54,17 +54,17 @@ private:
// Werden vom AcceleratorManager gesetzt
KeyCode maCurKeyCode;
- USHORT mnCurId;
- USHORT mnCurRepeat;
- BOOL mbIsCancel;
- BOOL* mpDel;
+ sal_uInt16 mnCurId;
+ sal_uInt16 mnCurRepeat;
+ sal_Bool mbIsCancel;
+ sal_Bool* mpDel;
//#if 0 // _SOLAR__PRIVATE
SAL_DLLPRIVATE void ImplInit();
SAL_DLLPRIVATE void ImplCopyData( ImplAccelData& rAccelData );
SAL_DLLPRIVATE void ImplDeleteData();
- SAL_DLLPRIVATE void ImplInsertAccel( USHORT nItemId, const KeyCode& rKeyCode,
- BOOL bEnable, Accelerator* pAutoAccel );
+ SAL_DLLPRIVATE void ImplInsertAccel( sal_uInt16 nItemId, const KeyCode& rKeyCode,
+ sal_Bool bEnable, Accelerator* pAutoAccel );
SAL_DLLPRIVATE ImplAccelEntry* ImplGetAccelData( const KeyCode& rKeyCode ) const;
//#endif
@@ -82,35 +82,35 @@ public:
virtual void Deactivate();
virtual void Select();
- void InsertItem( USHORT nItemId, const KeyCode& rKeyCode );
+ void InsertItem( sal_uInt16 nItemId, const KeyCode& rKeyCode );
void InsertItem( const ResId& rResId );
- void RemoveItem( USHORT nItemId );
+ void RemoveItem( sal_uInt16 nItemId );
void RemoveItem( const KeyCode rKeyCode );
void Clear();
- USHORT GetCurItemId() const { return mnCurId; }
+ sal_uInt16 GetCurItemId() const { return mnCurId; }
const KeyCode& GetCurKeyCode() const { return maCurKeyCode; }
- USHORT GetCurRepeat() const { return mnCurRepeat; }
- BOOL IsCancel() const { return mbIsCancel; }
-
- USHORT GetItemCount() const;
- USHORT GetItemId( USHORT nPos ) const;
- KeyCode GetItemKeyCode( USHORT nPos ) const;
- USHORT GetItemId( const KeyCode& rKeyCode ) const;
- KeyCode GetKeyCode( USHORT nItemId ) const;
- BOOL IsIdValid( USHORT nItemId ) const;
- BOOL IsKeyCodeValid( const KeyCode rKeyCode ) const;
- BOOL Call( const KeyCode& rKeyCode, USHORT nRepeat = 0 );
-
- void SetAccel( USHORT nItemId, Accelerator* pAccel );
- Accelerator* GetAccel( USHORT nItemId ) const;
+ sal_uInt16 GetCurRepeat() const { return mnCurRepeat; }
+ sal_Bool IsCancel() const { return mbIsCancel; }
+
+ sal_uInt16 GetItemCount() const;
+ sal_uInt16 GetItemId( sal_uInt16 nPos ) const;
+ KeyCode GetItemKeyCode( sal_uInt16 nPos ) const;
+ sal_uInt16 GetItemId( const KeyCode& rKeyCode ) const;
+ KeyCode GetKeyCode( sal_uInt16 nItemId ) const;
+ sal_Bool IsIdValid( sal_uInt16 nItemId ) const;
+ sal_Bool IsKeyCodeValid( const KeyCode rKeyCode ) const;
+ sal_Bool Call( const KeyCode& rKeyCode, sal_uInt16 nRepeat = 0 );
+
+ void SetAccel( sal_uInt16 nItemId, Accelerator* pAccel );
+ Accelerator* GetAccel( sal_uInt16 nItemId ) const;
void SetAccel( const KeyCode rKeyCode, Accelerator* pAccel );
Accelerator* GetAccel( const KeyCode rKeyCode ) const;
- void EnableItem( USHORT nItemId, BOOL bEnable = TRUE );
- BOOL IsItemEnabled( USHORT nItemId ) const;
- void EnableItem( const KeyCode rKeyCode, BOOL bEnable = TRUE );
- BOOL IsItemEnabled( const KeyCode rKeyCode ) const;
+ void EnableItem( sal_uInt16 nItemId, sal_Bool bEnable = sal_True );
+ sal_Bool IsItemEnabled( sal_uInt16 nItemId ) const;
+ void EnableItem( const KeyCode rKeyCode, sal_Bool bEnable = sal_True );
+ sal_Bool IsItemEnabled( const KeyCode rKeyCode ) const;
void SetHelpText( const XubString& rHelpText ) { maHelpStr = rHelpText; }
const XubString& GetHelpText() const { return maHelpStr; }
diff --git a/vcl/inc/vcl/accmgr.hxx b/vcl/inc/vcl/accmgr.hxx
index a60322eac403..553503380b15 100644
--- a/vcl/inc/vcl/accmgr.hxx
+++ b/vcl/inc/vcl/accmgr.hxx
@@ -52,13 +52,13 @@ public:
}
~ImplAccelManager();
- BOOL InsertAccel( Accelerator* pAccel );
+ sal_Bool InsertAccel( Accelerator* pAccel );
void RemoveAccel( Accelerator* pAccel );
- void EndSequence( BOOL bCancel = FALSE );
- void FlushAccel() { EndSequence( TRUE ); }
+ void EndSequence( sal_Bool bCancel = sal_False );
+ void FlushAccel() { EndSequence( sal_True ); }
- BOOL IsAccelKey( const KeyCode& rKeyCode, USHORT nRepeat );
+ sal_Bool IsAccelKey( const KeyCode& rKeyCode, sal_uInt16 nRepeat );
};
#endif // _SV_ACCMGR_HXX
diff --git a/vcl/inc/vcl/alpha.hxx b/vcl/inc/vcl/alpha.hxx
index ef48793cf8ce..909d135ff0b1 100644
--- a/vcl/inc/vcl/alpha.hxx
+++ b/vcl/inc/vcl/alpha.hxx
@@ -54,14 +54,14 @@ public:
AlphaMask();
AlphaMask( const Bitmap& rBitmap );
AlphaMask( const AlphaMask& rAlphaMask );
- AlphaMask( const Size& rSizePixel, BYTE* pEraseTransparency = NULL );
+ AlphaMask( const Size& rSizePixel, sal_uInt8* pEraseTransparency = NULL );
~AlphaMask();
AlphaMask& operator=( const Bitmap& rBitmap );
AlphaMask& operator=( const AlphaMask& rAlphaMask ) { return (AlphaMask&) Bitmap::operator=( rAlphaMask ); }
- BOOL operator!() const { return Bitmap::operator!(); }
- BOOL operator==( const AlphaMask& rAlphaMask ) const { return Bitmap::operator==( rAlphaMask ); }
- BOOL operator!=( const AlphaMask& rAlphaMask ) const { return Bitmap::operator!=( rAlphaMask ); }
+ sal_Bool operator!() const { return Bitmap::operator!(); }
+ sal_Bool operator==( const AlphaMask& rAlphaMask ) const { return Bitmap::operator==( rAlphaMask ); }
+ sal_Bool operator!=( const AlphaMask& rAlphaMask ) const { return Bitmap::operator!=( rAlphaMask ); }
const MapMode& GetPrefMapMode() const { return Bitmap::GetPrefMapMode(); }
void SetPrefMapMode( const MapMode& rMapMode ) { Bitmap::SetPrefMapMode( rMapMode ); }
@@ -72,26 +72,26 @@ public:
Size GetSizePixel() const { return Bitmap::GetSizePixel(); }
void SetSizePixel( const Size& rNewSize ) { Bitmap::SetSizePixel( rNewSize ); }
- ULONG GetSizeBytes() const { return Bitmap::GetSizeBytes(); }
- ULONG GetChecksum() const { return Bitmap::GetChecksum(); }
+ sal_uIntPtr GetSizeBytes() const { return Bitmap::GetSizeBytes(); }
+ sal_uIntPtr GetChecksum() const { return Bitmap::GetChecksum(); }
Bitmap GetBitmap() const;
public:
- BOOL Crop( const Rectangle& rRectPixel );
- BOOL Expand( ULONG nDX, ULONG nDY, BYTE* pInitTransparency = NULL );
- BOOL CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectSrc, const AlphaMask* pAlphaSrc = NULL );
- BOOL Erase( BYTE cTransparency );
- BOOL Invert();
- BOOL Mirror( ULONG nMirrorFlags );
- BOOL Scale( const Size& rNewSize, ULONG nScaleFlag = BMP_SCALE_FAST );
- BOOL Scale( const double& rScaleX, const double& rScaleY, ULONG nScaleFlag = BMP_SCALE_FAST );
- BOOL Rotate( long nAngle10, BYTE cFillTransparency );
- BOOL Replace( const Bitmap& rMask, BYTE rReplaceTransparency );
- BOOL Replace( BYTE cSearchTransparency, BYTE cReplaceTransparency, ULONG nTol = 0UL );
- BOOL Replace( BYTE* pSearchTransparencies, BYTE* pReplaceTransparencies,
- ULONG nColorCount, ULONG* pTols = NULL );
+ sal_Bool Crop( const Rectangle& rRectPixel );
+ sal_Bool Expand( sal_uIntPtr nDX, sal_uIntPtr nDY, sal_uInt8* pInitTransparency = NULL );
+ sal_Bool CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectSrc, const AlphaMask* pAlphaSrc = NULL );
+ sal_Bool Erase( sal_uInt8 cTransparency );
+ sal_Bool Invert();
+ sal_Bool Mirror( sal_uIntPtr nMirrorFlags );
+ sal_Bool Scale( const Size& rNewSize, sal_uIntPtr nScaleFlag = BMP_SCALE_FAST );
+ sal_Bool Scale( const double& rScaleX, const double& rScaleY, sal_uIntPtr nScaleFlag = BMP_SCALE_FAST );
+ sal_Bool Rotate( long nAngle10, sal_uInt8 cFillTransparency );
+ sal_Bool Replace( const Bitmap& rMask, sal_uInt8 rReplaceTransparency );
+ sal_Bool Replace( sal_uInt8 cSearchTransparency, sal_uInt8 cReplaceTransparency, sal_uIntPtr nTol = 0UL );
+ sal_Bool Replace( sal_uInt8* pSearchTransparencies, sal_uInt8* pReplaceTransparencies,
+ sal_uIntPtr nColorCount, sal_uIntPtr* pTols = NULL );
public:
@@ -101,8 +101,8 @@ public:
public:
- BOOL Read( SvStream& rIStm, BOOL bFileHeader = TRUE ) { return Bitmap::Read( rIStm, bFileHeader ); }
- BOOL Write( SvStream& rOStm, BOOL bCompressed = TRUE, BOOL bFileHeader = TRUE ) const { return Bitmap::Write( rOStm, bCompressed, bFileHeader ); }
+ sal_Bool Read( SvStream& rIStm, sal_Bool bFileHeader = sal_True ) { return Bitmap::Read( rIStm, bFileHeader ); }
+ sal_Bool Write( SvStream& rOStm, sal_Bool bCompressed = sal_True, sal_Bool bFileHeader = sal_True ) const { return Bitmap::Write( rOStm, bCompressed, bFileHeader ); }
friend VCL_DLLPUBLIC SvStream& operator<<( SvStream& rOStm, const BitmapEx& rBitmapEx );
friend VCL_DLLPUBLIC SvStream& operator>>( SvStream& rIStm, BitmapEx& rBitmapEx );
diff --git a/vcl/inc/vcl/animate.hxx b/vcl/inc/vcl/animate.hxx
index fc793fc12714..979aef93b967 100644
--- a/vcl/inc/vcl/animate.hxx
+++ b/vcl/inc/vcl/animate.hxx
@@ -70,7 +70,7 @@ struct VCL_DLLPUBLIC AnimationBitmap
Size aSizePix;
long nWait;
Disposal eDisposal;
- BOOL bUserInput;
+ sal_Bool bUserInput;
AnimationBitmap() {}
AnimationBitmap( const BitmapEx& rBmpEx, const Point& rPosPix,
@@ -81,9 +81,9 @@ struct VCL_DLLPUBLIC AnimationBitmap
aSizePix ( rSizePix ),
nWait ( _nWait ),
eDisposal ( _eDisposal ),
- bUserInput ( FALSE ) {}
+ bUserInput ( sal_False ) {}
- BOOL operator==( const AnimationBitmap& rAnimBmp ) const
+ sal_Bool operator==( const AnimationBitmap& rAnimBmp ) const
{
return( rAnimBmp.aBmpEx == aBmpEx &&
rAnimBmp.aPosPix == aPosPix &&
@@ -93,9 +93,9 @@ struct VCL_DLLPUBLIC AnimationBitmap
rAnimBmp.bUserInput == bUserInput );
}
- BOOL operator!=( const AnimationBitmap& rAnimBmp ) const { return !( *this == rAnimBmp ); }
+ sal_Bool operator!=( const AnimationBitmap& rAnimBmp ) const { return !( *this == rAnimBmp ); }
- BOOL IsEqual( const AnimationBitmap& rAnimBmp ) const
+ sal_Bool IsEqual( const AnimationBitmap& rAnimBmp ) const
{
return( rAnimBmp.aPosPix == aPosPix &&
rAnimBmp.aSizePix == aSizePix &&
@@ -105,7 +105,7 @@ struct VCL_DLLPUBLIC AnimationBitmap
rAnimBmp.aBmpEx.IsEqual( aBmpEx ) );
}
- ULONG GetChecksum() const;
+ sal_uIntPtr GetChecksum() const;
};
// -------------------
@@ -124,14 +124,14 @@ struct AInfo
OutputDevice* pOutDev;
void* pViewData;
long nExtraData;
- BOOL bWithSize;
- BOOL bPause;
+ sal_Bool bWithSize;
+ sal_Bool bPause;
AInfo() : pOutDev( NULL ),
pViewData( NULL ),
nExtraData( 0L ),
- bWithSize( FALSE ),
- bPause( FALSE ) {}
+ bWithSize( sal_False ),
+ bPause( sal_False ) {}
};
// -------------------
@@ -140,7 +140,7 @@ struct AInfo
class VCL_DLLPUBLIC Animation
{
- SAL_DLLPRIVATE static ULONG mnAnimCount;
+ SAL_DLLPRIVATE static sal_uIntPtr mnAnimCount;
List maList;
List maAInfoList;
@@ -155,22 +155,22 @@ class VCL_DLLPUBLIC Animation
long mnPos;
Disposal meLastDisposal;
CycleMode meCycleMode;
- BOOL mbFirst;
- BOOL mbIsInAnimation;
- BOOL mbWithSize;
- BOOL mbLoopTerminated;
- BOOL mbIsWaiting;
+ sal_Bool mbFirst;
+ sal_Bool mbIsInAnimation;
+ sal_Bool mbWithSize;
+ sal_Bool mbLoopTerminated;
+ sal_Bool mbIsWaiting;
//#if 0 // _SOLAR__PRIVATE
- SAL_DLLPRIVATE void ImplRestartTimer( ULONG nTimeout );
+ SAL_DLLPRIVATE void ImplRestartTimer( sal_uIntPtr nTimeout );
DECL_DLLPRIVATE_LINK( ImplTimeoutHdl, Timer* );
public:
SAL_DLLPRIVATE static void ImplIncAnimCount() { mnAnimCount++; }
SAL_DLLPRIVATE static void ImplDecAnimCount() { mnAnimCount--; }
- SAL_DLLPRIVATE ULONG ImplGetCurPos() const { return mnPos; }
+ SAL_DLLPRIVATE sal_uIntPtr ImplGetCurPos() const { return mnPos; }
//#endif
@@ -180,28 +180,28 @@ public:
~Animation();
Animation& operator=( const Animation& rAnimation );
- BOOL operator==( const Animation& rAnimation ) const;
- BOOL operator!=( const Animation& rAnimation ) const { return !(*this==rAnimation); }
+ sal_Bool operator==( const Animation& rAnimation ) const;
+ sal_Bool operator!=( const Animation& rAnimation ) const { return !(*this==rAnimation); }
- BOOL IsEqual( const Animation& rAnimation ) const;
+ sal_Bool IsEqual( const Animation& rAnimation ) const;
- BOOL IsEmpty() const;
+ sal_Bool IsEmpty() const;
void SetEmpty();
void Clear();
- BOOL Start( OutputDevice* pOutDev, const Point& rDestPt, long nExtraData = 0,
+ sal_Bool Start( OutputDevice* pOutDev, const Point& rDestPt, long nExtraData = 0,
OutputDevice* pFirstFrameOutDev = NULL );
- BOOL Start( OutputDevice* pOutDev, const Point& rDestPt, const Size& rDestSz, long nExtraData = 0,
+ sal_Bool Start( OutputDevice* pOutDev, const Point& rDestPt, const Size& rDestSz, long nExtraData = 0,
OutputDevice* pFirstFrameOutDev = NULL );
void Stop( OutputDevice* pOutDev = NULL, long nExtraData = 0 );
void Draw( OutputDevice* pOutDev, const Point& rDestPt ) const;
void Draw( OutputDevice* pOutDev, const Point& rDestPt, const Size& rDestSz ) const;
- BOOL IsInAnimation() const { return mbIsInAnimation; }
- BOOL IsTransparent() const;
- BOOL IsTerminated() const { return mbLoopTerminated; }
+ sal_Bool IsInAnimation() const { return mbIsInAnimation; }
+ sal_Bool IsTransparent() const;
+ sal_Bool IsTerminated() const { return mbLoopTerminated; }
const Size& GetDisplaySizePixel() const { return maGlobalSize; }
void SetDisplaySizePixel( const Size& rSize ) { maGlobalSize = rSize; }
@@ -209,8 +209,8 @@ public:
const BitmapEx& GetBitmapEx() const { return maBitmapEx; }
void SetBitmapEx( const BitmapEx& rBmpEx ) { maBitmapEx = rBmpEx; }
- ULONG GetLoopCount() const { return mnLoopCount; }
- void SetLoopCount( const ULONG nLoopCount );
+ sal_uIntPtr GetLoopCount() const { return mnLoopCount; }
+ void SetLoopCount( const sal_uIntPtr nLoopCount );
void ResetLoopCount();
void SetCycleMode( CycleMode eMode );
@@ -219,31 +219,31 @@ public:
void SetNotifyHdl( const Link& rLink ) { maNotifyLink = rLink; }
const Link& GetNotifyHdl() const { return maNotifyLink; }
- USHORT Count() const { return (USHORT) maList.Count(); }
- BOOL Insert( const AnimationBitmap& rAnimationBitmap );
- const AnimationBitmap& Get( USHORT nAnimation ) const;
- void Replace( const AnimationBitmap& rNewAnimationBmp, USHORT nAnimation );
+ sal_uInt16 Count() const { return (sal_uInt16) maList.Count(); }
+ sal_Bool Insert( const AnimationBitmap& rAnimationBitmap );
+ const AnimationBitmap& Get( sal_uInt16 nAnimation ) const;
+ void Replace( const AnimationBitmap& rNewAnimationBmp, sal_uInt16 nAnimation );
List* GetAInfoList() { return &maAInfoList; }
- ULONG GetSizeBytes() const;
- ULONG GetChecksum() const;
+ sal_uIntPtr GetSizeBytes() const;
+ sal_uIntPtr GetChecksum() const;
public:
- BOOL Convert( BmpConversion eConversion );
- BOOL ReduceColors( USHORT nNewColorCount,
+ sal_Bool Convert( BmpConversion eConversion );
+ sal_Bool ReduceColors( sal_uInt16 nNewColorCount,
BmpReduce eReduce = BMP_REDUCE_SIMPLE );
- BOOL Invert();
- BOOL Mirror( ULONG nMirrorFlags );
- BOOL Dither( ULONG nDitherFlags = BMP_DITHER_MATRIX );
- BOOL Adjust( short nLuminancePercent = 0,
+ sal_Bool Invert();
+ sal_Bool Mirror( sal_uIntPtr nMirrorFlags );
+ sal_Bool Dither( sal_uIntPtr nDitherFlags = BMP_DITHER_MATRIX );
+ sal_Bool Adjust( short nLuminancePercent = 0,
short nContrastPercent = 0,
short nChannelRPercent = 0,
short nChannelGPercent = 0,
short nChannelBPercent = 0,
double fGamma = 1.0,
- BOOL bInvert = FALSE );
- BOOL Filter( BmpFilter eFilter,
+ sal_Bool bInvert = sal_False );
+ sal_Bool Filter( BmpFilter eFilter,
const BmpFilterParam* pFilterParam = NULL,
const Link* pProgress = NULL );
diff --git a/vcl/inc/vcl/apptypes.hxx b/vcl/inc/vcl/apptypes.hxx
index a2d02dcbb066..c945209e5016 100644
--- a/vcl/inc/vcl/apptypes.hxx
+++ b/vcl/inc/vcl/apptypes.hxx
@@ -36,14 +36,14 @@
// - Application-Types -
// ---------------------
-#define EXC_RSCNOTLOADED ((USHORT)0x0100)
-#define EXC_SYSOBJNOTCREATED ((USHORT)0x0200)
-#define EXC_SYSTEM ((USHORT)0x0300)
-#define EXC_DISPLAY ((USHORT)0x0400)
-#define EXC_REMOTE ((USHORT)0x0500)
-#define EXC_USER ((USHORT)0x1000)
-#define EXC_MAJORTYPE ((USHORT)0xFF00)
-#define EXC_MINORTYPE ((USHORT)0x00FF)
+#define EXC_RSCNOTLOADED ((sal_uInt16)0x0100)
+#define EXC_SYSOBJNOTCREATED ((sal_uInt16)0x0200)
+#define EXC_SYSTEM ((sal_uInt16)0x0300)
+#define EXC_DISPLAY ((sal_uInt16)0x0400)
+#define EXC_REMOTE ((sal_uInt16)0x0500)
+#define EXC_USER ((sal_uInt16)0x1000)
+#define EXC_MAJORTYPE ((sal_uInt16)0xFF00)
+#define EXC_MINORTYPE ((sal_uInt16)0x00FF)
#define UNIQUEID_SV_BEGIN 64000
@@ -71,9 +71,9 @@ public:
// - UserActive -
// --------------
-#define USERACTIVE_MOUSEDRAG ((USHORT)0x0001)
-#define USERACTIVE_INPUT ((USHORT)0x0002)
-#define USERACTIVE_MODALDIALOG ((USHORT)0x0004)
-#define USERACTIVE_ALL ((USHORT)0xFFFF)
+#define USERACTIVE_MOUSEDRAG ((sal_uInt16)0x0001)
+#define USERACTIVE_INPUT ((sal_uInt16)0x0002)
+#define USERACTIVE_MODALDIALOG ((sal_uInt16)0x0004)
+#define USERACTIVE_ALL ((sal_uInt16)0xFFFF)
#endif // _VCL_APPTYPES_HXX
diff --git a/vcl/inc/vcl/bitmap.hxx b/vcl/inc/vcl/bitmap.hxx
index 7483f54014a4..be0d8720e333 100644
--- a/vcl/inc/vcl/bitmap.hxx
+++ b/vcl/inc/vcl/bitmap.hxx
@@ -164,27 +164,27 @@ class VCL_DLLPUBLIC BmpFilterParam
private:
BmpFilter meFilter;
- ULONG mnProgressStart;
- ULONG mnProgressEnd;
+ sal_uIntPtr mnProgressStart;
+ sal_uIntPtr mnProgressEnd;
public:
struct MosaicTileSize
{
- ULONG mnTileWidth;
- ULONG mnTileHeight;
+ sal_uIntPtr mnTileWidth;
+ sal_uIntPtr mnTileHeight;
};
struct EmbossAngles
{
- USHORT mnAzimuthAngle100;
- USHORT mnElevationAngle100;
+ sal_uInt16 mnAzimuthAngle100;
+ sal_uInt16 mnElevationAngle100;
};
private:
union
{
- USHORT mnSepiaPercent;
- BYTE mcSolarGreyThreshold;
+ sal_uInt16 mnSepiaPercent;
+ sal_uInt8 mcSolarGreyThreshold;
MosaicTileSize maMosaicTileSize;
EmbossAngles maEmbossAngles;
@@ -192,25 +192,25 @@ private:
public:
- BmpFilterParam( ULONG nProgressStart = 0, ULONG nProgressEnd = 0 ) :
+ BmpFilterParam( sal_uIntPtr nProgressStart = 0, sal_uIntPtr nProgressEnd = 0 ) :
meFilter( BMP_FILTER_UNKNOWN ), mnProgressStart( nProgressStart ), mnProgressEnd( nProgressEnd ) {}
- BmpFilterParam( BYTE cSolarGreyThreshold, ULONG nProgressStart = 0, ULONG nProgressEnd = 0 ) :
+ BmpFilterParam( sal_uInt8 cSolarGreyThreshold, sal_uIntPtr nProgressStart = 0, sal_uIntPtr nProgressEnd = 0 ) :
meFilter( BMP_FILTER_SOLARIZE ), mnProgressStart( nProgressStart ), mnProgressEnd( nProgressEnd ),
mcSolarGreyThreshold( cSolarGreyThreshold ) {}
- BmpFilterParam( USHORT nSepiaPercent, ULONG nProgressStart = 0, ULONG nProgressEnd = 0 ) :
+ BmpFilterParam( sal_uInt16 nSepiaPercent, sal_uIntPtr nProgressStart = 0, sal_uIntPtr nProgressEnd = 0 ) :
meFilter( BMP_FILTER_SEPIA ), mnProgressStart( nProgressStart ), mnProgressEnd( nProgressEnd ),
mnSepiaPercent( nSepiaPercent ) {}
- BmpFilterParam( const Size& rMosaicTileSize, ULONG nProgressStart = 0, ULONG nProgressEnd = 0 ) :
+ BmpFilterParam( const Size& rMosaicTileSize, sal_uIntPtr nProgressStart = 0, sal_uIntPtr nProgressEnd = 0 ) :
meFilter( BMP_FILTER_MOSAIC ), mnProgressStart( nProgressStart ), mnProgressEnd( nProgressEnd )
{
maMosaicTileSize.mnTileWidth = rMosaicTileSize.Width();
maMosaicTileSize.mnTileHeight= rMosaicTileSize.Height();
}
- BmpFilterParam( USHORT nEmbossAzimuthAngle100, USHORT nEmbossElevationAngle100,
- ULONG nProgressStart = 0, ULONG nProgressEnd = 0 ) :
+ BmpFilterParam( sal_uInt16 nEmbossAzimuthAngle100, sal_uInt16 nEmbossElevationAngle100,
+ sal_uIntPtr nProgressStart = 0, sal_uIntPtr nProgressEnd = 0 ) :
meFilter( BMP_FILTER_EMBOSS_GREY ), mnProgressStart( nProgressStart ), mnProgressEnd( nProgressEnd )
{
maEmbossAngles.mnAzimuthAngle100 = nEmbossAzimuthAngle100;
@@ -267,46 +267,46 @@ public:
SAL_DLLPRIVATE void ImplSetImpBitmap( ImpBitmap* pImpBmp );
SAL_DLLPRIVATE void ImplAssignWithSize( const Bitmap& rBitmap );
- SAL_DLLPRIVATE static BOOL ImplReadDIB( SvStream& rIStm, Bitmap& rBmp, ULONG nOffset );
- SAL_DLLPRIVATE static BOOL ImplReadDIBFileHeader( SvStream& rIStm, ULONG& rOffset );
- SAL_DLLPRIVATE static BOOL ImplReadDIBInfoHeader( SvStream& rIStm, DIBInfoHeader& rHeader, sal_Bool& bTopDown );
- SAL_DLLPRIVATE static BOOL ImplReadDIBPalette( SvStream& rIStm, BitmapWriteAccess& rAcc, BOOL bQuad );
- SAL_DLLPRIVATE static BOOL ImplReadDIBBits( SvStream& rIStm, DIBInfoHeader& rHeader, BitmapWriteAccess& rAcc, sal_Bool bTopDown );
- SAL_DLLPRIVATE BOOL ImplWriteDIB( SvStream& rOStm, BitmapReadAccess& rAcc, BOOL bCompressed ) const;
- SAL_DLLPRIVATE static BOOL ImplWriteDIBFileHeader( SvStream& rOStm, BitmapReadAccess& rAcc );
- SAL_DLLPRIVATE static BOOL ImplWriteDIBPalette( SvStream& rOStm, BitmapReadAccess& rAcc );
- SAL_DLLPRIVATE static BOOL ImplWriteDIBBits( SvStream& rOStm, BitmapReadAccess& rAcc,
- ULONG nCompression, sal_uInt32& rImageSize );
- SAL_DLLPRIVATE static void ImplDecodeRLE( BYTE* pBuffer, DIBInfoHeader& rHeader,
- BitmapWriteAccess& rAcc, BOOL bRLE4 );
- SAL_DLLPRIVATE static BOOL ImplWriteRLE( SvStream& rOStm, BitmapReadAccess& rAcc, BOOL bRLE4 );
-
- SAL_DLLPRIVATE BOOL ImplScaleFast( const double& rScaleX, const double& rScaleY );
- SAL_DLLPRIVATE BOOL ImplScaleInterpolate( const double& rScaleX, const double& rScaleY );
- SAL_DLLPRIVATE BOOL ImplMakeMono( BYTE cThreshold );
- SAL_DLLPRIVATE BOOL ImplMakeMonoDither();
- SAL_DLLPRIVATE BOOL ImplMakeGreyscales( USHORT nGreyscales );
- SAL_DLLPRIVATE BOOL ImplConvertUp( USHORT nBitCount, Color* pExtColor = NULL );
- SAL_DLLPRIVATE BOOL ImplConvertDown( USHORT nBitCount, Color* pExtColor = NULL );
- SAL_DLLPRIVATE BOOL ImplConvertGhosted();
- SAL_DLLPRIVATE BOOL ImplDitherMatrix();
- SAL_DLLPRIVATE BOOL ImplDitherFloyd();
- SAL_DLLPRIVATE BOOL ImplDitherFloyd16();
- SAL_DLLPRIVATE BOOL ImplReduceSimple( USHORT nColorCount );
- SAL_DLLPRIVATE BOOL ImplReducePopular( USHORT nColorCount );
- SAL_DLLPRIVATE BOOL ImplReduceMedian( USHORT nColorCount );
- SAL_DLLPRIVATE void ImplMedianCut( ULONG* pColBuf, BitmapPalette& rPal,
+ SAL_DLLPRIVATE static sal_Bool ImplReadDIB( SvStream& rIStm, Bitmap& rBmp, sal_uIntPtr nOffset );
+ SAL_DLLPRIVATE static sal_Bool ImplReadDIBFileHeader( SvStream& rIStm, sal_uIntPtr& rOffset );
+ SAL_DLLPRIVATE static sal_Bool ImplReadDIBInfoHeader( SvStream& rIStm, DIBInfoHeader& rHeader, sal_Bool& bTopDown );
+ SAL_DLLPRIVATE static sal_Bool ImplReadDIBPalette( SvStream& rIStm, BitmapWriteAccess& rAcc, sal_Bool bQuad );
+ SAL_DLLPRIVATE static sal_Bool ImplReadDIBBits( SvStream& rIStm, DIBInfoHeader& rHeader, BitmapWriteAccess& rAcc, sal_Bool bTopDown );
+ SAL_DLLPRIVATE sal_Bool ImplWriteDIB( SvStream& rOStm, BitmapReadAccess& rAcc, sal_Bool bCompressed ) const;
+ SAL_DLLPRIVATE static sal_Bool ImplWriteDIBFileHeader( SvStream& rOStm, BitmapReadAccess& rAcc );
+ SAL_DLLPRIVATE static sal_Bool ImplWriteDIBPalette( SvStream& rOStm, BitmapReadAccess& rAcc );
+ SAL_DLLPRIVATE static sal_Bool ImplWriteDIBBits( SvStream& rOStm, BitmapReadAccess& rAcc,
+ sal_uIntPtr nCompression, sal_uInt32& rImageSize );
+ SAL_DLLPRIVATE static void ImplDecodeRLE( sal_uInt8* pBuffer, DIBInfoHeader& rHeader,
+ BitmapWriteAccess& rAcc, sal_Bool bRLE4 );
+ SAL_DLLPRIVATE static sal_Bool ImplWriteRLE( SvStream& rOStm, BitmapReadAccess& rAcc, sal_Bool bRLE4 );
+
+ SAL_DLLPRIVATE sal_Bool ImplScaleFast( const double& rScaleX, const double& rScaleY );
+ SAL_DLLPRIVATE sal_Bool ImplScaleInterpolate( const double& rScaleX, const double& rScaleY );
+ SAL_DLLPRIVATE sal_Bool ImplMakeMono( sal_uInt8 cThreshold );
+ SAL_DLLPRIVATE sal_Bool ImplMakeMonoDither();
+ SAL_DLLPRIVATE sal_Bool ImplMakeGreyscales( sal_uInt16 nGreyscales );
+ SAL_DLLPRIVATE sal_Bool ImplConvertUp( sal_uInt16 nBitCount, Color* pExtColor = NULL );
+ SAL_DLLPRIVATE sal_Bool ImplConvertDown( sal_uInt16 nBitCount, Color* pExtColor = NULL );
+ SAL_DLLPRIVATE sal_Bool ImplConvertGhosted();
+ SAL_DLLPRIVATE sal_Bool ImplDitherMatrix();
+ SAL_DLLPRIVATE sal_Bool ImplDitherFloyd();
+ SAL_DLLPRIVATE sal_Bool ImplDitherFloyd16();
+ SAL_DLLPRIVATE sal_Bool ImplReduceSimple( sal_uInt16 nColorCount );
+ SAL_DLLPRIVATE sal_Bool ImplReducePopular( sal_uInt16 nColorCount );
+ SAL_DLLPRIVATE sal_Bool ImplReduceMedian( sal_uInt16 nColorCount );
+ SAL_DLLPRIVATE void ImplMedianCut( sal_uIntPtr* pColBuf, BitmapPalette& rPal,
long nR1, long nR2, long nG1, long nG2, long nB1, long nB2,
long nColors, long nPixels, long& rIndex );
- SAL_DLLPRIVATE BOOL ImplConvolute3( const long* pMatrix, long nDivisor,
+ SAL_DLLPRIVATE sal_Bool ImplConvolute3( const long* pMatrix, long nDivisor,
const BmpFilterParam* pFilterParam, const Link* pProgress );
- SAL_DLLPRIVATE BOOL ImplMedianFilter( const BmpFilterParam* pFilterParam, const Link* pProgress );
- SAL_DLLPRIVATE BOOL ImplSobelGrey( const BmpFilterParam* pFilterParam, const Link* pProgress );
- SAL_DLLPRIVATE BOOL ImplEmbossGrey( const BmpFilterParam* pFilterParam, const Link* pProgress );
- SAL_DLLPRIVATE BOOL ImplSolarize( const BmpFilterParam* pFilterParam, const Link* pProgress );
- SAL_DLLPRIVATE BOOL ImplSepia( const BmpFilterParam* pFilterParam, const Link* pProgress );
- SAL_DLLPRIVATE BOOL ImplMosaic( const BmpFilterParam* pFilterParam, const Link* pProgress );
- SAL_DLLPRIVATE BOOL ImplPopArt( const BmpFilterParam* pFilterParam, const Link* pProgress );
+ SAL_DLLPRIVATE sal_Bool ImplMedianFilter( const BmpFilterParam* pFilterParam, const Link* pProgress );
+ SAL_DLLPRIVATE sal_Bool ImplSobelGrey( const BmpFilterParam* pFilterParam, const Link* pProgress );
+ SAL_DLLPRIVATE sal_Bool ImplEmbossGrey( const BmpFilterParam* pFilterParam, const Link* pProgress );
+ SAL_DLLPRIVATE sal_Bool ImplSolarize( const BmpFilterParam* pFilterParam, const Link* pProgress );
+ SAL_DLLPRIVATE sal_Bool ImplSepia( const BmpFilterParam* pFilterParam, const Link* pProgress );
+ SAL_DLLPRIVATE sal_Bool ImplMosaic( const BmpFilterParam* pFilterParam, const Link* pProgress );
+ SAL_DLLPRIVATE sal_Bool ImplPopArt( const BmpFilterParam* pFilterParam, const Link* pProgress );
//#endif // PRIVATE
@@ -314,20 +314,20 @@ public:
Bitmap();
Bitmap( const Bitmap& rBitmap );
- Bitmap( const Size& rSizePixel, USHORT nBitCount, const BitmapPalette* pPal = NULL );
+ Bitmap( const Size& rSizePixel, sal_uInt16 nBitCount, const BitmapPalette* pPal = NULL );
Bitmap( const ResId& rResId );
Bitmap( SalBitmap* pSalBitmap );
~Bitmap();
Bitmap& operator=( const Bitmap& rBitmap );
- inline BOOL operator!() const;
- inline BOOL operator==( const Bitmap& rBitmap ) const;
- inline BOOL operator!=( const Bitmap& rBitmap ) const;
+ inline sal_Bool operator!() const;
+ inline sal_Bool operator==( const Bitmap& rBitmap ) const;
+ inline sal_Bool operator!=( const Bitmap& rBitmap ) const;
- inline BOOL IsSameInstance( const Bitmap& rBmp ) const;
- BOOL IsEqual( const Bitmap& rBmp ) const;
+ inline sal_Bool IsSameInstance( const Bitmap& rBmp ) const;
+ sal_Bool IsEqual( const Bitmap& rBmp ) const;
- inline BOOL IsEmpty() const;
+ inline sal_Bool IsEmpty() const;
void SetEmpty();
inline const MapMode& GetPrefMapMode() const;
@@ -348,20 +348,20 @@ public:
void SetSourceSizePixel( const Size& );
- USHORT GetBitCount() const;
- inline ULONG GetColorCount() const;
- inline ULONG GetSizeBytes() const;
- BOOL HasGreyPalette() const;
+ sal_uInt16 GetBitCount() const;
+ inline sal_uIntPtr GetColorCount() const;
+ inline sal_uIntPtr GetSizeBytes() const;
+ sal_Bool HasGreyPalette() const;
/** get system dependent bitmap data
@param rData
The system dependent BitmapSystemData structure to be filled
- @return TRUE if the bitmap has a valid system object (e.g. not empty)
+ @return sal_True if the bitmap has a valid system object (e.g. not empty)
*/
bool GetSystemData( BitmapSystemData& rData ) const;
- ULONG GetChecksum() const;
+ sal_uIntPtr GetChecksum() const;
Bitmap CreateDisplayBitmap( OutputDevice* pDisplay );
Bitmap GetColorTransformedBitmap( BmpColorMode eColorMode ) const;
@@ -370,7 +370,7 @@ public:
public:
- BOOL MakeMono( BYTE cThreshold );
+ sal_Bool MakeMono( sal_uInt8 cThreshold );
/** Convert bitmap format
@@ -378,9 +378,9 @@ public:
@param eConversion
The format this bitmap should be converted to.
- @return TRUE, if the conversion was completed successfully.
+ @return sal_True, if the conversion was completed successfully.
*/
- BOOL Convert( BmpConversion eConversion );
+ sal_Bool Convert( BmpConversion eConversion );
/** Reduce number of colors for the bitmap
@@ -390,9 +390,9 @@ public:
@param eReduce
Algorithm to use for color reduction
- @return TRUE, if the color reduction operation was completed successfully.
+ @return sal_True, if the color reduction operation was completed successfully.
*/
- BOOL ReduceColors( USHORT nNewColorCount,
+ sal_Bool ReduceColors( sal_uInt16 nNewColorCount,
BmpReduce eReduce = BMP_REDUCE_SIMPLE );
/** Apply a dither algorithm to the bitmap
@@ -407,7 +407,7 @@ public:
@param pDitherPal
A custom palette to be used when dithering (not yet implemented, leave NULL)
*/
- BOOL Dither( ULONG nDitherFlags = BMP_DITHER_MATRIX );
+ sal_Bool Dither( sal_uIntPtr nDitherFlags = BMP_DITHER_MATRIX );
/** Crop the bitmap
@@ -419,11 +419,11 @@ public:
dimension, i.e. negative left,top rectangle coordinates or
exceeding width or height is ignored.
- @return TRUE, if cropping was performed successfully. If
+ @return sal_True, if cropping was performed successfully. If
nothing had to be cropped, because e.g. the crop rectangle
- included the bitmap, FALSE is returned, too!
+ included the bitmap, sal_False is returned, too!
*/
- BOOL Crop( const Rectangle& rRectPixel );
+ sal_Bool Crop( const Rectangle& rRectPixel );
/** Expand the bitmap by pixel padding
@@ -436,11 +436,11 @@ public:
@param pInitColor
Color to use for padded pixel
- @return TRUE, if padding was performed successfully. FALSE is
+ @return sal_True, if padding was performed successfully. sal_False is
not only returned when the operation failed, but also if
nothing had to be done, e.g. because nDX and nDY were zero.
*/
- BOOL Expand( ULONG nDX, ULONG nDY,
+ sal_Bool Expand( sal_uIntPtr nDX, sal_uIntPtr nDY,
const Color* pInitColor = NULL );
/** Copy a rectangular area from another bitmap
@@ -460,12 +460,12 @@ public:
equal to the object this method is called on, copying takes
place within the same bitmap.
- @return TRUE, if the operation completed successfully. FALSE
+ @return sal_True, if the operation completed successfully. sal_False
is not only returned when the operation failed, but also if
nothing had to be done, e.g. because one of the rectangles are
empty.
*/
- BOOL CopyPixel( const Rectangle& rRectDst,
+ sal_Bool CopyPixel( const Rectangle& rRectDst,
const Rectangle& rRectSrc,
const Bitmap* pBmpSrc = NULL );
@@ -477,9 +477,9 @@ public:
@param eCombine
The combine operation to perform on the bitmap
- @return TRUE, if the operation was completed successfully.
+ @return sal_True, if the operation was completed successfully.
*/
- BOOL CombineSimple( const Bitmap& rMask,
+ sal_Bool CombineSimple( const Bitmap& rMask,
BmpCombine eCombine );
/** Alpha-blend the given bitmap against a specified uniform
@@ -496,9 +496,9 @@ public:
@param rBackgroundColor
Background color to use for every pixel during alpha blending
- @return TRUE, if blending was successful, FALSE otherwise
+ @return sal_True, if blending was successful, sal_False otherwise
*/
- BOOL Blend( const AlphaMask& rAlpha,
+ sal_Bool Blend( const AlphaMask& rAlpha,
const Color& rBackgroundColor );
/** Fill the entire bitmap with the given color
@@ -506,24 +506,24 @@ public:
@param rFillColor
Color value to use for filling
- @return TRUE, if the operation was completed successfully.
+ @return sal_True, if the operation was completed successfully.
*/
- BOOL Erase( const Color& rFillColor );
+ sal_Bool Erase( const Color& rFillColor );
/** Perform the Invert operation on every pixel
- @return TRUE, if the operation was completed successfully.
+ @return sal_True, if the operation was completed successfully.
*/
- BOOL Invert();
+ sal_Bool Invert();
/** Mirror the bitmap
@param nMirrorFlags
About which axis (horizontal, vertical, or both) to mirror
- @return TRUE, if the operation was completed successfully.
+ @return sal_True, if the operation was completed successfully.
*/
- BOOL Mirror( ULONG nMirrorFlags );
+ sal_Bool Mirror( sal_uIntPtr nMirrorFlags );
/** Scale the bitmap
@@ -533,10 +533,10 @@ public:
@param nScaleFlag
The algorithm to be used for scaling
- @return TRUE, if the operation was completed successfully.
+ @return sal_True, if the operation was completed successfully.
*/
- BOOL Scale( const Size& rNewSize,
- ULONG nScaleFlag = BMP_SCALE_FAST );
+ sal_Bool Scale( const Size& rNewSize,
+ sal_uIntPtr nScaleFlag = BMP_SCALE_FAST );
/** Scale the bitmap
@@ -546,10 +546,10 @@ public:
@param rScaleY
The scale factor in y direction.
- @return TRUE, if the operation was completed successfully.
+ @return sal_True, if the operation was completed successfully.
*/
- BOOL Scale( const double& rScaleX, const double& rScaleY,
- ULONG nScaleFlag = BMP_SCALE_FAST );
+ sal_Bool Scale( const double& rScaleX, const double& rScaleY,
+ sal_uIntPtr nScaleFlag = BMP_SCALE_FAST );
/** Rotate bitmap by the specified angle
@@ -562,9 +562,9 @@ public:
in. The empty spaces around that rotated original bitmap are
then filled with this color.
- @return TRUE, if the operation was completed successfully.
+ @return sal_True, if the operation was completed successfully.
*/
- BOOL Rotate( long nAngle10, const Color& rFillColor );
+ sal_Bool Rotate( long nAngle10, const Color& rFillColor );
/** Create on-off mask from bitmap
@@ -582,7 +582,7 @@ public:
@return the resulting bitmask.
*/
- Bitmap CreateMask( const Color& rTransColor, ULONG nTol = 0UL ) const;
+ Bitmap CreateMask( const Color& rTransColor, sal_uIntPtr nTol = 0UL ) const;
/** Create region of similar colors in a given rectangle
@@ -605,9 +605,9 @@ public:
@param rReplaceColor
Color to be placed in all changed pixel
- @return TRUE, if the operation was completed successfully.
+ @return sal_True, if the operation was completed successfully.
*/
- BOOL Replace( const Bitmap& rMask, const Color& rReplaceColor );
+ sal_Bool Replace( const Bitmap& rMask, const Color& rReplaceColor );
/** Merge bitmap with given background color according to specified alpha mask
@@ -617,9 +617,9 @@ public:
@param rMergeColor
Background color to be used for merging
- @return TRUE, if the operation was completed successfully.
+ @return sal_True, if the operation was completed successfully.
*/
- BOOL Replace( const AlphaMask& rAlpha, const Color& rMergeColor );
+ sal_Bool Replace( const AlphaMask& rAlpha, const Color& rMergeColor );
/** Replace all pixel having the search color with the specified color
@@ -634,9 +634,9 @@ public:
rSearchColor and the individual pixel values, such that the
corresponding pixel is still regarded a match.
- @return TRUE, if the operation was completed successfully.
+ @return sal_True, if the operation was completed successfully.
*/
- BOOL Replace( const Color& rSearchColor, const Color& rReplaceColor, ULONG nTol = 0 );
+ sal_Bool Replace( const Color& rSearchColor, const Color& rReplaceColor, sal_uIntPtr nTol = 0 );
/** Replace all pixel having one the search colors with the corresponding replace color
@@ -654,10 +654,10 @@ public:
pSearchColor colors and the individual pixel values, such that
the corresponding pixel is still regarded a match.
- @return TRUE, if the operation was completed successfully.
+ @return sal_True, if the operation was completed successfully.
*/
- BOOL Replace( const Color* pSearchColors, const Color* rReplaceColors,
- ULONG nColorCount, ULONG* pTols = NULL );
+ sal_Bool Replace( const Color* pSearchColors, const Color* rReplaceColors,
+ sal_uIntPtr nColorCount, sal_uIntPtr* pTols = NULL );
/** Convert the bitmap to a PolyPolygon
@@ -674,10 +674,10 @@ public:
@param pProgress
A callback for showing the progress of the vectorization
- @return TRUE, if the operation was completed successfully.
+ @return sal_True, if the operation was completed successfully.
*/
- BOOL Vectorize( PolyPolygon& rPolyPoly,
- ULONG nFlags = BMP_VECTORIZE_OUTER,
+ sal_Bool Vectorize( PolyPolygon& rPolyPoly,
+ sal_uIntPtr nFlags = BMP_VECTORIZE_OUTER,
const Link* pProgress = NULL );
/** Convert the bitmap to a meta file
@@ -699,10 +699,10 @@ public:
@param pProgress
A callback for showing the progress of the vectorization
- @return TRUE, if the operation was completed successfully.
+ @return sal_True, if the operation was completed successfully.
*/
- BOOL Vectorize( GDIMetaFile& rMtf, BYTE cReduce = 0,
- ULONG nFlags = BMP_VECTORIZE_INNER,
+ sal_Bool Vectorize( GDIMetaFile& rMtf, sal_uInt8 cReduce = 0,
+ sal_uIntPtr nFlags = BMP_VECTORIZE_INNER,
const Link* pProgress = NULL );
/** Change various global color characteristics
@@ -728,17 +728,17 @@ public:
(0.0,10.0]. Values outside this range are regarded as 1.0.
@param bInvert
- If TRUE, invert the channel values with the logical 'not' operator
+ If sal_True, invert the channel values with the logical 'not' operator
- @return TRUE, if the operation was completed successfully.
+ @return sal_True, if the operation was completed successfully.
*/
- BOOL Adjust( short nLuminancePercent = 0,
+ sal_Bool Adjust( short nLuminancePercent = 0,
short nContrastPercent = 0,
short nChannelRPercent = 0,
short nChannelGPercent = 0,
short nChannelBPercent = 0,
double fGamma = 1.0,
- BOOL bInvert = FALSE );
+ sal_Bool bInvert = sal_False );
/** Apply specified filter to the bitmap
@@ -751,9 +751,9 @@ public:
@param pProgress
A callback for showing the progress of the vectorization
- @return TRUE, if the operation was completed successfully.
+ @return sal_True, if the operation was completed successfully.
*/
- BOOL Filter( BmpFilter eFilter,
+ sal_Bool Filter( BmpFilter eFilter,
const BmpFilterParam* pFilterParam = NULL,
const Link* pProgress = NULL );
@@ -764,8 +764,8 @@ public:
public:
- BOOL Read( SvStream& rIStm, BOOL bFileHeader = TRUE );
- BOOL Write( SvStream& rOStm, BOOL bCompressed = TRUE, BOOL bFileHeader = TRUE ) const;
+ sal_Bool Read( SvStream& rIStm, sal_Bool bFileHeader = sal_True );
+ sal_Bool Write( SvStream& rOStm, sal_Bool bCompressed = sal_True, sal_Bool bFileHeader = sal_True ) const;
friend VCL_DLLPUBLIC SvStream& operator>>( SvStream& rIStm, Bitmap& rBitmap );
friend VCL_DLLPUBLIC SvStream& operator<<( SvStream& rOStm, const Bitmap& rBitmap );
@@ -775,35 +775,35 @@ public:
// - Inlines -
// -----------
-inline BOOL Bitmap::operator!() const
+inline sal_Bool Bitmap::operator!() const
{
return( mpImpBmp == NULL );
}
// ------------------------------------------------------------------
-inline BOOL Bitmap::operator==( const Bitmap& rBitmap ) const
+inline sal_Bool Bitmap::operator==( const Bitmap& rBitmap ) const
{
return( rBitmap.mpImpBmp == mpImpBmp );
}
// ------------------------------------------------------------------
-inline BOOL Bitmap::operator!=( const Bitmap& rBitmap ) const
+inline sal_Bool Bitmap::operator!=( const Bitmap& rBitmap ) const
{
return( rBitmap.mpImpBmp != mpImpBmp );
}
// ------------------------------------------------------------------
-inline BOOL Bitmap::IsSameInstance( const Bitmap& rBitmap ) const
+inline sal_Bool Bitmap::IsSameInstance( const Bitmap& rBitmap ) const
{
return( rBitmap.mpImpBmp == mpImpBmp );
}
// ------------------------------------------------------------------
-inline BOOL Bitmap::IsEmpty() const
+inline sal_Bool Bitmap::IsEmpty() const
{
return( mpImpBmp == NULL );
}
@@ -838,17 +838,17 @@ inline void Bitmap::SetPrefSize( const Size& rSize )
// ------------------------------------------------------------------
-inline ULONG Bitmap::GetColorCount() const
+inline sal_uIntPtr Bitmap::GetColorCount() const
{
- return( 1UL << (ULONG) GetBitCount() );
+ return( 1UL << (sal_uIntPtr) GetBitCount() );
}
// ------------------------------------------------------------------
-inline ULONG Bitmap::GetSizeBytes() const
+inline sal_uIntPtr Bitmap::GetSizeBytes() const
{
const Size aSizePix( GetSizePixel() );
- return( ( (ULONG) aSizePix.Width() * aSizePix.Height() * GetBitCount() ) >> 3UL );
+ return( ( (sal_uIntPtr) aSizePix.Width() * aSizePix.Height() * GetBitCount() ) >> 3UL );
}
#endif // _SV_BITMAP_HXX
diff --git a/vcl/inc/vcl/bitmapex.hxx b/vcl/inc/vcl/bitmapex.hxx
index c19e1a9cbc39..a2259833ca22 100644
--- a/vcl/inc/vcl/bitmapex.hxx
+++ b/vcl/inc/vcl/bitmapex.hxx
@@ -59,7 +59,7 @@ private:
Size aBitmapSize;
Color aTransparentColor;
TransparentType eTransparent;
- BOOL bAlpha;
+ sal_Bool bAlpha;
public:
@@ -83,13 +83,13 @@ public:
~BitmapEx();
BitmapEx& operator=( const BitmapEx& rBitmapEx );
- BOOL operator==( const BitmapEx& rBitmapEx ) const;
- BOOL operator!=( const BitmapEx& rBitmapEx ) const { return !(*this==rBitmapEx); }
- BOOL operator!() const { return !aBitmap; }
+ sal_Bool operator==( const BitmapEx& rBitmapEx ) const;
+ sal_Bool operator!=( const BitmapEx& rBitmapEx ) const { return !(*this==rBitmapEx); }
+ sal_Bool operator!() const { return !aBitmap; }
- BOOL IsEqual( const BitmapEx& rBmpEx ) const;
+ sal_Bool IsEqual( const BitmapEx& rBmpEx ) const;
- BOOL IsEmpty() const;
+ sal_Bool IsEmpty() const;
void SetEmpty();
void Clear();
@@ -101,7 +101,7 @@ public:
const Point& rDestPt, const Size& rDestSize,
const Point& rSrcPtPixel, const Size& rSrcSizePixel ) const;
- BOOL IsTransparent() const;
+ sal_Bool IsTransparent() const;
TransparentType GetTransparentType() const { return eTransparent; }
Bitmap GetBitmap( const Color* pTransReplaceColor = NULL ) const;
@@ -109,7 +109,7 @@ public:
BitmapEx GetColorTransformedBitmapEx( BmpColorMode eColorMode ) const;
- BOOL IsAlpha() const;
+ sal_Bool IsAlpha() const;
AlphaMask GetAlpha() const;
const Size& GetSizePixel() const { return aBitmapSize; }
@@ -124,9 +124,9 @@ public:
const Color& GetTransparentColor() const { return aTransparentColor; }
void SetTransparentColor( const Color& rColor ) { aTransparentColor = rColor; }
- USHORT GetBitCount() const { return aBitmap.GetBitCount(); }
- ULONG GetSizeBytes() const;
- ULONG GetChecksum() const;
+ sal_uInt16 GetBitCount() const { return aBitmap.GetBitCount(); }
+ sal_uIntPtr GetSizeBytes() const;
+ sal_uIntPtr GetChecksum() const;
public:
@@ -135,9 +135,9 @@ public:
@param eConversion
The format this bitmap should be converted to.
- @return TRUE, if the conversion was completed successfully.
+ @return sal_True, if the conversion was completed successfully.
*/
- BOOL Convert( BmpConversion eConversion );
+ sal_Bool Convert( BmpConversion eConversion );
/** Reduce number of colors for the bitmap
@@ -147,9 +147,9 @@ public:
@param eReduce
Algorithm to use for color reduction
- @return TRUE, if the color reduction operation was completed successfully.
+ @return sal_True, if the color reduction operation was completed successfully.
*/
- BOOL ReduceColors( USHORT nNewColorCount,
+ sal_Bool ReduceColors( sal_uInt16 nNewColorCount,
BmpReduce eReduce = BMP_REDUCE_SIMPLE );
/** Apply a dither algorithm to the bitmap
@@ -161,7 +161,7 @@ public:
@param nDitherFlags
The algorithm to be used for dithering
*/
- BOOL Dither( ULONG nDitherFlags = BMP_DITHER_MATRIX );
+ sal_Bool Dither( sal_uIntPtr nDitherFlags = BMP_DITHER_MATRIX );
/** Crop the bitmap
@@ -173,11 +173,11 @@ public:
dimension, i.e. negative left,top rectangle coordinates or
exceeding width or height is ignored.
- @return TRUE, if cropping was performed successfully. If
+ @return sal_True, if cropping was performed successfully. If
nothing had to be cropped, because e.g. the crop rectangle
- included the bitmap, FALSE is returned, too!
+ included the bitmap, sal_False is returned, too!
*/
- BOOL Crop( const Rectangle& rRectPixel );
+ sal_Bool Crop( const Rectangle& rRectPixel );
/** Expand the bitmap by pixel padding
@@ -190,13 +190,13 @@ public:
@param pInitColor
Color to use for padded pixel
- @return TRUE, if padding was performed successfully. FALSE is
+ @return sal_True, if padding was performed successfully. sal_False is
not only returned when the operation failed, but also if
nothing had to be done, e.g. because nDX and nDY were zero.
*/
- BOOL Expand( ULONG nDX, ULONG nDY,
+ sal_Bool Expand( sal_uIntPtr nDX, sal_uIntPtr nDY,
const Color* pInitColor = NULL,
- BOOL bExpandTransparent = FALSE );
+ sal_Bool bExpandTransparent = sal_False );
/** Copy a rectangular area from another bitmap
@@ -215,12 +215,12 @@ public:
equal to the object this method is called on, copying takes
place within the same bitmap.
- @return TRUE, if the operation completed successfully. FALSE
+ @return sal_True, if the operation completed successfully. sal_False
is not only returned when the operation failed, but also if
nothing had to be done, e.g. because one of the rectangles are
empty.
*/
- BOOL CopyPixel( const Rectangle& rRectDst,
+ sal_Bool CopyPixel( const Rectangle& rRectDst,
const Rectangle& rRectSrc,
const BitmapEx* pBmpExSrc = NULL );
@@ -230,24 +230,24 @@ public:
Color value to use for filling. Set the transparency part of
the color to fill the mask.
- @return TRUE, if the operation was completed successfully.
+ @return sal_True, if the operation was completed successfully.
*/
- BOOL Erase( const Color& rFillColor );
+ sal_Bool Erase( const Color& rFillColor );
/** Perform the Invert operation on every pixel
- @return TRUE, if the operation was completed successfully.
+ @return sal_True, if the operation was completed successfully.
*/
- BOOL Invert();
+ sal_Bool Invert();
/** Mirror the bitmap
@param nMirrorFlags
About which axis (horizontal, vertical, or both) to mirror
- @return TRUE, if the operation was completed successfully.
+ @return sal_True, if the operation was completed successfully.
*/
- BOOL Mirror( ULONG nMirrorFlags );
+ sal_Bool Mirror( sal_uIntPtr nMirrorFlags );
/** Scale the bitmap
@@ -257,9 +257,9 @@ public:
@param nScaleFlag
The algorithm to be used for scaling
- @return TRUE, if the operation was completed successfully.
+ @return sal_True, if the operation was completed successfully.
*/
- BOOL Scale( const Size& rNewSize, ULONG nScaleFlag = BMP_SCALE_FAST );
+ sal_Bool Scale( const Size& rNewSize, sal_uIntPtr nScaleFlag = BMP_SCALE_FAST );
/** Scale the bitmap
@@ -269,9 +269,9 @@ public:
@param rScaleY
The scale factor in y direction.
- @return TRUE, if the operation was completed successfully.
+ @return sal_True, if the operation was completed successfully.
*/
- BOOL Scale( const double& rScaleX, const double& rScaleY, ULONG nScaleFlag = BMP_SCALE_FAST );
+ sal_Bool Scale( const double& rScaleX, const double& rScaleY, sal_uIntPtr nScaleFlag = BMP_SCALE_FAST );
/** Rotate bitmap by the specified angle
@@ -284,9 +284,9 @@ public:
in. The empty spaces around that rotated original bitmap are
then filled with this color.
- @return TRUE, if the operation was completed successfully.
+ @return sal_True, if the operation was completed successfully.
*/
- BOOL Rotate( long nAngle10, const Color& rFillColor );
+ sal_Bool Rotate( long nAngle10, const Color& rFillColor );
/** Replace all pixel having the search color with the specified color
@@ -301,9 +301,9 @@ public:
rSearchColor and the individual pixel values, such that the
corresponding pixel is still regarded a match.
- @return TRUE, if the operation was completed successfully.
+ @return sal_True, if the operation was completed successfully.
*/
- BOOL Replace( const Color& rSearchColor, const Color& rReplaceColor, ULONG nTol = 0 );
+ sal_Bool Replace( const Color& rSearchColor, const Color& rReplaceColor, sal_uIntPtr nTol = 0 );
/** Replace all pixel having one the search colors with the corresponding replace color
@@ -321,10 +321,10 @@ public:
pSearchColor colors and the individual pixel values, such that
the corresponding pixel is still regarded a match.
- @return TRUE, if the operation was completed successfully.
+ @return sal_True, if the operation was completed successfully.
*/
- BOOL Replace( const Color* pSearchColors, const Color* pReplaceColors,
- ULONG nColorCount, const ULONG* pTols = NULL );
+ sal_Bool Replace( const Color* pSearchColors, const Color* pReplaceColors,
+ sal_uIntPtr nColorCount, const sal_uIntPtr* pTols = NULL );
/** Change various global color characteristics
@@ -349,17 +349,17 @@ public:
(0.0,10.0]. Values outside this range are regarded as 1.0.
@param bInvert
- If TRUE, invert the channel values with the logical 'not' operator
+ If sal_True, invert the channel values with the logical 'not' operator
- @return TRUE, if the operation was completed successfully.
+ @return sal_True, if the operation was completed successfully.
*/
- BOOL Adjust( short nLuminancePercent = 0,
+ sal_Bool Adjust( short nLuminancePercent = 0,
short nContrastPercent = 0,
short nChannelRPercent = 0,
short nChannelGPercent = 0,
short nChannelBPercent = 0,
double fGamma = 1.0,
- BOOL bInvert = FALSE );
+ sal_Bool bInvert = sal_False );
/** Apply specified filter to the bitmap
@@ -372,9 +372,9 @@ public:
@param pProgress
A callback for showing the progress of the vectorization
- @return TRUE, if the operation was completed successfully.
+ @return sal_True, if the operation was completed successfully.
*/
- BOOL Filter( BmpFilter eFilter,
+ sal_Bool Filter( BmpFilter eFilter,
const BmpFilterParam* pFilterParam = NULL,
const Link* pProgress = NULL );
diff --git a/vcl/inc/vcl/bmpacc.hxx b/vcl/inc/vcl/bmpacc.hxx
index f83b4c73a903..d9f0490eee27 100644
--- a/vcl/inc/vcl/bmpacc.hxx
+++ b/vcl/inc/vcl/bmpacc.hxx
@@ -99,13 +99,13 @@ protected:
ColorMask maColorMask;
FncGetPixel mFncGetPixel;
FncSetPixel mFncSetPixel;
- BOOL mbModify;
+ sal_Bool mbModify;
//#if 0 // _SOLAR__PRIVATE
SAL_DLLPRIVATE void ImplCreate( Bitmap& rBitmap );
SAL_DLLPRIVATE void ImplDestroy();
-SAL_DLLPRIVATE BOOL ImplSetAccessPointers( ULONG nFormat );
+SAL_DLLPRIVATE sal_Bool ImplSetAccessPointers( sal_uIntPtr nFormat );
public:
@@ -131,49 +131,49 @@ SAL_DLLPRIVATE BitmapBuffer* ImplGetBitmapBuffer() const { return mpBuffer; }
//#endif // __PRIVATE
protected:
- BitmapReadAccess( Bitmap& rBitmap, BOOL bModify );
+ BitmapReadAccess( Bitmap& rBitmap, sal_Bool bModify );
void Flush();
- void ReAccess( BOOL bModify );
+ void ReAccess( sal_Bool bModify );
public:
BitmapReadAccess( Bitmap& rBitmap );
virtual ~BitmapReadAccess();
- inline BOOL operator!() const;
+ inline sal_Bool operator!() const;
inline long Width() const;
inline long Height() const;
inline Point TopLeft() const;
inline Point BottomRight() const;
- inline BOOL IsTopDown() const;
- inline BOOL IsBottomUp() const;
+ inline sal_Bool IsTopDown() const;
+ inline sal_Bool IsBottomUp() const;
- inline ULONG GetScanlineFormat() const;
- inline ULONG GetScanlineSize() const;
+ inline sal_uIntPtr GetScanlineFormat() const;
+ inline sal_uIntPtr GetScanlineSize() const;
- inline USHORT GetBitCount() const;
+ inline sal_uInt16 GetBitCount() const;
inline BitmapColor GetBestMatchingColor( const BitmapColor& rBitmapColor );
inline Scanline GetBuffer() const;
inline Scanline GetScanline( long nY ) const;
- inline BOOL HasPalette() const;
+ inline sal_Bool HasPalette() const;
inline const BitmapPalette& GetPalette() const;
- inline USHORT GetPaletteEntryCount() const;
- inline const BitmapColor& GetPaletteColor( USHORT nColor ) const;
+ inline sal_uInt16 GetPaletteEntryCount() const;
+ inline const BitmapColor& GetPaletteColor( sal_uInt16 nColor ) const;
inline const BitmapColor& GetBestPaletteColor( const BitmapColor& rBitmapColor ) const;
- USHORT GetBestPaletteIndex( const BitmapColor& rBitmapColor ) const;
+ sal_uInt16 GetBestPaletteIndex( const BitmapColor& rBitmapColor ) const;
- inline BOOL HasColorMask() const;
+ inline sal_Bool HasColorMask() const;
inline ColorMask& GetColorMask() const;
- inline BitmapColor GetPixelFromData( const BYTE* pData, long nX ) const;
- inline void SetPixelOnData( BYTE* pData, long nX, const BitmapColor& rBitmapColor );
+ inline BitmapColor GetPixelFromData( const sal_uInt8* pData, long nX ) const;
+ inline void SetPixelOnData( sal_uInt8* pData, long nX, const BitmapColor& rBitmapColor );
inline BitmapColor GetPixel( long nY, long nX ) const;
inline BitmapColor GetColor( long nY, long nX ) const;
- inline BYTE GetLuminance( long nY, long nX ) const;
+ inline sal_uInt8 GetLuminance( long nY, long nX ) const;
};
// ---------------------
@@ -189,13 +189,13 @@ public:
void CopyScanline( long nY, const BitmapReadAccess& rReadAcc );
void CopyScanline( long nY, ConstScanline aSrcScanline,
- ULONG nSrcScanlineFormat, ULONG nSrcScanlineSize );
+ sal_uIntPtr nSrcScanlineFormat, sal_uIntPtr nSrcScanlineSize );
void CopyBuffer( const BitmapReadAccess& rReadAcc );
inline void SetPalette( const BitmapPalette& rPalette );
- inline void SetPaletteEntryCount( USHORT nCount );
- inline void SetPaletteColor( USHORT nColor, const BitmapColor& rBitmapColor );
+ inline void SetPaletteEntryCount( sal_uInt16 nCount );
+ inline void SetPaletteColor( sal_uInt16 nColor, const BitmapColor& rBitmapColor );
inline void SetPixel( long nY, long nX, const BitmapColor& rBitmapColor );
@@ -300,7 +300,7 @@ typedef ScopedBitmapAccess< BitmapWriteAccess > ScopedBitmapWriteAccess;
// - Inlines -
// -----------
-inline BOOL BitmapReadAccess::operator!() const
+inline sal_Bool BitmapReadAccess::operator!() const
{
return( mpBuffer == NULL );
}
@@ -335,22 +335,22 @@ inline Point BitmapReadAccess::BottomRight() const
// ------------------------------------------------------------------
-inline BOOL BitmapReadAccess::IsTopDown() const
+inline sal_Bool BitmapReadAccess::IsTopDown() const
{
DBG_ASSERT( mpBuffer, "Access is not valid!" );
- return( mpBuffer ? sal::static_int_cast<BOOL>( BMP_SCANLINE_ADJUSTMENT( mpBuffer->mnFormat ) == BMP_FORMAT_TOP_DOWN ) : FALSE );
+ return( mpBuffer ? sal::static_int_cast<sal_Bool>( BMP_SCANLINE_ADJUSTMENT( mpBuffer->mnFormat ) == BMP_FORMAT_TOP_DOWN ) : sal_False );
}
// ------------------------------------------------------------------
-inline BOOL BitmapReadAccess::IsBottomUp() const
+inline sal_Bool BitmapReadAccess::IsBottomUp() const
{
return !IsTopDown();
}
// ------------------------------------------------------------------
-inline ULONG BitmapReadAccess::GetScanlineFormat() const
+inline sal_uIntPtr BitmapReadAccess::GetScanlineFormat() const
{
DBG_ASSERT( mpBuffer, "Access is not valid!" );
return( mpBuffer ? BMP_SCANLINE_FORMAT( mpBuffer->mnFormat ) : 0UL );
@@ -358,7 +358,7 @@ inline ULONG BitmapReadAccess::GetScanlineFormat() const
// ------------------------------------------------------------------
-inline ULONG BitmapReadAccess::GetScanlineSize() const
+inline sal_uIntPtr BitmapReadAccess::GetScanlineSize() const
{
DBG_ASSERT( mpBuffer, "Access is not valid!" );
return( mpBuffer ? mpBuffer->mnScanlineSize : 0UL );
@@ -366,7 +366,7 @@ inline ULONG BitmapReadAccess::GetScanlineSize() const
// ------------------------------------------------------------------
-inline USHORT BitmapReadAccess::GetBitCount() const
+inline sal_uInt16 BitmapReadAccess::GetBitCount() const
{
DBG_ASSERT( mpBuffer, "Access is not valid!" );
return( mpBuffer ? mpBuffer->mnBitCount : 0 );
@@ -377,7 +377,7 @@ inline USHORT BitmapReadAccess::GetBitCount() const
inline BitmapColor BitmapReadAccess::GetBestMatchingColor( const BitmapColor& rBitmapColor )
{
if( HasPalette() )
- return BitmapColor( (BYTE) GetBestPaletteIndex( rBitmapColor ) );
+ return BitmapColor( (sal_uInt8) GetBestPaletteIndex( rBitmapColor ) );
else
return rBitmapColor;
}
@@ -401,7 +401,7 @@ inline Scanline BitmapReadAccess::GetScanline( long nY ) const
// ------------------------------------------------------------------
-inline BOOL BitmapReadAccess::HasPalette() const
+inline sal_Bool BitmapReadAccess::HasPalette() const
{
DBG_ASSERT( mpBuffer, "Access is not valid!" );
return( mpBuffer && !!mpBuffer->maPalette );
@@ -417,7 +417,7 @@ inline const BitmapPalette& BitmapReadAccess::GetPalette() const
// ------------------------------------------------------------------
-inline USHORT BitmapReadAccess::GetPaletteEntryCount() const
+inline sal_uInt16 BitmapReadAccess::GetPaletteEntryCount() const
{
DBG_ASSERT( HasPalette(), "Bitmap has no palette!" );
return( HasPalette() ? mpBuffer->maPalette.GetEntryCount() : 0 );
@@ -425,7 +425,7 @@ inline USHORT BitmapReadAccess::GetPaletteEntryCount() const
// ------------------------------------------------------------------
-inline const BitmapColor& BitmapReadAccess::GetPaletteColor( USHORT nColor ) const
+inline const BitmapColor& BitmapReadAccess::GetPaletteColor( sal_uInt16 nColor ) const
{
DBG_ASSERT( mpBuffer, "Access is not valid!" );
DBG_ASSERT( HasPalette(), "Bitmap has no palette!" );
@@ -441,10 +441,10 @@ inline const BitmapColor& BitmapReadAccess::GetBestPaletteColor( const BitmapCol
// ------------------------------------------------------------------
-inline BOOL BitmapReadAccess::HasColorMask() const
+inline sal_Bool BitmapReadAccess::HasColorMask() const
{
DBG_ASSERT( mpBuffer, "Access is not valid!" );
- const ULONG nFormat = BMP_SCANLINE_FORMAT( mpBuffer->mnFormat );
+ const sal_uIntPtr nFormat = BMP_SCANLINE_FORMAT( mpBuffer->mnFormat );
return( nFormat == BMP_FORMAT_8BIT_TC_MASK ||
nFormat == BMP_FORMAT_16BIT_TC_MSB_MASK ||
@@ -473,7 +473,7 @@ inline BitmapColor BitmapReadAccess::GetPixel( long nY, long nX ) const
// ------------------------------------------------------------------
-inline BitmapColor BitmapReadAccess::GetPixelFromData( const BYTE* pData, long nX ) const
+inline BitmapColor BitmapReadAccess::GetPixelFromData( const sal_uInt8* pData, long nX ) const
{
DBG_ASSERT( pData, "Access is not valid!" );
return mFncGetPixel( pData, nX, maColorMask );
@@ -481,7 +481,7 @@ inline BitmapColor BitmapReadAccess::GetPixelFromData( const BYTE* pData, long n
// ------------------------------------------------------------------
-inline void BitmapReadAccess::SetPixelOnData( BYTE* pData, long nX, const BitmapColor& rBitmapColor )
+inline void BitmapReadAccess::SetPixelOnData( sal_uInt8* pData, long nX, const BitmapColor& rBitmapColor )
{
DBG_ASSERT( pData, "Access is not valid!" );
mFncSetPixel( pData, nX, rBitmapColor, maColorMask );
@@ -502,7 +502,7 @@ inline BitmapColor BitmapReadAccess::GetColor( long nY, long nX ) const
// ------------------------------------------------------------------
-inline BYTE BitmapReadAccess::GetLuminance( long nY, long nX ) const
+inline sal_uInt8 BitmapReadAccess::GetLuminance( long nY, long nX ) const
{
return GetColor( nY, nX ).GetLuminance();
}
@@ -517,7 +517,7 @@ inline void BitmapWriteAccess::SetPalette( const BitmapPalette& rPalette )
// ------------------------------------------------------------------
-inline void BitmapWriteAccess::SetPaletteEntryCount( USHORT nCount )
+inline void BitmapWriteAccess::SetPaletteEntryCount( sal_uInt16 nCount )
{
DBG_ASSERT( mpBuffer, "Access is not valid!" );
mpBuffer->maPalette.SetEntryCount( nCount );
@@ -525,7 +525,7 @@ inline void BitmapWriteAccess::SetPaletteEntryCount( USHORT nCount )
// ------------------------------------------------------------------
-inline void BitmapWriteAccess::SetPaletteColor( USHORT nColor, const BitmapColor& rBitmapColor )
+inline void BitmapWriteAccess::SetPaletteColor( sal_uInt16 nColor, const BitmapColor& rBitmapColor )
{
DBG_ASSERT( mpBuffer, "Access is not valid!" );
DBG_ASSERT( HasPalette(), "Bitmap has no palette!" );
diff --git a/vcl/inc/vcl/brdwin.hxx b/vcl/inc/vcl/brdwin.hxx
index bf76174150e2..7e1dfb6b0b39 100644
--- a/vcl/inc/vcl/brdwin.hxx
+++ b/vcl/inc/vcl/brdwin.hxx
@@ -37,39 +37,39 @@ class ImplBorderWindowView;
// - ImplBorderWindow-Types -
// --------------------------
-#define BORDERWINDOW_STYLE_OVERLAP ((USHORT)0x0001)
-#define BORDERWINDOW_STYLE_BORDER ((USHORT)0x0002)
-#define BORDERWINDOW_STYLE_FLOAT ((USHORT)0x0004)
-#define BORDERWINDOW_STYLE_FRAME ((USHORT)0x0008)
-#define BORDERWINDOW_STYLE_APP ((USHORT)0x0010)
-
-#define BORDERWINDOW_HITTEST_TITLE ((USHORT)0x0001)
-#define BORDERWINDOW_HITTEST_LEFT ((USHORT)0x0002)
-#define BORDERWINDOW_HITTEST_MENU ((USHORT)0x0004)
-#define BORDERWINDOW_HITTEST_TOP ((USHORT)0x0008)
-#define BORDERWINDOW_HITTEST_RIGHT ((USHORT)0x0010)
-#define BORDERWINDOW_HITTEST_BOTTOM ((USHORT)0x0020)
-#define BORDERWINDOW_HITTEST_TOPLEFT ((USHORT)0x0040)
-#define BORDERWINDOW_HITTEST_TOPRIGHT ((USHORT)0x0080)
-#define BORDERWINDOW_HITTEST_BOTTOMLEFT ((USHORT)0x0100)
-#define BORDERWINDOW_HITTEST_BOTTOMRIGHT ((USHORT)0x0200)
-#define BORDERWINDOW_HITTEST_CLOSE ((USHORT)0x0400)
-#define BORDERWINDOW_HITTEST_ROLL ((USHORT)0x0800)
-#define BORDERWINDOW_HITTEST_DOCK ((USHORT)0x1000)
-#define BORDERWINDOW_HITTEST_HIDE ((USHORT)0x2000)
-#define BORDERWINDOW_HITTEST_HELP ((USHORT)0x4000)
-#define BORDERWINDOW_HITTEST_PIN ((USHORT)0x8000)
-
-#define BORDERWINDOW_DRAW_TITLE ((USHORT)0x0001)
-#define BORDERWINDOW_DRAW_BORDER ((USHORT)0x0002)
-#define BORDERWINDOW_DRAW_FRAME ((USHORT)0x0004)
-#define BORDERWINDOW_DRAW_CLOSE ((USHORT)0x0008)
-#define BORDERWINDOW_DRAW_ROLL ((USHORT)0x0010)
-#define BORDERWINDOW_DRAW_DOCK ((USHORT)0x0020)
-#define BORDERWINDOW_DRAW_HIDE ((USHORT)0x0040)
-#define BORDERWINDOW_DRAW_HELP ((USHORT)0x0080)
-#define BORDERWINDOW_DRAW_PIN ((USHORT)0x0100)
-#define BORDERWINDOW_DRAW_MENU ((USHORT)0x0200)
+#define BORDERWINDOW_STYLE_OVERLAP ((sal_uInt16)0x0001)
+#define BORDERWINDOW_STYLE_BORDER ((sal_uInt16)0x0002)
+#define BORDERWINDOW_STYLE_FLOAT ((sal_uInt16)0x0004)
+#define BORDERWINDOW_STYLE_FRAME ((sal_uInt16)0x0008)
+#define BORDERWINDOW_STYLE_APP ((sal_uInt16)0x0010)
+
+#define BORDERWINDOW_HITTEST_TITLE ((sal_uInt16)0x0001)
+#define BORDERWINDOW_HITTEST_LEFT ((sal_uInt16)0x0002)
+#define BORDERWINDOW_HITTEST_MENU ((sal_uInt16)0x0004)
+#define BORDERWINDOW_HITTEST_TOP ((sal_uInt16)0x0008)
+#define BORDERWINDOW_HITTEST_RIGHT ((sal_uInt16)0x0010)
+#define BORDERWINDOW_HITTEST_BOTTOM ((sal_uInt16)0x0020)
+#define BORDERWINDOW_HITTEST_TOPLEFT ((sal_uInt16)0x0040)
+#define BORDERWINDOW_HITTEST_TOPRIGHT ((sal_uInt16)0x0080)
+#define BORDERWINDOW_HITTEST_BOTTOMLEFT ((sal_uInt16)0x0100)
+#define BORDERWINDOW_HITTEST_BOTTOMRIGHT ((sal_uInt16)0x0200)
+#define BORDERWINDOW_HITTEST_CLOSE ((sal_uInt16)0x0400)
+#define BORDERWINDOW_HITTEST_ROLL ((sal_uInt16)0x0800)
+#define BORDERWINDOW_HITTEST_DOCK ((sal_uInt16)0x1000)
+#define BORDERWINDOW_HITTEST_HIDE ((sal_uInt16)0x2000)
+#define BORDERWINDOW_HITTEST_HELP ((sal_uInt16)0x4000)
+#define BORDERWINDOW_HITTEST_PIN ((sal_uInt16)0x8000)
+
+#define BORDERWINDOW_DRAW_TITLE ((sal_uInt16)0x0001)
+#define BORDERWINDOW_DRAW_BORDER ((sal_uInt16)0x0002)
+#define BORDERWINDOW_DRAW_FRAME ((sal_uInt16)0x0004)
+#define BORDERWINDOW_DRAW_CLOSE ((sal_uInt16)0x0008)
+#define BORDERWINDOW_DRAW_ROLL ((sal_uInt16)0x0010)
+#define BORDERWINDOW_DRAW_DOCK ((sal_uInt16)0x0020)
+#define BORDERWINDOW_DRAW_HIDE ((sal_uInt16)0x0040)
+#define BORDERWINDOW_DRAW_HELP ((sal_uInt16)0x0080)
+#define BORDERWINDOW_DRAW_PIN ((sal_uInt16)0x0100)
+#define BORDERWINDOW_DRAW_MENU ((sal_uInt16)0x0200)
#define BORDERWINDOW_DRAW_ALL (BORDERWINDOW_DRAW_TITLE | \
BORDERWINDOW_DRAW_BORDER | \
BORDERWINDOW_DRAW_FRAME | \
@@ -81,10 +81,10 @@ class ImplBorderWindowView;
BORDERWINDOW_DRAW_PIN | \
BORDERWINDOW_DRAW_MENU)
-#define BORDERWINDOW_TITLE_NORMAL ((USHORT)0x0001)
-#define BORDERWINDOW_TITLE_SMALL ((USHORT)0x0002)
-#define BORDERWINDOW_TITLE_TEAROFF ((USHORT)0x0004)
-#define BORDERWINDOW_TITLE_NONE ((USHORT)0x0008)
+#define BORDERWINDOW_TITLE_NORMAL ((sal_uInt16)0x0001)
+#define BORDERWINDOW_TITLE_SMALL ((sal_uInt16)0x0002)
+#define BORDERWINDOW_TITLE_TEAROFF ((sal_uInt16)0x0004)
+#define BORDERWINDOW_TITLE_NONE ((sal_uInt16)0x0008)
// --------------------
// - ImplBorderWindow -
@@ -106,26 +106,26 @@ private:
long mnMaxHeight;
long mnRollHeight;
long mnOrgMenuHeight;
- USHORT mnTitleType;
- USHORT mnBorderStyle;
- BOOL mbFloatWindow;
- BOOL mbSmallOutBorder;
- BOOL mbFrameBorder;
- BOOL mbPined;
- BOOL mbRollUp;
- BOOL mbMenuHide;
- BOOL mbDockBtn;
- BOOL mbHideBtn;
- BOOL mbHelpBtn;
- BOOL mbMenuBtn;
- BOOL mbDisplayActive;
+ sal_uInt16 mnTitleType;
+ sal_uInt16 mnBorderStyle;
+ sal_Bool mbFloatWindow;
+ sal_Bool mbSmallOutBorder;
+ sal_Bool mbFrameBorder;
+ sal_Bool mbPined;
+ sal_Bool mbRollUp;
+ sal_Bool mbMenuHide;
+ sal_Bool mbDockBtn;
+ sal_Bool mbHideBtn;
+ sal_Bool mbHelpBtn;
+ sal_Bool mbMenuBtn;
+ sal_Bool mbDisplayActive;
using Window::ImplInit;
void ImplInit( Window* pParent,
- WinBits nStyle, USHORT nTypeStyle,
+ WinBits nStyle, sal_uInt16 nTypeStyle,
SystemParentData* pParentData );
void ImplInit( Window* pParent,
- WinBits nStyle, USHORT nTypeStyle,
+ WinBits nStyle, sal_uInt16 nTypeStyle,
const ::com::sun::star::uno::Any& );
// Copy assignment is forbidden and not implemented.
@@ -136,11 +136,11 @@ public:
ImplBorderWindow( Window* pParent,
SystemParentData* pParentData,
WinBits nStyle = 0,
- USHORT nTypeStyle = 0 );
+ sal_uInt16 nTypeStyle = 0 );
ImplBorderWindow( Window* pParent, WinBits nStyle = 0,
- USHORT nTypeStyle = 0 );
+ sal_uInt16 nTypeStyle = 0 );
ImplBorderWindow( Window* pParent,
- WinBits nStyle, USHORT nTypeStyle,
+ WinBits nStyle, sal_uInt16 nTypeStyle,
const ::com::sun::star::uno::Any& );
~ImplBorderWindow();
@@ -156,28 +156,28 @@ public:
virtual void DataChanged( const DataChangedEvent& rDCEvt );
void InitView();
- void UpdateView( BOOL bNewView, const Size& rNewOutSize );
+ void UpdateView( sal_Bool bNewView, const Size& rNewOutSize );
void InvalidateBorder();
using Window::Draw;
void Draw( const Rectangle& rRect, OutputDevice* pDev, const Point& rPos );
- void SetDisplayActive( BOOL bActive );
- BOOL IsDisplayActive() const { return mbDisplayActive; }
- void SetTitleType( USHORT nTitleType, const Size& rSize );
- void SetBorderStyle( USHORT nStyle );
- USHORT GetBorderStyle() const { return mnBorderStyle; }
- void SetPin( BOOL bPin );
- void SetRollUp( BOOL bRollUp, const Size& rSize );
+ void SetDisplayActive( sal_Bool bActive );
+ sal_Bool IsDisplayActive() const { return mbDisplayActive; }
+ void SetTitleType( sal_uInt16 nTitleType, const Size& rSize );
+ void SetBorderStyle( sal_uInt16 nStyle );
+ sal_uInt16 GetBorderStyle() const { return mnBorderStyle; }
+ void SetPin( sal_Bool bPin );
+ void SetRollUp( sal_Bool bRollUp, const Size& rSize );
void SetCloser();
- void SetDockButton( BOOL bDockButton );
- void SetHideButton( BOOL bHideButton );
- void SetHelpButton( BOOL bHelpButton );
- void SetMenuButton( BOOL bMenuButton );
+ void SetDockButton( sal_Bool bDockButton );
+ void SetHideButton( sal_Bool bHideButton );
+ void SetHelpButton( sal_Bool bHelpButton );
+ void SetMenuButton( sal_Bool bMenuButton );
void UpdateMenuHeight();
void SetMenuBarWindow( Window* pWindow );
- void SetMenuBarMode( BOOL bHide );
+ void SetMenuBarMode( sal_Bool bHide );
void SetMinOutputSize( long nWidth, long nHeight )
{ mnMinWidth = nWidth; mnMinHeight = nHeight; }
@@ -224,18 +224,18 @@ struct ImplBorderFrameData
long mnBorderSize;
long mnTitleHeight;
long mnTitleOff;
- USHORT mnHitTest;
- USHORT mnPinState;
- USHORT mnCloseState;
- USHORT mnRollState;
- USHORT mnDockState;
- USHORT mnMenuState;
- USHORT mnHideState;
- USHORT mnHelpState;
- USHORT mnTitleType;
- BOOL mbFloatWindow;
- BOOL mbDragFull;
- BOOL mbTitleClipped;
+ sal_uInt16 mnHitTest;
+ sal_uInt16 mnPinState;
+ sal_uInt16 mnCloseState;
+ sal_uInt16 mnRollState;
+ sal_uInt16 mnDockState;
+ sal_uInt16 mnMenuState;
+ sal_uInt16 mnHideState;
+ sal_uInt16 mnHelpState;
+ sal_uInt16 mnTitleType;
+ sal_Bool mbFloatWindow;
+ sal_Bool mbDragFull;
+ sal_Bool mbTitleClipped;
};
// =======================================================================
@@ -249,23 +249,23 @@ class ImplBorderWindowView
public:
virtual ~ImplBorderWindowView();
- virtual BOOL MouseMove( const MouseEvent& rMEvt );
- virtual BOOL MouseButtonDown( const MouseEvent& rMEvt );
- virtual BOOL Tracking( const TrackingEvent& rTEvt );
+ virtual sal_Bool MouseMove( const MouseEvent& rMEvt );
+ virtual sal_Bool MouseButtonDown( const MouseEvent& rMEvt );
+ virtual sal_Bool Tracking( const TrackingEvent& rTEvt );
virtual String RequestHelp( const Point& rPos, Rectangle& rHelpRect );
virtual void Init( OutputDevice* pDev, long nWidth, long nHeight ) = 0;
virtual void GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder,
sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const = 0;
virtual long CalcTitleWidth() const = 0;
- virtual void DrawWindow( USHORT nDrawFlags, OutputDevice* pOutDev = NULL, const Point* pOffset = NULL ) = 0;
+ virtual void DrawWindow( sal_uInt16 nDrawFlags, OutputDevice* pOutDev = NULL, const Point* pOffset = NULL ) = 0;
virtual Rectangle GetMenuRect() const;
void ImplInitTitle( ImplBorderFrameData* pData );
- USHORT ImplHitTest( ImplBorderFrameData* pData, const Point& rPos );
- BOOL ImplMouseMove( ImplBorderFrameData* pData, const MouseEvent& rMEvt );
- BOOL ImplMouseButtonDown( ImplBorderFrameData* pData, const MouseEvent& rMEvt );
- BOOL ImplTracking( ImplBorderFrameData* pData, const TrackingEvent& rTEvt );
+ sal_uInt16 ImplHitTest( ImplBorderFrameData* pData, const Point& rPos );
+ sal_Bool ImplMouseMove( ImplBorderFrameData* pData, const MouseEvent& rMEvt );
+ sal_Bool ImplMouseButtonDown( ImplBorderFrameData* pData, const MouseEvent& rMEvt );
+ sal_Bool ImplTracking( ImplBorderFrameData* pData, const TrackingEvent& rTEvt );
String ImplRequestHelp( ImplBorderFrameData* pData, const Point& rPos, Rectangle& rHelpRect );
long ImplCalcTitleWidth( const ImplBorderFrameData* pData ) const;
};
@@ -285,7 +285,7 @@ public:
virtual void GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder,
sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const;
virtual long CalcTitleWidth() const;
- virtual void DrawWindow( USHORT nDrawFlags, OutputDevice* pOutDev, const Point* pOffset );
+ virtual void DrawWindow( sal_uInt16 nDrawFlags, OutputDevice* pOutDev, const Point* pOffset );
};
@@ -314,7 +314,7 @@ public:
virtual void GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder,
sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const;
virtual long CalcTitleWidth() const;
- virtual void DrawWindow( USHORT nDrawFlags, OutputDevice* pOutDev, const Point* pOffset );
+ virtual void DrawWindow( sal_uInt16 nDrawFlags, OutputDevice* pOutDev, const Point* pOffset );
};
@@ -335,9 +335,9 @@ public:
ImplStdBorderWindowView( ImplBorderWindow* pBorderWindow );
~ImplStdBorderWindowView();
- virtual BOOL MouseMove( const MouseEvent& rMEvt );
- virtual BOOL MouseButtonDown( const MouseEvent& rMEvt );
- virtual BOOL Tracking( const TrackingEvent& rTEvt );
+ virtual sal_Bool MouseMove( const MouseEvent& rMEvt );
+ virtual sal_Bool MouseButtonDown( const MouseEvent& rMEvt );
+ virtual sal_Bool Tracking( const TrackingEvent& rTEvt );
virtual String RequestHelp( const Point& rPos, Rectangle& rHelpRect );
virtual Rectangle GetMenuRect() const;
@@ -345,7 +345,7 @@ public:
virtual void GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder,
sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const;
virtual long CalcTitleWidth() const;
- virtual void DrawWindow( USHORT nDrawFlags, OutputDevice* pOutDev, const Point* pOffset );
+ virtual void DrawWindow( sal_uInt16 nDrawFlags, OutputDevice* pOutDev, const Point* pOffset );
};
diff --git a/vcl/inc/vcl/btndlg.hxx b/vcl/inc/vcl/btndlg.hxx
index dbeb8350a0d4..98046090e8f7 100644
--- a/vcl/inc/vcl/btndlg.hxx
+++ b/vcl/inc/vcl/btndlg.hxx
@@ -40,13 +40,13 @@ class PushButton;
// - ButtonDialog-Types -
// ----------------------
-#define BUTTONDIALOG_BUTTON_NOTFOUND ((USHORT)0xFFFF)
+#define BUTTONDIALOG_BUTTON_NOTFOUND ((sal_uInt16)0xFFFF)
-#define BUTTONDIALOG_DEFBUTTON ((USHORT)0x0001)
-#define BUTTONDIALOG_OKBUTTON ((USHORT)0x0002)
-#define BUTTONDIALOG_CANCELBUTTON ((USHORT)0x0004)
-#define BUTTONDIALOG_HELPBUTTON ((USHORT)0x0008)
-#define BUTTONDIALOG_FOCUSBUTTON ((USHORT)0x0010)
+#define BUTTONDIALOG_DEFBUTTON ((sal_uInt16)0x0001)
+#define BUTTONDIALOG_OKBUTTON ((sal_uInt16)0x0002)
+#define BUTTONDIALOG_CANCELBUTTON ((sal_uInt16)0x0004)
+#define BUTTONDIALOG_HELPBUTTON ((sal_uInt16)0x0008)
+#define BUTTONDIALOG_FOCUSBUTTON ((sal_uInt16)0x0010)
// ----------------
// - ButtonDialog -
@@ -59,14 +59,14 @@ private:
Size maPageSize;
Size maCtrlSize;
long mnButtonSize;
- USHORT mnCurButtonId;
- USHORT mnFocusButtonId;
- BOOL mbFormat;
+ sal_uInt16 mnCurButtonId;
+ sal_uInt16 mnFocusButtonId;
+ sal_Bool mbFormat;
Link maClickHdl;
SAL_DLLPRIVATE void ImplInitButtonDialogData();
- SAL_DLLPRIVATE PushButton* ImplCreatePushButton( USHORT nBtnFlags );
- SAL_DLLPRIVATE ImplBtnDlgItem* ImplGetItem( USHORT nId ) const;
+ SAL_DLLPRIVATE PushButton* ImplCreatePushButton( sal_uInt16 nBtnFlags );
+ SAL_DLLPRIVATE ImplBtnDlgItem* ImplGetItem( sal_uInt16 nId ) const;
DECL_DLLPRIVATE_LINK( ImplClickHdl, PushButton* pBtn );
SAL_DLLPRIVATE void ImplPosControls();
@@ -90,25 +90,25 @@ public:
void SetPageSizePixel( const Size& rSize ) { maPageSize = rSize; }
const Size& GetPageSizePixel() const { return maPageSize; }
- USHORT GetCurButtonId() const { return mnCurButtonId; }
+ sal_uInt16 GetCurButtonId() const { return mnCurButtonId; }
- void AddButton( const XubString& rText, USHORT nId, USHORT nBtnFlags, long nSepPixel = 0 );
- void AddButton( StandardButtonType eType, USHORT nId, USHORT nBtnFlags, long nSepPixel = 0 );
- void AddButton( PushButton* pBtn, USHORT nId, USHORT nBtnFlags, long nSepPixel = 0 );
- void RemoveButton( USHORT nId );
+ void AddButton( const XubString& rText, sal_uInt16 nId, sal_uInt16 nBtnFlags, long nSepPixel = 0 );
+ void AddButton( StandardButtonType eType, sal_uInt16 nId, sal_uInt16 nBtnFlags, long nSepPixel = 0 );
+ void AddButton( PushButton* pBtn, sal_uInt16 nId, sal_uInt16 nBtnFlags, long nSepPixel = 0 );
+ void RemoveButton( sal_uInt16 nId );
void Clear();
- USHORT GetButtonCount() const;
- USHORT GetButtonId( USHORT nButton ) const;
- PushButton* GetPushButton( USHORT nId ) const;
- void SetButtonText( USHORT nId, const XubString& rText );
- XubString GetButtonText( USHORT nId ) const;
- void SetButtonHelpText( USHORT nId, const XubString& rText );
- XubString GetButtonHelpText( USHORT nId ) const;
- void SetButtonHelpId( USHORT nId, ULONG nHelpId );
- ULONG GetButtonHelpId( USHORT nId ) const;
-
- void SetFocusButton( USHORT nId = BUTTONDIALOG_BUTTON_NOTFOUND ) { mnFocusButtonId = nId; }
- USHORT GetFocusButton() const { return mnFocusButtonId; }
+ sal_uInt16 GetButtonCount() const;
+ sal_uInt16 GetButtonId( sal_uInt16 nButton ) const;
+ PushButton* GetPushButton( sal_uInt16 nId ) const;
+ void SetButtonText( sal_uInt16 nId, const XubString& rText );
+ XubString GetButtonText( sal_uInt16 nId ) const;
+ void SetButtonHelpText( sal_uInt16 nId, const XubString& rText );
+ XubString GetButtonHelpText( sal_uInt16 nId ) const;
+ void SetButtonHelpId( sal_uInt16 nId, sal_uIntPtr nHelpId );
+ sal_uIntPtr GetButtonHelpId( sal_uInt16 nId ) const;
+
+ void SetFocusButton( sal_uInt16 nId = BUTTONDIALOG_BUTTON_NOTFOUND ) { mnFocusButtonId = nId; }
+ sal_uInt16 GetFocusButton() const { return mnFocusButtonId; }
void SetClickHdl( const Link& rLink ) { maClickHdl = rLink; }
const Link& GetClickHdl() const { return maClickHdl; }
diff --git a/vcl/inc/vcl/button.hxx b/vcl/inc/vcl/button.hxx
index 8f4b94bf7b18..a9ed964a132e 100644
--- a/vcl/inc/vcl/button.hxx
+++ b/vcl/inc/vcl/button.hxx
@@ -55,17 +55,17 @@ private:
SAL_DLLPRIVATE Button (const Button &);
SAL_DLLPRIVATE Button & operator= (const Button &);
public:
- SAL_DLLPRIVATE USHORT ImplGetButtonState() const;
- SAL_DLLPRIVATE USHORT& ImplGetButtonState();
- SAL_DLLPRIVATE USHORT ImplGetTextStyle( XubString& rText, WinBits nWinStyle, ULONG nDrawFlags );
+ SAL_DLLPRIVATE sal_uInt16 ImplGetButtonState() const;
+ SAL_DLLPRIVATE sal_uInt16& ImplGetButtonState();
+ SAL_DLLPRIVATE sal_uInt16 ImplGetTextStyle( XubString& rText, WinBits nWinStyle, sal_uIntPtr nDrawFlags );
SAL_DLLPRIVATE void ImplDrawAlignedImage( OutputDevice* pDev, Point& rPos, Size& rSize,
- BOOL bLayout, ULONG nImageSep, ULONG nDrawFlags,
- USHORT nTextStyle, Rectangle *pSymbolRect=NULL, bool bAddImageSep = false );
+ sal_Bool bLayout, sal_uIntPtr nImageSep, sal_uIntPtr nDrawFlags,
+ sal_uInt16 nTextStyle, Rectangle *pSymbolRect=NULL, bool bAddImageSep = false );
SAL_DLLPRIVATE void ImplSetFocusRect( const Rectangle &rFocusRect );
SAL_DLLPRIVATE const Rectangle& ImplGetFocusRect() const;
SAL_DLLPRIVATE void ImplSetSymbolAlign( SymbolAlign eAlign );
SAL_DLLPRIVATE SymbolAlign ImplGetSymbolAlign() const;
- SAL_DLLPRIVATE void ImplSetSmallSymbol( BOOL bSmall = TRUE );
+ SAL_DLLPRIVATE void ImplSetSmallSymbol( sal_Bool bSmall = sal_True );
protected:
Button( WindowType nType );
@@ -84,19 +84,19 @@ public:
static XubString GetStandardText( StandardButtonType eButton );
static XubString GetStandardHelpText( StandardButtonType eButton );
- BOOL SetModeImage( const Image& rImage, BmpColorMode eMode = BMP_COLOR_NORMAL );
+ sal_Bool SetModeImage( const Image& rImage, BmpColorMode eMode = BMP_COLOR_NORMAL );
const Image GetModeImage( BmpColorMode eMode = BMP_COLOR_NORMAL ) const;
- BOOL HasImage() const;
+ sal_Bool HasImage() const;
void SetImageAlign( ImageAlign eAlign );
ImageAlign GetImageAlign() const;
- BOOL SetModeBitmap( const BitmapEx& rBitmap, BmpColorMode eMode = BMP_COLOR_NORMAL );
+ sal_Bool SetModeBitmap( const BitmapEx& rBitmap, BmpColorMode eMode = BMP_COLOR_NORMAL );
BitmapEx GetModeBitmap( BmpColorMode eMode = BMP_COLOR_NORMAL ) const;
- void EnableImageDisplay( BOOL bEnable );
- BOOL IsImageDisplayEnabled();
- void EnableTextDisplay( BOOL bEnable );
- BOOL IsTextDisplayEnabled();
+ void EnableImageDisplay( sal_Bool bEnable );
+ sal_Bool IsImageDisplayEnabled();
+ void EnableTextDisplay( sal_Bool bEnable );
+ sal_Bool IsTextDisplayEnabled();
void SetFocusRect( const Rectangle& rFocusRect );
const Rectangle& GetFocusRect() const;
@@ -108,8 +108,8 @@ public:
// - PushButton-Types -
// --------------------
-#define PUSHBUTTON_DROPDOWN_TOOLBOX ((USHORT)0x0001)
-#define PUSHBUTTON_DROPDOWN_MENUBUTTON ((USHORT)0x0002)
+#define PUSHBUTTON_DROPDOWN_TOOLBOX ((sal_uInt16)0x0001)
+#define PUSHBUTTON_DROPDOWN_MENUBUTTON ((sal_uInt16)0x0002)
// --------------
// - PushButton -
@@ -121,21 +121,21 @@ protected:
SymbolType meSymbol;
TriState meState;
TriState meSaveValue;
- USHORT mnDDStyle;
- BOOL mbPressed;
- BOOL mbInUserDraw;
+ sal_uInt16 mnDDStyle;
+ sal_Bool mbPressed;
+ sal_Bool mbInUserDraw;
Link maToggleHdl;
SAL_DLLPRIVATE void ImplInitPushButtonData();
SAL_DLLPRIVATE WinBits ImplInitStyle( const Window* pPrevWindow, WinBits nStyle );
- SAL_DLLPRIVATE void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground );
- SAL_DLLPRIVATE void ImplDrawPushButtonContent( OutputDevice* pDev, ULONG nDrawFlags,
+ SAL_DLLPRIVATE void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground );
+ SAL_DLLPRIVATE void ImplDrawPushButtonContent( OutputDevice* pDev, sal_uIntPtr nDrawFlags,
const Rectangle& rRect, bool bLayout );
SAL_DLLPRIVATE void ImplDrawPushButton( bool bLayout = false );
using Button::ImplGetTextStyle;
- SAL_DLLPRIVATE USHORT ImplGetTextStyle( ULONG nDrawFlags ) const;
- SAL_DLLPRIVATE BOOL IsSymbol() const { return ( (meSymbol != SYMBOL_NOSYMBOL) && (meSymbol != SYMBOL_IMAGE) ); }
- SAL_DLLPRIVATE BOOL IsImage() const { return Button::HasImage(); }
+ SAL_DLLPRIVATE sal_uInt16 ImplGetTextStyle( sal_uIntPtr nDrawFlags ) const;
+ SAL_DLLPRIVATE sal_Bool IsSymbol() const { return ( (meSymbol != SYMBOL_NOSYMBOL) && (meSymbol != SYMBOL_IMAGE) ); }
+ SAL_DLLPRIVATE sal_Bool IsImage() const { return Button::HasImage(); }
// Copy assignment is forbidden and not implemented.
SAL_DLLPRIVATE PushButton( const PushButton & );
@@ -146,10 +146,10 @@ protected:
using Control::ImplInitSettings;
using Window::ImplInit;
public:
- SAL_DLLPRIVATE void ImplSetDefButton( BOOL bSet );
- SAL_DLLPRIVATE static void ImplDrawPushButtonFrame( Window* pDev, Rectangle& rRect, USHORT nStyle );
- SAL_DLLPRIVATE static BOOL ImplHitTestPushButton( Window* pDev, const Point& rPos );
- SAL_DLLPRIVATE BOOL ImplIsDefButton() const;
+ SAL_DLLPRIVATE void ImplSetDefButton( sal_Bool bSet );
+ SAL_DLLPRIVATE static void ImplDrawPushButtonFrame( Window* pDev, Rectangle& rRect, sal_uInt16 nStyle );
+ SAL_DLLPRIVATE static sal_Bool ImplHitTestPushButton( Window* pDev, const Point& rPos );
+ SAL_DLLPRIVATE sal_Bool ImplIsDefButton() const;
protected:
PushButton( WindowType nType );
@@ -169,7 +169,7 @@ public:
virtual void KeyInput( const KeyEvent& rKEvt );
virtual void KeyUp( const KeyEvent& rKEvt );
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_uIntPtr nFlags );
virtual void Resize();
virtual void GetFocus();
virtual void LoseFocus();
@@ -185,17 +185,17 @@ public:
void SetSymbolAlign( SymbolAlign eAlign );
SymbolAlign GetSymbolAlign() const;
- void SetDropDown( USHORT nStyle );
- USHORT GetDropDown() const { return mnDDStyle; }
+ void SetDropDown( sal_uInt16 nStyle );
+ sal_uInt16 GetDropDown() const { return mnDDStyle; }
void SetState( TriState eState );
TriState GetState() const { return meState; }
- void Check( BOOL bCheck = TRUE );
- BOOL IsChecked() const;
+ void Check( sal_Bool bCheck = sal_True );
+ sal_Bool IsChecked() const;
- void SetPressed( BOOL bPressed );
- BOOL IsPressed() const { return mbPressed; }
+ void SetPressed( sal_Bool bPressed );
+ sal_Bool IsPressed() const { return mbPressed; }
void EndSelection();
@@ -209,12 +209,12 @@ public:
const Link& GetToggleHdl() const { return maToggleHdl; }
};
-inline void PushButton::Check( BOOL bCheck )
+inline void PushButton::Check( sal_Bool bCheck )
{
SetState( (bCheck) ? STATE_CHECK : STATE_NOCHECK );
}
-inline BOOL PushButton::IsChecked() const
+inline sal_Bool PushButton::IsChecked() const
{
return (GetState() == STATE_CHECK);
}
@@ -296,17 +296,17 @@ private:
Rectangle maMouseRect;
Image maImage;
Image maImageHC;
- BOOL mbChecked;
- BOOL mbSaveValue;
- BOOL mbRadioCheck;
- BOOL mbStateChanged;
+ sal_Bool mbChecked;
+ sal_Bool mbSaveValue;
+ sal_Bool mbRadioCheck;
+ sal_Bool mbStateChanged;
Link maToggleHdl;
SAL_DLLPRIVATE void ImplInitRadioButtonData();
SAL_DLLPRIVATE WinBits ImplInitStyle( const Window* pPrevWindow, WinBits nStyle );
- SAL_DLLPRIVATE void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground );
+ SAL_DLLPRIVATE void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground );
SAL_DLLPRIVATE void ImplDrawRadioButtonState();
- SAL_DLLPRIVATE void ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
+ SAL_DLLPRIVATE void ImplDraw( OutputDevice* pDev, sal_uIntPtr nDrawFlags,
const Point& rPos, const Size& rSize,
const Size& rImageSize, Rectangle& rStateRect,
Rectangle& rMouseRect, bool bLayout = false );
@@ -327,7 +327,7 @@ protected:
SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
public:
- SAL_DLLPRIVATE void ImplCallClick( BOOL bGrabFocus = FALSE, USHORT nFocusFlags = 0 );
+ SAL_DLLPRIVATE void ImplCallClick( sal_Bool bGrabFocus = sal_False, sal_uInt16 nFocusFlags = 0 );
SAL_DLLPRIVATE void ImplSetMinimumNWFSize();
protected:
@@ -356,7 +356,7 @@ public:
virtual void KeyInput( const KeyEvent& rKEvt );
virtual void KeyUp( const KeyEvent& rKEvt );
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_uIntPtr nFlags );
virtual void Resize();
virtual void GetFocus();
virtual void LoseFocus();
@@ -366,22 +366,22 @@ public:
virtual void Toggle();
- BOOL IsStateChanged() const { return mbStateChanged; }
+ sal_Bool IsStateChanged() const { return mbStateChanged; }
- void EnableRadioCheck( BOOL bRadioCheck = TRUE ) { mbRadioCheck = bRadioCheck; }
- BOOL IsRadioCheckEnabled() const { return mbRadioCheck; }
+ void EnableRadioCheck( sal_Bool bRadioCheck = sal_True ) { mbRadioCheck = bRadioCheck; }
+ sal_Bool IsRadioCheckEnabled() const { return mbRadioCheck; }
- BOOL SetModeRadioImage( const Image& rImage, BmpColorMode eMode = BMP_COLOR_NORMAL );
+ sal_Bool SetModeRadioImage( const Image& rImage, BmpColorMode eMode = BMP_COLOR_NORMAL );
const Image& GetModeRadioImage( BmpColorMode eMode = BMP_COLOR_NORMAL ) const;
- void SetState( BOOL bCheck );
- void Check( BOOL bCheck = TRUE );
- BOOL IsChecked() const { return mbChecked; }
+ void SetState( sal_Bool bCheck );
+ void Check( sal_Bool bCheck = sal_True );
+ sal_Bool IsChecked() const { return mbChecked; }
void SaveValue() { mbSaveValue = IsChecked(); }
- BOOL GetSavedValue() const { return mbSaveValue; }
+ sal_Bool GetSavedValue() const { return mbSaveValue; }
- static Image GetRadioImage( const AllSettings& rSettings, USHORT nFlags );
+ static Image GetRadioImage( const AllSettings& rSettings, sal_uInt16 nFlags );
Size CalcMinimumSize( long nMaxWidth = 0 ) const;
virtual Size GetOptimalSize(WindowSizeType eType) const;
@@ -416,14 +416,14 @@ private:
Rectangle maMouseRect;
TriState meState;
TriState meSaveValue;
- BOOL mbTriState;
+ sal_Bool mbTriState;
Link maToggleHdl;
SAL_DLLPRIVATE void ImplInitCheckBoxData();
SAL_DLLPRIVATE WinBits ImplInitStyle( const Window* pPrevWindow, WinBits nStyle );
- SAL_DLLPRIVATE void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground );
+ SAL_DLLPRIVATE void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground );
SAL_DLLPRIVATE void ImplInvalidateOrDrawCheckBoxState();
- SAL_DLLPRIVATE void ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
+ SAL_DLLPRIVATE void ImplDraw( OutputDevice* pDev, sal_uIntPtr nDrawFlags,
const Point& rPos, const Size& rSize,
const Size& rImageSize, Rectangle& rStateRect,
Rectangle& rMouseRect, bool bLayout );
@@ -461,7 +461,7 @@ public:
virtual void KeyInput( const KeyEvent& rKEvt );
virtual void KeyUp( const KeyEvent& rKEvt );
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_uIntPtr nFlags );
virtual void Resize();
virtual void GetFocus();
virtual void LoseFocus();
@@ -474,16 +474,16 @@ public:
void SetState( TriState eState );
TriState GetState() const { return meState; }
- void Check( BOOL bCheck = TRUE );
- BOOL IsChecked() const;
+ void Check( sal_Bool bCheck = sal_True );
+ sal_Bool IsChecked() const;
- void EnableTriState( BOOL bTriState = TRUE );
- BOOL IsTriStateEnabled() const { return mbTriState; }
+ void EnableTriState( sal_Bool bTriState = sal_True );
+ sal_Bool IsTriStateEnabled() const { return mbTriState; }
void SaveValue() { meSaveValue = GetState(); }
TriState GetSavedValue() const { return meSaveValue; }
- static Image GetCheckImage( const AllSettings& rSettings, USHORT nFlags );
+ static Image GetCheckImage( const AllSettings& rSettings, sal_uInt16 nFlags );
Size CalcMinimumSize( long nMaxWidth = 0 ) const;
virtual Size GetOptimalSize(WindowSizeType eType) const;
@@ -492,12 +492,12 @@ public:
const Link& GetToggleHdl() const { return maToggleHdl; }
};
-inline void CheckBox::Check( BOOL bCheck )
+inline void CheckBox::Check( sal_Bool bCheck )
{
SetState( (bCheck) ? STATE_CHECK : STATE_NOCHECK );
}
-inline BOOL CheckBox::IsChecked() const
+inline sal_Bool CheckBox::IsChecked() const
{
return (GetState() == STATE_CHECK);
}
diff --git a/vcl/inc/vcl/canvasbitmap.hxx b/vcl/inc/vcl/canvasbitmap.hxx
index 85c0aa795c8c..da0116808416 100644
--- a/vcl/inc/vcl/canvasbitmap.hxx
+++ b/vcl/inc/vcl/canvasbitmap.hxx
@@ -66,7 +66,7 @@ namespace unotools
bool m_bSwap;
bool m_bPalette;
- SAL_DLLPRIVATE void setComponentInfo( ULONG redShift, ULONG greenShift, ULONG blueShift );
+ SAL_DLLPRIVATE void setComponentInfo( sal_uIntPtr redShift, sal_uIntPtr greenShift, sal_uIntPtr blueShift );
virtual ~VclCanvasBitmap();
diff --git a/vcl/inc/vcl/cmdevt.hxx b/vcl/inc/vcl/cmdevt.hxx
index 7e968b6c7a54..5540f26ad5eb 100644
--- a/vcl/inc/vcl/cmdevt.hxx
+++ b/vcl/inc/vcl/cmdevt.hxx
@@ -38,54 +38,54 @@
// - CommandExtTextInputData -
// ---------------------------
-#define EXTTEXTINPUT_ATTR_GRAYWAVELINE ((USHORT)0x0100)
-#define EXTTEXTINPUT_ATTR_UNDERLINE ((USHORT)0x0200)
-#define EXTTEXTINPUT_ATTR_BOLDUNDERLINE ((USHORT)0x0400)
-#define EXTTEXTINPUT_ATTR_DOTTEDUNDERLINE ((USHORT)0x0800)
-#define EXTTEXTINPUT_ATTR_DASHDOTUNDERLINE ((USHORT)0x1000)
-#define EXTTEXTINPUT_ATTR_HIGHLIGHT ((USHORT)0x2000)
-#define EXTTEXTINPUT_ATTR_REDTEXT ((USHORT)0x4000)
-#define EXTTEXTINPUT_ATTR_HALFTONETEXT ((USHORT)0x8000)
-
-#define EXTTEXTINPUT_CURSOR_INVISIBLE ((USHORT)0x0001)
-#define EXTTEXTINPUT_CURSOR_OVERWRITE ((USHORT)0x0002)
+#define EXTTEXTINPUT_ATTR_GRAYWAVELINE ((sal_uInt16)0x0100)
+#define EXTTEXTINPUT_ATTR_UNDERLINE ((sal_uInt16)0x0200)
+#define EXTTEXTINPUT_ATTR_BOLDUNDERLINE ((sal_uInt16)0x0400)
+#define EXTTEXTINPUT_ATTR_DOTTEDUNDERLINE ((sal_uInt16)0x0800)
+#define EXTTEXTINPUT_ATTR_DASHDOTUNDERLINE ((sal_uInt16)0x1000)
+#define EXTTEXTINPUT_ATTR_HIGHLIGHT ((sal_uInt16)0x2000)
+#define EXTTEXTINPUT_ATTR_REDTEXT ((sal_uInt16)0x4000)
+#define EXTTEXTINPUT_ATTR_HALFTONETEXT ((sal_uInt16)0x8000)
+
+#define EXTTEXTINPUT_CURSOR_INVISIBLE ((sal_uInt16)0x0001)
+#define EXTTEXTINPUT_CURSOR_OVERWRITE ((sal_uInt16)0x0002)
class VCL_DLLPUBLIC CommandExtTextInputData
{
private:
XubString maText;
- USHORT* mpTextAttr;
+ sal_uInt16* mpTextAttr;
xub_StrLen mnCursorPos;
xub_StrLen mnDeltaStart;
xub_StrLen mnOldTextLen;
- USHORT mnCursorFlags;
- BOOL mbOnlyCursor;
+ sal_uInt16 mnCursorFlags;
+ sal_Bool mbOnlyCursor;
public:
CommandExtTextInputData();
CommandExtTextInputData( const XubString& rText,
- const USHORT* pTextAttr,
+ const sal_uInt16* pTextAttr,
xub_StrLen nCursorPos,
- USHORT nCursorFlags,
+ sal_uInt16 nCursorFlags,
xub_StrLen nDeltaStart,
xub_StrLen nOldTextLen,
- BOOL bOnlyCursor );
+ sal_Bool bOnlyCursor );
CommandExtTextInputData( const CommandExtTextInputData& rData );
~CommandExtTextInputData();
const XubString& GetText() const { return maText; }
- const USHORT* GetTextAttr() const { return mpTextAttr; }
- USHORT GetCharTextAttr( USHORT nIndex ) const;
+ const sal_uInt16* GetTextAttr() const { return mpTextAttr; }
+ sal_uInt16 GetCharTextAttr( sal_uInt16 nIndex ) const;
xub_StrLen GetCursorPos() const { return mnCursorPos; }
- BOOL IsCursorVisible() const { return (mnCursorFlags & EXTTEXTINPUT_CURSOR_INVISIBLE) == 0; }
- BOOL IsCursorOverwrite() const { return (mnCursorFlags & EXTTEXTINPUT_CURSOR_OVERWRITE) != 0; }
- USHORT GetCursorFlags() const { return mnCursorFlags; }
+ sal_Bool IsCursorVisible() const { return (mnCursorFlags & EXTTEXTINPUT_CURSOR_INVISIBLE) == 0; }
+ sal_Bool IsCursorOverwrite() const { return (mnCursorFlags & EXTTEXTINPUT_CURSOR_OVERWRITE) != 0; }
+ sal_uInt16 GetCursorFlags() const { return mnCursorFlags; }
xub_StrLen GetDeltaStart() const { return mnDeltaStart; }
xub_StrLen GetOldTextLen() const { return mnOldTextLen; }
- BOOL IsOnlyCursorChanged() const { return mbOnlyCursor; }
+ sal_Bool IsOnlyCursorChanged() const { return mbOnlyCursor; }
};
-inline USHORT CommandExtTextInputData::GetCharTextAttr( USHORT nIndex ) const
+inline sal_uInt16 CommandExtTextInputData::GetCharTextAttr( sal_uInt16 nIndex ) const
{
if ( mpTextAttr && (nIndex < maText.Len()) )
return mpTextAttr[nIndex];
@@ -123,47 +123,47 @@ inline CommandInputContextData::CommandInputContextData( LanguageType eLang )
// - CommandWheelData -
// --------------------
-#define COMMAND_WHEEL_SCROLL ((USHORT)0x0001)
-#define COMMAND_WHEEL_ZOOM ((USHORT)0x0002)
-#define COMMAND_WHEEL_DATAZOOM ((USHORT)0x0004)
+#define COMMAND_WHEEL_SCROLL ((sal_uInt16)0x0001)
+#define COMMAND_WHEEL_ZOOM ((sal_uInt16)0x0002)
+#define COMMAND_WHEEL_DATAZOOM ((sal_uInt16)0x0004)
-#define COMMAND_WHEEL_PAGESCROLL ((ULONG)0xFFFFFFFF)
+#define COMMAND_WHEEL_PAGESCROLL ((sal_uIntPtr)0xFFFFFFFF)
class VCL_DLLPUBLIC CommandWheelData
{
private:
long mnDelta;
long mnNotchDelta;
- ULONG mnLines;
- USHORT mnMode;
- USHORT mnCode;
- BOOL mbHorz;
- BOOL mbDeltaIsPixel;
+ sal_uIntPtr mnLines;
+ sal_uInt16 mnMode;
+ sal_uInt16 mnCode;
+ sal_Bool mbHorz;
+ sal_Bool mbDeltaIsPixel;
public:
CommandWheelData();
CommandWheelData( long nWheelDelta, long nWheelNotchDelta,
- ULONG nScrollLines,
- USHORT nWheelMode, USHORT nKeyModifier,
- BOOL bHorz = FALSE, BOOL bDeltaIsPixel = FALSE );
+ sal_uIntPtr nScrollLines,
+ sal_uInt16 nWheelMode, sal_uInt16 nKeyModifier,
+ sal_Bool bHorz = sal_False, sal_Bool bDeltaIsPixel = sal_False );
long GetDelta() const { return mnDelta; }
long GetNotchDelta() const { return mnNotchDelta; }
- ULONG GetScrollLines() const { return mnLines; }
- BOOL IsHorz() const { return mbHorz; }
- BOOL IsDeltaPixel() const { return mbDeltaIsPixel; }
+ sal_uIntPtr GetScrollLines() const { return mnLines; }
+ sal_Bool IsHorz() const { return mbHorz; }
+ sal_Bool IsDeltaPixel() const { return mbDeltaIsPixel; }
- USHORT GetMode() const { return mnMode; }
+ sal_uInt16 GetMode() const { return mnMode; }
- USHORT GetModifier() const
+ sal_uInt16 GetModifier() const
{ return (mnCode & (KEY_SHIFT | KEY_MOD1 | KEY_MOD2)); }
- BOOL IsShift() const
+ sal_Bool IsShift() const
{ return ((mnCode & KEY_SHIFT) != 0); }
- BOOL IsMod1() const
+ sal_Bool IsMod1() const
{ return ((mnCode & KEY_MOD1) != 0); }
- BOOL IsMod2() const
+ sal_Bool IsMod2() const
{ return ((mnCode & KEY_MOD2) != 0); }
- BOOL IsMod3() const
+ sal_Bool IsMod3() const
{ return ((mnCode & KEY_MOD3) != 0); }
};
@@ -174,14 +174,14 @@ inline CommandWheelData::CommandWheelData()
mnLines = 0;
mnMode = 0;
mnCode = 0;
- mbHorz = FALSE;
- mbDeltaIsPixel = FALSE;
+ mbHorz = sal_False;
+ mbDeltaIsPixel = sal_False;
}
inline CommandWheelData::CommandWheelData( long nWheelDelta, long nWheelNotchDelta,
- ULONG nScrollLines,
- USHORT nWheelMode, USHORT nKeyModifier,
- BOOL bHorz, BOOL bDeltaIsPixel )
+ sal_uIntPtr nScrollLines,
+ sal_uInt16 nWheelMode, sal_uInt16 nKeyModifier,
+ sal_Bool bHorz, sal_Bool bDeltaIsPixel )
{
mnDelta = nWheelDelta;
mnNotchDelta = nWheelNotchDelta;
@@ -236,17 +236,17 @@ class VCL_DLLPUBLIC CommandVoiceData
{
private:
XubString maText;
- USHORT mnCommand;
+ sal_uInt16 mnCommand;
DictationCommandType meType;
public:
CommandVoiceData();
CommandVoiceData( const XubString& rStr,
DictationCommandType eType,
- USHORT nCommand );
+ sal_uInt16 nCommand );
const XubString& GetText() const { return maText; }
- USHORT GetCommand() const { return mnCommand; }
+ sal_uInt16 GetCommand() const { return mnCommand; }
DictationCommandType GetType() const { return meType; }
};
@@ -258,7 +258,7 @@ inline CommandVoiceData::CommandVoiceData()
inline CommandVoiceData::CommandVoiceData( const XubString& rStr,
DictationCommandType eType,
- USHORT nCommand ) :
+ sal_uInt16 nCommand ) :
maText( rStr ),
mnCommand( nCommand ),
meType( eType )
@@ -272,26 +272,26 @@ inline CommandVoiceData::CommandVoiceData( const XubString& rStr,
class VCL_DLLPUBLIC CommandModKeyData
{
private:
- USHORT mnCode;
+ sal_uInt16 mnCode;
public:
CommandModKeyData();
- CommandModKeyData( USHORT nCode );
-
- BOOL IsShift() const { return (mnCode & MODKEY_SHIFT) ? TRUE : FALSE; }
- BOOL IsMod1() const { return (mnCode & MODKEY_MOD1) ? TRUE : FALSE; }
- BOOL IsMod2() const { return (mnCode & MODKEY_MOD2) ? TRUE : FALSE; }
- BOOL IsMod3() const { return (mnCode & MODKEY_MOD3) ? TRUE : FALSE; }
-
- BOOL IsLeftShift() const { return (mnCode & MODKEY_LSHIFT) ? TRUE : FALSE; }
- BOOL IsLeftMod1() const { return (mnCode & MODKEY_LMOD1) ? TRUE : FALSE; }
- BOOL IsLeftMod2() const { return (mnCode & MODKEY_LMOD2) ? TRUE : FALSE; }
- BOOL IsLeftMod3() const { return (mnCode & MODKEY_LMOD3) ? TRUE : FALSE; }
-
- BOOL IsRightShift() const { return (mnCode & MODKEY_RSHIFT) ? TRUE : FALSE; }
- BOOL IsRightMod1() const { return (mnCode & MODKEY_RMOD1) ? TRUE : FALSE; }
- BOOL IsRightMod2() const { return (mnCode & MODKEY_RMOD2) ? TRUE : FALSE; }
- BOOL IsRightMod3() const { return (mnCode & MODKEY_RMOD3) ? TRUE : FALSE; }
+ CommandModKeyData( sal_uInt16 nCode );
+
+ sal_Bool IsShift() const { return (mnCode & MODKEY_SHIFT) ? sal_True : sal_False; }
+ sal_Bool IsMod1() const { return (mnCode & MODKEY_MOD1) ? sal_True : sal_False; }
+ sal_Bool IsMod2() const { return (mnCode & MODKEY_MOD2) ? sal_True : sal_False; }
+ sal_Bool IsMod3() const { return (mnCode & MODKEY_MOD3) ? sal_True : sal_False; }
+
+ sal_Bool IsLeftShift() const { return (mnCode & MODKEY_LSHIFT) ? sal_True : sal_False; }
+ sal_Bool IsLeftMod1() const { return (mnCode & MODKEY_LMOD1) ? sal_True : sal_False; }
+ sal_Bool IsLeftMod2() const { return (mnCode & MODKEY_LMOD2) ? sal_True : sal_False; }
+ sal_Bool IsLeftMod3() const { return (mnCode & MODKEY_LMOD3) ? sal_True : sal_False; }
+
+ sal_Bool IsRightShift() const { return (mnCode & MODKEY_RSHIFT) ? sal_True : sal_False; }
+ sal_Bool IsRightMod1() const { return (mnCode & MODKEY_RMOD1) ? sal_True : sal_False; }
+ sal_Bool IsRightMod2() const { return (mnCode & MODKEY_RMOD2) ? sal_True : sal_False; }
+ sal_Bool IsRightMod3() const { return (mnCode & MODKEY_RMOD3) ? sal_True : sal_False; }
};
inline CommandModKeyData::CommandModKeyData()
@@ -299,7 +299,7 @@ inline CommandModKeyData::CommandModKeyData()
mnCode = 0L;
}
-inline CommandModKeyData::CommandModKeyData( USHORT nCode )
+inline CommandModKeyData::CommandModKeyData( sal_uInt16 nCode )
{
mnCode = nCode;
}
@@ -357,15 +357,15 @@ class VCL_DLLPUBLIC CommandDialogData
class VCL_DLLPUBLIC CommandSelectionChangeData
{
private:
- ULONG mnStart;
- ULONG mnEnd;
+ sal_uIntPtr mnStart;
+ sal_uIntPtr mnEnd;
public:
CommandSelectionChangeData();
- CommandSelectionChangeData( ULONG nStart, ULONG nEnd );
+ CommandSelectionChangeData( sal_uIntPtr nStart, sal_uIntPtr nEnd );
- ULONG GetStart() const { return mnStart; }
- ULONG GetEnd() const { return mnEnd; }
+ sal_uIntPtr GetStart() const { return mnStart; }
+ sal_uIntPtr GetEnd() const { return mnEnd; }
};
inline CommandSelectionChangeData::CommandSelectionChangeData()
@@ -373,8 +373,8 @@ inline CommandSelectionChangeData::CommandSelectionChangeData()
mnStart = mnEnd = 0;
}
-inline CommandSelectionChangeData::CommandSelectionChangeData( ULONG nStart,
- ULONG nEnd )
+inline CommandSelectionChangeData::CommandSelectionChangeData( sal_uIntPtr nStart,
+ sal_uIntPtr nEnd )
{
mnStart = nStart;
mnEnd = nEnd;
@@ -384,43 +384,43 @@ inline CommandSelectionChangeData::CommandSelectionChangeData( ULONG nStart,
// - CommandEvent -
// ----------------
-#define COMMAND_CONTEXTMENU ((USHORT)1)
-#define COMMAND_STARTDRAG ((USHORT)2)
-#define COMMAND_WHEEL ((USHORT)3)
-#define COMMAND_STARTAUTOSCROLL ((USHORT)4)
-#define COMMAND_AUTOSCROLL ((USHORT)5)
-#define COMMAND_VOICE ((USHORT)6)
-#define COMMAND_STARTEXTTEXTINPUT ((USHORT)7)
-#define COMMAND_EXTTEXTINPUT ((USHORT)8)
-#define COMMAND_ENDEXTTEXTINPUT ((USHORT)9)
-#define COMMAND_INPUTCONTEXTCHANGE ((USHORT)10)
-#define COMMAND_CURSORPOS ((USHORT)11)
-#define COMMAND_PASTESELECTION ((USHORT)12)
-#define COMMAND_MODKEYCHANGE ((USHORT)13)
-#define COMMAND_HANGUL_HANJA_CONVERSION ((USHORT)14)
-#define COMMAND_INPUTLANGUAGECHANGE ((USHORT)15)
-#define COMMAND_SHOWDIALOG ((USHORT)16)
-#define COMMAND_MEDIA ((USHORT)17)
-#define COMMAND_SELECTIONCHANGE ((USHORT)18)
-#define COMMAND_PREPARERECONVERSION ((USHORT)19)
-#define COMMAND_USER ((USHORT)4096)
+#define COMMAND_CONTEXTMENU ((sal_uInt16)1)
+#define COMMAND_STARTDRAG ((sal_uInt16)2)
+#define COMMAND_WHEEL ((sal_uInt16)3)
+#define COMMAND_STARTAUTOSCROLL ((sal_uInt16)4)
+#define COMMAND_AUTOSCROLL ((sal_uInt16)5)
+#define COMMAND_VOICE ((sal_uInt16)6)
+#define COMMAND_STARTEXTTEXTINPUT ((sal_uInt16)7)
+#define COMMAND_EXTTEXTINPUT ((sal_uInt16)8)
+#define COMMAND_ENDEXTTEXTINPUT ((sal_uInt16)9)
+#define COMMAND_INPUTCONTEXTCHANGE ((sal_uInt16)10)
+#define COMMAND_CURSORPOS ((sal_uInt16)11)
+#define COMMAND_PASTESELECTION ((sal_uInt16)12)
+#define COMMAND_MODKEYCHANGE ((sal_uInt16)13)
+#define COMMAND_HANGUL_HANJA_CONVERSION ((sal_uInt16)14)
+#define COMMAND_INPUTLANGUAGECHANGE ((sal_uInt16)15)
+#define COMMAND_SHOWDIALOG ((sal_uInt16)16)
+#define COMMAND_MEDIA ((sal_uInt16)17)
+#define COMMAND_SELECTIONCHANGE ((sal_uInt16)18)
+#define COMMAND_PREPARERECONVERSION ((sal_uInt16)19)
+#define COMMAND_USER ((sal_uInt16)4096)
class VCL_DLLPUBLIC CommandEvent
{
private:
Point maPos;
void* mpData;
- USHORT mnCommand;
- BOOL mbMouseEvent;
+ sal_uInt16 mnCommand;
+ sal_Bool mbMouseEvent;
public:
CommandEvent();
- CommandEvent( const Point& rMousePos, USHORT nCmd,
- BOOL bMEvt = FALSE, const void* pCmdData = NULL );
+ CommandEvent( const Point& rMousePos, sal_uInt16 nCmd,
+ sal_Bool bMEvt = sal_False, const void* pCmdData = NULL );
- USHORT GetCommand() const { return mnCommand; }
+ sal_uInt16 GetCommand() const { return mnCommand; }
const Point& GetMousePosPixel() const { return maPos; }
- BOOL IsMouseEvent() const { return mbMouseEvent; }
+ sal_Bool IsMouseEvent() const { return mbMouseEvent; }
void* GetData() const { return mpData; }
const CommandExtTextInputData* GetExtTextInputData() const;
@@ -438,11 +438,11 @@ inline CommandEvent::CommandEvent()
{
mpData = NULL;
mnCommand = 0;
- mbMouseEvent = FALSE;
+ mbMouseEvent = sal_False;
}
inline CommandEvent::CommandEvent( const Point& rMousePos,
- USHORT nCmd, BOOL bMEvt, const void* pCmdData ) :
+ sal_uInt16 nCmd, sal_Bool bMEvt, const void* pCmdData ) :
maPos( rMousePos )
{
mpData = (void*)pCmdData;
diff --git a/vcl/inc/vcl/combobox.h b/vcl/inc/vcl/combobox.h
index f4fc39f021b2..def55435ad1f 100644
--- a/vcl/inc/vcl/combobox.h
+++ b/vcl/inc/vcl/combobox.h
@@ -28,10 +28,10 @@
#ifndef _SV_COMBOBOX_H
#define _SV_COMBOBOX_H
-#define COMBOBOX_APPEND ((USHORT)0xFFFF)
-#define COMBOBOX_ENTRY_NOTFOUND ((USHORT)0xFFFF)
-#define COMBOBOX_ERROR ((USHORT)0xFFFF)
+#define COMBOBOX_APPEND ((sal_uInt16)0xFFFF)
+#define COMBOBOX_ENTRY_NOTFOUND ((sal_uInt16)0xFFFF)
+#define COMBOBOX_ERROR ((sal_uInt16)0xFFFF)
-#define COMBOBOX_USERDRAW_SELECTED ((USHORT)0x0001)
+#define COMBOBOX_USERDRAW_SELECTED ((sal_uInt16)0x0001)
#endif // _SV_COMBOBOX_H
diff --git a/vcl/inc/vcl/combobox.hxx b/vcl/inc/vcl/combobox.hxx
index e35474a84d53..939d358c3b5a 100644
--- a/vcl/inc/vcl/combobox.hxx
+++ b/vcl/inc/vcl/combobox.hxx
@@ -50,11 +50,11 @@ private:
ImplListBox* mpImplLB;
ImplBtn* mpBtn;
ImplListBoxFloatingWindow* mpFloatWin;
- USHORT mnDDHeight;
+ sal_uInt16 mnDDHeight;
xub_Unicode mcMultiSep;
- BOOL mbDDAutoSize : 1;
- BOOL mbSyntheticModify : 1;
- BOOL mbMatchCase : 1;
+ sal_Bool mbDDAutoSize : 1;
+ sal_Bool mbSyntheticModify : 1;
+ sal_Bool mbMatchCase : 1;
Link maSelectHdl;
Link maDoubleClickHdl;
@@ -82,7 +82,7 @@ protected:
protected:
ComboBox( WindowType nType );
- BOOL IsDropDownBox() const { return mpFloatWin ? TRUE : FALSE; }
+ sal_Bool IsDropDownBox() const { return mpFloatWin ? sal_True : sal_False; }
virtual void FillLayoutData() const;
public:
@@ -90,7 +90,7 @@ public:
ComboBox( Window* pParent, const ResId& rResId );
~ComboBox();
- 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_uIntPtr nFlags );
virtual void Resize();
virtual long PreNotify( NotifyEvent& rNEvt );
virtual long Notify( NotifyEvent& rNEvt );
@@ -105,7 +105,7 @@ public:
virtual const Wallpaper& GetDisplayBackground() const;
- virtual void SetPosSizePixel( long nX, long nY, long nWidth, long nHeight, USHORT nFlags = WINDOW_POSSIZE_ALL );
+ virtual void SetPosSizePixel( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags = WINDOW_POSSIZE_ALL );
void SetPosSizePixel( const Point& rNewPos, const Size& rNewSize )
{ Edit::SetPosSizePixel( rNewPos, rNewSize ); }
void SetDropDownSizePixel( const Size& rNewSize )
@@ -116,55 +116,55 @@ public:
// returns empty rectangle in DropDown mode,
// else it returns the PosSize of the ListBox
- void SetDropDownLineCount( USHORT nLines );
- USHORT GetDropDownLineCount() const;
+ void SetDropDownLineCount( sal_uInt16 nLines );
+ sal_uInt16 GetDropDownLineCount() const;
- void EnableAutoSize( BOOL bAuto );
- BOOL IsAutoSizeEnabled() const { return mbDDAutoSize; }
+ void EnableAutoSize( sal_Bool bAuto );
+ sal_Bool IsAutoSizeEnabled() const { return mbDDAutoSize; }
- void EnableDDAutoWidth( BOOL b );
- BOOL IsDDAutoWidthEnabled() const;
+ void EnableDDAutoWidth( sal_Bool b );
+ sal_Bool IsDDAutoWidthEnabled() const;
void SetText( const XubString& rStr );
void SetText( const XubString& rStr, const Selection& rNewSelection );
- USHORT InsertEntry( const XubString& rStr, USHORT nPos = COMBOBOX_APPEND );
- USHORT InsertEntry( const XubString& rStr, const Image& rImage, USHORT nPos = COMBOBOX_APPEND );
+ sal_uInt16 InsertEntry( const XubString& rStr, sal_uInt16 nPos = COMBOBOX_APPEND );
+ sal_uInt16 InsertEntry( const XubString& rStr, const Image& rImage, sal_uInt16 nPos = COMBOBOX_APPEND );
void RemoveEntry( const XubString& rStr );
- void RemoveEntry( USHORT nPos );
+ void RemoveEntry( sal_uInt16 nPos );
void Clear();
- USHORT GetEntryPos( const XubString& rStr ) const;
- USHORT GetEntryPos( const void* pData ) const;
- XubString GetEntry( USHORT nPos ) const;
- USHORT GetEntryCount() const;
+ sal_uInt16 GetEntryPos( const XubString& rStr ) const;
+ sal_uInt16 GetEntryPos( const void* pData ) const;
+ XubString GetEntry( sal_uInt16 nPos ) const;
+ sal_uInt16 GetEntryCount() const;
- BOOL IsTravelSelect() const;
- BOOL IsInDropDown() const;
+ sal_Bool IsTravelSelect() const;
+ sal_Bool IsInDropDown() const;
void ToggleDropDown();
- long CalcWindowSizePixel( USHORT nLines ) const;
+ long CalcWindowSizePixel( sal_uInt16 nLines ) const;
void SetUserItemSize( const Size& rSz );
const Size& GetUserItemSize() const;
- void EnableUserDraw( BOOL bUserDraw );
- BOOL IsUserDrawEnabled() const;
+ void EnableUserDraw( sal_Bool bUserDraw );
+ sal_Bool IsUserDrawEnabled() const;
- void DrawEntry( const UserDrawEvent& rEvt, BOOL bDrawImage, BOOL bDrawText, BOOL bDrawTextAtImagePos = FALSE );
- void SetBorderStyle( USHORT nBorderStyle );
+ void DrawEntry( const UserDrawEvent& rEvt, sal_Bool bDrawImage, sal_Bool bDrawText, sal_Bool bDrawTextAtImagePos = sal_False );
+ void SetBorderStyle( sal_uInt16 nBorderStyle );
- void SetSeparatorPos( USHORT n );
+ void SetSeparatorPos( sal_uInt16 n );
void SetSeparatorPos();
- USHORT GetSeparatorPos() const;
+ sal_uInt16 GetSeparatorPos() const;
- void EnableAutocomplete( BOOL bEnable, BOOL bMatchCase = FALSE );
- BOOL IsAutocompleteEnabled() const;
+ void EnableAutocomplete( sal_Bool bEnable, sal_Bool bMatchCase = sal_False );
+ sal_Bool IsAutocompleteEnabled() const;
- void EnableMultiSelection( BOOL bMulti );
- BOOL IsMultiSelectionEnabled() const;
+ void EnableMultiSelection( sal_Bool bMulti );
+ sal_Bool IsMultiSelectionEnabled() const;
void SetMultiSelectionSeparator( xub_Unicode cSep ) { mcMultiSep = cSep; }
xub_Unicode GetMultiSelectionSeparator() const { return mcMultiSep; }
@@ -177,32 +177,32 @@ public:
virtual Size GetOptimalSize(WindowSizeType eType) 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 SetMRUEntries( const XubString& rEntries, xub_Unicode cSep = ';' );
XubString GetMRUEntries( xub_Unicode cSep = ';' ) const;
- void SetMaxMRUCount( USHORT n );
- USHORT GetMaxMRUCount() const;
+ void SetMaxMRUCount( sal_uInt16 n );
+ sal_uInt16 GetMaxMRUCount() const;
- void SetEntryData( USHORT nPos, void* pNewData );
- void* GetEntryData( USHORT nPos ) const;
+ void SetEntryData( sal_uInt16 nPos, void* pNewData );
+ void* GetEntryData( sal_uInt16 nPos ) const;
- void SetTopEntry( USHORT nPos );
- void ShowProminentEntry( USHORT nPos );
- USHORT GetTopEntry() const;
+ void SetTopEntry( sal_uInt16 nPos );
+ void ShowProminentEntry( sal_uInt16 nPos );
+ sal_uInt16 GetTopEntry() const;
void SetProminentEntryType( ProminentEntry eType );
ProminentEntry GetProminentEntryType() const;
- USHORT GetDisplayLineCount() const;
+ sal_uInt16 GetDisplayLineCount() const;
- USHORT GetSelectEntryCount() const;
- USHORT GetSelectEntryPos( USHORT nSelIndex = 0 ) const;
- BOOL IsEntryPosSelected( USHORT nPos ) const;
- void SelectEntryPos( USHORT nPos, BOOL bSelect = TRUE );
+ sal_uInt16 GetSelectEntryCount() const;
+ sal_uInt16 GetSelectEntryPos( sal_uInt16 nSelIndex = 0 ) const;
+ sal_Bool IsEntryPosSelected( sal_uInt16 nPos ) const;
+ void SelectEntryPos( sal_uInt16 nPos, sal_Bool bSelect = sal_True );
void SetNoSelection();
- Rectangle GetBoundingRectangle( USHORT nItem ) const;
+ Rectangle GetBoundingRectangle( sal_uInt16 nItem ) const;
/** checks whether a certain point lies within the bounds of
a list item and returns the item as well as the character position
@@ -223,7 +223,7 @@ public:
if no item is at that point.
*/
using Control::GetIndexForPoint;
- long GetIndexForPoint( const Point& rPoint, USHORT& rPos ) const;
+ long GetIndexForPoint( const Point& rPoint, sal_uInt16& rPos ) const;
};
#endif // _COMBOBOX_HXX
diff --git a/vcl/inc/vcl/ctrl.hxx b/vcl/inc/vcl/ctrl.hxx
index 3838b29a6d0a..ef3563649667 100644
--- a/vcl/inc/vcl/ctrl.hxx
+++ b/vcl/inc/vcl/ctrl.hxx
@@ -47,7 +47,7 @@ protected:
::vcl::ImplControlData* mpControlData;
private:
- BOOL mbHasFocus;
+ sal_Bool mbHasFocus;
Link maGetFocusHdl;
Link maLoseFocusHdl;
@@ -86,8 +86,8 @@ protected:
@return
if the Control instance has been destroyed in any of the call
*/
- BOOL ImplCallEventListenersAndHandler(
- ULONG nEvent, const Link& rHandler, void* pCaller
+ sal_Bool ImplCallEventListenersAndHandler(
+ sal_uIntPtr nEvent, const Link& rHandler, void* pCaller
);
/** draws the given text onto the given device
@@ -99,7 +99,7 @@ protected:
directly at the target device, or taking the reference device into account) when returning.
*/
void DrawControlText( OutputDevice& _rTargetDevice, Rectangle& _io_rRect,
- const XubString& _rStr, USHORT _nStyle,
+ const XubString& _rStr, sal_uInt16 _nStyle,
MetricVector* _pVector, String* _pDisplayText ) const;
virtual const Font&
@@ -107,7 +107,7 @@ protected:
virtual const Color&
GetCanonicalTextColor( const StyleSettings& _rStyle ) const;
- void ImplInitSettings( const BOOL _bFont, const BOOL _bForeground );
+ void ImplInitSettings( const sal_Bool _bFont, const sal_Bool _bForeground );
//#if 0 // _SOLAR__PRIVATE
public:
diff --git a/vcl/inc/vcl/cursor.hxx b/vcl/inc/vcl/cursor.hxx
index db8f5efd0566..14fd58296b0d 100644
--- a/vcl/inc/vcl/cursor.hxx
+++ b/vcl/inc/vcl/cursor.hxx
@@ -41,7 +41,7 @@ class Window;
// - Cursor-Styles -
// -----------------
-#define CURSOR_SHADOW ((USHORT)0x0001)
+#define CURSOR_SHADOW ((sal_uInt16)0x0001)
#define CURSOR_DIRECTION_NONE ((unsigned char)0x00)
#define CURSOR_DIRECTION_LTR ((unsigned char)0x01)
#define CURSOR_DIRECTION_RTL ((unsigned char)0x02)
@@ -60,8 +60,8 @@ private:
Size maSize; // Groesse
Point maPos; // Position
short mnOrientation; // Rotation
- USHORT mnStyle; // Style
- BOOL mbVisible; // Ist Cursor sichtbar
+ sal_uInt16 mnStyle; // Style
+ sal_Bool mbVisible; // Ist Cursor sichtbar
unsigned char mnDirection; // indicates direction
//#if 0 // _SOLAR__PRIVATE
@@ -69,7 +69,7 @@ public:
SAL_DLLPRIVATE void ImplDraw();
SAL_DLLPRIVATE void ImplRestore();
DECL_DLLPRIVATE_LINK( ImplTimerHdl, AutoTimer* );
- SAL_DLLPRIVATE void ImplShow( BOOL bDrawDirect = TRUE );
+ SAL_DLLPRIVATE void ImplShow( sal_Bool bDrawDirect = sal_True );
SAL_DLLPRIVATE void ImplHide();
SAL_DLLPRIVATE void ImplNew();
//#endif
@@ -79,12 +79,12 @@ public:
Cursor( const Cursor& rCursor );
~Cursor();
- void SetStyle( USHORT nStyle );
- USHORT GetStyle() const { return mnStyle; }
+ void SetStyle( sal_uInt16 nStyle );
+ sal_uInt16 GetStyle() const { return mnStyle; }
void Show();
void Hide();
- BOOL IsVisible() const { return mbVisible; }
+ sal_Bool IsVisible() const { return mbVisible; }
void SetWindow( Window* pWindow );
Window* GetWindow() const { return mpWindow; }
@@ -111,8 +111,8 @@ public:
unsigned char GetDirection() const { return mnDirection; }
Cursor& operator=( const Cursor& rCursor );
- BOOL operator==( const Cursor& rCursor ) const;
- BOOL operator!=( const Cursor& rCursor ) const
+ sal_Bool operator==( const Cursor& rCursor ) const;
+ sal_Bool operator!=( const Cursor& rCursor ) const
{ return !(Cursor::operator==( rCursor )); }
};
diff --git a/vcl/inc/vcl/cvtgrf.hxx b/vcl/inc/vcl/cvtgrf.hxx
index 97541c1b8f9f..83213ffc2ff4 100644
--- a/vcl/inc/vcl/cvtgrf.hxx
+++ b/vcl/inc/vcl/cvtgrf.hxx
@@ -48,8 +48,8 @@ private:
//#if 0 // _SOLAR__PRIVATE
public:
- SAL_DLLPRIVATE ULONG ImplConvert( ULONG nInFormat, void* pInBuffer, ULONG nInBufSize,
- void** ppOutBuffer, ULONG nOutFormat );
+ SAL_DLLPRIVATE sal_uIntPtr ImplConvert( sal_uIntPtr nInFormat, void* pInBuffer, sal_uIntPtr nInBufSize,
+ void** ppOutBuffer, sal_uIntPtr nOutFormat );
//#endif // __PRIVATE
public:
@@ -57,8 +57,8 @@ public:
GraphicConverter();
~GraphicConverter();
- static ULONG Import( SvStream& rIStm, Graphic& rGraphic, ULONG nFormat = CVT_UNKNOWN );
- static ULONG Export( SvStream& rOStm, const Graphic& rGraphic, ULONG nFormat );
+ static sal_uIntPtr Import( SvStream& rIStm, Graphic& rGraphic, sal_uIntPtr nFormat = CVT_UNKNOWN );
+ static sal_uIntPtr Export( SvStream& rOStm, const Graphic& rGraphic, sal_uIntPtr nFormat );
ConvertData* GetConvertData() { return mpConvertData; }
diff --git a/vcl/inc/vcl/cvtsvm.hxx b/vcl/inc/vcl/cvtsvm.hxx
index 03948ac56690..b78ad26ef104 100644
--- a/vcl/inc/vcl/cvtsvm.hxx
+++ b/vcl/inc/vcl/cvtsvm.hxx
@@ -98,14 +98,14 @@ private:
//#if 0 // _SOLAR__PRIVATE
SAL_DLLPRIVATE void ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf );
SAL_DLLPRIVATE void ImplConvertToSVM1( SvStream& rOStm, GDIMetaFile& rMtf );
- SAL_DLLPRIVATE ULONG ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
- VirtualDevice& rSaveVDev, BOOL& rRop_0_1,
+ SAL_DLLPRIVATE sal_uIntPtr ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
+ VirtualDevice& rSaveVDev, sal_Bool& rRop_0_1,
Color& rLineCol, Stack& rLineColStack,
rtl_TextEncoding& rActualCharSet );
//#endif
public:
- SVMConverter( SvStream& rIStm, GDIMetaFile& rMtf, ULONG nConvertMode );
+ SVMConverter( SvStream& rIStm, GDIMetaFile& rMtf, sal_uIntPtr nConvertMode );
~SVMConverter() {}
private:
diff --git a/vcl/inc/vcl/dbggui.hxx b/vcl/inc/vcl/dbggui.hxx
index 7ed23706e6f3..0526a109a376 100644
--- a/vcl/inc/vcl/dbggui.hxx
+++ b/vcl/inc/vcl/dbggui.hxx
@@ -50,7 +50,7 @@ void DbgDialogTest( Window* pWindow );
->DbgData::nWarningOut and ->DbgData::nTraceOut
@see DBG_OUT_USER_CHANNEL_0
*/
-USHORT DbgRegisterNamedUserChannel( const XubString& _rChannelUIName, DbgPrintLine pProc );
+sal_uInt16 DbgRegisterNamedUserChannel( const XubString& _rChannelUIName, DbgPrintLine pProc );
#define DBGGUI_INIT() DbgGUIInit()
#define DBGGUI_DEINIT() DbgGUIDeInit()
diff --git a/vcl/inc/vcl/decoview.hxx b/vcl/inc/vcl/decoview.hxx
index 2412ceda8431..36c9882c0e36 100644
--- a/vcl/inc/vcl/decoview.hxx
+++ b/vcl/inc/vcl/decoview.hxx
@@ -42,45 +42,45 @@ class OutputDevice;
// ------------------------
// Flags for DrawSymbol()
-#define SYMBOL_DRAW_MONO ((USHORT)0x0001)
-#define SYMBOL_DRAW_DISABLE ((USHORT)0x0002)
+#define SYMBOL_DRAW_MONO ((sal_uInt16)0x0001)
+#define SYMBOL_DRAW_DISABLE ((sal_uInt16)0x0002)
// Flags for DrawFrame()
-#define FRAME_DRAW_IN ((USHORT)0x0001)
-#define FRAME_DRAW_OUT ((USHORT)0x0002)
-#define FRAME_DRAW_GROUP ((USHORT)0x0003)
-#define FRAME_DRAW_DOUBLEIN ((USHORT)0x0004)
-#define FRAME_DRAW_DOUBLEOUT ((USHORT)0x0005)
-#define FRAME_DRAW_MENU ((USHORT)0x0010)
-#define FRAME_DRAW_WINDOWBORDER ((USHORT)0x0020)
-#define FRAME_DRAW_BORDERWINDOWBORDER ((USHORT)0x0040)
-#define FRAME_DRAW_MONO ((USHORT)0x1000)
-#define FRAME_DRAW_NODRAW ((USHORT)0x8000)
-#define FRAME_DRAW_STYLE ((USHORT)0x000F)
+#define FRAME_DRAW_IN ((sal_uInt16)0x0001)
+#define FRAME_DRAW_OUT ((sal_uInt16)0x0002)
+#define FRAME_DRAW_GROUP ((sal_uInt16)0x0003)
+#define FRAME_DRAW_DOUBLEIN ((sal_uInt16)0x0004)
+#define FRAME_DRAW_DOUBLEOUT ((sal_uInt16)0x0005)
+#define FRAME_DRAW_MENU ((sal_uInt16)0x0010)
+#define FRAME_DRAW_WINDOWBORDER ((sal_uInt16)0x0020)
+#define FRAME_DRAW_BORDERWINDOWBORDER ((sal_uInt16)0x0040)
+#define FRAME_DRAW_MONO ((sal_uInt16)0x1000)
+#define FRAME_DRAW_NODRAW ((sal_uInt16)0x8000)
+#define FRAME_DRAW_STYLE ((sal_uInt16)0x000F)
// Flags for DrawHighlightFrame()
-#define FRAME_HIGHLIGHT_IN ((USHORT)0x0001)
-#define FRAME_HIGHLIGHT_OUT ((USHORT)0x0002)
-#define FRAME_HIGHLIGHT_TESTBACKGROUND ((USHORT)0x4000)
-#define FRAME_HIGHLIGHT_STYLE ((USHORT)0x000F)
+#define FRAME_HIGHLIGHT_IN ((sal_uInt16)0x0001)
+#define FRAME_HIGHLIGHT_OUT ((sal_uInt16)0x0002)
+#define FRAME_HIGHLIGHT_TESTBACKGROUND ((sal_uInt16)0x4000)
+#define FRAME_HIGHLIGHT_STYLE ((sal_uInt16)0x000F)
// Flags for DrawButton()
-#define BUTTON_DRAW_DEFAULT ((USHORT)0x0001)
-#define BUTTON_DRAW_NOLIGHTBORDER ((USHORT)0x0002)
-#define BUTTON_DRAW_PRESSED ((USHORT)0x0004)
-#define BUTTON_DRAW_CHECKED ((USHORT)0x0008)
-#define BUTTON_DRAW_DONTKNOW ((USHORT)0x0010)
-#define BUTTON_DRAW_MONO ((USHORT)0x0020)
-#define BUTTON_DRAW_NOFILL ((USHORT)0x0040)
-#define BUTTON_DRAW_DISABLED ((USHORT)0x0080)
-#define BUTTON_DRAW_HIGHLIGHT ((USHORT)0x0100)
-#define BUTTON_DRAW_FLAT ((USHORT)0x0200)
-#define BUTTON_DRAW_NOTOPLIGHTBORDER ((USHORT)0x0400)
-#define BUTTON_DRAW_NOBOTTOMSHADOWBORDER ((USHORT)0x0800)
-#define BUTTON_DRAW_NOLEFTLIGHTBORDER ((USHORT)0x1000)
-#define BUTTON_DRAW_NOTEXT ((USHORT)0x2000)
-#define BUTTON_DRAW_NOIMAGE ((USHORT)0x4000)
-#define BUTTON_DRAW_NODRAW ((USHORT)0x8000)
+#define BUTTON_DRAW_DEFAULT ((sal_uInt16)0x0001)
+#define BUTTON_DRAW_NOLIGHTBORDER ((sal_uInt16)0x0002)
+#define BUTTON_DRAW_PRESSED ((sal_uInt16)0x0004)
+#define BUTTON_DRAW_CHECKED ((sal_uInt16)0x0008)
+#define BUTTON_DRAW_DONTKNOW ((sal_uInt16)0x0010)
+#define BUTTON_DRAW_MONO ((sal_uInt16)0x0020)
+#define BUTTON_DRAW_NOFILL ((sal_uInt16)0x0040)
+#define BUTTON_DRAW_DISABLED ((sal_uInt16)0x0080)
+#define BUTTON_DRAW_HIGHLIGHT ((sal_uInt16)0x0100)
+#define BUTTON_DRAW_FLAT ((sal_uInt16)0x0200)
+#define BUTTON_DRAW_NOTOPLIGHTBORDER ((sal_uInt16)0x0400)
+#define BUTTON_DRAW_NOBOTTOMSHADOWBORDER ((sal_uInt16)0x0800)
+#define BUTTON_DRAW_NOLEFTLIGHTBORDER ((sal_uInt16)0x1000)
+#define BUTTON_DRAW_NOTEXT ((sal_uInt16)0x2000)
+#define BUTTON_DRAW_NOIMAGE ((sal_uInt16)0x4000)
+#define BUTTON_DRAW_NODRAW ((sal_uInt16)0x8000)
// ------------------
// - DecorationView -
@@ -96,14 +96,14 @@ public:
{ mpOutDev = pOutDev; }
void DrawSymbol( const Rectangle& rRect, SymbolType eType,
- const Color& rColor, USHORT nStyle = 0 );
+ const Color& rColor, sal_uInt16 nStyle = 0 );
void DrawFrame( const Rectangle& rRect,
const Color& rLeftTopColor,
const Color& rRightBottomColor );
void DrawHighlightFrame( const Rectangle& rRect,
- USHORT nStyle = FRAME_HIGHLIGHT_OUT );
- Rectangle DrawFrame( const Rectangle& rRect, USHORT nStyle = FRAME_DRAW_OUT );
- Rectangle DrawButton( const Rectangle& rRect, USHORT nStyle );
+ sal_uInt16 nStyle = FRAME_HIGHLIGHT_OUT );
+ Rectangle DrawFrame( const Rectangle& rRect, sal_uInt16 nStyle = FRAME_DRAW_OUT );
+ Rectangle DrawButton( const Rectangle& rRect, sal_uInt16 nStyle );
void DrawSeparator( const Point& rStart, const Point& rStop, bool bVertical = true );
};
diff --git a/vcl/inc/vcl/dialog.hxx b/vcl/inc/vcl/dialog.hxx
index 60fe97225b4b..660bf9e955ca 100644
--- a/vcl/inc/vcl/dialog.hxx
+++ b/vcl/inc/vcl/dialog.hxx
@@ -49,10 +49,10 @@ private:
Dialog* mpPrevExecuteDlg;
DialogImpl* mpDialogImpl;
long mnMousePositioned;
- BOOL mbInExecute;
- BOOL mbOldSaveBack;
- BOOL mbInClose;
- BOOL mbModalMode;
+ sal_Bool mbInExecute;
+ sal_Bool mbOldSaveBack;
+ sal_Bool mbInClose;
+ sal_Bool mbModalMode;
SAL_DLLPRIVATE void ImplInitDialogData();
SAL_DLLPRIVATE void ImplInitSettings();
@@ -70,12 +70,12 @@ protected:
SAL_DLLPRIVATE void ImplCenterDialog();
public:
- SAL_DLLPRIVATE BOOL IsInClose() const { return mbInClose; }
+ SAL_DLLPRIVATE sal_Bool IsInClose() const { return mbInClose; }
//#endif
protected:
Dialog( WindowType nType );
- 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_uIntPtr nFlags );
public:
Dialog( Window* pParent, WinBits nStyle = WB_STDDIALOG );
@@ -86,20 +86,20 @@ public:
virtual void StateChanged( StateChangedType nStateChange );
virtual void DataChanged( const DataChangedEvent& rDCEvt );
- virtual BOOL Close();
+ virtual sal_Bool Close();
virtual short Execute();
- BOOL IsInExecute() const { return mbInExecute; }
+ sal_Bool IsInExecute() const { return mbInExecute; }
////////////////////////////////////////
// Dialog::Execute replacement API
public:
// Link impl: DECL_LINK( MyEndDialogHdl, Dialog* ); <= param is dialog just ended
virtual void StartExecuteModal( const Link& rEndDialogHdl );
- BOOL IsStartedModal() const;
+ sal_Bool IsStartedModal() const;
long GetResult() const;
private:
- BOOL ImplStartExecuteModal();
+ sal_Bool ImplStartExecuteModal();
void ImplEndExecuteModal();
public:
@@ -112,9 +112,9 @@ public:
void GetDrawWindowBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder,
sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const;
- void SetModalInputMode( BOOL bModal );
- void SetModalInputMode( BOOL bModal, BOOL bSubModalDialogs );
- BOOL IsModalInputMode() const { return mbModalMode; }
+ void SetModalInputMode( sal_Bool bModal );
+ void SetModalInputMode( sal_Bool bModal, sal_Bool bSubModalDialogs );
+ sal_Bool IsModalInputMode() const { return mbModalMode; }
void GrabFocusToFirstControl();
};
@@ -148,7 +148,7 @@ public:
private:
using Window::Show;
- void Show( BOOL bVisible = TRUE );
+ void Show( sal_Bool bVisible = sal_True );
using Window::Hide;
void Hide();
diff --git a/vcl/inc/vcl/dockingarea.hxx b/vcl/inc/vcl/dockingarea.hxx
index 848ecac72770..dc7effa54c4e 100644
--- a/vcl/inc/vcl/dockingarea.hxx
+++ b/vcl/inc/vcl/dockingarea.hxx
@@ -53,7 +53,7 @@ public:
void SetAlign( WindowAlign eNewAlign );
WindowAlign GetAlign() const;
- BOOL IsHorizontal() const;
+ sal_Bool IsHorizontal() const;
virtual void Paint( const Rectangle& rRect );
virtual void Resize();
diff --git a/vcl/inc/vcl/dockwin.hxx b/vcl/inc/vcl/dockwin.hxx
index 61464400d595..e135a911dd04 100644
--- a/vcl/inc/vcl/dockwin.hxx
+++ b/vcl/inc/vcl/dockwin.hxx
@@ -38,24 +38,24 @@ struct DockingData
{
Point maMousePos; // in
Rectangle maTrackRect; // in/out
- BOOL mbFloating; // out
- BOOL mbLivemode; // in
- BOOL mbInteractive; // in
+ sal_Bool mbFloating; // out
+ sal_Bool mbLivemode; // in
+ sal_Bool mbInteractive; // in
DockingData() {};
- DockingData( const Point& rPt, const Rectangle& rRect, BOOL b) :
- maMousePos( rPt ), maTrackRect( rRect ), mbFloating( b ), mbLivemode( FALSE ), mbInteractive( TRUE )
+ DockingData( const Point& rPt, const Rectangle& rRect, sal_Bool b) :
+ maMousePos( rPt ), maTrackRect( rRect ), mbFloating( b ), mbLivemode( sal_False ), mbInteractive( sal_True )
{};
};
struct EndDockingData
{
Rectangle maWindowRect; // in
- BOOL mbFloating; // in
- BOOL mbCancelled; // in
+ sal_Bool mbFloating; // in
+ sal_Bool mbCancelled; // in
EndDockingData() {};
- EndDockingData( const Rectangle& rRect, BOOL b, BOOL bCancelled ) :
+ EndDockingData( const Rectangle& rRect, sal_Bool b, sal_Bool bCancelled ) :
maWindowRect( rRect ), mbFloating( b ), mbCancelled( bCancelled )
{};
};
@@ -63,10 +63,10 @@ struct EndDockingData
struct EndPopupModeData
{
Point maFloatingPos; // in
- BOOL mbTearoff; // in
+ sal_Bool mbTearoff; // in
EndPopupModeData() {};
- EndPopupModeData( const Point& rPos, BOOL bTearoff ) :
+ EndPopupModeData( const Point& rPos, sal_Bool bTearoff ) :
maFloatingPos( rPos ), mbTearoff( bTearoff )
{};
};
@@ -110,7 +110,7 @@ private:
sal_Int32 mnDockRight;
sal_Int32 mnDockBottom;
WinBits mnFloatBits;
- BOOL mbDockCanceled:1,
+ sal_Bool mbDockCanceled:1,
mbFloatPrevented:1,
mbDockable:1,
mbDocking:1,
@@ -128,21 +128,21 @@ private:
void ImplInitData();
DECL_LINK( PopupModeEnd, void* );
- void ImplEnableStartDocking( BOOL bEnable = TRUE ) { mbStartDockingEnabled = bEnable; }
- BOOL ImplStartDockingEnabled() { return mbStartDockingEnabled; }
+ void ImplEnableStartDocking( sal_Bool bEnable = sal_True ) { mbStartDockingEnabled = bEnable; }
+ sal_Bool ImplStartDockingEnabled() { return mbStartDockingEnabled; }
public:
ImplDockingWindowWrapper( const Window *pWindow );
virtual ~ImplDockingWindowWrapper();
Window* GetWindow() { return mpDockingWindow; }
- BOOL ImplStartDocking( const Point& rPos );
+ sal_Bool ImplStartDocking( const Point& rPos );
// those methods actually call the corresponding handlers
void StartDocking( const Point& rPos, Rectangle& rRect );
- BOOL Docking( const Point& rPos, Rectangle& rRect );
- void EndDocking( const Rectangle& rRect, BOOL bFloatMode );
- BOOL PrepareToggleFloatingMode();
+ sal_Bool Docking( const Point& rPos, Rectangle& rRect );
+ void EndDocking( const Rectangle& rRect, sal_Bool bFloatMode );
+ sal_Bool PrepareToggleFloatingMode();
void ToggleFloatingMode();
void SetDragArea( const Rectangle& rRect );
@@ -150,29 +150,29 @@ public:
void Lock();
void Unlock();
- BOOL IsLocked() const;
+ sal_Bool IsLocked() const;
- void StartPopupMode( ToolBox* pParentToolBox, ULONG nPopupModeFlags );
- BOOL IsInPopupMode() const;
+ void StartPopupMode( ToolBox* pParentToolBox, sal_uIntPtr nPopupModeFlags );
+ sal_Bool IsInPopupMode() const;
- void TitleButtonClick( USHORT nButton );
+ void TitleButtonClick( sal_uInt16 nButton );
void Pin();
void Roll();
void PopupModeEnd();
void Resizing( Size& rSize );
- BOOL Close();
+ sal_Bool Close();
void Tracking( const TrackingEvent& rTEvt );
long Notify( NotifyEvent& rNEvt );
- void ShowTitleButton( USHORT nButton, BOOL bVisible = TRUE );
- BOOL IsTitleButtonVisible( USHORT nButton ) const;
+ void ShowTitleButton( sal_uInt16 nButton, sal_Bool bVisible = sal_True );
+ sal_Bool IsTitleButtonVisible( sal_uInt16 nButton ) const;
- void SetPin( BOOL bPin );
- BOOL IsPined() const;
+ void SetPin( sal_Bool bPin );
+ sal_Bool IsPined() const;
void RollUp();
void RollDown();
- BOOL IsRollUp() const;
+ sal_Bool IsRollUp() const;
void SetRollUpOutputSizePixel( const Size& rSize );
Size GetRollUpOutputSizePixel() const;
@@ -183,13 +183,13 @@ public:
void SetMaxOutputSizePixel( const Size& rSize );
const Size& GetMaxOutputSizePixel() const;
- BOOL IsDocking() const { return mbDocking; }
- BOOL IsDockable() const { return mbDockable; }
- BOOL IsDockingCanceled() const { return mbDockCanceled; }
- BOOL IsFloatingPrevented() const { return mbFloatPrevented; }
+ sal_Bool IsDocking() const { return mbDocking; }
+ sal_Bool IsDockable() const { return mbDockable; }
+ sal_Bool IsDockingCanceled() const { return mbDockCanceled; }
+ sal_Bool IsFloatingPrevented() const { return mbFloatPrevented; }
- void SetFloatingMode( BOOL bFloatMode = FALSE );
- BOOL IsFloatingMode() const;
+ void SetFloatingMode( sal_Bool bFloatMode = sal_False );
+ sal_Bool IsFloatingMode() const;
FloatingWindow* GetFloatingWindow() const { return mpFloatWin; }
void SetFloatingPos( const Point& rNewPos );
@@ -201,7 +201,7 @@ public:
virtual void SetPosSizePixel( long nX, long nY,
long nWidth, long nHeight,
- USHORT nFlags = WINDOW_POSSIZE_ALL );
+ sal_uInt16 nFlags = WINDOW_POSSIZE_ALL );
void SetPosSizePixel( const Point& rNewPos,
const Size& rNewSize )
{ mpDockingWindow->SetPosSizePixel( rNewPos, rNewSize ); }
@@ -224,26 +224,26 @@ public:
void RemoveWindow( const Window *pWin );
ImplDockingWindowWrapper* GetDockingWindowWrapper( const Window *pWin );
- BOOL IsDockable( const Window *pWin );
+ sal_Bool IsDockable( const Window *pWin );
- BOOL IsFloating( const Window *pWin );
- void SetFloatingMode( const Window *pWin, BOOL bFloating );
+ sal_Bool IsFloating( const Window *pWin );
+ void SetFloatingMode( const Window *pWin, sal_Bool bFloating );
void Lock( const Window *pWin );
void Unlock( const Window *pWin );
- BOOL IsLocked( const Window *pWin );
+ sal_Bool IsLocked( const Window *pWin );
void StartPopupMode( ToolBox *pParentToolBox, const Window *pWin );
- void StartPopupMode( ToolBox *pParentToolBox, const Window *pWin, ULONG nPopupModeFlags );
+ void StartPopupMode( ToolBox *pParentToolBox, const Window *pWin, sal_uIntPtr nPopupModeFlags );
- BOOL IsInPopupMode( const Window *pWin );
+ sal_Bool IsInPopupMode( const Window *pWin );
void EndPopupMode( const Window *pWin );
// required because those methods are not virtual in Window (!!!) and must
// be availbale from the toolkit
void SetPosSizePixel( Window *pWin, long nX, long nY,
long nWidth, long nHeight,
- USHORT nFlags = WINDOW_POSSIZE_ALL );
+ sal_uInt16 nFlags = WINDOW_POSSIZE_ALL );
Rectangle GetPosSizePixel( const Window *pWin );
};
@@ -273,7 +273,7 @@ private:
sal_Int32 mnDockRight;
sal_Int32 mnDockBottom;
WinBits mnFloatBits;
- BOOL mbDockCanceled:1,
+ sal_Bool mbDockCanceled:1,
mbDockPrevented:1,
mbFloatPrevented:1,
mbDockable:1,
@@ -301,7 +301,7 @@ protected:
SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
public:
- SAL_DLLPRIVATE BOOL ImplStartDocking( const Point& rPos );
+ SAL_DLLPRIVATE sal_Bool ImplStartDocking( const Point& rPos );
//#endif
protected:
@@ -313,31 +313,31 @@ public:
~DockingWindow();
virtual void StartDocking();
- virtual BOOL Docking( const Point& rPos, Rectangle& rRect );
- virtual void EndDocking( const Rectangle& rRect, BOOL bFloatMode );
- virtual BOOL PrepareToggleFloatingMode();
+ virtual sal_Bool Docking( const Point& rPos, Rectangle& rRect );
+ virtual void EndDocking( const Rectangle& rRect, sal_Bool bFloatMode );
+ virtual sal_Bool PrepareToggleFloatingMode();
virtual void ToggleFloatingMode();
- virtual void TitleButtonClick( USHORT nButton );
+ virtual void TitleButtonClick( sal_uInt16 nButton );
virtual void Pin();
virtual void Roll();
virtual void PopupModeEnd();
virtual void Resizing( Size& rSize );
- virtual BOOL Close();
+ virtual sal_Bool Close();
virtual void Tracking( const TrackingEvent& rTEvt );
virtual long Notify( NotifyEvent& rNEvt );
virtual void StateChanged( StateChangedType nType );
virtual void DataChanged( const DataChangedEvent& rDCEvt );
- void ShowTitleButton( USHORT nButton, BOOL bVisible = TRUE );
- BOOL IsTitleButtonVisible( USHORT nButton ) const;
+ void ShowTitleButton( sal_uInt16 nButton, sal_Bool bVisible = sal_True );
+ sal_Bool IsTitleButtonVisible( sal_uInt16 nButton ) const;
- void SetPin( BOOL bPin );
- BOOL IsPined() const;
+ void SetPin( sal_Bool bPin );
+ sal_Bool IsPined() const;
void RollUp();
void RollDown();
- BOOL IsRollUp() const;
+ sal_Bool IsRollUp() const;
void SetRollUpOutputSizePixel( const Size& rSize );
Size GetRollUpOutputSizePixel() const;
@@ -348,14 +348,14 @@ public:
void SetMaxOutputSizePixel( const Size& rSize );
const Size& GetMaxOutputSizePixel() const;
- BOOL IsDocking() const { return mbDocking; }
- BOOL IsDockable() const { return mbDockable; }
- BOOL IsDockingCanceled() const { return mbDockCanceled; }
- BOOL IsDockingPrevented() const { return mbDockPrevented; }
- BOOL IsFloatingPrevented() const { return mbFloatPrevented; }
+ sal_Bool IsDocking() const { return mbDocking; }
+ sal_Bool IsDockable() const { return mbDockable; }
+ sal_Bool IsDockingCanceled() const { return mbDockCanceled; }
+ sal_Bool IsDockingPrevented() const { return mbDockPrevented; }
+ sal_Bool IsFloatingPrevented() const { return mbFloatPrevented; }
- void SetFloatingMode( BOOL bFloatMode = FALSE );
- BOOL IsFloatingMode() const;
+ void SetFloatingMode( sal_Bool bFloatMode = sal_False );
+ sal_Bool IsFloatingMode() const;
FloatingWindow* GetFloatingWindow() const { return mpFloatWin; }
void SetFloatingPos( const Point& rNewPos );
@@ -367,7 +367,7 @@ public:
virtual void SetPosSizePixel( long nX, long nY,
long nWidth, long nHeight,
- USHORT nFlags = WINDOW_POSSIZE_ALL );
+ sal_uInt16 nFlags = WINDOW_POSSIZE_ALL );
void SetPosSizePixel( const Point& rNewPos,
const Size& rNewSize )
{ Window::SetPosSizePixel( rNewPos, rNewSize ); }
@@ -377,14 +377,14 @@ public:
Size GetOutputSizePixel() const;
};
-inline void DockingWindow::SetPin( BOOL bPin )
+inline void DockingWindow::SetPin( sal_Bool bPin )
{
if ( mpFloatWin )
mpFloatWin->SetPin( bPin );
mbPined = bPin;
}
-inline BOOL DockingWindow::IsPined() const
+inline sal_Bool DockingWindow::IsPined() const
{
if ( mpFloatWin )
return mpFloatWin->IsPined();
@@ -395,17 +395,17 @@ inline void DockingWindow::RollUp()
{
if ( mpFloatWin )
mpFloatWin->RollUp();
- mbRollUp = TRUE;
+ mbRollUp = sal_True;
}
inline void DockingWindow::RollDown()
{
if ( mpFloatWin )
mpFloatWin->RollDown();
- mbRollUp = FALSE;
+ mbRollUp = sal_False;
}
-inline BOOL DockingWindow::IsRollUp() const
+inline sal_Bool DockingWindow::IsRollUp() const
{
if ( mpFloatWin )
return mpFloatWin->IsRollUp();
diff --git a/vcl/inc/vcl/edit.hxx b/vcl/inc/vcl/edit.hxx
index a40de9503367..773c31e95a22 100644
--- a/vcl/inc/vcl/edit.hxx
+++ b/vcl/inc/vcl/edit.hxx
@@ -76,11 +76,11 @@ private:
XubString maRedoText;
long mnXOffset;
Selection maSelection;
- USHORT mnAlign;
+ sal_uInt16 mnAlign;
xub_StrLen mnMaxTextLen;
AutocompleteAction meAutocompleteAction;
xub_Unicode mcEchoChar;
- BOOL mbModified:1,
+ sal_Bool mbModified:1,
mbInternModified:1,
mbReadOnly:1,
mbInsertMode:1,
@@ -100,19 +100,19 @@ private:
SAL_DLLPRIVATE XubString ImplGetText() const;
SAL_DLLPRIVATE void ImplRepaint( xub_StrLen nStart = 0, xub_StrLen nEnd = STRING_LEN, bool bLayout = false );
SAL_DLLPRIVATE void ImplInvalidateOrRepaint( xub_StrLen nStart = 0, xub_StrLen nEnd = STRING_LEN );
- SAL_DLLPRIVATE void ImplDelete( const Selection& rSelection, BYTE nDirection, BYTE nMode );
+ SAL_DLLPRIVATE void ImplDelete( const Selection& rSelection, sal_uInt8 nDirection, sal_uInt8 nMode );
SAL_DLLPRIVATE void ImplSetText( const XubString& rStr, const Selection* pNewSelection = 0 );
SAL_DLLPRIVATE void ImplInsertText( const XubString& rStr, const Selection* pNewSelection = 0, sal_Bool bIsUserInput = sal_False );
SAL_DLLPRIVATE String ImplGetValidString( const String& rString ) const;
SAL_DLLPRIVATE void ImplClearBackground( long nXStart, long nXEnd );
- SAL_DLLPRIVATE void ImplShowCursor( BOOL bOnlyIfVisible = TRUE );
+ SAL_DLLPRIVATE void ImplShowCursor( sal_Bool bOnlyIfVisible = sal_True );
SAL_DLLPRIVATE void ImplAlign();
SAL_DLLPRIVATE void ImplAlignAndPaint();
SAL_DLLPRIVATE xub_StrLen ImplGetCharPos( const Point& rWindowPos ) const;
- SAL_DLLPRIVATE void ImplSetCursorPos( xub_StrLen nChar, BOOL bSelect );
+ SAL_DLLPRIVATE void ImplSetCursorPos( xub_StrLen nChar, sal_Bool bSelect );
SAL_DLLPRIVATE void ImplShowDDCursor();
SAL_DLLPRIVATE void ImplHideDDCursor();
- SAL_DLLPRIVATE BOOL ImplHandleKeyEvent( const KeyEvent& rKEvt );
+ SAL_DLLPRIVATE sal_Bool ImplHandleKeyEvent( const KeyEvent& rKEvt );
SAL_DLLPRIVATE void ImplCopyToSelectionClipboard();
SAL_DLLPRIVATE void ImplCopy( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard >& rxClipboard );
SAL_DLLPRIVATE void ImplPaste( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard >& rxClipboard );
@@ -126,9 +126,9 @@ protected:
using Window::ImplInit;
SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle );
SAL_DLLPRIVATE WinBits ImplInitStyle( WinBits nStyle );
- SAL_DLLPRIVATE void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground );
+ SAL_DLLPRIVATE void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground );
SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
- SAL_DLLPRIVATE void ImplSetSelection( const Selection& rSelection, BOOL bPaint = TRUE );
+ SAL_DLLPRIVATE void ImplSetSelection( const Selection& rSelection, sal_Bool bPaint = sal_True );
SAL_DLLPRIVATE int ImplGetNativeControlType();
static SAL_DLLPRIVATE void ImplInvalidateOutermostBorder( Window* pWin );
@@ -164,7 +164,7 @@ public:
virtual void KeyInput( const KeyEvent& rKEvt );
virtual void Paint( const Rectangle& rRect );
virtual void Resize();
- 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_uIntPtr nFlags );
virtual void GetFocus();
virtual void LoseFocus();
virtual void Tracking( const TrackingEvent& rTEvt );
@@ -176,24 +176,24 @@ public:
virtual void Modify();
virtual void UpdateData();
- static BOOL IsCharInput( const KeyEvent& rKEvt );
+ static sal_Bool IsCharInput( const KeyEvent& rKEvt );
virtual void SetModifyFlag();
virtual void ClearModifyFlag();
- virtual BOOL IsModified() const { return mpSubEdit ? mpSubEdit->mbModified : mbModified; }
+ virtual sal_Bool IsModified() const { return mpSubEdit ? mpSubEdit->mbModified : mbModified; }
- virtual void EnableUpdateData( ULONG nTimeout = EDIT_UPDATEDATA_TIMEOUT );
+ virtual void EnableUpdateData( sal_uIntPtr nTimeout = EDIT_UPDATEDATA_TIMEOUT );
virtual void DisableUpdateData() { delete mpUpdateDataTimer; mpUpdateDataTimer = NULL; }
- virtual ULONG IsUpdateDataEnabled() const;
+ virtual sal_uIntPtr IsUpdateDataEnabled() const;
void SetEchoChar( xub_Unicode c );
xub_Unicode GetEchoChar() const { return mcEchoChar; }
- virtual void SetReadOnly( BOOL bReadOnly = TRUE );
- virtual BOOL IsReadOnly() const { return mbReadOnly; }
+ virtual void SetReadOnly( sal_Bool bReadOnly = sal_True );
+ virtual sal_Bool IsReadOnly() const { return mbReadOnly; }
- void SetInsertMode( BOOL bInsert );
- BOOL IsInsertMode() const;
+ void SetInsertMode( sal_Bool bInsert );
+ sal_Bool IsInsertMode() const;
virtual void SetMaxTextLen( xub_StrLen nMaxLen = EDIT_NOLIMIT );
virtual xub_StrLen GetMaxTextLen() const { return mnMaxTextLen; }
@@ -231,7 +231,7 @@ public:
virtual Size CalcMinimumSize() const;
virtual Size GetOptimalSize(WindowSizeType eType) const;
- virtual Size CalcSize( USHORT nChars ) const;
+ virtual Size CalcSize( sal_uInt16 nChars ) const;
virtual xub_StrLen GetMaxVisChars() const;
xub_StrLen GetCharPos( const Point& rWindowPos ) const;
@@ -249,12 +249,12 @@ public:
virtual Selection GetSurroundingTextSelection() const;
};
-inline ULONG Edit::IsUpdateDataEnabled() const
+inline sal_uIntPtr Edit::IsUpdateDataEnabled() const
{
if ( mpUpdateDataTimer )
return mpUpdateDataTimer->GetTimeout();
else
- return FALSE;
+ return sal_False;
}
#endif // _SV_EDIT_HXX
diff --git a/vcl/inc/vcl/event.hxx b/vcl/inc/vcl/event.hxx
index 9458a4298c33..61d9d91d7533 100644
--- a/vcl/inc/vcl/event.hxx
+++ b/vcl/inc/vcl/event.hxx
@@ -57,13 +57,13 @@ class VCL_DLLPUBLIC KeyEvent
{
private:
KeyCode maKeyCode;
- USHORT mnRepeat;
+ sal_uInt16 mnRepeat;
xub_Unicode mnCharCode;
public:
KeyEvent();
KeyEvent( xub_Unicode nChar, const KeyCode& rKeyCode,
- USHORT nRepeat = 0 );
+ sal_uInt16 nRepeat = 0 );
/** inits this vcl KeyEvent with all settings from the given awt event **/
KeyEvent( const ::com::sun::star::awt::KeyEvent& rEvent );
@@ -73,7 +73,7 @@ public:
xub_Unicode GetCharCode() const { return mnCharCode; }
const KeyCode& GetKeyCode() const { return maKeyCode; }
- USHORT GetRepeat() const { return mnRepeat; }
+ sal_uInt16 GetRepeat() const { return mnRepeat; }
KeyEvent LogicalTextDirectionality (TextDirectionality eMode) const;
KeyEvent (const KeyEvent& rKeyEvent);
@@ -87,7 +87,7 @@ inline KeyEvent::KeyEvent()
}
inline KeyEvent::KeyEvent( xub_Unicode nChar, const KeyCode& rKeyCode,
- USHORT nRepeat ) :
+ sal_uInt16 nRepeat ) :
maKeyCode( rKeyCode )
{
@@ -100,24 +100,24 @@ inline KeyEvent::KeyEvent( xub_Unicode nChar, const KeyCode& rKeyCode,
// --------------------
// Maus-Move-Modi
-#define MOUSE_SIMPLEMOVE ((USHORT)0x0001)
-#define MOUSE_DRAGMOVE ((USHORT)0x0002)
-#define MOUSE_DRAGCOPY ((USHORT)0x0004)
-#define MOUSE_ENTERWINDOW ((USHORT)0x0010)
-#define MOUSE_LEAVEWINDOW ((USHORT)0x0020)
-#define MOUSE_SYNTHETIC ((USHORT)0x0040)
-#define MOUSE_MODIFIERCHANGED ((USHORT)0x0080)
+#define MOUSE_SIMPLEMOVE ((sal_uInt16)0x0001)
+#define MOUSE_DRAGMOVE ((sal_uInt16)0x0002)
+#define MOUSE_DRAGCOPY ((sal_uInt16)0x0004)
+#define MOUSE_ENTERWINDOW ((sal_uInt16)0x0010)
+#define MOUSE_LEAVEWINDOW ((sal_uInt16)0x0020)
+#define MOUSE_SYNTHETIC ((sal_uInt16)0x0040)
+#define MOUSE_MODIFIERCHANGED ((sal_uInt16)0x0080)
// Maus-Button-Down/Up-Modi
-#define MOUSE_SIMPLECLICK ((USHORT)0x0001)
-#define MOUSE_SELECT ((USHORT)0x0002)
-#define MOUSE_MULTISELECT ((USHORT)0x0004)
-#define MOUSE_RANGESELECT ((USHORT)0x0008)
+#define MOUSE_SIMPLECLICK ((sal_uInt16)0x0001)
+#define MOUSE_SELECT ((sal_uInt16)0x0002)
+#define MOUSE_MULTISELECT ((sal_uInt16)0x0004)
+#define MOUSE_RANGESELECT ((sal_uInt16)0x0008)
// Maus-Buttons
-#define MOUSE_LEFT ((USHORT)0x0001)
-#define MOUSE_MIDDLE ((USHORT)0x0002)
-#define MOUSE_RIGHT ((USHORT)0x0004)
+#define MOUSE_LEFT ((sal_uInt16)0x0001)
+#define MOUSE_MIDDLE ((sal_uInt16)0x0002)
+#define MOUSE_RIGHT ((sal_uInt16)0x0004)
// --------------
// - MouseEvent -
@@ -127,53 +127,53 @@ class VCL_DLLPUBLIC MouseEvent
{
private:
Point maPos;
- USHORT mnMode;
- USHORT mnClicks;
- USHORT mnCode;
+ sal_uInt16 mnMode;
+ sal_uInt16 mnClicks;
+ sal_uInt16 mnCode;
public:
MouseEvent();
- MouseEvent( const Point& rPos, USHORT nClicks = 1,
- USHORT nMode = 0, USHORT nButtons = 0,
- USHORT nModifier = 0 );
+ MouseEvent( const Point& rPos, sal_uInt16 nClicks = 1,
+ sal_uInt16 nMode = 0, sal_uInt16 nButtons = 0,
+ sal_uInt16 nModifier = 0 );
const Point& GetPosPixel() const { return maPos; }
- USHORT GetMode() const { return mnMode; }
+ sal_uInt16 GetMode() const { return mnMode; }
/** inits this vcl KeyEvent with all settings from the given awt event **/
MouseEvent( const ::com::sun::star::awt::MouseEvent& rEvent );
/** fills out the given awt KeyEvent with all settings from this vcl event **/
void InitMouseEvent( ::com::sun::star::awt::MouseEvent& rEvent ) const;
- USHORT GetClicks() const { return mnClicks; }
+ sal_uInt16 GetClicks() const { return mnClicks; }
- BOOL IsEnterWindow() const
+ sal_Bool IsEnterWindow() const
{ return ((mnMode & MOUSE_ENTERWINDOW) != 0); }
- BOOL IsLeaveWindow() const
+ sal_Bool IsLeaveWindow() const
{ return ((mnMode & MOUSE_LEAVEWINDOW) != 0); }
- BOOL IsSynthetic() const
+ sal_Bool IsSynthetic() const
{ return ((mnMode & MOUSE_SYNTHETIC) != 0); }
- BOOL IsModifierChanged() const
+ sal_Bool IsModifierChanged() const
{ return ((mnMode & MOUSE_MODIFIERCHANGED) != 0); }
- USHORT GetButtons() const
+ sal_uInt16 GetButtons() const
{ return (mnCode & (MOUSE_LEFT | MOUSE_MIDDLE | MOUSE_RIGHT)); }
- BOOL IsLeft() const
+ sal_Bool IsLeft() const
{ return ((mnCode & MOUSE_LEFT) != 0); }
- BOOL IsMiddle() const
+ sal_Bool IsMiddle() const
{ return ((mnCode & MOUSE_MIDDLE) != 0); }
- BOOL IsRight() const
+ sal_Bool IsRight() const
{ return ((mnCode & MOUSE_RIGHT) != 0); }
- USHORT GetModifier() const
+ sal_uInt16 GetModifier() const
{ return (mnCode & (KEY_SHIFT | KEY_MOD1 | KEY_MOD2)); }
- BOOL IsShift() const
+ sal_Bool IsShift() const
{ return ((mnCode & KEY_SHIFT) != 0); }
- BOOL IsMod1() const
+ sal_Bool IsMod1() const
{ return ((mnCode & KEY_MOD1) != 0); }
- BOOL IsMod2() const
+ sal_Bool IsMod2() const
{ return ((mnCode & KEY_MOD2) != 0); }
- BOOL IsMod3() const
+ sal_Bool IsMod3() const
{ return ((mnCode & KEY_MOD3) != 0); }
};
@@ -184,9 +184,9 @@ inline MouseEvent::MouseEvent()
mnCode = 0;
}
-inline MouseEvent::MouseEvent( const Point& rPos, USHORT nClicks,
- USHORT nMode,
- USHORT nButtons, USHORT nModifier ) :
+inline MouseEvent::MouseEvent( const Point& rPos, sal_uInt16 nClicks,
+ sal_uInt16 nMode,
+ sal_uInt16 nButtons, sal_uInt16 nModifier ) :
maPos( rPos )
{
mnClicks = nClicks;
@@ -198,46 +198,46 @@ inline MouseEvent::MouseEvent( const Point& rPos, USHORT nClicks,
// - HelpEvent -
// -------------
-#define HELPMODE_CONTEXT ((USHORT)0x0001)
-#define HELPMODE_EXTENDED ((USHORT)0x0002)
-#define HELPMODE_BALLOON ((USHORT)0x0004)
-#define HELPMODE_QUICK ((USHORT)0x0008)
+#define HELPMODE_CONTEXT ((sal_uInt16)0x0001)
+#define HELPMODE_EXTENDED ((sal_uInt16)0x0002)
+#define HELPMODE_BALLOON ((sal_uInt16)0x0004)
+#define HELPMODE_QUICK ((sal_uInt16)0x0008)
class VCL_DLLPUBLIC HelpEvent
{
private:
Point maPos;
- USHORT mnMode;
- BOOL mbKeyboardActivated;
+ sal_uInt16 mnMode;
+ sal_Bool mbKeyboardActivated;
public:
HelpEvent();
- HelpEvent( USHORT nHelpMode );
- HelpEvent( const Point& rMousePos, USHORT nHelpMode );
+ HelpEvent( sal_uInt16 nHelpMode );
+ HelpEvent( const Point& rMousePos, sal_uInt16 nHelpMode );
const Point& GetMousePosPixel() const;
- USHORT GetMode() const { return mnMode; }
- BOOL KeyboardActivated() const { return mbKeyboardActivated; }
- void SetKeyboardActivated( BOOL bKeyboard ) { mbKeyboardActivated = bKeyboard; }
+ sal_uInt16 GetMode() const { return mnMode; }
+ sal_Bool KeyboardActivated() const { return mbKeyboardActivated; }
+ void SetKeyboardActivated( sal_Bool bKeyboard ) { mbKeyboardActivated = bKeyboard; }
};
inline HelpEvent::HelpEvent()
{
mnMode = HELPMODE_CONTEXT;
- mbKeyboardActivated = TRUE;
+ mbKeyboardActivated = sal_True;
}
-inline HelpEvent::HelpEvent( const Point& rMousePos, USHORT nHelpMode ) :
+inline HelpEvent::HelpEvent( const Point& rMousePos, sal_uInt16 nHelpMode ) :
maPos( rMousePos )
{
mnMode = nHelpMode;
- mbKeyboardActivated = FALSE;
+ mbKeyboardActivated = sal_False;
}
-inline HelpEvent::HelpEvent( USHORT nHelpMode )
+inline HelpEvent::HelpEvent( sal_uInt16 nHelpMode )
{
mnMode = nHelpMode;
- mbKeyboardActivated = TRUE;
+ mbKeyboardActivated = sal_True;
}
// -----------------
@@ -249,19 +249,19 @@ class VCL_DLLPUBLIC UserDrawEvent
private:
OutputDevice* mpOutDev;
Rectangle maOutRect;
- USHORT mnItemId;
- USHORT mnStyle;
+ sal_uInt16 mnItemId;
+ sal_uInt16 mnStyle;
public:
UserDrawEvent();
UserDrawEvent( OutputDevice* pOut,
const Rectangle& rOutRect,
- USHORT nId, USHORT nStyle = 0 );
+ sal_uInt16 nId, sal_uInt16 nStyle = 0 );
OutputDevice* GetDevice() const { return mpOutDev; }
const Rectangle& GetRect() const { return maOutRect; }
- USHORT GetItemId() const { return mnItemId; }
- USHORT GetStyle() const { return mnStyle; }
+ sal_uInt16 GetItemId() const { return mnItemId; }
+ sal_uInt16 GetStyle() const { return mnStyle; }
};
inline UserDrawEvent::UserDrawEvent()
@@ -273,7 +273,7 @@ inline UserDrawEvent::UserDrawEvent()
inline UserDrawEvent::UserDrawEvent( OutputDevice* pOut,
const Rectangle& rOutRect,
- USHORT nId, USHORT nStyle ) :
+ sal_uInt16 nId, sal_uInt16 nStyle ) :
maOutRect( rOutRect )
{
mpOutDev = pOut;
@@ -285,13 +285,13 @@ inline UserDrawEvent::UserDrawEvent( OutputDevice* pOut,
// - Tracking-Types -
// ------------------
-#define ENDTRACK_CANCEL ((USHORT)0x0001)
-#define ENDTRACK_KEY ((USHORT)0x0002)
-#define ENDTRACK_FOCUS ((USHORT)0x0004)
-#define ENDTRACK_END ((USHORT)0x1000)
-#define ENDTRACK_DONTCALLHDL ((USHORT)0x8000)
+#define ENDTRACK_CANCEL ((sal_uInt16)0x0001)
+#define ENDTRACK_KEY ((sal_uInt16)0x0002)
+#define ENDTRACK_FOCUS ((sal_uInt16)0x0004)
+#define ENDTRACK_END ((sal_uInt16)0x1000)
+#define ENDTRACK_DONTCALLHDL ((sal_uInt16)0x8000)
-#define TRACKING_REPEAT ((USHORT)0x0100)
+#define TRACKING_REPEAT ((sal_uInt16)0x0100)
// -----------------
// - TrackingEvent -
@@ -301,23 +301,23 @@ class VCL_DLLPUBLIC TrackingEvent
{
private:
MouseEvent maMEvt;
- USHORT mnFlags;
+ sal_uInt16 mnFlags;
public:
TrackingEvent();
TrackingEvent( const MouseEvent& rMEvt,
- USHORT nTrackFlags = 0 );
+ sal_uInt16 nTrackFlags = 0 );
const MouseEvent& GetMouseEvent() const { return maMEvt; }
- BOOL IsTrackingRepeat() const
+ sal_Bool IsTrackingRepeat() const
{ return ((mnFlags & TRACKING_REPEAT) != 0); }
- BOOL IsTrackingEnded() const
+ sal_Bool IsTrackingEnded() const
{ return ((mnFlags & ENDTRACK_END) != 0); }
- BOOL IsTrackingCanceled() const
+ sal_Bool IsTrackingCanceled() const
{ return ((mnFlags & ENDTRACK_CANCEL) != 0); }
- USHORT GetTrackingFlags() const { return mnFlags; }
+ sal_uInt16 GetTrackingFlags() const { return mnFlags; }
};
inline TrackingEvent::TrackingEvent()
@@ -326,7 +326,7 @@ inline TrackingEvent::TrackingEvent()
}
inline TrackingEvent::TrackingEvent( const MouseEvent& rMEvt,
- USHORT nTrackFlags ) :
+ sal_uInt16 nTrackFlags ) :
maMEvt( rMEvt )
{
mnFlags = nTrackFlags;
@@ -356,17 +356,17 @@ class VCL_DLLPUBLIC NotifyEvent
private:
Window* mpWindow;
void* mpData;
- USHORT mnType;
+ sal_uInt16 mnType;
long mnRetValue;
public:
NotifyEvent();
- NotifyEvent( USHORT nType,
+ NotifyEvent( sal_uInt16 nType,
Window* pWindow,
const void* pEvent = NULL,
long nRet = 0 );
- USHORT GetType() const { return mnType; }
+ sal_uInt16 GetType() const { return mnType; }
Window* GetWindow() const { return mpWindow; }
void* GetData() const { return mpData; }
@@ -386,7 +386,7 @@ inline NotifyEvent::NotifyEvent()
mnRetValue = 0;
}
-inline NotifyEvent::NotifyEvent( USHORT nType, Window* pWindow,
+inline NotifyEvent::NotifyEvent( sal_uInt16 nType, Window* pWindow,
const void* pEvent, long nRet )
{
mpWindow = pWindow;
@@ -423,30 +423,30 @@ inline const CommandEvent* NotifyEvent::GetCommandEvent() const
// - DataChangedEvent -
// --------------------
-#define DATACHANGED_SETTINGS ((USHORT)1)
-#define DATACHANGED_DISPLAY ((USHORT)2)
-#define DATACHANGED_DATETIME ((USHORT)3)
-#define DATACHANGED_FONTS ((USHORT)4)
-#define DATACHANGED_PRINTER ((USHORT)5)
-#define DATACHANGED_FONTSUBSTITUTION ((USHORT)6)
-#define DATACHANGED_USER ((USHORT)10000)
+#define DATACHANGED_SETTINGS ((sal_uInt16)1)
+#define DATACHANGED_DISPLAY ((sal_uInt16)2)
+#define DATACHANGED_DATETIME ((sal_uInt16)3)
+#define DATACHANGED_FONTS ((sal_uInt16)4)
+#define DATACHANGED_PRINTER ((sal_uInt16)5)
+#define DATACHANGED_FONTSUBSTITUTION ((sal_uInt16)6)
+#define DATACHANGED_USER ((sal_uInt16)10000)
class VCL_DLLPUBLIC DataChangedEvent
{
private:
void* mpData;
- ULONG mnFlags;
- USHORT mnType;
+ sal_uIntPtr mnFlags;
+ sal_uInt16 mnType;
public:
DataChangedEvent();
- DataChangedEvent( USHORT nType,
+ DataChangedEvent( sal_uInt16 nType,
const void* pData = NULL,
- ULONG nFlags = 0 );
+ sal_uIntPtr nFlags = 0 );
- USHORT GetType() const { return mnType; }
+ sal_uInt16 GetType() const { return mnType; }
void* GetData() const { return mpData; }
- ULONG GetFlags() const { return mnFlags; }
+ sal_uIntPtr GetFlags() const { return mnFlags; }
const AllSettings* GetOldSettings() const;
};
@@ -458,9 +458,9 @@ inline DataChangedEvent::DataChangedEvent()
mnType = 0;
}
-inline DataChangedEvent::DataChangedEvent( USHORT nType,
+inline DataChangedEvent::DataChangedEvent( sal_uInt16 nType,
const void* pData,
- ULONG nChangeFlags )
+ sal_uIntPtr nChangeFlags )
{
mpData = (void*)pData;
mnFlags = nChangeFlags;
diff --git a/vcl/inc/vcl/evntpost.hxx b/vcl/inc/vcl/evntpost.hxx
index 9e9badb7157b..01d2ccd2e95e 100644
--- a/vcl/inc/vcl/evntpost.hxx
+++ b/vcl/inc/vcl/evntpost.hxx
@@ -36,13 +36,13 @@ namespace vcl
{
struct UserEvent
{
- ULONG m_nWhich;
+ sal_uIntPtr m_nWhich;
void* m_pData;
};
class VCL_DLLPUBLIC EventPoster
{
- ULONG m_nId;
+ sal_uIntPtr m_nId;
Link m_aLink;
//#if 0 // _SOLAR__PRIVATE
diff --git a/vcl/inc/vcl/field.hxx b/vcl/inc/vcl/field.hxx
index e1f39cc78966..24601d2c96bb 100644
--- a/vcl/inc/vcl/field.hxx
+++ b/vcl/inc/vcl/field.hxx
@@ -51,21 +51,21 @@ private:
Edit* mpField;
LocaleDataWrapper* mpLocaleDataWrapper;
Link maErrorLink;
- BOOL mbReformat;
- BOOL mbStrictFormat;
- BOOL mbEmptyFieldValue;
- BOOL mbEmptyFieldValueEnabled;
- BOOL mbDefaultLocale;
+ sal_Bool mbReformat;
+ sal_Bool mbStrictFormat;
+ sal_Bool mbEmptyFieldValue;
+ sal_Bool mbEmptyFieldValueEnabled;
+ sal_Bool mbDefaultLocale;
protected:
SAL_DLLPRIVATE void ImplSetText( const XubString& rText, Selection* pNewSel = NULL );
- SAL_DLLPRIVATE BOOL ImplGetEmptyFieldValue() const { return mbEmptyFieldValue; }
+ SAL_DLLPRIVATE sal_Bool ImplGetEmptyFieldValue() const { return mbEmptyFieldValue; }
- void SetFieldText( const XubString& rText, BOOL bKeepSelection );
- void SetEmptyFieldValueData( BOOL bValue ) { mbEmptyFieldValue = bValue; }
+ void SetFieldText( const XubString& rText, sal_Bool bKeepSelection );
+ void SetEmptyFieldValueData( sal_Bool bValue ) { mbEmptyFieldValue = bValue; }
SAL_DLLPRIVATE LocaleDataWrapper& ImplGetLocaleDataWrapper() const;
- BOOL IsDefaultLocale() const { return mbDefaultLocale; }
+ sal_Bool IsDefaultLocale() const { return mbDefaultLocale; }
public:
FormatterBase( Edit* pField = NULL );
@@ -76,11 +76,11 @@ public:
void SetField( Edit* pField ) { mpField = pField; }
Edit* GetField() const { return mpField; }
- BOOL MustBeReformatted() const { return mbReformat; }
- void MarkToBeReformatted( BOOL b ) { mbReformat = b; }
+ sal_Bool MustBeReformatted() const { return mbReformat; }
+ void MarkToBeReformatted( sal_Bool b ) { mbReformat = b; }
- void SetStrictFormat( BOOL bStrict );
- BOOL IsStrictFormat() const { return mbStrictFormat; }
+ void SetStrictFormat( sal_Bool bStrict );
+ sal_Bool IsStrictFormat() const { return mbStrictFormat; }
virtual void Reformat();
virtual void ReformatAll();
@@ -94,10 +94,10 @@ public:
const Link& GetErrorHdl() const { return maErrorLink; }
void SetEmptyFieldValue();
- BOOL IsEmptyFieldValue() const;
+ sal_Bool IsEmptyFieldValue() const;
- void EnableEmptyFieldValue( BOOL bEnable ) { mbEmptyFieldValueEnabled = bEnable; }
- BOOL IsEmptyFieldValueEnabled() const { return mbEmptyFieldValueEnabled; }
+ void EnableEmptyFieldValue( sal_Bool bEnable ) { mbEmptyFieldValueEnabled = bEnable; }
+ sal_Bool IsEmptyFieldValueEnabled() const { return mbEmptyFieldValueEnabled; }
};
@@ -105,7 +105,7 @@ public:
// - PatternFormatter -
// --------------------
-#define PATTERN_FORMAT_EMPTYLITERALS ((USHORT)0x0001)
+#define PATTERN_FORMAT_EMPTYLITERALS ((sal_uInt16)0x0001)
class VCL_DLLPUBLIC PatternFormatter : public FormatterBase
{
@@ -113,17 +113,17 @@ private:
ByteString maEditMask;
XubString maFieldString;
XubString maLiteralMask;
- USHORT mnFormatFlags;
- BOOL mbSameMask;
- BOOL mbInPattKeyInput;
+ sal_uInt16 mnFormatFlags;
+ sal_Bool mbSameMask;
+ sal_Bool mbInPattKeyInput;
protected:
PatternFormatter();
SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
SAL_DLLPRIVATE void ImplSetMask( const ByteString& rEditMask, const XubString& rLiteralMask );
- SAL_DLLPRIVATE BOOL ImplIsSameMask() const { return mbSameMask; }
- SAL_DLLPRIVATE BOOL& ImplGetInPattKeyInput() { return mbInPattKeyInput; }
+ SAL_DLLPRIVATE sal_Bool ImplIsSameMask() const { return mbSameMask; }
+ SAL_DLLPRIVATE sal_Bool& ImplGetInPattKeyInput() { return mbInPattKeyInput; }
public:
~PatternFormatter();
@@ -135,12 +135,12 @@ public:
const ByteString& GetEditMask() const { return maEditMask; }
const XubString& GetLiteralMask() const { return maLiteralMask; }
- void SetFormatFlags( USHORT nFlags ) { mnFormatFlags = nFlags; }
- USHORT GetFormatFlags() const { return mnFormatFlags; }
+ void SetFormatFlags( sal_uInt16 nFlags ) { mnFormatFlags = nFlags; }
+ sal_uInt16 GetFormatFlags() const { return mnFormatFlags; }
void SetString( const XubString& rStr );
XubString GetString() const;
- BOOL IsStringModified() const { return !(GetString().Equals( maFieldString )); }
+ sal_Bool IsStringModified() const { return !(GetString().Equals( maFieldString )); }
void SelectFixedFont();
};
@@ -160,10 +160,10 @@ protected:
sal_Int64 mnMin;
sal_Int64 mnMax;
sal_Int64 mnCorrectedValue;
- USHORT mnType;
- USHORT mnDecimalDigits;
- BOOL mbThousandSep;
- BOOL mbShowTrailingZeros;
+ sal_uInt16 mnType;
+ sal_uInt16 mnDecimalDigits;
+ sal_Bool mbThousandSep;
+ sal_Bool mbShowTrailingZeros;
// the members below are used in all derivatives of NumericFormatter
// not in NumericFormatter itself.
@@ -182,7 +182,7 @@ protected:
void FieldLast();
SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
- SAL_DLLPRIVATE BOOL ImplNumericReformat( const XubString& rStr, double& rValue, XubString& rOutStr );
+ SAL_DLLPRIVATE sal_Bool ImplNumericReformat( const XubString& rStr, double& rValue, XubString& rOutStr );
SAL_DLLPRIVATE void ImplNewFieldValue( sal_Int64 nNewValue );
SAL_DLLPRIVATE void ImplSetUserValue( sal_Int64 nNewValue, Selection* pNewSelection = NULL );
@@ -203,20 +203,20 @@ public:
void SetSpinSize( sal_Int64 nNewSize ) { mnSpinSize = nNewSize; }
sal_Int64 GetSpinSize() const { return mnSpinSize; }
- void SetDecimalDigits( USHORT nDigits );
- USHORT GetDecimalDigits() const;
+ void SetDecimalDigits( sal_uInt16 nDigits );
+ sal_uInt16 GetDecimalDigits() const;
- void SetUseThousandSep( BOOL b );
- BOOL IsUseThousandSep() const { return mbThousandSep; }
+ void SetUseThousandSep( sal_Bool b );
+ sal_Bool IsUseThousandSep() const { return mbThousandSep; }
- void SetShowTrailingZeros( BOOL bShowTrailingZeros );
- BOOL IsShowTrailingZeros() const { return mbShowTrailingZeros; }
+ void SetShowTrailingZeros( sal_Bool bShowTrailingZeros );
+ sal_Bool IsShowTrailingZeros() const { return mbShowTrailingZeros; }
void SetUserValue( sal_Int64 nNewValue );
virtual void SetValue( sal_Int64 nNewValue );
virtual sal_Int64 GetValue() const;
- BOOL IsValueModified() const;
+ sal_Bool IsValueModified() const;
sal_Int64 GetCorrectedValue() const { return mnCorrectedValue; }
Fraction ConvertToFraction( sal_Int64 nValue );
@@ -247,7 +247,7 @@ protected:
virtual XubString CreateFieldText( sal_Int64 nValue ) const;
SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
- SAL_DLLPRIVATE BOOL ImplMetricReformat( const XubString& rStr, double& rValue, XubString& rOutStr );
+ SAL_DLLPRIVATE sal_Bool ImplMetricReformat( const XubString& rStr, double& rValue, XubString& rOutStr );
public:
~MetricFormatter();
@@ -300,7 +300,7 @@ private:
protected:
CurrencyFormatter();
virtual XubString CreateFieldText( sal_Int64 nValue ) const;
- SAL_DLLPRIVATE BOOL ImplCurrencyReformat( const XubString& rStr, XubString& rOutStr );
+ SAL_DLLPRIVATE sal_Bool ImplCurrencyReformat( const XubString& rStr, XubString& rOutStr );
public:
~CurrencyFormatter();
@@ -328,12 +328,12 @@ private:
Date maMin;
Date maMax;
Date maCorrectedDate;
- BOOL mbLongFormat;
- BOOL mbEmptyDate;
- BOOL mbShowDateCentury;
- USHORT mnDateFormat;
- ULONG mnExtDateFormat;
- BOOL mbEnforceValidValue;
+ sal_Bool mbLongFormat;
+ sal_Bool mbEmptyDate;
+ sal_Bool mbShowDateCentury;
+ sal_uInt16 mnDateFormat;
+ sal_uIntPtr mnExtDateFormat;
+ sal_Bool mbEnforceValidValue;
SAL_DLLPRIVATE void ImplInit();
@@ -342,7 +342,7 @@ protected:
SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
SAL_DLLPRIVATE const Date& ImplGetFieldDate() const { return maFieldDate; }
- SAL_DLLPRIVATE BOOL ImplDateReformat( const XubString& rStr, XubString& rOutStr,
+ SAL_DLLPRIVATE sal_Bool ImplDateReformat( const XubString& rStr, XubString& rOutStr,
const AllSettings& rSettings );
SAL_DLLPRIVATE void ImplSetUserDate( const Date& rNewDate,
Selection* pNewSelection = NULL );
@@ -351,7 +351,7 @@ protected:
SAL_DLLPRIVATE void ImplNewFieldValue( const Date& rDate );
CalendarWrapper& GetCalendarWrapper() const;
- SAL_DLLPRIVATE BOOL ImplAllowMalformedInput() const;
+ SAL_DLLPRIVATE sal_Bool ImplAllowMalformedInput() const;
public:
~DateFormatter();
@@ -363,7 +363,7 @@ public:
void SetExtDateFormat( ExtDateFieldFormat eFormat );
- ExtDateFieldFormat GetExtDateFormat( BOOL bResolveSystemFormat = FALSE ) const;
+ ExtDateFieldFormat GetExtDateFormat( sal_Bool bResolveSystemFormat = sal_False ) const;
void SetMin( const Date& rNewMin );
const Date& GetMin() const { return maMin; }
@@ -374,44 +374,44 @@ public:
// --------------------------------------------------------------
// MT: Remove these methods too, ExtDateFormat should be enough!
- // What should happen if using DDMMYYYY, but ShowCentury=FALSE?
+ // What should happen if using DDMMYYYY, but ShowCentury=sal_False?
// --------------------------------------------------------------
- void SetLongFormat( BOOL bLong );
- BOOL IsLongFormat() const { return mbLongFormat; }
- void SetShowDateCentury( BOOL bShowCentury );
- BOOL IsShowDateCentury() const { return mbShowDateCentury; }
+ void SetLongFormat( sal_Bool bLong );
+ sal_Bool IsLongFormat() const { return mbLongFormat; }
+ void SetShowDateCentury( sal_Bool bShowCentury );
+ sal_Bool IsShowDateCentury() const { return mbShowDateCentury; }
// --------------------------------------------------------------
void SetDate( const Date& rNewDate );
void SetUserDate( const Date& rNewDate );
Date GetDate() const;
Date GetRealDate() const;
- BOOL IsDateModified() const;
+ sal_Bool IsDateModified() const;
void SetEmptyDate();
- BOOL IsEmptyDate() const;
+ sal_Bool IsEmptyDate() const;
Date GetCorrectedDate() const { return maCorrectedDate; }
void ResetLastDate() { maLastDate = Date( 0, 0, 0 ); }
static void ExpandCentury( Date& rDate );
- static void ExpandCentury( Date& rDate, USHORT nTwoDigitYearStart );
+ static void ExpandCentury( Date& rDate, sal_uInt16 nTwoDigitYearStart );
static Date GetInvalidDate() { return Date( 0, 0, 0 ); }
/** enables or disables the enforcement of valid values
- If this is set to <TRUE/> (which is the default), then GetDate will always return a valid
+ If this is set to <sal_True/> (which is the default), then GetDate will always return a valid
date, no matter whether the current text can really be interpreted as date. (Note: this
is the compatible bahavior).
- If this is set to <FALSE/>, the GetDate will return GetInvalidDate, in case the current text
+ If this is set to <sal_False/>, the GetDate will return GetInvalidDate, in case the current text
cannot be interpreted as date.
- In addition, if this is set to <FALSE/>, the text in the field will <em>not</em> be corrected
+ In addition, if this is set to <sal_False/>, the text in the field will <em>not</em> be corrected
when the control loses the focus - instead, the invalid input will be preserved.
*/
- void EnforceValidValue( BOOL _bEnforce ) { mbEnforceValidValue = _bEnforce; }
- inline BOOL IsEnforceValidValue( ) const { return mbEnforceValidValue; }
+ void EnforceValidValue( sal_Bool _bEnforce ) { mbEnforceValidValue = _bEnforce; }
+ inline sal_Bool IsEnforceValidValue( ) const { return mbEnforceValidValue; }
};
@@ -427,10 +427,10 @@ private:
Time maMax;
Time maCorrectedTime;
TimeFieldFormat meFormat;
- USHORT mnTimeFormat;
- BOOL mbDuration;
- BOOL mbEmptyTime;
- BOOL mbEnforceValidValue;
+ sal_uInt16 mnTimeFormat;
+ sal_Bool mbDuration;
+ sal_Bool mbEmptyTime;
+ sal_Bool mbEnforceValidValue;
SAL_DLLPRIVATE void ImplInit();
@@ -440,10 +440,10 @@ protected:
TimeFormatter();
SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
- SAL_DLLPRIVATE BOOL ImplTimeReformat( const XubString& rStr, XubString& rOutStr );
+ SAL_DLLPRIVATE sal_Bool ImplTimeReformat( const XubString& rStr, XubString& rOutStr );
SAL_DLLPRIVATE void ImplNewFieldValue( const Time& rTime );
SAL_DLLPRIVATE void ImplSetUserTime( const Time& rNewTime, Selection* pNewSelection = NULL );
- SAL_DLLPRIVATE BOOL ImplAllowMalformedInput() const;
+ SAL_DLLPRIVATE sal_Bool ImplAllowMalformedInput() const;
public:
@@ -468,34 +468,34 @@ public:
void SetFormat( TimeFieldFormat eNewFormat );
TimeFieldFormat GetFormat() const { return meFormat; }
- void SetDuration( BOOL mbDuration );
- BOOL IsDuration() const { return mbDuration; }
+ void SetDuration( sal_Bool mbDuration );
+ sal_Bool IsDuration() const { return mbDuration; }
void SetTime( const Time& rNewTime );
void SetUserTime( const Time& rNewTime );
Time GetTime() const;
Time GetRealTime() const;
- BOOL IsTimeModified() const;
+ sal_Bool IsTimeModified() const;
void SetEmptyTime() { FormatterBase::SetEmptyFieldValue(); }
- BOOL IsEmptyTime() const { return FormatterBase::IsEmptyFieldValue(); }
+ sal_Bool IsEmptyTime() const { return FormatterBase::IsEmptyFieldValue(); }
Time GetCorrectedTime() const { return maCorrectedTime; }
static Time GetInvalidTime() { return Time( 99, 99, 99 ); }
/** enables or disables the enforcement of valid values
- If this is set to <TRUE/> (which is the default), then GetTime will always return a valid
+ If this is set to <sal_True/> (which is the default), then GetTime will always return a valid
time, no matter whether the current text can really be interpreted as time. (Note: this
is the compatible bahavior).
- If this is set to <FALSE/>, the GetTime will return GetInvalidTime, in case the current text
+ If this is set to <sal_False/>, the GetTime will return GetInvalidTime, in case the current text
cannot be interpreted as time.
- In addition, if this is set to <FALSE/>, the text in the field will <em>not</em> be corrected
+ In addition, if this is set to <sal_False/>, the text in the field will <em>not</em> be corrected
when the control loses the focus - instead, the invalid input will be preserved.
*/
- void EnforceValidValue( BOOL _bEnforce ) { mbEnforceValidValue = _bEnforce; }
- inline BOOL IsEnforceValidValue( ) const { return mbEnforceValidValue; }
+ void EnforceValidValue( sal_Bool _bEnforce ) { mbEnforceValidValue = _bEnforce; }
+ inline sal_Bool IsEnforceValidValue( ) const { return mbEnforceValidValue; }
};
@@ -580,31 +580,31 @@ public:
static void SetDefaultUnit( FieldUnit eDefaultUnit );
static FieldUnit GetDefaultUnit();
- static sal_Int64 ConvertValue( sal_Int64 nValue, sal_Int64 mnBaseValue, USHORT nDecDigits,
+ static sal_Int64 ConvertValue( sal_Int64 nValue, sal_Int64 mnBaseValue, sal_uInt16 nDecDigits,
FieldUnit eInUnit, FieldUnit eOutUnit );
- static sal_Int64 ConvertValue( sal_Int64 nValue, USHORT nDecDigits,
+ static sal_Int64 ConvertValue( sal_Int64 nValue, sal_uInt16 nDecDigits,
FieldUnit eInUnit, MapUnit eOutUnit );
- static sal_Int64 ConvertValue( sal_Int64 nValue, USHORT nDecDigits,
+ static sal_Int64 ConvertValue( sal_Int64 nValue, sal_uInt16 nDecDigits,
MapUnit eInUnit, FieldUnit eOutUnit );
// for backwards compatibility
// caution: conversion to double loses precision
- static double ConvertDoubleValue( double nValue, sal_Int64 mnBaseValue, USHORT nDecDigits,
+ static double ConvertDoubleValue( double nValue, sal_Int64 mnBaseValue, sal_uInt16 nDecDigits,
FieldUnit eInUnit, FieldUnit eOutUnit );
- static double ConvertDoubleValue( double nValue, USHORT nDecDigits,
+ static double ConvertDoubleValue( double nValue, sal_uInt16 nDecDigits,
FieldUnit eInUnit, MapUnit eOutUnit );
- static double ConvertDoubleValue( double nValue, USHORT nDecDigits,
+ static double ConvertDoubleValue( double nValue, sal_uInt16 nDecDigits,
MapUnit eInUnit, FieldUnit eOutUnit );
// for backwards compatibility
// caution: conversion to double loses precision
- static double ConvertDoubleValue( sal_Int64 nValue, sal_Int64 nBaseValue, USHORT nDecDigits,
+ static double ConvertDoubleValue( sal_Int64 nValue, sal_Int64 nBaseValue, sal_uInt16 nDecDigits,
FieldUnit eInUnit, FieldUnit eOutUnit )
{ return ConvertDoubleValue( static_cast<double>(nValue), nBaseValue, nDecDigits, eInUnit, eOutUnit ); }
- static double ConvertDoubleValue( sal_Int64 nValue, USHORT nDecDigits,
+ static double ConvertDoubleValue( sal_Int64 nValue, sal_uInt16 nDecDigits,
FieldUnit eInUnit, MapUnit eOutUnit )
{ return ConvertDoubleValue( static_cast<double>(nValue), nDecDigits, eInUnit, eOutUnit ); }
- static double ConvertDoubleValue( sal_Int64 nValue, USHORT nDecDigits,
+ static double ConvertDoubleValue( sal_Int64 nValue, sal_uInt16 nDecDigits,
MapUnit eInUnit, FieldUnit eOutUnit )
{ return ConvertDoubleValue( static_cast<double>(nValue), nDecDigits, eInUnit, eOutUnit ); }
};
@@ -648,7 +648,7 @@ private:
Date maLast;
protected:
- SAL_DLLPRIVATE void ImplDateSpinArea( BOOL bUp );
+ SAL_DLLPRIVATE void ImplDateSpinArea( sal_Bool bUp );
SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
public:
@@ -684,7 +684,7 @@ private:
Time maLast;
protected:
- SAL_DLLPRIVATE void ImplTimeSpinArea( BOOL bUp );
+ SAL_DLLPRIVATE void ImplTimeSpinArea( sal_Bool bUp );
SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
public:
@@ -731,11 +731,11 @@ public:
virtual void ReformatAll();
void InsertString( const XubString& rStr,
- USHORT nPos = COMBOBOX_APPEND );
+ sal_uInt16 nPos = COMBOBOX_APPEND );
void RemoveString( const XubString& rStr );
using PatternFormatter::GetString;
- XubString GetString( USHORT nPos ) const;
- USHORT GetStringPos( const XubString& rStr ) const;
+ XubString GetString( sal_uInt16 nPos ) const;
+ sal_uInt16 GetStringPos( const XubString& rStr ) const;
};
@@ -758,11 +758,11 @@ public:
virtual void ReformatAll();
- void InsertValue( sal_Int64 nValue, USHORT nPos = COMBOBOX_APPEND );
+ void InsertValue( sal_Int64 nValue, sal_uInt16 nPos = COMBOBOX_APPEND );
void RemoveValue( sal_Int64 nValue );
using NumericFormatter::GetValue;
- sal_Int64 GetValue( USHORT nPos ) const;
- USHORT GetValuePos( sal_Int64 nPos ) const;
+ sal_Int64 GetValue( sal_uInt16 nPos ) const;
+ sal_uInt16 GetValuePos( sal_Int64 nPos ) const;
};
@@ -787,10 +787,10 @@ public:
virtual void ReformatAll();
void InsertValue( sal_Int64 nValue, FieldUnit eInUnit = FUNIT_NONE,
- USHORT nPos = COMBOBOX_APPEND );
+ sal_uInt16 nPos = COMBOBOX_APPEND );
void RemoveValue( sal_Int64 nValue, FieldUnit eInUnit = FUNIT_NONE );
- sal_Int64 GetValue( USHORT nPos, FieldUnit eOutUnit = FUNIT_NONE ) const;
- USHORT GetValuePos( sal_Int64 nValue,
+ sal_Int64 GetValue( sal_uInt16 nPos, FieldUnit eOutUnit = FUNIT_NONE ) const;
+ sal_uInt16 GetValuePos( sal_Int64 nValue,
FieldUnit eInUnit = FUNIT_NONE ) const;
// Needed, because GetValue() with nPos hide these functions
@@ -818,10 +818,10 @@ public:
virtual void ReformatAll();
- void InsertValue( sal_Int64 nValue, USHORT nPos = COMBOBOX_APPEND );
+ void InsertValue( sal_Int64 nValue, sal_uInt16 nPos = COMBOBOX_APPEND );
void RemoveValue( sal_Int64 nValue );
- sal_Int64 GetValue( USHORT nPos ) const;
- USHORT GetValuePos( sal_Int64 nValue ) const;
+ sal_Int64 GetValue( sal_uInt16 nPos ) const;
+ sal_uInt16 GetValuePos( sal_Int64 nValue ) const;
// Needed, because GetValue() with nPos hide this function
virtual sal_Int64 GetValue() const;
@@ -847,11 +847,11 @@ public:
virtual void ReformatAll();
- void InsertDate( const Date& rDate, USHORT nPos = COMBOBOX_APPEND );
+ void InsertDate( const Date& rDate, sal_uInt16 nPos = COMBOBOX_APPEND );
void RemoveDate( const Date& rDate );
using DateFormatter::GetDate;
- Date GetDate( USHORT nPos ) const;
- USHORT GetDatePos( const Date& rDate ) const;
+ Date GetDate( sal_uInt16 nPos ) const;
+ sal_uInt16 GetDatePos( const Date& rDate ) const;
};
@@ -874,11 +874,11 @@ public:
virtual void ReformatAll();
- void InsertTime( const Time& rTime, USHORT nPos = COMBOBOX_APPEND );
+ void InsertTime( const Time& rTime, sal_uInt16 nPos = COMBOBOX_APPEND );
void RemoveTime( const Time& rTime );
using TimeFormatter::GetTime;
- Time GetTime( USHORT nPos ) const;
- USHORT GetTimePos( const Time& rTime ) const;
+ Time GetTime( sal_uInt16 nPos ) const;
+ sal_uInt16 GetTimePos( const Time& rTime ) const;
};
#endif // _SV_FIELD_HXX
diff --git a/vcl/inc/vcl/fixbrd.hxx b/vcl/inc/vcl/fixbrd.hxx
index 2bf0d8e1cb31..a42d522538cf 100644
--- a/vcl/inc/vcl/fixbrd.hxx
+++ b/vcl/inc/vcl/fixbrd.hxx
@@ -50,8 +50,8 @@
class VCL_DLLPUBLIC FixedBorder : public Control
{
private:
- USHORT mnType;
- BOOL mbTransparent;
+ sal_uInt16 mnType;
+ sal_Bool mbTransparent;
private:
using Control::ImplInitSettings;
@@ -59,7 +59,7 @@ private:
SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle );
SAL_DLLPRIVATE WinBits ImplInitStyle( WinBits nStyle );
SAL_DLLPRIVATE void ImplInitSettings();
- SAL_DLLPRIVATE void ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
+ SAL_DLLPRIVATE void ImplDraw( OutputDevice* pDev, sal_uIntPtr nDrawFlags,
const Point& rPos, const Size& rSize );
public:
@@ -68,15 +68,15 @@ public:
~FixedBorder();
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_uIntPtr nFlags );
virtual void Resize();
virtual void StateChanged( StateChangedType nType );
virtual void DataChanged( const DataChangedEvent& rDCEvt );
- void SetTransparent( BOOL bTransparent );
- BOOL IsTransparent() const { return mbTransparent; }
- void SetBorderType( USHORT nType );
- USHORT GetBorderType() const { return mnType; }
+ void SetTransparent( sal_Bool bTransparent );
+ sal_Bool IsTransparent() const { return mbTransparent; }
+ void SetBorderType( sal_uInt16 nType );
+ sal_uInt16 GetBorderType() const { return mnType; }
};
#endif // _SV_FIXBRD_HXX
diff --git a/vcl/inc/vcl/fixed.hxx b/vcl/inc/vcl/fixed.hxx
index 4460694420a0..3e14b512807f 100644
--- a/vcl/inc/vcl/fixed.hxx
+++ b/vcl/inc/vcl/fixed.hxx
@@ -48,11 +48,11 @@ private:
using Window::ImplInit;
SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle );
SAL_DLLPRIVATE WinBits ImplInitStyle( WinBits nStyle );
- SAL_DLLPRIVATE void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground );
- SAL_DLLPRIVATE void ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
+ SAL_DLLPRIVATE void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground );
+ SAL_DLLPRIVATE void ImplDraw( OutputDevice* pDev, sal_uIntPtr nDrawFlags,
const Point& rPos, const Size& rSize, bool bFillLayout = false ) const;
public:
- SAL_DLLPRIVATE static USHORT ImplGetTextStyle( WinBits nWinBits );
+ SAL_DLLPRIVATE static sal_uInt16 ImplGetTextStyle( WinBits nWinBits );
//#endif
protected:
virtual void FillLayoutData() const;
@@ -67,7 +67,7 @@ public:
FixedText( Window* pParent, const ResId& rResId, bool bDisableAccessibleLabelForRelation );
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_uIntPtr nFlags );
virtual void Resize();
virtual void StateChanged( StateChangedType nType );
virtual void DataChanged( const DataChangedEvent& rDCEvt );
@@ -88,7 +88,7 @@ private:
using Window::ImplInit;
SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle );
SAL_DLLPRIVATE WinBits ImplInitStyle( WinBits nStyle );
- SAL_DLLPRIVATE void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground );
+ SAL_DLLPRIVATE void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground );
SAL_DLLPRIVATE void ImplDraw( bool bLayout = false );
protected:
@@ -103,7 +103,7 @@ public:
FixedLine( Window* pParent, const ResId& rResId );
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_uIntPtr nFlags );
virtual void Resize();
virtual void StateChanged( StateChangedType nType );
virtual void DataChanged( const DataChangedEvent& rDCEvt );
@@ -126,7 +126,7 @@ private:
SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle );
SAL_DLLPRIVATE WinBits ImplInitStyle( WinBits nStyle );
SAL_DLLPRIVATE void ImplInitSettings();
- SAL_DLLPRIVATE void ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
+ SAL_DLLPRIVATE void ImplDraw( OutputDevice* pDev, sal_uIntPtr nDrawFlags,
const Point& rPos, const Size& rSize );
protected:
@@ -138,7 +138,7 @@ public:
~FixedBitmap();
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_uIntPtr nFlags );
virtual void Resize();
virtual void StateChanged( StateChangedType nType );
virtual void DataChanged( const DataChangedEvent& rDCEvt );
@@ -146,7 +146,7 @@ public:
void SetBitmap( const Bitmap& rBitmap );
using OutputDevice::GetBitmap;
const Bitmap& GetBitmap() const { return maBitmap; }
- BOOL SetModeBitmap( const Bitmap& rBitmap, BmpColorMode eMode = BMP_COLOR_NORMAL );
+ sal_Bool SetModeBitmap( const Bitmap& rBitmap, BmpColorMode eMode = BMP_COLOR_NORMAL );
const Bitmap& GetModeBitmap( BmpColorMode eMode = BMP_COLOR_NORMAL ) const;
};
@@ -159,7 +159,7 @@ class VCL_DLLPUBLIC FixedImage : public Control
private:
Image maImage;
Image maImageHC;
- BOOL mbInUserDraw;
+ sal_Bool mbInUserDraw;
private:
using Control::ImplInitSettings;
@@ -167,7 +167,7 @@ private:
SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle );
SAL_DLLPRIVATE WinBits ImplInitStyle( WinBits nStyle );
SAL_DLLPRIVATE void ImplInitSettings();
- SAL_DLLPRIVATE void ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
+ SAL_DLLPRIVATE void ImplDraw( OutputDevice* pDev, sal_uIntPtr nDrawFlags,
const Point& rPos, const Size& rSize );
protected:
@@ -179,7 +179,7 @@ public:
~FixedImage();
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_uIntPtr nFlags );
virtual void Resize();
virtual void StateChanged( StateChangedType nType );
virtual void DataChanged( const DataChangedEvent& rDCEvt );
@@ -189,7 +189,7 @@ public:
void SetImage( const Image& rImage );
const Image& GetImage() const { return maImage; }
- BOOL SetModeImage( const Image& rImage, BmpColorMode eMode = BMP_COLOR_NORMAL );
+ sal_Bool SetModeImage( const Image& rImage, BmpColorMode eMode = BMP_COLOR_NORMAL );
const Image& GetModeImage( BmpColorMode eMode = BMP_COLOR_NORMAL ) const;
Point CalcImagePos( const Point& rPos,
diff --git a/vcl/inc/vcl/floatwin.hxx b/vcl/inc/vcl/floatwin.hxx
index 8b7c9be6499c..d25552398642 100644
--- a/vcl/inc/vcl/floatwin.hxx
+++ b/vcl/inc/vcl/floatwin.hxx
@@ -39,33 +39,33 @@ class PopupModeEvent;
// - FloatingWindow-Types -
// ------------------------
-#define FLOATWIN_POPUPMODE_ALLOWTEAROFF ((ULONG)0x00000001)
-#define FLOATWIN_POPUPMODE_ANIMATIONSLIDE ((ULONG)0x00000002)
-#define FLOATWIN_POPUPMODE_NOAUTOARRANGE ((ULONG)0x00000004)
-#define FLOATWIN_POPUPMODE_NOANIMATION ((ULONG)0x00000008)
-#define FLOATWIN_POPUPMODE_DOWN ((ULONG)0x00000010)
-#define FLOATWIN_POPUPMODE_UP ((ULONG)0x00000020)
-#define FLOATWIN_POPUPMODE_LEFT ((ULONG)0x00000040)
-#define FLOATWIN_POPUPMODE_RIGHT ((ULONG)0x00000080)
-#define FLOATWIN_POPUPMODE_NOFOCUSCLOSE ((ULONG)0x00000100)
-#define FLOATWIN_POPUPMODE_NOKEYCLOSE ((ULONG)0x00000200)
-#define FLOATWIN_POPUPMODE_NOMOUSECLOSE ((ULONG)0x00000400)
-#define FLOATWIN_POPUPMODE_NOMOUSERECTCLOSE ((ULONG)0x00000800)
-#define FLOATWIN_POPUPMODE_ALLMOUSEBUTTONCLOSE ((ULONG)0x00001000)
-#define FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE ((ULONG)0x00002000)
-#define FLOATWIN_POPUPMODE_PATHMOUSECANCELCLICK ((ULONG)0x00004000)
-#define FLOATWIN_POPUPMODE_NEWLEVEL ((ULONG)0x00008000)
-#define FLOATWIN_POPUPMODE_NOMOUSEUPCLOSE ((ULONG)0x00010000)
-#define FLOATWIN_POPUPMODE_GRABFOCUS ((ULONG)0x00020000)
-
-#define FLOATWIN_POPUPMODEEND_CANCEL ((USHORT)0x0001)
-#define FLOATWIN_POPUPMODEEND_TEAROFF ((USHORT)0x0002)
-#define FLOATWIN_POPUPMODEEND_DONTCALLHDL ((USHORT)0x0004)
-#define FLOATWIN_POPUPMODEEND_CLOSEALL ((USHORT)0x0008)
-
-#define FLOATWIN_TITLE_NORMAL ((USHORT)0x0001)
-#define FLOATWIN_TITLE_TEAROFF ((USHORT)0x0002)
-#define FLOATWIN_TITLE_NONE ((USHORT)0x0004)
+#define FLOATWIN_POPUPMODE_ALLOWTEAROFF ((sal_uIntPtr)0x00000001)
+#define FLOATWIN_POPUPMODE_ANIMATIONSLIDE ((sal_uIntPtr)0x00000002)
+#define FLOATWIN_POPUPMODE_NOAUTOARRANGE ((sal_uIntPtr)0x00000004)
+#define FLOATWIN_POPUPMODE_NOANIMATION ((sal_uIntPtr)0x00000008)
+#define FLOATWIN_POPUPMODE_DOWN ((sal_uIntPtr)0x00000010)
+#define FLOATWIN_POPUPMODE_UP ((sal_uIntPtr)0x00000020)
+#define FLOATWIN_POPUPMODE_LEFT ((sal_uIntPtr)0x00000040)
+#define FLOATWIN_POPUPMODE_RIGHT ((sal_uIntPtr)0x00000080)
+#define FLOATWIN_POPUPMODE_NOFOCUSCLOSE ((sal_uIntPtr)0x00000100)
+#define FLOATWIN_POPUPMODE_NOKEYCLOSE ((sal_uIntPtr)0x00000200)
+#define FLOATWIN_POPUPMODE_NOMOUSECLOSE ((sal_uIntPtr)0x00000400)
+#define FLOATWIN_POPUPMODE_NOMOUSERECTCLOSE ((sal_uIntPtr)0x00000800)
+#define FLOATWIN_POPUPMODE_ALLMOUSEBUTTONCLOSE ((sal_uIntPtr)0x00001000)
+#define FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE ((sal_uIntPtr)0x00002000)
+#define FLOATWIN_POPUPMODE_PATHMOUSECANCELCLICK ((sal_uIntPtr)0x00004000)
+#define FLOATWIN_POPUPMODE_NEWLEVEL ((sal_uIntPtr)0x00008000)
+#define FLOATWIN_POPUPMODE_NOMOUSEUPCLOSE ((sal_uIntPtr)0x00010000)
+#define FLOATWIN_POPUPMODE_GRABFOCUS ((sal_uIntPtr)0x00020000)
+
+#define FLOATWIN_POPUPMODEEND_CANCEL ((sal_uInt16)0x0001)
+#define FLOATWIN_POPUPMODEEND_TEAROFF ((sal_uInt16)0x0002)
+#define FLOATWIN_POPUPMODEEND_DONTCALLHDL ((sal_uInt16)0x0004)
+#define FLOATWIN_POPUPMODEEND_CLOSEALL ((sal_uInt16)0x0008)
+
+#define FLOATWIN_TITLE_NORMAL ((sal_uInt16)0x0001)
+#define FLOATWIN_TITLE_TEAROFF ((sal_uInt16)0x0002)
+#define FLOATWIN_TITLE_NONE ((sal_uInt16)0x0004)
// ------------------
// - FloatingWindow -
@@ -79,18 +79,18 @@ private:
Window* mpFirstPopupModeWin;
ImplData* mpImplData;
Rectangle maFloatRect;
- ULONG mnPostId;
- ULONG mnPopupModeFlags;
- USHORT mnTitle;
- USHORT mnOldTitle;
- BOOL mbInPopupMode;
- BOOL mbPopupMode;
- BOOL mbPopupModeCanceled;
- BOOL mbPopupModeTearOff;
- BOOL mbMouseDown;
- BOOL mbOldSaveBackMode;
- BOOL mbGrabFocus; // act as key input window, although focus is not set
- BOOL mbInCleanUp;
+ sal_uIntPtr mnPostId;
+ sal_uIntPtr mnPopupModeFlags;
+ sal_uInt16 mnTitle;
+ sal_uInt16 mnOldTitle;
+ sal_Bool mbInPopupMode;
+ sal_Bool mbPopupMode;
+ sal_Bool mbPopupModeCanceled;
+ sal_Bool mbPopupModeTearOff;
+ sal_Bool mbMouseDown;
+ sal_Bool mbOldSaveBackMode;
+ sal_Bool mbGrabFocus; // act as key input window, although focus is not set
+ sal_Bool mbInCleanUp;
Link maPopupModeEndHdl;
//#if 0 // _SOLAR__PRIVATE
@@ -108,20 +108,20 @@ protected:
SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
public:
-#define IMPL_FLOATWIN_HITTEST_OUTSIDE ((USHORT)0x0001)
-#define IMPL_FLOATWIN_HITTEST_WINDOW ((USHORT)0x0002)
-#define IMPL_FLOATWIN_HITTEST_RECT ((USHORT)0x0004)
- SAL_DLLPRIVATE FloatingWindow* ImplFloatHitTest( Window* pReference, const Point& rPos, USHORT& rHitTest );
+#define IMPL_FLOATWIN_HITTEST_OUTSIDE ((sal_uInt16)0x0001)
+#define IMPL_FLOATWIN_HITTEST_WINDOW ((sal_uInt16)0x0002)
+#define IMPL_FLOATWIN_HITTEST_RECT ((sal_uInt16)0x0004)
+ SAL_DLLPRIVATE FloatingWindow* ImplFloatHitTest( Window* pReference, const Point& rPos, sal_uInt16& rHitTest );
SAL_DLLPRIVATE FloatingWindow* ImplFindLastLevelFloat();
- SAL_DLLPRIVATE BOOL ImplIsFloatPopupModeWindow( const Window* pWindow );
- SAL_DLLPRIVATE void ImplSetMouseDown() { mbMouseDown = TRUE; }
- SAL_DLLPRIVATE BOOL ImplIsMouseDown() const { return mbMouseDown; }
+ SAL_DLLPRIVATE sal_Bool ImplIsFloatPopupModeWindow( const Window* pWindow );
+ SAL_DLLPRIVATE void ImplSetMouseDown() { mbMouseDown = sal_True; }
+ SAL_DLLPRIVATE sal_Bool ImplIsMouseDown() const { return mbMouseDown; }
SAL_DLLPRIVATE static Point ImplCalcPos( Window* pWindow,
- const Rectangle& rRect, ULONG nFlags,
- USHORT& rArrangeIndex );
- SAL_DLLPRIVATE void ImplEndPopupMode( USHORT nFlags = 0, ULONG nFocusId = 0 );
+ const Rectangle& rRect, sal_uIntPtr nFlags,
+ sal_uInt16& rArrangeIndex );
+ SAL_DLLPRIVATE void ImplEndPopupMode( sal_uInt16 nFlags = 0, sal_uIntPtr nFocusId = 0 );
SAL_DLLPRIVATE Rectangle& ImplGetItemEdgeClipRect();
- SAL_DLLPRIVATE BOOL ImplIsInPrivatePopupMode() const { return mbInPopupMode; }
+ SAL_DLLPRIVATE sal_Bool ImplIsInPrivatePopupMode() const { return mbInPopupMode; }
//#endif
public:
@@ -135,27 +135,27 @@ public:
virtual void PopupModeEnd();
- void SetTitleType( USHORT nTitle );
- USHORT GetTitleType() const { return mnTitle; }
+ void SetTitleType( sal_uInt16 nTitle );
+ sal_uInt16 GetTitleType() const { return mnTitle; }
- void StartPopupMode( const Rectangle& rRect, ULONG nFlags = 0 );
- void StartPopupMode( ToolBox* pBox, ULONG nFlags = 0 );
- void EndPopupMode( USHORT nFlags = 0 );
+ void StartPopupMode( const Rectangle& rRect, sal_uIntPtr nFlags = 0 );
+ void StartPopupMode( ToolBox* pBox, sal_uIntPtr nFlags = 0 );
+ void EndPopupMode( sal_uInt16 nFlags = 0 );
void AddPopupModeWindow( Window* pWindow );
void RemovePopupModeWindow( Window* pWindow );
- ULONG GetPopupModeFlags() const { return mnPopupModeFlags; }
- void SetPopupModeFlags( ULONG nFlags ) { mnPopupModeFlags = nFlags; }
- BOOL IsInPopupMode() const { return mbPopupMode; }
- BOOL IsInCleanUp() const { return mbInCleanUp; }
- BOOL IsPopupModeCanceled() const { return mbPopupModeCanceled; }
- BOOL IsPopupModeTearOff() const { return mbPopupModeTearOff; }
+ sal_uIntPtr GetPopupModeFlags() const { return mnPopupModeFlags; }
+ void SetPopupModeFlags( sal_uIntPtr nFlags ) { mnPopupModeFlags = nFlags; }
+ sal_Bool IsInPopupMode() const { return mbPopupMode; }
+ sal_Bool IsInCleanUp() const { return mbInCleanUp; }
+ sal_Bool IsPopupModeCanceled() const { return mbPopupModeCanceled; }
+ sal_Bool IsPopupModeTearOff() const { return mbPopupModeTearOff; }
void SetPopupModeEndHdl( const Link& rLink ) { maPopupModeEndHdl = rLink; }
const Link& GetPopupModeEndHdl() const { return maPopupModeEndHdl; }
- BOOL GrabsFocus() const { return mbGrabFocus; }
+ sal_Bool GrabsFocus() const { return mbGrabFocus; }
- static Point CalcFloatingPosition( Window* pWindow, const Rectangle& rRect, ULONG nFlags, USHORT& rArrangeIndex );
+ static Point CalcFloatingPosition( Window* pWindow, const Rectangle& rRect, sal_uIntPtr nFlags, sal_uInt16& rArrangeIndex );
};
#endif // _SV_FLOATWIN_HXX
diff --git a/vcl/inc/vcl/fntstyle.hxx b/vcl/inc/vcl/fntstyle.hxx
index 4b4ccc9f6d02..6b9c4c29275f 100644
--- a/vcl/inc/vcl/fntstyle.hxx
+++ b/vcl/inc/vcl/fntstyle.hxx
@@ -46,7 +46,7 @@ enum FontRelief { RELIEF_NONE, RELIEF_EMBOSSED, RELIEF_ENGRAVED, FontRelief_FORC
// - Font types -
// --------------
-typedef BYTE FontKerning;
+typedef sal_uInt8 FontKerning;
#define KERNING_FONTSPECIFIC ((FontKerning)0x01)
#define KERNING_ASIAN ((FontKerning)0x02)
diff --git a/vcl/inc/vcl/font.hxx b/vcl/inc/vcl/font.hxx
index 80fd31ebf6dc..7a5152a04a1d 100644
--- a/vcl/inc/vcl/font.hxx
+++ b/vcl/inc/vcl/font.hxx
@@ -64,8 +64,8 @@ public:
const Color& GetColor() const;
void SetFillColor( const Color& );
const Color& GetFillColor() const;
- void SetTransparent( BOOL bTransparent );
- BOOL IsTransparent() const;
+ void SetTransparent( sal_Bool bTransparent );
+ sal_Bool IsTransparent() const;
void SetAlign( FontAlign );
FontAlign GetAlign() const;
@@ -93,11 +93,11 @@ public:
void SetOrientation( short nLineOrientation );
short GetOrientation() const;
- void SetVertical( BOOL bVertical );
- BOOL IsVertical() const;
+ void SetVertical( sal_Bool bVertical );
+ sal_Bool IsVertical() const;
void SetKerning( FontKerning nKerning );
FontKerning GetKerning() const;
- BOOL IsKerning() const;
+ sal_Bool IsKerning() const;
void SetWeight( FontWeight );
FontWeight GetWeight() const;
@@ -105,10 +105,10 @@ public:
FontWidth GetWidthType() const;
void SetItalic( FontItalic );
FontItalic GetItalic() const;
- void SetOutline( BOOL bOutline );
- BOOL IsOutline() const;
- void SetShadow( BOOL bShadow );
- BOOL IsShadow() const;
+ void SetOutline( sal_Bool bOutline );
+ sal_Bool IsOutline() const;
+ void SetShadow( sal_Bool bShadow );
+ sal_Bool IsShadow() const;
void SetRelief( FontRelief );
FontRelief GetRelief() const;
void SetUnderline( FontUnderline );
@@ -119,17 +119,17 @@ public:
FontStrikeout GetStrikeout() const;
void SetEmphasisMark( FontEmphasisMark );
FontEmphasisMark GetEmphasisMark() const;
- void SetWordLineMode( BOOL bWordLine );
- BOOL IsWordLineMode() const;
+ void SetWordLineMode( sal_Bool bWordLine );
+ sal_Bool IsWordLineMode() const;
void Merge( const Font& rFont );
void GetFontAttributes( ImplFontAttributes& rAttrs ) const;
Font& operator=( const Font& );
- BOOL operator==( const Font& ) const;
- BOOL operator!=( const Font& rFont ) const
+ sal_Bool operator==( const Font& ) const;
+ sal_Bool operator!=( const Font& rFont ) const
{ return !(Font::operator==( rFont )); }
- BOOL IsSameInstance( const Font& ) const;
+ sal_Bool IsSameInstance( const Font& ) const;
friend VCL_DLLPUBLIC SvStream& operator>>( SvStream& rIStm, Font& );
friend VCL_DLLPUBLIC SvStream& operator<<( SvStream& rOStm, const Font& );
diff --git a/vcl/inc/vcl/gdimtf.hxx b/vcl/inc/vcl/gdimtf.hxx
index 06f7a0d14a2e..a2ce9b0b443d 100644
--- a/vcl/inc/vcl/gdimtf.hxx
+++ b/vcl/inc/vcl/gdimtf.hxx
@@ -49,8 +49,8 @@ class Gradient;
// - GDIMetaFile-Types -
// ---------------------
-#define GDI_METAFILE_END ((ULONG)0xFFFFFFFF)
-#define GDI_METAFILE_LABEL_NOTFOUND ((ULONG)0xFFFFFFFF)
+#define GDI_METAFILE_END ((sal_uIntPtr)0xFFFFFFFF)
+#define GDI_METAFILE_LABEL_NOTFOUND ((sal_uIntPtr)0xFFFFFFFF)
#ifndef METAFILE_END
#define METAFILE_END GDI_METAFILE_END
@@ -105,8 +105,8 @@ private:
GDIMetaFile* pNext;
OutputDevice* pOutDev;
ImpLabelList* pLabelList;
- BOOL bPause;
- BOOL bRecord;
+ sal_Bool bPause;
+ sal_Bool bRecord;
//#if 0 // _SOLAR__PRIVATE
@@ -140,7 +140,7 @@ private:
protected:
- virtual void Linker( OutputDevice* pOut, BOOL bLink );
+ virtual void Linker( OutputDevice* pOut, sal_Bool bLink );
virtual long Hook();
public:
@@ -151,12 +151,12 @@ public:
using List::operator==;
using List::operator!=;
GDIMetaFile& operator=( const GDIMetaFile& rMtf );
- BOOL operator==( const GDIMetaFile& rMtf ) const;
- BOOL operator!=( const GDIMetaFile& rMtf ) const { return !( *this == rMtf ); }
+ sal_Bool operator==( const GDIMetaFile& rMtf ) const;
+ sal_Bool operator!=( const GDIMetaFile& rMtf ) const { return !( *this == rMtf ); }
void Clear();
sal_Bool IsEqual( const GDIMetaFile& rMtf ) const;
- BOOL Mirror( ULONG nMirrorFlags );
+ sal_Bool Mirror( sal_uIntPtr nMirrorFlags );
void Move( long nX, long nY );
void Scale( double fScaleX, double fScaleY );
void Scale( const Fraction& rScaleX, const Fraction& rScaleY );
@@ -173,52 +173,52 @@ public:
void Adjust( short nLuminancePercent = 0, short nContrastPercent = 0,
short nChannelRPercent = 0, short nChannelGPercent = 0,
- short nChannelBPercent = 0, double fGamma = 1.0, BOOL bInvert = FALSE );
+ short nChannelBPercent = 0, double fGamma = 1.0, sal_Bool bInvert = sal_False );
void Convert( MtfConversion eConversion );
- void ReplaceColors( const Color& rSearchColor, const Color& rReplaceColor, ULONG nTol = 0 );
+ void ReplaceColors( const Color& rSearchColor, const Color& rReplaceColor, sal_uIntPtr nTol = 0 );
void ReplaceColors( const Color* pSearchColors, const Color* rReplaceColors,
- ULONG nColorCount, ULONG* pTols = NULL );
+ sal_uIntPtr nColorCount, sal_uIntPtr* pTols = NULL );
GDIMetaFile GetMonochromeMtf( const Color& rCol ) const;
void Record( OutputDevice* pOutDev );
- BOOL IsRecord() const { return bRecord; }
+ sal_Bool IsRecord() const { return bRecord; }
- void Play( GDIMetaFile& rMtf, ULONG nPos = GDI_METAFILE_END );
- void Play( OutputDevice* pOutDev, ULONG nPos = GDI_METAFILE_END );
+ void Play( GDIMetaFile& rMtf, sal_uIntPtr nPos = GDI_METAFILE_END );
+ void Play( OutputDevice* pOutDev, sal_uIntPtr nPos = GDI_METAFILE_END );
void Play( OutputDevice* pOutDev, const Point& rPos,
- const Size& rSize, ULONG nPos = GDI_METAFILE_END );
+ const Size& rSize, sal_uIntPtr nPos = GDI_METAFILE_END );
- void Pause( BOOL bPause );
- BOOL IsPause() const { return bPause; }
+ void Pause( sal_Bool bPause );
+ sal_Bool IsPause() const { return bPause; }
void Stop();
void WindStart();
void WindEnd();
- void Wind( ULONG nAction );
+ void Wind( sal_uIntPtr nAction );
void WindPrev();
void WindNext();
- ULONG GetActionCount() const { return Count(); }
+ sal_uIntPtr GetActionCount() const { return Count(); }
void AddAction( MetaAction* pAction );
- void AddAction( MetaAction* pAction, ULONG nPos );
- void RemoveAction( ULONG nPos );
- MetaAction* CopyAction( ULONG nPos ) const;
+ void AddAction( MetaAction* pAction, sal_uIntPtr nPos );
+ void RemoveAction( sal_uIntPtr nPos );
+ MetaAction* CopyAction( sal_uIntPtr nPos ) const;
MetaAction* GetCurAction() const { return (MetaAction*) GetCurObject(); }
- MetaAction* GetAction( ULONG nAction ) const { return (MetaAction*) GetObject( nAction ); }
+ MetaAction* GetAction( sal_uIntPtr nAction ) const { return (MetaAction*) GetObject( nAction ); }
MetaAction* FirstAction() { return (MetaAction*) First(); }
MetaAction* NextAction() { return (MetaAction*) Next(); }
- MetaAction* ReplaceAction( MetaAction* pAction, ULONG nAction ) { return (MetaAction*) Replace( pAction, nAction ); }
+ MetaAction* ReplaceAction( MetaAction* pAction, sal_uIntPtr nAction ) { return (MetaAction*) Replace( pAction, nAction ); }
- ULONG GetActionPos( const String& rLabel );
- BOOL InsertLabel( const String& rLabel, ULONG nActionPos );
+ sal_uIntPtr GetActionPos( const String& rLabel );
+ sal_Bool InsertLabel( const String& rLabel, sal_uIntPtr nActionPos );
void RemoveLabel( const String& rLabel );
void RenameLabel( const String& rLabel, const String& rNewLabel );
- ULONG GetLabelCount() const;
- String GetLabel( ULONG nLabel );
+ sal_uIntPtr GetLabelCount() const;
+ String GetLabel( sal_uIntPtr nLabel );
- BOOL SaveStatus();
+ sal_Bool SaveStatus();
const Size& GetPrefSize() const { return aPrefSize; }
void SetPrefSize( const Size& rSize ) { aPrefSize = rSize; }
@@ -229,8 +229,8 @@ public:
void SetHookHdl( const Link& rLink ) { aHookHdlLink = rLink; }
const Link& GetHookHdl() const { return aHookHdlLink; }
- ULONG GetChecksum() const;
- ULONG GetSizeBytes() const;
+ sal_uIntPtr GetChecksum() const;
+ sal_uIntPtr GetSizeBytes() const;
// Methoden zum Lesen und Schreiben des neuen Formats;
// die Read-Methode kann auch das alte Format lesen
@@ -242,7 +242,7 @@ public:
friend VCL_DLLPUBLIC SvStream& operator>>( SvStream& rIStm, GDIMetaFile& rGDIMetaFile );
friend VCL_DLLPUBLIC SvStream& operator<<( SvStream& rOStm, const GDIMetaFile& rGDIMetaFile );
- BOOL CreateThumbnail( sal_uInt32 nMaximumExtent, BitmapEx& rBmpEx, const BitmapEx* pOverlay = NULL, const Rectangle* pOverlayRect = NULL ) const;
+ sal_Bool CreateThumbnail( sal_uInt32 nMaximumExtent, BitmapEx& rBmpEx, const BitmapEx* pOverlay = NULL, const Rectangle* pOverlayRect = NULL ) const;
};
#endif // _SV_GDIMTF_HXX
diff --git a/vcl/inc/vcl/gfxlink.hxx b/vcl/inc/vcl/gfxlink.hxx
index 3b3938ec848b..23ed60841186 100644
--- a/vcl/inc/vcl/gfxlink.hxx
+++ b/vcl/inc/vcl/gfxlink.hxx
@@ -42,16 +42,16 @@
struct ImpBuffer
{
- ULONG mnRefCount;
- BYTE* mpBuffer;
+ sal_uIntPtr mnRefCount;
+ sal_uInt8* mpBuffer;
- ImpBuffer( ULONG nSize )
+ ImpBuffer( sal_uIntPtr nSize )
{
mnRefCount = 1UL;
- mpBuffer = nSize ? new BYTE[ nSize ] : NULL;
+ mpBuffer = nSize ? new sal_uInt8[ nSize ] : NULL;
}
- ImpBuffer( BYTE* pBuf ) { mnRefCount = 1UL; mpBuffer = pBuf; }
+ ImpBuffer( sal_uInt8* pBuf ) { mnRefCount = 1UL; mpBuffer = pBuf; }
~ImpBuffer() { delete[] mpBuffer; }
};
@@ -63,15 +63,15 @@ struct ImpBuffer
struct ImpSwap
{
INetURLObject maURL;
- ULONG mnDataSize;
- ULONG mnRefCount;
+ sal_uIntPtr mnDataSize;
+ sal_uIntPtr mnRefCount;
- ImpSwap( BYTE* pData, ULONG nDataSize );
+ ImpSwap( sal_uInt8* pData, sal_uIntPtr nDataSize );
~ImpSwap();
- BYTE* GetData() const;
+ sal_uInt8* GetData() const;
- BOOL IsSwapped() const { return maURL.GetMainURL( INetURLObject::NO_DECODE ).getLength() > 0; }
+ sal_Bool IsSwapped() const { return maURL.GetMainURL( INetURLObject::NO_DECODE ).getLength() > 0; }
void WriteTo( SvStream& rOStm ) const;
};
@@ -137,7 +137,7 @@ private:
sal_uInt32 mnBufSize;
sal_uInt32 mnUserId;
ImpGfxLink* mpImpData;
- ULONG mnExtra2;
+ sal_uIntPtr mnExtra2;
SAL_DLLPRIVATE void ImplCopy( const GfxLink& rGfxLink );
@@ -145,7 +145,7 @@ public:
GfxLink();
GfxLink( const GfxLink& );
GfxLink( const String& rPath, GfxLinkType nType );
- GfxLink( BYTE* pBuf, sal_uInt32 nBufSize, GfxLinkType nType, BOOL bOwns );
+ GfxLink( sal_uInt8* pBuf, sal_uInt32 nBufSize, GfxLinkType nType, sal_Bool bOwns );
~GfxLink();
GfxLink& operator=( const GfxLink& );
@@ -157,8 +157,8 @@ public:
sal_uInt32 GetUserId() const { return mnUserId; }
sal_uInt32 GetDataSize() const;
- void SetData( BYTE* pBuf, sal_uInt32 nSize, GfxLinkType nType, BOOL bOwns );
- const BYTE* GetData() const;
+ void SetData( sal_uInt8* pBuf, sal_uInt32 nSize, GfxLinkType nType, sal_Bool bOwns );
+ const sal_uInt8* GetData() const;
const Size& GetPrefSize() const;
void SetPrefSize( const Size& rPrefSize );
@@ -168,16 +168,16 @@ public:
void SetPrefMapMode( const MapMode& rPrefMapMode );
bool IsPrefMapModeValid();
- BOOL IsNative() const;
- BOOL IsUser() const { return( GFX_LINK_TYPE_USER == meType ); }
+ sal_Bool IsNative() const;
+ sal_Bool IsUser() const { return( GFX_LINK_TYPE_USER == meType ); }
- BOOL LoadNative( Graphic& rGraphic );
+ sal_Bool LoadNative( Graphic& rGraphic );
- BOOL ExportNative( SvStream& rOStream ) const;
+ sal_Bool ExportNative( SvStream& rOStream ) const;
void SwapOut();
void SwapIn();
- BOOL IsSwappedOut() const { return( mpSwap != NULL ); }
+ sal_Bool IsSwappedOut() const { return( mpSwap != NULL ); }
public:
diff --git a/vcl/inc/vcl/glyphcache.hxx b/vcl/inc/vcl/glyphcache.hxx
index a77c1626dc24..63b4a798fbba 100644
--- a/vcl/inc/vcl/glyphcache.hxx
+++ b/vcl/inc/vcl/glyphcache.hxx
@@ -90,7 +90,7 @@ private:
void GrowNotify();
private:
- ULONG CalcByteCount() const;
+ sal_uIntPtr CalcByteCount() const;
void GarbageCollect();
// the GlyphCache's FontList matches a font request to a serverfont instance
@@ -99,8 +99,8 @@ private:
struct IFSD_Hash{ size_t operator()( const ImplFontSelectData& ) const; };
typedef ::std::hash_map<ImplFontSelectData,ServerFont*,IFSD_Hash,IFSD_Equal > FontList;
FontList maFontList;
- ULONG mnMaxSize; // max overall cache size in bytes
- mutable ULONG mnBytesUsed;
+ sal_uIntPtr mnMaxSize; // max overall cache size in bytes
+ mutable sal_uIntPtr mnBytesUsed;
mutable long mnLruIndex;
mutable int mnGlyphCount;
ServerFont* mpCurrentGCFont;
@@ -188,7 +188,7 @@ public:
const ImplFontSelectData& GetFontSelData() const { return maFontSelData; }
virtual void FetchFontMetric( ImplFontMetricData&, long& rFactor ) const = 0;
- virtual ULONG GetKernPairs( ImplKernPairData** ) const { return 0; }
+ virtual sal_uIntPtr GetKernPairs( ImplKernPairData** ) const { return 0; }
virtual int GetGlyphKernValue( int, int ) const { return 0; }
virtual bool GetFontCodeRanges( CmapResult& ) const { return false; }
Point TransformPoint( const Point& ) const;
@@ -217,7 +217,7 @@ protected:
void AddRef() const { ++mnRefCount; }
long GetRefCount() const { return mnRefCount; }
long Release() const;
- ULONG GetByteCount() const { return mnBytesUsed; }
+ sal_uIntPtr GetByteCount() const { return mnBytesUsed; }
virtual void InitGlyphData( int nGlyphIndex, GlyphData& ) const = 0;
virtual void GarbageCollect( long );
@@ -237,7 +237,7 @@ private:
// used by GlyphCache for cache LRU algorithm
mutable long mnRefCount;
- mutable ULONG mnBytesUsed;
+ mutable sal_uIntPtr mnBytesUsed;
ServerFont* mpPrevGCFont;
ServerFont* mpNextGCFont;
@@ -326,13 +326,13 @@ public:
public:
unsigned char* mpBits;
- ULONG mnAllocated;
+ sal_uIntPtr mnAllocated;
- ULONG mnWidth;
- ULONG mnHeight;
+ sal_uIntPtr mnWidth;
+ sal_uIntPtr mnHeight;
- ULONG mnScanlineSize;
- ULONG mnBitCount;
+ sal_uIntPtr mnScanlineSize;
+ sal_uIntPtr mnBitCount;
int mnXOffset;
int mnYOffset;
diff --git a/vcl/inc/vcl/gradient.hxx b/vcl/inc/vcl/gradient.hxx
index 8938627cf684..6295e854d6c4 100644
--- a/vcl/inc/vcl/gradient.hxx
+++ b/vcl/inc/vcl/gradient.hxx
@@ -54,17 +54,17 @@ class SvStream;
class Impl_Gradient
{
public:
- ULONG mnRefCount;
+ sal_uIntPtr mnRefCount;
GradientStyle meStyle;
Color maStartColor;
Color maEndColor;
- USHORT mnAngle;
- USHORT mnBorder;
- USHORT mnOfsX;
- USHORT mnOfsY;
- USHORT mnIntensityStart;
- USHORT mnIntensityEnd;
- USHORT mnStepCount;
+ sal_uInt16 mnAngle;
+ sal_uInt16 mnBorder;
+ sal_uInt16 mnOfsX;
+ sal_uInt16 mnOfsY;
+ sal_uInt16 mnIntensityStart;
+ sal_uInt16 mnIntensityEnd;
+ sal_uInt16 mnStepCount;
friend SvStream& operator>>( SvStream& rIStm, Impl_Gradient& rImplGradient );
friend SvStream& operator<<( SvStream& rOStm, const Impl_Gradient& rImplGradient );
@@ -100,29 +100,29 @@ public:
void SetEndColor( const Color& rColor );
const Color& GetEndColor() const { return mpImplGradient->maEndColor; }
- void SetAngle( USHORT nAngle );
- USHORT GetAngle() const { return mpImplGradient->mnAngle; }
+ void SetAngle( sal_uInt16 nAngle );
+ sal_uInt16 GetAngle() const { return mpImplGradient->mnAngle; }
- void SetBorder( USHORT nBorder );
- USHORT GetBorder() const { return mpImplGradient->mnBorder; }
- void SetOfsX( USHORT nOfsX );
- USHORT GetOfsX() const { return mpImplGradient->mnOfsX; }
- void SetOfsY( USHORT nOfsY );
- USHORT GetOfsY() const { return mpImplGradient->mnOfsY; }
+ void SetBorder( sal_uInt16 nBorder );
+ sal_uInt16 GetBorder() const { return mpImplGradient->mnBorder; }
+ void SetOfsX( sal_uInt16 nOfsX );
+ sal_uInt16 GetOfsX() const { return mpImplGradient->mnOfsX; }
+ void SetOfsY( sal_uInt16 nOfsY );
+ sal_uInt16 GetOfsY() const { return mpImplGradient->mnOfsY; }
- void SetStartIntensity( USHORT nIntens );
- USHORT GetStartIntensity() const { return mpImplGradient->mnIntensityStart; }
- void SetEndIntensity( USHORT nIntens );
- USHORT GetEndIntensity() const { return mpImplGradient->mnIntensityEnd; }
+ void SetStartIntensity( sal_uInt16 nIntens );
+ sal_uInt16 GetStartIntensity() const { return mpImplGradient->mnIntensityStart; }
+ void SetEndIntensity( sal_uInt16 nIntens );
+ sal_uInt16 GetEndIntensity() const { return mpImplGradient->mnIntensityEnd; }
- void SetSteps( USHORT nSteps );
- USHORT GetSteps() const { return mpImplGradient->mnStepCount; }
+ void SetSteps( sal_uInt16 nSteps );
+ sal_uInt16 GetSteps() const { return mpImplGradient->mnStepCount; }
Gradient& operator=( const Gradient& rGradient );
- BOOL operator==( const Gradient& rGradient ) const;
- BOOL operator!=( const Gradient& rGradient ) const
+ sal_Bool operator==( const Gradient& rGradient ) const;
+ sal_Bool operator!=( const Gradient& rGradient ) const
{ return !(Gradient::operator==( rGradient )); }
- BOOL IsSameInstance( const Gradient& rGradient ) const
+ sal_Bool IsSameInstance( const Gradient& rGradient ) const
{ return (mpImplGradient == rGradient.mpImplGradient); }
friend VCL_DLLPUBLIC SvStream& operator>>( SvStream& rIStm, Gradient& rGradient );
diff --git a/vcl/inc/vcl/graph.h b/vcl/inc/vcl/graph.h
index c50a54b8802d..f93561882800 100644
--- a/vcl/inc/vcl/graph.h
+++ b/vcl/inc/vcl/graph.h
@@ -56,11 +56,11 @@ protected:
String maUpperName;
ReaderData* mpReaderData;
- BOOL mbIsReading;
+ sal_Bool mbIsReading;
GraphicReader() :
mpReaderData( NULL ),
- mbIsReading( FALSE ) {}
+ mbIsReading( sal_False ) {}
public:
@@ -68,11 +68,11 @@ public:
const String& GetUpperFilterName() const { return maUpperName; }
ReaderData* GetReaderData() const { return mpReaderData; }
- BOOL IsReading() const { return mbIsReading; }
+ sal_Bool IsReading() const { return mbIsReading; }
// TODO: when incompatible changes are possible again
// the preview size hint should be redone
- BOOL IsPreviewModeEnabled() const;
+ sal_Bool IsPreviewModeEnabled() const;
void DisablePreviewMode();
void SetPreviewSize( const Size& );
Size GetPreviewSize() const;
diff --git a/vcl/inc/vcl/graph.hxx b/vcl/inc/vcl/graph.hxx
index aa860273fdb7..944cbbf60be4 100644
--- a/vcl/inc/vcl/graph.hxx
+++ b/vcl/inc/vcl/graph.hxx
@@ -109,19 +109,19 @@ public:
virtual ~Graphic();
Graphic& operator=( const Graphic& rGraphic );
- BOOL operator==( const Graphic& rGraphic ) const;
- BOOL operator!=( const Graphic& rGraphic ) const;
- BOOL operator!() const;
+ sal_Bool operator==( const Graphic& rGraphic ) const;
+ sal_Bool operator!=( const Graphic& rGraphic ) const;
+ sal_Bool operator!() const;
void Clear();
GraphicType GetType() const;
void SetDefaultType();
- BOOL IsSupportedGraphic() const;
+ sal_Bool IsSupportedGraphic() const;
- BOOL IsTransparent() const;
- BOOL IsAlpha() const;
- BOOL IsAnimated() const;
+ sal_Bool IsTransparent() const;
+ sal_Bool IsAlpha() const;
+ sal_Bool IsAnimated() const;
// #i102089# Access of Bitmap potentially will have to rasterconvert the Graphic
// if it is a MetaFile. To be able to control this conversion it is necessary to
@@ -144,7 +144,7 @@ public:
Size GetSizePixel( const OutputDevice* pRefDevice = NULL ) const;
- ULONG GetSizeBytes() const;
+ sal_uIntPtr GetSizeBytes() const;
void Draw( OutputDevice* pOutDev,
const Point& rDestPt ) const;
@@ -173,12 +173,12 @@ public:
void SetAnimationNotifyHdl( const Link& rLink );
Link GetAnimationNotifyHdl() const;
- ULONG GetAnimationLoopCount() const;
+ sal_uIntPtr GetAnimationLoopCount() const;
void ResetAnimationLoopCount();
List* GetAnimationInfoList() const;
- ULONG GetChecksum() const;
+ sal_uIntPtr GetChecksum() const;
public:
@@ -187,26 +187,26 @@ public:
public:
- static USHORT GetGraphicsCompressMode( SvStream& rIStm );
+ static sal_uInt16 GetGraphicsCompressMode( SvStream& rIStm );
- void SetDocFileName( const String& rName, ULONG nFilePos );
+ void SetDocFileName( const String& rName, sal_uIntPtr nFilePos );
const String& GetDocFileName() const;
- ULONG GetDocFilePos() const;
+ sal_uIntPtr GetDocFilePos() const;
- BOOL ReadEmbedded( SvStream& rIStream, BOOL bSwap = FALSE );
- BOOL WriteEmbedded( SvStream& rOStream );
+ sal_Bool ReadEmbedded( SvStream& rIStream, sal_Bool bSwap = sal_False );
+ sal_Bool WriteEmbedded( SvStream& rOStream );
- BOOL SwapOut();
- BOOL SwapOut( SvStream* pOStm );
- BOOL SwapIn();
- BOOL SwapIn( SvStream* pIStm );
- BOOL IsSwapOut() const;
+ sal_Bool SwapOut();
+ sal_Bool SwapOut( SvStream* pOStm );
+ sal_Bool SwapIn();
+ sal_Bool SwapIn( SvStream* pIStm );
+ sal_Bool IsSwapOut() const;
void SetLink( const GfxLink& );
GfxLink GetLink() const;
- BOOL IsLink() const;
+ sal_Bool IsLink() const;
- BOOL ExportNative( SvStream& rOStream ) const;
+ sal_Bool ExportNative( SvStream& rOStream ) const;
friend VCL_DLLPUBLIC SvStream& operator<<( SvStream& rOStream, const Graphic& rGraphic );
friend VCL_DLLPUBLIC SvStream& operator>>( SvStream& rIStream, Graphic& rGraphic );
diff --git a/vcl/inc/vcl/group.hxx b/vcl/inc/vcl/group.hxx
index 48461ec18ac0..69d14c145cd2 100644
--- a/vcl/inc/vcl/group.hxx
+++ b/vcl/inc/vcl/group.hxx
@@ -43,8 +43,8 @@ private:
using Window::ImplInit;
SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle );
SAL_DLLPRIVATE WinBits ImplInitStyle( WinBits nStyle );
- SAL_DLLPRIVATE void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground );
- SAL_DLLPRIVATE void ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
+ SAL_DLLPRIVATE void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground );
+ SAL_DLLPRIVATE void ImplDraw( OutputDevice* pDev, sal_uIntPtr nDrawFlags,
const Point& rPos, const Size& rSize, bool bLayout = false );
virtual void FillLayoutData() const;
@@ -58,7 +58,7 @@ public:
GroupBox( Window* pParent, const ResId& rResId );
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_uIntPtr nFlags );
virtual void Resize();
virtual void StateChanged( StateChangedType nType );
virtual void DataChanged( const DataChangedEvent& rDCEvt );
diff --git a/vcl/inc/vcl/hatch.hxx b/vcl/inc/vcl/hatch.hxx
index 5a8e36088f2e..93d96b367f5a 100644
--- a/vcl/inc/vcl/hatch.hxx
+++ b/vcl/inc/vcl/hatch.hxx
@@ -41,11 +41,11 @@ class SvStream;
struct ImplHatch
{
- ULONG mnRefCount;
+ sal_uIntPtr mnRefCount;
Color maColor;
HatchStyle meStyle;
long mnDistance;
- USHORT mnAngle;
+ sal_uInt16 mnAngle;
ImplHatch();
ImplHatch( const ImplHatch& rImplHatch );
@@ -69,13 +69,13 @@ public:
Hatch();
Hatch( const Hatch& rHatch );
- Hatch( HatchStyle eStyle, const Color& rHatchColor, long nDistance, USHORT nAngle10 = 0 );
+ Hatch( HatchStyle eStyle, const Color& rHatchColor, long nDistance, sal_uInt16 nAngle10 = 0 );
~Hatch();
Hatch& operator=( const Hatch& rHatch );
- BOOL operator==( const Hatch& rHatch ) const;
- BOOL operator!=( const Hatch& rHatch ) const { return !(Hatch::operator==( rHatch ) ); }
- BOOL IsSameInstance( const Hatch& rHatch ) const { return( mpImplHatch == rHatch.mpImplHatch ); }
+ sal_Bool operator==( const Hatch& rHatch ) const;
+ sal_Bool operator!=( const Hatch& rHatch ) const { return !(Hatch::operator==( rHatch ) ); }
+ sal_Bool IsSameInstance( const Hatch& rHatch ) const { return( mpImplHatch == rHatch.mpImplHatch ); }
void SetStyle( HatchStyle eStyle );
HatchStyle GetStyle() const { return mpImplHatch->meStyle; }
@@ -86,8 +86,8 @@ public:
void SetDistance( long nDistance );
long GetDistance() const { return mpImplHatch->mnDistance; }
- void SetAngle( USHORT nAngle10 );
- USHORT GetAngle() const { return mpImplHatch->mnAngle; }
+ void SetAngle( sal_uInt16 nAngle10 );
+ sal_uInt16 GetAngle() const { return mpImplHatch->mnAngle; }
friend VCL_DLLPUBLIC SvStream& operator>>( SvStream& rIStm, Hatch& rHatch );
friend VCL_DLLPUBLIC SvStream& operator<<( SvStream& rOStm, const Hatch& rHatch );
diff --git a/vcl/inc/vcl/help.hxx b/vcl/inc/vcl/help.hxx
index 30308aa8a723..83d323f53668 100644
--- a/vcl/inc/vcl/help.hxx
+++ b/vcl/inc/vcl/help.hxx
@@ -40,20 +40,20 @@ class Window;
// - Help-Types -
// --------------
-#define QUICKHELP_LEFT ((USHORT)0x0001)
-#define QUICKHELP_CENTER ((USHORT)0x0002)
-#define QUICKHELP_RIGHT ((USHORT)0x0004)
-#define QUICKHELP_TOP ((USHORT)0x0008)
-#define QUICKHELP_VCENTER ((USHORT)0x0010)
-#define QUICKHELP_BOTTOM ((USHORT)0x0020)
+#define QUICKHELP_LEFT ((sal_uInt16)0x0001)
+#define QUICKHELP_CENTER ((sal_uInt16)0x0002)
+#define QUICKHELP_RIGHT ((sal_uInt16)0x0004)
+#define QUICKHELP_TOP ((sal_uInt16)0x0008)
+#define QUICKHELP_VCENTER ((sal_uInt16)0x0010)
+#define QUICKHELP_BOTTOM ((sal_uInt16)0x0020)
#define QUICKHELP_NOAUTOPOS (QUICKHELP_LEFT | QUICKHELP_CENTER | QUICKHELP_RIGHT | QUICKHELP_TOP | QUICKHELP_VCENTER | QUICKHELP_BOTTOM)
-#define QUICKHELP_CTRLTEXT ((USHORT)0x0040)
-#define QUICKHELP_NOEVADEPOINTER ((USHORT)0x4000)
-#define QUICKHELP_BIDI_RTL ((USHORT)0x8000)
+#define QUICKHELP_CTRLTEXT ((sal_uInt16)0x0040)
+#define QUICKHELP_NOEVADEPOINTER ((sal_uInt16)0x4000)
+#define QUICKHELP_BIDI_RTL ((sal_uInt16)0x8000)
// By changes you must also change: rsc/vclrsc.hxx
-#define OOO_HELP_INDEX ((ULONG)0xFFFFFFFF)
-#define OOO_HELP_HELPONHELP ((ULONG)0xFFFFFFFE)
+#define OOO_HELP_INDEX ((sal_uIntPtr)0xFFFFFFFF)
+#define OOO_HELP_HELPONHELP ((sal_uIntPtr)0xFFFFFFFE)
// --------
// - Help -
@@ -71,53 +71,53 @@ public:
void SetHelpFile( const String& rFileName ) { maHelpFile = rFileName; }
const String& GetHelpFile() const { return maHelpFile; }
- virtual BOOL Start( ULONG nHelpId, const Window* pWindow );
- virtual BOOL Start( const XubString& rKeyWord, const Window* pWindow );
- virtual void OpenHelpAgent( ULONG nHelpId );
- virtual XubString GetHelpText( ULONG nHelpId, const Window* pWindow );
+ virtual sal_Bool Start( sal_uIntPtr nHelpId, const Window* pWindow );
+ virtual sal_Bool Start( const XubString& rKeyWord, const Window* pWindow );
+ virtual void OpenHelpAgent( sal_uIntPtr nHelpId );
+ virtual XubString GetHelpText( sal_uIntPtr nHelpId, const Window* pWindow );
virtual XubString GetHelpText( const String& aHelpURL, const Window* pWindow );
static void EnableContextHelp();
static void DisableContextHelp();
- static BOOL IsContextHelpEnabled();
- static BOOL StartContextHelp();
+ static sal_Bool IsContextHelpEnabled();
+ static sal_Bool StartContextHelp();
static void EnableExtHelp();
static void DisableExtHelp();
- static BOOL IsExtHelpEnabled();
- static BOOL StartExtHelp();
- static BOOL EndExtHelp();
- static BOOL IsExtHelpActive();
+ static sal_Bool IsExtHelpEnabled();
+ static sal_Bool StartExtHelp();
+ static sal_Bool EndExtHelp();
+ static sal_Bool IsExtHelpActive();
static void EnableBalloonHelp();
static void DisableBalloonHelp();
- static BOOL IsBalloonHelpEnabled();
- static BOOL ShowBalloon( Window* pParent,
+ static sal_Bool IsBalloonHelpEnabled();
+ static sal_Bool ShowBalloon( Window* pParent,
const Point& rScreenPos,
const XubString& rHelpText );
- static BOOL ShowBalloon( Window* pParent,
+ static sal_Bool ShowBalloon( Window* pParent,
const Point& rScreenPos,
const Rectangle&,
const XubString& rHelpText );
static void EnableQuickHelp();
static void DisableQuickHelp();
- static BOOL IsQuickHelpEnabled();
- static BOOL ShowQuickHelp( Window* pParent,
+ static sal_Bool IsQuickHelpEnabled();
+ static sal_Bool ShowQuickHelp( Window* pParent,
const Rectangle& rScreenRect,
const XubString& rHelpText,
const XubString& rLongHelpText,
- USHORT nStyle = 0 );
- static BOOL ShowQuickHelp( Window* pParent,
+ sal_uInt16 nStyle = 0 );
+ static sal_Bool ShowQuickHelp( Window* pParent,
const Rectangle& rScreenRect,
const XubString& rHelpText,
- USHORT nStyle = 0 )
+ sal_uInt16 nStyle = 0 )
{ return Help::ShowQuickHelp( pParent, rScreenRect, rHelpText, XubString(), nStyle ); }
- static ULONG ShowTip( Window* pParent,
+ static sal_uIntPtr ShowTip( Window* pParent,
const Rectangle& rScreenRect,
- const XubString& rText, USHORT nStyle = 0 );
- static void HideTip( ULONG nId );
+ const XubString& rText, sal_uInt16 nStyle = 0 );
+ static void HideTip( sal_uIntPtr nId );
};
#endif // _SV_HELP_HXX
diff --git a/vcl/inc/vcl/helpwin.hxx b/vcl/inc/vcl/helpwin.hxx
index 244ae1b7d846..a3fd0a81da36 100644
--- a/vcl/inc/vcl/helpwin.hxx
+++ b/vcl/inc/vcl/helpwin.hxx
@@ -49,8 +49,8 @@ private:
Timer maShowTimer;
Timer maHideTimer;
- USHORT mnHelpWinStyle;
- USHORT mnStyle;
+ sal_uInt16 mnHelpWinStyle;
+ sal_uInt16 mnStyle;
protected:
DECL_LINK( TimerHdl, Timer* );
@@ -60,33 +60,33 @@ protected:
void ImplShow();
public:
- HelpTextWindow( Window* pParent, const String& rText, USHORT nHelpWinStyle, USHORT nStyle );
+ HelpTextWindow( Window* pParent, const String& rText, sal_uInt16 nHelpWinStyle, sal_uInt16 nStyle );
~HelpTextWindow();
const String& GetHelpText() const { return maHelpText; }
void SetHelpText( const String& rHelpText );
- USHORT GetWinStyle() const { return mnHelpWinStyle; }
+ sal_uInt16 GetWinStyle() const { return mnHelpWinStyle; }
// Nur merken:
void SetStatusText( const String& rStatusText ) { maStatusText = rStatusText; }
void SetHelpArea( const Rectangle& rRect ) { maHelpArea = rRect; }
- void ShowHelp( USHORT nDelayMode );
+ void ShowHelp( sal_uInt16 nDelayMode );
Size CalcOutSize() const;
const Rectangle& GetHelpArea() const { return maHelpArea; }
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
- BOOL RegisterAccessibleParent();
+ sal_Bool RegisterAccessibleParent();
void RevokeAccessibleParent();
};
-void ImplShowHelpWindow( Window* pParent, USHORT nHelpWinStyle, USHORT nStyle,
+void ImplShowHelpWindow( Window* pParent, sal_uInt16 nHelpWinStyle, sal_uInt16 nStyle,
const String& rHelpText, const String& rStatusText,
const Point& rScreenPos, const Rectangle* pHelpArea = NULL );
void ImplDestroyHelpWindow( bool bUpdateHideTime );
-void ImplSetHelpWindowPos( Window* pHelpWindow, USHORT nHelpWinStyle, USHORT nStyle,
+void ImplSetHelpWindowPos( Window* pHelpWindow, sal_uInt16 nHelpWinStyle, sal_uInt16 nStyle,
const Point& rPos, const Rectangle* pHelpArea );
#endif // _SV_HELPWIN_HXX
diff --git a/vcl/inc/vcl/i18nhelp.hxx b/vcl/inc/vcl/i18nhelp.hxx
index 8f6a12f95761..b66ee1ee844e 100644
--- a/vcl/inc/vcl/i18nhelp.hxx
+++ b/vcl/inc/vcl/i18nhelp.hxx
@@ -86,7 +86,7 @@ public:
sal_Bool MatchMnemonic( const String& rString, sal_Unicode cMnemonicChar ) const;
String GetDate( const Date& rDate ) const;
- String GetNum( long nNumber, USHORT nDecimals, BOOL bUseThousandSep = TRUE, BOOL bTrailingZeros = TRUE ) const;
+ String GetNum( long nNumber, sal_uInt16 nDecimals, sal_Bool bUseThousandSep = sal_True, sal_Bool bTrailingZeros = sal_True ) const;
static String filterFormattingChars( const String& );
};
diff --git a/vcl/inc/vcl/idlemgr.hxx b/vcl/inc/vcl/idlemgr.hxx
index 6d7d7c8e531f..93da741827eb 100644
--- a/vcl/inc/vcl/idlemgr.hxx
+++ b/vcl/inc/vcl/idlemgr.hxx
@@ -47,7 +47,7 @@ public:
ImplIdleMgr();
~ImplIdleMgr();
- BOOL InsertIdleHdl( const Link& rLink, USHORT nPriority );
+ sal_Bool InsertIdleHdl( const Link& rLink, sal_uInt16 nPriority );
void RemoveIdleHdl( const Link& rLink );
void RestartIdler()
diff --git a/vcl/inc/vcl/ilstbox.hxx b/vcl/inc/vcl/ilstbox.hxx
index 33f60a1e8a2f..fdb178e8d56b 100644
--- a/vcl/inc/vcl/ilstbox.hxx
+++ b/vcl/inc/vcl/ilstbox.hxx
@@ -65,7 +65,7 @@ struct ImplEntryType
XubString maStr;
Image maImage;
void* mpUserData;
- BOOL mbIsSelected;
+ sal_Bool mbIsSelected;
long mnFlags;
long mnHeight;
@@ -75,7 +75,7 @@ struct ImplEntryType
mnFlags( 0 ),
mnHeight( 0 )
{
- mbIsSelected = FALSE;
+ mbIsSelected = sal_False;
mpUserData = NULL;
}
@@ -84,7 +84,7 @@ struct ImplEntryType
mnFlags( 0 ),
mnHeight( 0 )
{
- mbIsSelected = FALSE;
+ mbIsSelected = sal_False;
mpUserData = NULL;
}
@@ -93,7 +93,7 @@ struct ImplEntryType
mnFlags( 0 ),
mnHeight( 0 )
{
- mbIsSelected = FALSE;
+ mbIsSelected = sal_False;
mpUserData = NULL;
}
};
@@ -106,87 +106,87 @@ class ImplEntryList : private List
{
private:
Window* mpWindow; // For getting the current locale when matching strings
- USHORT mnLastSelected;
- USHORT mnSelectionAnchor;
- USHORT mnImages;
+ sal_uInt16 mnLastSelected;
+ sal_uInt16 mnSelectionAnchor;
+ sal_uInt16 mnImages;
- USHORT mnMRUCount;
- USHORT mnMaxMRUCount;
+ sal_uInt16 mnMRUCount;
+ sal_uInt16 mnMaxMRUCount;
Link maSelectionChangedHdl;
- BOOL mbCallSelectionChangedHdl;
+ sal_Bool mbCallSelectionChangedHdl;
- ImplEntryType* GetEntry( USHORT nPos ) const { return (ImplEntryType*)List::GetObject( nPos ); }
+ ImplEntryType* GetEntry( sal_uInt16 nPos ) const { return (ImplEntryType*)List::GetObject( nPos ); }
public:
ImplEntryList( Window* pWindow );
~ImplEntryList();
- USHORT InsertEntry( USHORT nPos, ImplEntryType* pNewEntry, BOOL bSort );
- void RemoveEntry( USHORT nPos );
- const ImplEntryType* GetEntryPtr( USHORT nPos ) const { return (const ImplEntryType*) GetObject( nPos ); }
- ImplEntryType* GetMutableEntryPtr( USHORT nPos ) const { return (ImplEntryType*) GetObject( nPos ); }
+ sal_uInt16 InsertEntry( sal_uInt16 nPos, ImplEntryType* pNewEntry, sal_Bool bSort );
+ void RemoveEntry( sal_uInt16 nPos );
+ const ImplEntryType* GetEntryPtr( sal_uInt16 nPos ) const { return (const ImplEntryType*) GetObject( nPos ); }
+ ImplEntryType* GetMutableEntryPtr( sal_uInt16 nPos ) const { return (ImplEntryType*) GetObject( nPos ); }
void Clear();
- USHORT FindMatchingEntry( const XubString& rStr, USHORT nStart = 0, BOOL bForward = TRUE, BOOL bLazy = TRUE ) const;
- USHORT FindEntry( const XubString& rStr, BOOL bSearchMRUArea = FALSE ) const;
- USHORT FindEntry( const void* pData ) const;
+ sal_uInt16 FindMatchingEntry( const XubString& rStr, sal_uInt16 nStart = 0, sal_Bool bForward = sal_True, sal_Bool bLazy = sal_True ) const;
+ sal_uInt16 FindEntry( const XubString& rStr, sal_Bool bSearchMRUArea = sal_False ) const;
+ sal_uInt16 FindEntry( const void* pData ) const;
// helper: add up heights up to index nEndIndex.
// GetAddedHeight( 0 ) returns 0
// GetAddedHeight( LISTBOX_ENTRY_NOTFOUND ) returns 0
// GetAddedHeight( i, k ) with k > i is equivalent -GetAddedHeight( k, i )
- long GetAddedHeight( USHORT nEndIndex, USHORT nBeginIndex = 0, long nBeginHeight = 0 ) const;
- long GetEntryHeight( USHORT nPos ) const;
+ long GetAddedHeight( sal_uInt16 nEndIndex, sal_uInt16 nBeginIndex = 0, long nBeginHeight = 0 ) const;
+ long GetEntryHeight( sal_uInt16 nPos ) const;
- USHORT GetEntryCount() const { return (USHORT)List::Count(); }
- BOOL HasImages() const { return mnImages ? TRUE : FALSE; }
+ sal_uInt16 GetEntryCount() const { return (sal_uInt16)List::Count(); }
+ sal_Bool HasImages() const { return mnImages ? sal_True : sal_False; }
- XubString GetEntryText( USHORT nPos ) const;
+ XubString GetEntryText( sal_uInt16 nPos ) const;
- BOOL HasEntryImage( USHORT nPos ) const;
- Image GetEntryImage( USHORT nPos ) const;
+ sal_Bool HasEntryImage( sal_uInt16 nPos ) const;
+ Image GetEntryImage( sal_uInt16 nPos ) const;
- void SetEntryData( USHORT nPos, void* pNewData );
- void* GetEntryData( USHORT nPos ) const;
+ void SetEntryData( sal_uInt16 nPos, void* pNewData );
+ void* GetEntryData( sal_uInt16 nPos ) const;
- void SetEntryFlags( USHORT nPos, long nFlags );
- long GetEntryFlags( USHORT nPos ) const;
+ void SetEntryFlags( sal_uInt16 nPos, long nFlags );
+ long GetEntryFlags( sal_uInt16 nPos ) const;
- void SelectEntry( USHORT nPos, BOOL bSelect );
+ void SelectEntry( sal_uInt16 nPos, sal_Bool bSelect );
- USHORT GetSelectEntryCount() const;
- XubString GetSelectEntry( USHORT nIndex ) const;
- USHORT GetSelectEntryPos( USHORT nIndex ) const;
- BOOL IsEntrySelected( const XubString& rStr ) const;
- BOOL IsEntryPosSelected( USHORT nIndex ) const;
+ sal_uInt16 GetSelectEntryCount() const;
+ XubString GetSelectEntry( sal_uInt16 nIndex ) const;
+ sal_uInt16 GetSelectEntryPos( sal_uInt16 nIndex ) const;
+ sal_Bool IsEntrySelected( const XubString& rStr ) const;
+ sal_Bool IsEntryPosSelected( sal_uInt16 nIndex ) const;
- void SetLastSelected( USHORT nPos ) { mnLastSelected = nPos; }
- USHORT GetLastSelected() const { return mnLastSelected; }
+ void SetLastSelected( sal_uInt16 nPos ) { mnLastSelected = nPos; }
+ sal_uInt16 GetLastSelected() const { return mnLastSelected; }
- void SetSelectionAnchor( USHORT nPos ) { mnSelectionAnchor = nPos; }
- USHORT GetSelectionAnchor() const { return mnSelectionAnchor; }
+ void SetSelectionAnchor( sal_uInt16 nPos ) { mnSelectionAnchor = nPos; }
+ sal_uInt16 GetSelectionAnchor() const { return mnSelectionAnchor; }
void SetSelectionChangedHdl( const Link& rLnk ) { maSelectionChangedHdl = rLnk; }
- void SetCallSelectionChangedHdl( BOOL bCall ) { mbCallSelectionChangedHdl = bCall; }
+ void SetCallSelectionChangedHdl( sal_Bool bCall ) { mbCallSelectionChangedHdl = bCall; }
- void SetMRUCount( USHORT n ) { mnMRUCount = n; }
- USHORT GetMRUCount() const { return mnMRUCount; }
+ void SetMRUCount( sal_uInt16 n ) { mnMRUCount = n; }
+ sal_uInt16 GetMRUCount() const { return mnMRUCount; }
- void SetMaxMRUCount( USHORT n ) { mnMaxMRUCount = n; }
- USHORT GetMaxMRUCount() const { return mnMaxMRUCount; }
+ void SetMaxMRUCount( sal_uInt16 n ) { mnMaxMRUCount = n; }
+ sal_uInt16 GetMaxMRUCount() const { return mnMaxMRUCount; }
/** An Entry is selectable if its mnFlags does not have the
LISTBOX_ENTRY_FLAG_DISABLE_SELECTION flag set. */
- bool IsEntrySelectable( USHORT nPos ) const;
+ bool IsEntrySelectable( sal_uInt16 nPos ) const;
/** returns the first entry found from the given position nPos that is selectable
or LISTBOX_ENTRY_NOTFOUND if non is found. If the entry at nPos is not selectable,
it returns the first selectable entry after nPos if bForward is true and the
first selectable entry after nPos is bForward is false.
*/
- USHORT FindFirstSelectable( USHORT nPos, bool bForward = true );
+ sal_uInt16 FindFirstSelectable( sal_uInt16 nPos, bool bForward = true );
};
// ---------------------
@@ -213,22 +213,22 @@ private:
long mnMaxWidth; // Maximale Breite eines Eintrags
long mnMaxHeight; // Maximale Hoehe eines Eintrags
- USHORT mnCurrentPos; // Position (Focus)
- USHORT mnTrackingSaveSelection; // Selektion vor Tracking();
+ sal_uInt16 mnCurrentPos; // Position (Focus)
+ sal_uInt16 mnTrackingSaveSelection; // Selektion vor Tracking();
- USHORT mnSeparatorPos; // Separator
+ sal_uInt16 mnSeparatorPos; // Separator
- USHORT mnUserDrawEntry;
+ sal_uInt16 mnUserDrawEntry;
- USHORT mnTop; // Ausgabe ab Zeile
+ sal_uInt16 mnTop; // Ausgabe ab Zeile
long mnLeft; // Ausgabe ab Spalte
long mnBorder; // Abstand Rahmen - Text
long mnTextHeight; // Texthoehe
ProminentEntry meProminentType; // where is the "prominent" entry
- USHORT mnSelectModifier; // Modifiers
+ sal_uInt16 mnSelectModifier; // Modifiers
- BOOL mbHasFocusRect: 1,
+ sal_Bool mbHasFocusRect: 1,
mbSort: 1, // ListBox sortiert
mbTrack: 1, // Tracking
mbMulti: 1, // MultiListBox
@@ -266,8 +266,8 @@ protected:
virtual void GetFocus();
virtual void LoseFocus();
- BOOL SelectEntries( USHORT nSelect, LB_EVENT_TYPE eLET, BOOL bShift = FALSE, BOOL bCtrl = FALSE );
- void ImplPaint( USHORT nPos, BOOL bErase = FALSE, bool bLayout = false );
+ sal_Bool SelectEntries( sal_uInt16 nSelect, LB_EVENT_TYPE eLET, sal_Bool bShift = sal_False, sal_Bool bCtrl = sal_False );
+ void ImplPaint( sal_uInt16 nPos, sal_Bool bErase = sal_False, bool bLayout = false );
void ImplDoPaint( const Rectangle& rRect, bool bLayout = false );
void ImplCalcMetrics();
void ImplUpdateEntryMetrics( ImplEntryType& rEntry );
@@ -288,65 +288,65 @@ public:
ImplEntryList* GetEntryList() const { return mpEntryList; }
- USHORT InsertEntry( USHORT nPos, ImplEntryType* pNewEntry );
- void RemoveEntry( USHORT nPos );
+ sal_uInt16 InsertEntry( sal_uInt16 nPos, ImplEntryType* pNewEntry );
+ void RemoveEntry( sal_uInt16 nPos );
void Clear();
void ResetCurrentPos() { mnCurrentPos = LISTBOX_ENTRY_NOTFOUND; }
- USHORT GetCurrentPos() const { return mnCurrentPos; }
- USHORT GetDisplayLineCount() const;
- void SetEntryFlags( USHORT nPos, long nFlags );
+ sal_uInt16 GetCurrentPos() const { return mnCurrentPos; }
+ sal_uInt16 GetDisplayLineCount() const;
+ void SetEntryFlags( sal_uInt16 nPos, long nFlags );
- void DrawEntry( USHORT nPos, BOOL bDrawImage, BOOL bDrawText, BOOL bDrawTextAtImagePos = FALSE, bool bLayout = false );
+ void DrawEntry( sal_uInt16 nPos, sal_Bool bDrawImage, sal_Bool bDrawText, sal_Bool bDrawTextAtImagePos = sal_False, bool bLayout = false );
- void SelectEntry( USHORT nPos, BOOL bSelect );
+ void SelectEntry( sal_uInt16 nPos, sal_Bool bSelect );
void DeselectAll();
- USHORT GetEntryPosForPoint( const Point& rPoint ) const;
- USHORT GetLastVisibleEntry() const;
+ sal_uInt16 GetEntryPosForPoint( const Point& rPoint ) const;
+ sal_uInt16 GetLastVisibleEntry() const;
- BOOL ProcessKeyInput( const KeyEvent& rKEvt );
+ sal_Bool ProcessKeyInput( const KeyEvent& rKEvt );
- void SetTopEntry( USHORT nTop );
- USHORT GetTopEntry() const { return mnTop; }
+ void SetTopEntry( sal_uInt16 nTop );
+ sal_uInt16 GetTopEntry() const { return mnTop; }
// ShowProminentEntry will set the entry correspoding to nEntryPos
// either at top or in the middle depending on the chosen style
- void ShowProminentEntry( USHORT nEntryPos );
+ void ShowProminentEntry( sal_uInt16 nEntryPos );
void SetProminentEntryType( ProminentEntry eType ) { meProminentType = eType; }
ProminentEntry GetProminentEntryType() const { return meProminentType; }
using Window::IsVisible;
- BOOL IsVisible( USHORT nEntry ) const;
+ sal_Bool IsVisible( sal_uInt16 nEntry ) const;
long GetLeftIndent() const { return mnLeft; }
void SetLeftIndent( long n );
void ScrollHorz( long nDiff );
- void AllowGrabFocus( BOOL b ) { mbGrabFocus = b; }
- BOOL IsGrabFocusAllowed() const { return mbGrabFocus; }
+ void AllowGrabFocus( sal_Bool b ) { mbGrabFocus = b; }
+ sal_Bool IsGrabFocusAllowed() const { return mbGrabFocus; }
- void SetSeparatorPos( USHORT n ) { mnSeparatorPos = n; }
- USHORT GetSeparatorPos() const { return mnSeparatorPos; }
+ void SetSeparatorPos( sal_uInt16 n ) { mnSeparatorPos = n; }
+ sal_uInt16 GetSeparatorPos() const { return mnSeparatorPos; }
- void SetTravelSelect( BOOL bTravelSelect ) { mbTravelSelect = bTravelSelect; }
- BOOL IsTravelSelect() const { return mbTravelSelect; }
- BOOL IsTrackingSelect() const { return mbTrackingSelect; }
+ void SetTravelSelect( sal_Bool bTravelSelect ) { mbTravelSelect = bTravelSelect; }
+ sal_Bool IsTravelSelect() const { return mbTravelSelect; }
+ sal_Bool IsTrackingSelect() const { return mbTrackingSelect; }
void SetUserItemSize( const Size& rSz );
const Size& GetUserItemSize() const { return maUserItemSize; }
- void EnableUserDraw( BOOL bUserDraw ) { mbUserDrawEnabled = bUserDraw; }
- BOOL IsUserDrawEnabled() const { return mbUserDrawEnabled; }
+ void EnableUserDraw( sal_Bool bUserDraw ) { mbUserDrawEnabled = bUserDraw; }
+ sal_Bool IsUserDrawEnabled() const { return mbUserDrawEnabled; }
- void EnableMultiSelection( BOOL bMulti, BOOL bStackMode ) { mbMulti = bMulti; mbStackMode = bStackMode; }
- BOOL IsMultiSelectionEnabled() const { return mbMulti; }
+ void EnableMultiSelection( sal_Bool bMulti, sal_Bool bStackMode ) { mbMulti = bMulti; mbStackMode = bStackMode; }
+ sal_Bool IsMultiSelectionEnabled() const { return mbMulti; }
- void SetMultiSelectionSimpleMode( BOOL bSimple ) { mbSimpleMode = bSimple; }
- BOOL IsMultiSelectionSimpleMode() const { return mbSimpleMode; }
+ void SetMultiSelectionSimpleMode( sal_Bool bSimple ) { mbSimpleMode = bSimple; }
+ sal_Bool IsMultiSelectionSimpleMode() const { return mbSimpleMode; }
- void EnableMouseMoveSelect( BOOL bMouseMoveSelect ) { mbMouseMoveSelect = bMouseMoveSelect; }
- BOOL IsMouseMoveSelectEnabled() const { return mbMouseMoveSelect; }
- BOOL IsMouseMoveSelect() const { return mbMouseMoveSelect||mbStackMode; }
+ void EnableMouseMoveSelect( sal_Bool bMouseMoveSelect ) { mbMouseMoveSelect = bMouseMoveSelect; }
+ sal_Bool IsMouseMoveSelectEnabled() const { return mbMouseMoveSelect; }
+ sal_Bool IsMouseMoveSelect() const { return mbMouseMoveSelect||mbStackMode; }
- Size CalcSize( USHORT nMaxLines ) const;
- Rectangle GetBoundingRectangle( USHORT nItem ) const;
+ Size CalcSize( sal_uInt16 nMaxLines ) const;
+ Rectangle GetBoundingRectangle( sal_uInt16 nItem ) const;
long GetEntryHeight() const { return mnMaxHeight; }
long GetMaxEntryWidth() const { return mnMaxWidth; }
@@ -364,21 +364,21 @@ public:
void SetMRUChangedHdl( const Link& rLink ) { maMRUChangedHdl = rLink; }
const Link& GetMRUChangedHdl() const { return maMRUChangedHdl; }
- BOOL IsSelectionChanged() const { return mbSelectionChanged; }
- USHORT GetSelectModifier() const { return mnSelectModifier; }
+ sal_Bool IsSelectionChanged() const { return mbSelectionChanged; }
+ sal_uInt16 GetSelectModifier() const { return mnSelectModifier; }
- void EnableSort( BOOL b ) { mbSort = b; }
+ void EnableSort( sal_Bool b ) { mbSort = b; }
- void SetReadOnly( BOOL bReadOnly ) { mbReadOnly = bReadOnly; }
- BOOL IsReadOnly() const { return mbReadOnly; }
+ void SetReadOnly( sal_Bool bReadOnly ) { mbReadOnly = bReadOnly; }
+ sal_Bool IsReadOnly() const { return mbReadOnly; }
using Control::ImplInitSettings;
- void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground );
- USHORT ImplGetTextStyle() const;
+ void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground );
+ sal_uInt16 ImplGetTextStyle() const;
// pb: #106948# explicit mirroring for calc
- inline void EnableMirroring() { mbMirroring = TRUE; }
- inline BOOL IsMirroring() const { return mbMirroring; }
+ inline void EnableMirroring() { mbMirroring = sal_True; }
+ inline sal_Bool IsMirroring() const { return mbMirroring; }
};
// ---------------
@@ -392,7 +392,7 @@ private:
ScrollBar* mpHScrollBar;
ScrollBar* mpVScrollBar;
ScrollBarBox* mpScrollBarBox;
- BOOL mbVScroll : 1, // VScroll an oder aus
+ sal_Bool mbVScroll : 1, // VScroll an oder aus
mbHScroll : 1, // HScroll an oder aus
mbAutoHScroll : 1; // AutoHScroll an oder aus
Link maScrollHdl; // Weil der vom ImplListBoxWindow selbst benoetigt wird.
@@ -423,55 +423,55 @@ public:
virtual const Wallpaper& GetDisplayBackground() const;
virtual Window* GetPreferredKeyInputWindow();
- USHORT InsertEntry( USHORT nPos, const XubString& rStr );
- USHORT InsertEntry( USHORT nPos, const Image& rImage );
- USHORT InsertEntry( USHORT nPos, const XubString& rStr, const Image& rImage );
- void RemoveEntry( USHORT nPos );
- void SetEntryData( USHORT nPos, void* pNewData ) { maLBWindow.GetEntryList()->SetEntryData( nPos, pNewData ); }
+ sal_uInt16 InsertEntry( sal_uInt16 nPos, const XubString& rStr );
+ sal_uInt16 InsertEntry( sal_uInt16 nPos, const Image& rImage );
+ sal_uInt16 InsertEntry( sal_uInt16 nPos, const XubString& rStr, const Image& rImage );
+ void RemoveEntry( sal_uInt16 nPos );
+ void SetEntryData( sal_uInt16 nPos, void* pNewData ) { maLBWindow.GetEntryList()->SetEntryData( nPos, pNewData ); }
void Clear();
- void SetEntryFlags( USHORT nPos, long nFlags );
- long GetEntryFlags( USHORT nPos ) const;
+ void SetEntryFlags( sal_uInt16 nPos, long nFlags );
+ long GetEntryFlags( sal_uInt16 nPos ) const;
- void SelectEntry( USHORT nPos, BOOL bSelect );
+ void SelectEntry( sal_uInt16 nPos, sal_Bool bSelect );
void SetNoSelection();
void ResetCurrentPos() { maLBWindow.ResetCurrentPos(); }
- USHORT GetCurrentPos() const { return maLBWindow.GetCurrentPos(); }
+ sal_uInt16 GetCurrentPos() const { return maLBWindow.GetCurrentPos(); }
- BOOL ProcessKeyInput( const KeyEvent& rKEvt ) { return maLBWindow.ProcessKeyInput( rKEvt ); }
- BOOL HandleWheelAsCursorTravel( const CommandEvent& rCEvt );
+ sal_Bool ProcessKeyInput( const KeyEvent& rKEvt ) { return maLBWindow.ProcessKeyInput( rKEvt ); }
+ sal_Bool HandleWheelAsCursorTravel( const CommandEvent& rCEvt );
- void SetSeparatorPos( USHORT n ) { maLBWindow.SetSeparatorPos( n ); }
- USHORT GetSeparatorPos() const { return maLBWindow.GetSeparatorPos(); }
+ void SetSeparatorPos( sal_uInt16 n ) { maLBWindow.SetSeparatorPos( n ); }
+ sal_uInt16 GetSeparatorPos() const { return maLBWindow.GetSeparatorPos(); }
- void SetTopEntry( USHORT nTop ) { maLBWindow.SetTopEntry( nTop ); }
- USHORT GetTopEntry() const { return maLBWindow.GetTopEntry(); }
- void ShowProminentEntry( USHORT nPos ) { maLBWindow.ShowProminentEntry( nPos ); }
+ void SetTopEntry( sal_uInt16 nTop ) { maLBWindow.SetTopEntry( nTop ); }
+ sal_uInt16 GetTopEntry() const { return maLBWindow.GetTopEntry(); }
+ void ShowProminentEntry( sal_uInt16 nPos ) { maLBWindow.ShowProminentEntry( nPos ); }
using Window::IsVisible;
- BOOL IsVisible( USHORT nEntry ) const { return maLBWindow.IsVisible( nEntry ); }
+ sal_Bool IsVisible( sal_uInt16 nEntry ) const { return maLBWindow.IsVisible( nEntry ); }
void SetProminentEntryType( ProminentEntry eType ) { maLBWindow.SetProminentEntryType( eType ); }
ProminentEntry GetProminentEntryType() const { return maLBWindow.GetProminentEntryType(); }
long GetLeftIndent() const { return maLBWindow.GetLeftIndent(); }
- void SetLeftIndent( USHORT n ) { maLBWindow.SetLeftIndent( n ); }
+ void SetLeftIndent( sal_uInt16 n ) { maLBWindow.SetLeftIndent( n ); }
void ScrollHorz( short nDiff ) { maLBWindow.ScrollHorz( nDiff ); }
- void SetTravelSelect( BOOL bTravelSelect ) { maLBWindow.SetTravelSelect( bTravelSelect ); }
- BOOL IsTravelSelect() const { return maLBWindow.IsTravelSelect(); }
- BOOL IsTrackingSelect() const { return maLBWindow.IsTrackingSelect(); }
+ void SetTravelSelect( sal_Bool bTravelSelect ) { maLBWindow.SetTravelSelect( bTravelSelect ); }
+ sal_Bool IsTravelSelect() const { return maLBWindow.IsTravelSelect(); }
+ sal_Bool IsTrackingSelect() const { return maLBWindow.IsTrackingSelect(); }
- void EnableMultiSelection( BOOL bMulti, BOOL bStackMode ) { maLBWindow.EnableMultiSelection( bMulti, bStackMode ); }
- BOOL IsMultiSelectionEnabled() const { return maLBWindow.IsMultiSelectionEnabled(); }
+ void EnableMultiSelection( sal_Bool bMulti, sal_Bool bStackMode ) { maLBWindow.EnableMultiSelection( bMulti, bStackMode ); }
+ sal_Bool IsMultiSelectionEnabled() const { return maLBWindow.IsMultiSelectionEnabled(); }
- void SetMultiSelectionSimpleMode( BOOL bSimple ) { maLBWindow.SetMultiSelectionSimpleMode( bSimple ); }
- BOOL IsMultiSelectionSimpleMode() const { return maLBWindow.IsMultiSelectionSimpleMode(); }
+ void SetMultiSelectionSimpleMode( sal_Bool bSimple ) { maLBWindow.SetMultiSelectionSimpleMode( bSimple ); }
+ sal_Bool IsMultiSelectionSimpleMode() const { return maLBWindow.IsMultiSelectionSimpleMode(); }
- void SetReadOnly( BOOL b ) { maLBWindow.SetReadOnly( b ); }
- BOOL IsReadOnly() const { return maLBWindow.IsReadOnly(); }
+ void SetReadOnly( sal_Bool b ) { maLBWindow.SetReadOnly( b ); }
+ sal_Bool IsReadOnly() const { return maLBWindow.IsReadOnly(); }
- Size CalcSize( USHORT nMaxLines ) const { return maLBWindow.CalcSize( nMaxLines ); }
+ Size CalcSize( sal_uInt16 nMaxLines ) const { return maLBWindow.CalcSize( nMaxLines ); }
long GetEntryHeight() const { return maLBWindow.GetEntryHeight(); }
long GetMaxEntryWidth() const { return maLBWindow.GetMaxEntryWidth(); }
@@ -487,15 +487,15 @@ public:
const Link& GetUserDrawHdl() const { return maLBWindow.GetUserDrawHdl(); }
void SetSelectionChangedHdl( const Link& rLnk ) { maLBWindow.GetEntryList()->SetSelectionChangedHdl( rLnk ); }
- void SetCallSelectionChangedHdl( BOOL bCall ) { maLBWindow.GetEntryList()->SetCallSelectionChangedHdl( bCall ); }
- BOOL IsSelectionChanged() const { return maLBWindow.IsSelectionChanged(); }
- USHORT GetSelectModifier() const { return maLBWindow.GetSelectModifier(); }
+ void SetCallSelectionChangedHdl( sal_Bool bCall ) { maLBWindow.GetEntryList()->SetCallSelectionChangedHdl( bCall ); }
+ sal_Bool IsSelectionChanged() const { return maLBWindow.IsSelectionChanged(); }
+ sal_uInt16 GetSelectModifier() const { return maLBWindow.GetSelectModifier(); }
void SetMRUEntries( const XubString& rEntries, xub_Unicode cSep );
XubString GetMRUEntries( xub_Unicode cSep ) const;
- void SetMaxMRUCount( USHORT n ) { maLBWindow.GetEntryList()->SetMaxMRUCount( n ); }
- USHORT GetMaxMRUCount() const { return maLBWindow.GetEntryList()->GetMaxMRUCount(); }
- USHORT GetDisplayLineCount() const
+ void SetMaxMRUCount( sal_uInt16 n ) { maLBWindow.GetEntryList()->SetMaxMRUCount( n ); }
+ sal_uInt16 GetMaxMRUCount() const { return maLBWindow.GetEntryList()->GetMaxMRUCount(); }
+ sal_uInt16 GetDisplayLineCount() const
{ return maLBWindow.GetDisplayLineCount(); }
// pb: #106948# explicit mirroring for calc
@@ -511,9 +511,9 @@ class ImplListBoxFloatingWindow : public FloatingWindow
private:
ImplListBox* mpImplLB;
Size maPrefSz;
- USHORT mnDDLineCount;
- USHORT mnPopupModeStartSaveSelection;
- BOOL mbAutoWidth;
+ sal_uInt16 mnDDLineCount;
+ sal_uInt16 mnPopupModeStartSaveSelection;
+ sal_Bool mbAutoWidth;
protected:
long PreNotify( NotifyEvent& rNEvt );
@@ -526,21 +526,21 @@ public:
void SetPrefSize( const Size& rSz ) { maPrefSz = rSz; }
const Size& GetPrefSize() const { return maPrefSz; }
- void SetAutoWidth( BOOL b ) { mbAutoWidth = b; }
- BOOL IsAutoWidth() const { return mbAutoWidth; }
+ void SetAutoWidth( sal_Bool b ) { mbAutoWidth = b; }
+ sal_Bool IsAutoWidth() const { return mbAutoWidth; }
Size CalcFloatSize();
- void StartFloat( BOOL bStartTracking );
+ void StartFloat( sal_Bool bStartTracking );
virtual void SetPosSizePixel( long nX, long nY,
- long nWidth, long nHeight, USHORT nFlags = WINDOW_POSSIZE_ALL );
+ long nWidth, long nHeight, sal_uInt16 nFlags = WINDOW_POSSIZE_ALL );
void SetPosSizePixel( const Point& rNewPos, const Size& rNewSize )
{ FloatingWindow::SetPosSizePixel( rNewPos, rNewSize ); }
- void SetDropDownLineCount( USHORT n ) { mnDDLineCount = n; }
- USHORT GetDropDownLineCount() const { return mnDDLineCount; }
+ void SetDropDownLineCount( sal_uInt16 n ) { mnDDLineCount = n; }
+ sal_uInt16 GetDropDownLineCount() const { return mnDDLineCount; }
- USHORT GetPopupModeStartSaveSelection() const { return mnPopupModeStartSaveSelection; }
+ sal_uInt16 GetPopupModeStartSaveSelection() const { return mnPopupModeStartSaveSelection; }
virtual void Resize();
};
@@ -553,7 +553,7 @@ class ImplWin : public Control
{
private:
- USHORT mnItemPos; // wegen UserDraw muss ich wissen, welches Item ich darstelle.
+ sal_uInt16 mnItemPos; // wegen UserDraw muss ich wissen, welches Item ich darstelle.
XubString maString;
Image maImage;
Image maImageHC;
@@ -564,7 +564,7 @@ private:
Link maMBDownHdl;
Link maUserDrawHdl;
- BOOL mbUserDrawEnabled : 1,
+ sal_Bool mbUserDrawEnabled : 1,
mbInUserDraw : 1;
@@ -583,8 +583,8 @@ public:
virtual void LoseFocus();
virtual long PreNotify( NotifyEvent& rNEvt );
- USHORT GetItemPos() const { return mnItemPos; }
- void SetItemPos( USHORT n ) { mnItemPos = n; }
+ sal_uInt16 GetItemPos() const { return mnItemPos; }
+ void SetItemPos( sal_uInt16 n ) { mnItemPos = n; }
const XubString& GetString() const { return maString; }
void SetString( const XubString& rStr ) { maString = rStr; }
@@ -592,7 +592,7 @@ public:
const Image& GetImage() const { return maImage; }
void SetImage( const Image& rImg ) { maImage = rImg; }
- BOOL SetModeImage( const Image& rImage, BmpColorMode eMode = BMP_COLOR_NORMAL );
+ sal_Bool SetModeImage( const Image& rImage, BmpColorMode eMode = BMP_COLOR_NORMAL );
const Image& GetModeImage( BmpColorMode eMode = BMP_COLOR_NORMAL ) const;
@@ -606,10 +606,10 @@ public:
void SetUserItemSize( const Size& rSz ) { maUserItemSize = rSz; }
const Size& GetUserItemSize() const { return maUserItemSize; }
- void EnableUserDraw( BOOL bUserDraw ) { mbUserDrawEnabled = bUserDraw; }
- BOOL IsUserDrawEnabled() const { return mbUserDrawEnabled; }
+ void EnableUserDraw( sal_Bool bUserDraw ) { mbUserDrawEnabled = bUserDraw; }
+ sal_Bool IsUserDrawEnabled() const { return mbUserDrawEnabled; }
- void DrawEntry( BOOL bDrawImage, BOOL bDrawText, BOOL bDrawTextAtImagePos = FALSE, bool bLayout = false );
+ void DrawEntry( sal_Bool bDrawImage, sal_Bool bDrawText, sal_Bool bDrawTextAtImagePos = sal_False, bool bLayout = false );
};
// -----------
@@ -619,7 +619,7 @@ public:
class ImplBtn : public PushButton
{
private:
- BOOL mbDown;
+ sal_Bool mbDown;
Link maMBDownHdl;
@@ -635,7 +635,7 @@ public:
};
-void ImplInitFieldSettings( Window* pWin, BOOL bFont, BOOL bForeground, BOOL bBackground );
+void ImplInitFieldSettings( Window* pWin, sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground );
void ImplInitDropDownButton( PushButton* pButton );
#endif // _SV_ILSTBOX_HXX
diff --git a/vcl/inc/vcl/image.h b/vcl/inc/vcl/image.h
index 023b2c2d1a2c..6ae9ad3a9c4a 100644
--- a/vcl/inc/vcl/image.h
+++ b/vcl/inc/vcl/image.h
@@ -43,22 +43,22 @@ public:
ImplImageBmp();
~ImplImageBmp();
- void Create( long nItemWidth, long nItemHeight, USHORT nInitSize );
- void Create( const BitmapEx& rBmpEx, long nItemWidth, long nItemHeight,USHORT nInitSize );
+ void Create( long nItemWidth, long nItemHeight, sal_uInt16 nInitSize );
+ void Create( const BitmapEx& rBmpEx, long nItemWidth, long nItemHeight,sal_uInt16 nInitSize );
- void Expand( USHORT nGrowSize );
+ void Expand( sal_uInt16 nGrowSize );
- void Replace( USHORT nPos, USHORT nSrcPos );
- void Replace( USHORT nPos, const ImplImageBmp& rImageBmp, USHORT nSrcPos );
- void Replace( USHORT nPos, const BitmapEx& rBmpEx );
+ void Replace( sal_uInt16 nPos, sal_uInt16 nSrcPos );
+ void Replace( sal_uInt16 nPos, const ImplImageBmp& rImageBmp, sal_uInt16 nSrcPos );
+ void Replace( sal_uInt16 nPos, const BitmapEx& rBmpEx );
- void ReplaceColors( const Color* pSrcColors, const Color* pDstColors, ULONG nColorCount );
+ void ReplaceColors( const Color* pSrcColors, const Color* pDstColors, sal_uIntPtr nColorCount );
void ColorTransform( BmpColorMode eColorMode );
void Invert();
- BitmapEx GetBitmapEx( USHORT nPosCount, USHORT* pPosAry ) const;
+ BitmapEx GetBitmapEx( sal_uInt16 nPosCount, sal_uInt16* pPosAry ) const;
- void Draw( USHORT nPos, OutputDevice* pDev, const Point& rPos, USHORT nStyle, const Size* pSize = NULL );
+ void Draw( sal_uInt16 nPos, OutputDevice* pDev, const Point& rPos, sal_uInt16 nStyle, const Size* pSize = NULL );
private:
@@ -66,8 +66,8 @@ private:
BitmapEx maDisabledBmpEx;
BitmapEx* mpDisplayBmp;
Size maSize;
- BYTE* mpInfoAry;
- USHORT mnSize;
+ sal_uInt8* mpInfoAry;
+ sal_uInt16 mnSize;
void ImplUpdateDisplayBmp( OutputDevice* pOutDev );
void ImplUpdateDisabledBmpEx( int nPos );
@@ -91,12 +91,12 @@ struct ImageAryData
{
::rtl::OUString maName;
// Images identified by either name, or by id
- USHORT mnId;
+ sal_uInt16 mnId;
BitmapEx maBitmapEx;
ImageAryData();
ImageAryData( const rtl::OUString &aName,
- USHORT nId, const BitmapEx &aBitmap );
+ sal_uInt16 nId, const BitmapEx &aBitmap );
ImageAryData( const ImageAryData& rData );
~ImageAryData();
@@ -118,16 +118,16 @@ struct ImplImageList
ImageAryDataNameHash maNameHash;
rtl::OUString maPrefix;
Size maImageSize;
- ULONG mnRefCount;
+ sal_uIntPtr mnRefCount;
ImplImageList();
ImplImageList( const ImplImageList &aSrc );
~ImplImageList();
void AddImage( const ::rtl::OUString &aName,
- USHORT nId, const BitmapEx &aBitmapEx );
- void RemoveImage( USHORT nPos );
- USHORT GetImageCount() const;
+ sal_uInt16 nId, const BitmapEx &aBitmapEx );
+ void RemoveImage( sal_uInt16 nPos );
+ sal_uInt16 GetImageCount() const;
};
// --------------------
@@ -137,12 +137,12 @@ struct ImplImageList
struct ImplImageRefData
{
ImplImageList* mpImplData;
- USHORT mnIndex;
+ sal_uInt16 mnIndex;
ImplImageRefData() {} // Um Warning zu umgehen
~ImplImageRefData();
- BOOL IsEqual( const ImplImageRefData& rData );
+ sal_Bool IsEqual( const ImplImageRefData& rData );
};
// ----------------
@@ -157,7 +157,7 @@ struct ImplImageData
ImplImageData( const BitmapEx& rBmpEx );
~ImplImageData();
- BOOL IsEqual( const ImplImageData& rData );
+ sal_Bool IsEqual( const ImplImageData& rData );
};
// -------------
@@ -166,7 +166,7 @@ struct ImplImageData
struct ImplImage
{
- ULONG mnRefCount;
+ sal_uIntPtr mnRefCount;
// TODO: use inheritance to get rid of meType+mpData
void* mpData;
ImageType meType;
diff --git a/vcl/inc/vcl/image.hxx b/vcl/inc/vcl/image.hxx
index f4f642656783..1532ac7fe5ce 100644
--- a/vcl/inc/vcl/image.hxx
+++ b/vcl/inc/vcl/image.hxx
@@ -46,7 +46,7 @@ namespace com { namespace sun { namespace star { namespace graphic { class XGrap
// -----------
#define IMAGE_STDBTN_COLOR Color( 0xC0, 0xC0, 0xC0 )
-#define IMAGELIST_IMAGE_NOTFOUND ((USHORT)0xFFFF)
+#define IMAGELIST_IMAGE_NOTFOUND ((sal_uInt16)0xFFFF)
// -----------------------
// - ImageColorTransform -
@@ -86,14 +86,14 @@ public:
::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > GetXGraphic() const;
Image GetColorTransformedImage( ImageColorTransform eColorTransform ) const;
- static void GetColorTransformArrays( ImageColorTransform eColorTransform, Color*& rpSrcColor, Color*& rpDstColor, ULONG& rColorCount );
+ static void GetColorTransformArrays( ImageColorTransform eColorTransform, Color*& rpSrcColor, Color*& rpDstColor, sal_uIntPtr& rColorCount );
void Invert();
- BOOL operator!() const { return( !mpImplData ? true : false ); }
+ sal_Bool operator!() const { return( !mpImplData ? true : false ); }
Image& operator=( const Image& rImage );
- BOOL operator==( const Image& rImage ) const;
- BOOL operator!=( const Image& rImage ) const { return !(Image::operator==( rImage )); }
+ sal_Bool operator==( const Image& rImage ) const;
+ sal_Bool operator!=( const Image& rImage ) const { return !(Image::operator==( rImage )); }
private:
@@ -109,7 +109,7 @@ private:
class VCL_DLLPUBLIC ImageList
{
public:
- ImageList( USHORT nInit = 8, USHORT nGrow = 4 );
+ ImageList( sal_uInt16 nInit = 8, sal_uInt16 nGrow = 4 );
ImageList( const ResId& rResId );
ImageList( const ::std::vector< ::rtl::OUString >& rNameVector,
const ::rtl::OUString& rPrefix,
@@ -121,57 +121,57 @@ public:
void InsertFromHorizontalStrip( const BitmapEx &rBitmapEx,
const std::vector< rtl::OUString > &rNameVector );
void InsertFromHorizontalBitmap( const ResId& rResId,
- USHORT nCount,
+ sal_uInt16 nCount,
const Color *pNonAlphaMaskColor,
const Color *pSearchColors = NULL,
const Color *pReplaceColors = NULL,
- ULONG nColorCount = 0);
+ sal_uIntPtr nColorCount = 0);
BitmapEx GetAsHorizontalStrip() const;
- USHORT GetImageCount() const;
+ sal_uInt16 GetImageCount() const;
Size GetImageSize() const;
- void AddImage( USHORT nNewId, const Image& rImage );
+ void AddImage( sal_uInt16 nNewId, const Image& rImage );
void AddImage( const ::rtl::OUString& rImageName, const Image& rImage );
- void ReplaceImage( USHORT nId, const Image& rImage );
+ void ReplaceImage( sal_uInt16 nId, const Image& rImage );
void ReplaceImage( const ::rtl::OUString& rImageName, const Image& rImage );
- void ReplaceImage( USHORT nId, USHORT nReplaceId );
+ void ReplaceImage( sal_uInt16 nId, sal_uInt16 nReplaceId );
void ReplaceImage( const ::rtl::OUString& rImageName, const ::rtl::OUString& rReplaceName );
- void RemoveImage( USHORT nId );
+ void RemoveImage( sal_uInt16 nId );
void RemoveImage( const ::rtl::OUString& rImageName );
- Image GetImage( USHORT nId ) const;
+ Image GetImage( sal_uInt16 nId ) const;
Image GetImage( const ::rtl::OUString& rImageName ) const;
- USHORT GetImagePos( USHORT nId ) const;
- bool HasImageAtPos( USHORT nId ) const;
- USHORT GetImagePos( const ::rtl::OUString& rImageName ) const;
+ sal_uInt16 GetImagePos( sal_uInt16 nId ) const;
+ bool HasImageAtPos( sal_uInt16 nId ) const;
+ sal_uInt16 GetImagePos( const ::rtl::OUString& rImageName ) const;
- USHORT GetImageId( USHORT nPos ) const;
- void GetImageIds( ::std::vector< USHORT >& rIds ) const;
+ sal_uInt16 GetImageId( sal_uInt16 nPos ) const;
+ void GetImageIds( ::std::vector< sal_uInt16 >& rIds ) const;
- ::rtl::OUString GetImageName( USHORT nPos ) const;
+ ::rtl::OUString GetImageName( sal_uInt16 nPos ) const;
void GetImageNames( ::std::vector< ::rtl::OUString >& rNames ) const;
ImageList& operator=( const ImageList& rImageList );
- BOOL operator==( const ImageList& rImageList ) const;
- BOOL operator!=( const ImageList& rImageList ) const { return !(ImageList::operator==( rImageList )); }
+ sal_Bool operator==( const ImageList& rImageList ) const;
+ sal_Bool operator!=( const ImageList& rImageList ) const { return !(ImageList::operator==( rImageList )); }
private:
ImplImageList* mpImplData;
- USHORT mnInitSize;
- USHORT mnGrowSize;
+ sal_uInt16 mnInitSize;
+ sal_uInt16 mnGrowSize;
SAL_DLLPRIVATE void ImplInitBitmapEx( const ::rtl::OUString& rUserImageName,
const ::std::vector< ::rtl::OUString >& rImageNames,
const ::rtl::OUString& rSymbolsStyle,
BitmapEx& rBmpEx,
const Color* pMaskColor ) const;
- SAL_DLLPRIVATE void ImplInit( USHORT nItems, const Size &rSize );
- SAL_DLLPRIVATE USHORT ImplGetImageId( const ::rtl::OUString& rImageName ) const;
+ SAL_DLLPRIVATE void ImplInit( sal_uInt16 nItems, const Size &rSize );
+ SAL_DLLPRIVATE sal_uInt16 ImplGetImageId( const ::rtl::OUString& rImageName ) const;
SAL_DLLPRIVATE void ImplMakeUnique();
};
diff --git a/vcl/inc/vcl/imgcons.hxx b/vcl/inc/vcl/imgcons.hxx
index 2f582fec15c3..f6adfab773ab 100644
--- a/vcl/inc/vcl/imgcons.hxx
+++ b/vcl/inc/vcl/imgcons.hxx
@@ -60,7 +60,7 @@ private:
Link maDoneLink;
sal_uInt32 mnFormat;
sal_uInt32 mnStatus;
- BOOL mbTrans;
+ sal_Bool mbTrans;
protected:
@@ -71,8 +71,8 @@ public:
ImageConsumer();
virtual ~ImageConsumer();
- BOOL GetData( BitmapEx& rBmpEx ) const;
- BOOL GetData( Image& rImage ) const;
+ sal_Bool GetData( BitmapEx& rBmpEx ) const;
+ sal_Bool GetData( Image& rImage ) const;
const Rectangle& GetChangedRect() const { return maChangedRect; }
sal_uInt32 GetStatus() const;
@@ -86,13 +86,13 @@ public:
virtual void Init( sal_uInt32 nWidth, sal_uInt32 nHeight );
- virtual void SetColorModel( USHORT nBitCount,
+ virtual void SetColorModel( sal_uInt16 nBitCount,
sal_uInt32 nPalEntries, const sal_uInt32* pRGBAPal,
sal_uInt32 nRMask, sal_uInt32 nGMask, sal_uInt32 nBMask, sal_uInt32 nAMask );
virtual void SetPixelsByBytes( sal_uInt32 nConsX, sal_uInt32 nConsY,
sal_uInt32 nConsWidth, sal_uInt32 nConsHeight,
- const BYTE* pProducerData, sal_uInt32 nOffset, sal_uInt32 nScanSize );
+ const sal_uInt8* pProducerData, sal_uInt32 nOffset, sal_uInt32 nScanSize );
virtual void SetPixelsByLongs( sal_uInt32 nConsX, sal_uInt32 nConsY,
sal_uInt32 nConsWidth, sal_uInt32 nConsHeight,
diff --git a/vcl/inc/vcl/imgctrl.hxx b/vcl/inc/vcl/imgctrl.hxx
index fa3b01463f34..21a5a617fbe5 100644
--- a/vcl/inc/vcl/imgctrl.hxx
+++ b/vcl/inc/vcl/imgctrl.hxx
@@ -60,7 +60,7 @@ public:
void SetBitmap( const BitmapEx& rBmp );
using OutputDevice::GetBitmap;
const BitmapEx& GetBitmap() const { return maBmp; }
- BOOL SetModeBitmap( const BitmapEx& rBitmap, BmpColorMode eMode = BMP_COLOR_NORMAL );
+ sal_Bool SetModeBitmap( const BitmapEx& rBitmap, BmpColorMode eMode = BMP_COLOR_NORMAL );
const BitmapEx& GetModeBitmap( BmpColorMode eMode = BMP_COLOR_NORMAL ) const;
};
diff --git a/vcl/inc/vcl/impbmp.hxx b/vcl/inc/vcl/impbmp.hxx
index dc40fdcd3181..c01dde59dae1 100644
--- a/vcl/inc/vcl/impbmp.hxx
+++ b/vcl/inc/vcl/impbmp.hxx
@@ -49,8 +49,8 @@ class ImpBitmap
{
private:
- ULONG mnRefCount;
- ULONG mnChecksum;
+ sal_uIntPtr mnRefCount;
+ sal_uIntPtr mnChecksum;
SalBitmap* mpSalBitmap;
Size maSourceSize;
@@ -68,29 +68,29 @@ public:
public:
- BOOL ImplCreate( const Size& rSize, USHORT nBitCount, const BitmapPalette& rPal );
- BOOL ImplCreate( const ImpBitmap& rImpBitmap );
- BOOL ImplCreate( const ImpBitmap& rImpBitmap, SalGraphics* pGraphics );
- BOOL ImplCreate( const ImpBitmap& rImpBitmap, USHORT nNewBitCount );
+ sal_Bool ImplCreate( const Size& rSize, sal_uInt16 nBitCount, const BitmapPalette& rPal );
+ sal_Bool ImplCreate( const ImpBitmap& rImpBitmap );
+ sal_Bool ImplCreate( const ImpBitmap& rImpBitmap, SalGraphics* pGraphics );
+ sal_Bool ImplCreate( const ImpBitmap& rImpBitmap, sal_uInt16 nNewBitCount );
void ImplDestroy();
Size ImplGetSize() const;
Size ImplGetSourceSize() const;
void ImplSetSourceSize( const Size&);
- USHORT ImplGetBitCount() const;
+ sal_uInt16 ImplGetBitCount() const;
- BitmapBuffer* ImplAcquireBuffer( BOOL bReadOnly );
- void ImplReleaseBuffer( BitmapBuffer* pBuffer, BOOL bReadOnly );
+ BitmapBuffer* ImplAcquireBuffer( sal_Bool bReadOnly );
+ void ImplReleaseBuffer( BitmapBuffer* pBuffer, sal_Bool bReadOnly );
public:
- ULONG ImplGetRefCount() const { return mnRefCount; }
+ sal_uIntPtr ImplGetRefCount() const { return mnRefCount; }
void ImplIncRefCount() { mnRefCount++; }
void ImplDecRefCount() { mnRefCount--; }
- inline void ImplSetChecksum( ULONG nChecksum ) { mnChecksum = nChecksum; }
- inline ULONG ImplGetChecksum() const { return mnChecksum; }
+ inline void ImplSetChecksum( sal_uIntPtr nChecksum ) { mnChecksum = nChecksum; }
+ inline sal_uIntPtr ImplGetChecksum() const { return mnChecksum; }
#endif // PRIVATE
};
diff --git a/vcl/inc/vcl/impfont.hxx b/vcl/inc/vcl/impfont.hxx
index a1104bbf4a86..a91096eabef6 100644
--- a/vcl/inc/vcl/impfont.hxx
+++ b/vcl/inc/vcl/impfont.hxx
@@ -81,7 +81,7 @@ private:
FontType meType; // used by metrics only
short mnOrientation;
FontKerning mnKerning;
- BOOL mbWordLine:1,
+ sal_Bool mbWordLine:1,
mbOutline:1,
mbConfigLookup:1, // there was a config lookup
mbShadow:1,
@@ -107,8 +107,8 @@ private:
long mnExtLeading; // External Leading
long mnLineHeight; // Ascent+Descent+EmphasisMark
long mnSlant; // Slant
- USHORT mnMiscFlags; // Misc Flags
- UINT32 mnRefCount; // Reference Counter
+ sal_uInt16 mnMiscFlags; // Misc Flags
+ sal_uInt32 mnRefCount; // Reference Counter
enum { DEVICE_FLAG=1, SCALABLE_FLAG=2, LATIN_FLAG=4, CJK_FLAG=8, CTL_FLAG=16 };
@@ -211,7 +211,7 @@ private:
private:
const sal_uInt32* mpRangeCodes; // pairs of StartCode/(EndCode+1)
const int* mpStartGlyphs; // range-specific mapper to glyphs
- const USHORT* mpGlyphIds; // individual glyphid mappings
+ const sal_uInt16* mpGlyphIds; // individual glyphid mappings
int mnRangeCount;
int mnCharCount;
int mnRefCount;
@@ -227,11 +227,11 @@ CmapResult
public:
explicit CmapResult( bool bSymbolic = false,
const sal_uInt32* pRangeCodes = NULL, int nRangeCount = 0,
- const int* pStartGlyphs = 0, const USHORT* pGlyphIds = NULL );
+ const int* pStartGlyphs = 0, const sal_uInt16* pGlyphIds = NULL );
const sal_uInt32* mpRangeCodes;
const int* mpStartGlyphs;
- const USHORT* mpGlyphIds;
+ const sal_uInt16* mpGlyphIds;
int mnRangeCount;
bool mbSymbolic;
bool mbRecoded;
diff --git a/vcl/inc/vcl/impgraph.hxx b/vcl/inc/vcl/impgraph.hxx
index bb28d801fe12..f4de70e0fa62 100644
--- a/vcl/inc/vcl/impgraph.hxx
+++ b/vcl/inc/vcl/impgraph.hxx
@@ -69,11 +69,11 @@ private:
GfxLink* mpGfxLink;
GraphicType meType;
String maDocFileURLStr;
- ULONG mnDocFilePos;
- mutable ULONG mnSizeBytes;
- ULONG mnRefCount;
- BOOL mbSwapOut;
- BOOL mbSwapUnderway;
+ sal_uIntPtr mnDocFilePos;
+ mutable sal_uIntPtr mnSizeBytes;
+ sal_uIntPtr mnRefCount;
+ sal_Bool mbSwapOut;
+ sal_Bool mbSwapUnderway;
private:
@@ -86,19 +86,19 @@ private:
virtual ~ImpGraphic();
ImpGraphic& operator=( const ImpGraphic& rImpGraphic );
- BOOL operator==( const ImpGraphic& rImpGraphic ) const;
- BOOL operator!=( const ImpGraphic& rImpGraphic ) const { return !( *this == rImpGraphic ); }
+ sal_Bool operator==( const ImpGraphic& rImpGraphic ) const;
+ sal_Bool operator!=( const ImpGraphic& rImpGraphic ) const { return !( *this == rImpGraphic ); }
- void ImplClearGraphics( BOOL bCreateSwapInfo );
+ void ImplClearGraphics( sal_Bool bCreateSwapInfo );
void ImplClear();
GraphicType ImplGetType() const;
void ImplSetDefaultType();
- BOOL ImplIsSupportedGraphic() const;
+ sal_Bool ImplIsSupportedGraphic() const;
- BOOL ImplIsTransparent() const;
- BOOL ImplIsAlpha() const;
- BOOL ImplIsAnimated() const;
+ sal_Bool ImplIsTransparent() const;
+ sal_Bool ImplIsAlpha() const;
+ sal_Bool ImplIsAnimated() const;
Bitmap ImplGetBitmap(const GraphicConversionParameters& rParameters) const;
BitmapEx ImplGetBitmapEx(const GraphicConversionParameters& rParameters) const;
@@ -111,7 +111,7 @@ private:
MapMode ImplGetPrefMapMode() const;
void ImplSetPrefMapMode( const MapMode& rPrefMapMode );
- ULONG ImplGetSizeBytes() const;
+ sal_uIntPtr ImplGetSizeBytes() const;
void ImplDraw( OutputDevice* pOutDev,
const Point& rDestPt ) const;
@@ -134,7 +134,7 @@ private:
void ImplSetAnimationNotifyHdl( const Link& rLink );
Link ImplGetAnimationNotifyHdl() const;
- ULONG ImplGetAnimationLoopCount() const;
+ sal_uIntPtr ImplGetAnimationLoopCount() const;
void ImplResetAnimationLoopCount();
List* ImplGetAnimationInfoList() const;
@@ -146,28 +146,28 @@ private:
private:
- void ImplSetDocFileName( const String& rName, ULONG nFilePos );
+ void ImplSetDocFileName( const String& rName, sal_uIntPtr nFilePos );
const String& ImplGetDocFileName() const;
- ULONG ImplGetDocFilePos() const;
+ sal_uIntPtr ImplGetDocFilePos() const;
- BOOL ImplReadEmbedded( SvStream& rIStream, BOOL bSwap = FALSE );
- BOOL ImplWriteEmbedded( SvStream& rOStream );
+ sal_Bool ImplReadEmbedded( SvStream& rIStream, sal_Bool bSwap = sal_False );
+ sal_Bool ImplWriteEmbedded( SvStream& rOStream );
- BOOL ImplSwapIn();
- BOOL ImplSwapIn( SvStream* pIStm );
+ sal_Bool ImplSwapIn();
+ sal_Bool ImplSwapIn( SvStream* pIStm );
- BOOL ImplSwapOut();
- BOOL ImplSwapOut( SvStream* pOStm );
+ sal_Bool ImplSwapOut();
+ sal_Bool ImplSwapOut( SvStream* pOStm );
- BOOL ImplIsSwapOut() const;
+ sal_Bool ImplIsSwapOut() const;
void ImplSetLink( const GfxLink& );
GfxLink ImplGetLink();
- BOOL ImplIsLink() const;
+ sal_Bool ImplIsLink() const;
- ULONG ImplGetChecksum() const;
+ sal_uIntPtr ImplGetChecksum() const;
- BOOL ImplExportNative( SvStream& rOStm ) const;
+ sal_Bool ImplExportNative( SvStream& rOStm ) const;
friend SvStream& operator<<( SvStream& rOStm, const ImpGraphic& rImpGraphic );
friend SvStream& operator>>( SvStream& rIStm, ImpGraphic& rImpGraphic );
diff --git a/vcl/inc/vcl/impoct.hxx b/vcl/inc/vcl/impoct.hxx
index 543ab19d6a57..7a4dc3e3ab55 100644
--- a/vcl/inc/vcl/impoct.hxx
+++ b/vcl/inc/vcl/impoct.hxx
@@ -120,9 +120,9 @@ inline void ImpErrorQuad::ImplAddColorError7( const ImpErrorQuad& rErrQuad )
inline BitmapColor ImpErrorQuad::ImplGetColor()
{
- return BitmapColor( (BYTE) ( ( nRed < 0L ? 0L : nRed > 8160L ? 8160L : nRed ) >> 5L ),
- (BYTE) ( ( nGreen < 0L ? 0L : nGreen > 8160L ? 8160L : nGreen ) >> 5L ),
- (BYTE) ( ( nBlue < 0L ? 0L : nBlue > 8160L ? 8160L : nBlue ) >> 5L ) );
+ return BitmapColor( (sal_uInt8) ( ( nRed < 0L ? 0L : nRed > 8160L ? 8160L : nRed ) >> 5L ),
+ (sal_uInt8) ( ( nGreen < 0L ? 0L : nGreen > 8160L ? 8160L : nGreen ) >> 5L ),
+ (sal_uInt8) ( ( nBlue < 0L ? 0L : nBlue > 8160L ? 8160L : nBlue ) >> 5L ) );
}
// -------------
@@ -132,14 +132,14 @@ inline BitmapColor ImpErrorQuad::ImplGetColor()
class ImpNodeCache
{
OctreeNode* pActNode;
- ULONG nNew;
- ULONG nDelete;
- ULONG nGet;
- ULONG nRelease;
+ sal_uIntPtr nNew;
+ sal_uIntPtr nDelete;
+ sal_uIntPtr nGet;
+ sal_uIntPtr nRelease;
public:
- ImpNodeCache( const ULONG nInitSize );
+ ImpNodeCache( const sal_uIntPtr nInitSize );
~ImpNodeCache();
inline OctreeNode* ImplGetFreeNode();
diff --git a/vcl/inc/vcl/impprn.hxx b/vcl/inc/vcl/impprn.hxx
index 954b2340d0c7..717c9b2a3108 100644
--- a/vcl/inc/vcl/impprn.hxx
+++ b/vcl/inc/vcl/impprn.hxx
@@ -73,7 +73,7 @@ private:
GDIMetaFile maCurPageMetaFile;
long mnMaxBmpDPIX;
long mnMaxBmpDPIY;
- ULONG mnRestoreDrawMode;
+ sal_uIntPtr mnRestoreDrawMode;
int mnCurCopyCount;
DECL_LINK( ImplPrintHdl, Timer* );
@@ -96,7 +96,7 @@ public:
void StartQueuePrint();
void EndQueuePrint();
void AbortQueuePrint();
- void AddQueuePage( GDIMetaFile* pPage, USHORT nPage, BOOL bNewJobSetup );
+ void AddQueuePage( GDIMetaFile* pPage, sal_uInt16 nPage, sal_Bool bNewJobSetup );
bool IsUserCopy() const { return mbUserCopy; }
void SetUserCopy( bool bSet ) { mbUserCopy = bSet; }
@@ -109,7 +109,7 @@ public:
used by pull implementation to get the number of physical pages
(that is how often PrintNextPage should be called)
*/
- ULONG GetPrintPageCount() const;
+ sal_uIntPtr GetPrintPageCount() const;
/**
used by pull implementation to get ranges of physical pages that
@@ -129,7 +129,7 @@ public:
returns an false in push model (error condition)
*/
- bool GetPaperRanges( std::vector< ULONG >& o_rRanges, bool i_bIncludeOrientationChanges ) const;
+ bool GetPaperRanges( std::vector< sal_uIntPtr >& o_rRanges, bool i_bIncludeOrientationChanges ) const;
/**
get the jobsetup for a page
diff --git a/vcl/inc/vcl/inputctx.hxx b/vcl/inc/vcl/inputctx.hxx
index 5e7cffa29dc6..f96364eddabb 100644
--- a/vcl/inc/vcl/inputctx.hxx
+++ b/vcl/inc/vcl/inputctx.hxx
@@ -36,10 +36,10 @@
// - InputContext-Flags -
// ----------------------
-#define INPUTCONTEXT_TEXT ((ULONG)0x00000001)
-#define INPUTCONTEXT_EXTTEXTINPUT ((ULONG)0x00000002)
-#define INPUTCONTEXT_EXTTEXTINPUT_ON ((ULONG)0x00000004)
-#define INPUTCONTEXT_EXTTEXTINPUT_OFF ((ULONG)0x00000008)
+#define INPUTCONTEXT_TEXT ((sal_uIntPtr)0x00000001)
+#define INPUTCONTEXT_EXTTEXTINPUT ((sal_uIntPtr)0x00000002)
+#define INPUTCONTEXT_EXTTEXTINPUT_ON ((sal_uIntPtr)0x00000004)
+#define INPUTCONTEXT_EXTTEXTINPUT_OFF ((sal_uIntPtr)0x00000008)
// ----------------
// - InputContext -
@@ -49,26 +49,26 @@ class VCL_DLLPUBLIC InputContext
{
private:
Font maFont;
- ULONG mnOptions;
+ sal_uIntPtr mnOptions;
public:
InputContext() { mnOptions = 0; }
InputContext( const InputContext& rInputContext ) :
maFont( rInputContext.maFont )
{ mnOptions = rInputContext.mnOptions; }
- InputContext( const Font& rFont, ULONG nOptions = 0 ) :
+ InputContext( const Font& rFont, sal_uIntPtr nOptions = 0 ) :
maFont( rFont )
{ mnOptions = nOptions; }
void SetFont( const Font& rFont ) { maFont = rFont; }
const Font& GetFont() const { return maFont; }
- void SetOptions( ULONG nOptions ) { mnOptions = nOptions; }
- ULONG GetOptions() const { return mnOptions; }
+ void SetOptions( sal_uIntPtr nOptions ) { mnOptions = nOptions; }
+ sal_uIntPtr GetOptions() const { return mnOptions; }
InputContext& operator=( const InputContext& rInputContext );
- BOOL operator==( const InputContext& rInputContext ) const;
- BOOL operator!=( const InputContext& rInputContext ) const
+ sal_Bool operator==( const InputContext& rInputContext ) const;
+ sal_Bool operator!=( const InputContext& rInputContext ) const
{ return !(InputContext::operator==( rInputContext )); }
};
@@ -79,7 +79,7 @@ inline InputContext& InputContext::operator=( const InputContext& rInputContext
return *this;
}
-inline BOOL InputContext::operator==( const InputContext& rInputContext ) const
+inline sal_Bool InputContext::operator==( const InputContext& rInputContext ) const
{
return ((mnOptions == rInputContext.mnOptions) &&
(maFont == rInputContext.maFont));
diff --git a/vcl/inc/vcl/jobset.h b/vcl/inc/vcl/jobset.h
index 2a8be4a6999e..981194080ede 100644
--- a/vcl/inc/vcl/jobset.h
+++ b/vcl/inc/vcl/jobset.h
@@ -52,18 +52,18 @@
struct ImplJobSetup
{
- USHORT mnRefCount; // RefCount (only independ data)
- USHORT mnSystem; // Sytem - JOBSETUP_SYSTEM_xxxx
+ sal_uInt16 mnRefCount; // RefCount (only independ data)
+ sal_uInt16 mnSystem; // Sytem - JOBSETUP_SYSTEM_xxxx
String maPrinterName; // Printer-Name
String maDriver; // Driver-Name
Orientation meOrientation; // Orientation
DuplexMode meDuplexMode; // Duplex
- USHORT mnPaperBin; // paper bin / in tray
+ sal_uInt16 mnPaperBin; // paper bin / in tray
Paper mePaperFormat; // paper format
long mnPaperWidth; // paper width (100th mm)
long mnPaperHeight; // paper height (100th mm)
- ULONG mnDriverDataLen; // length of system specific data
- BYTE* mpDriverData; // system specific data (will be streamed a byte block)
+ sal_uIntPtr mnDriverDataLen; // length of system specific data
+ sal_uInt8* mpDriverData; // system specific data (will be streamed a byte block)
::std::hash_map< ::rtl::OUString, ::rtl::OUString, ::rtl::OUStringHash > maValueMap;
ImplJobSetup();
diff --git a/vcl/inc/vcl/jobset.hxx b/vcl/inc/vcl/jobset.hxx
index 4228fc8e90e1..5dcb0f1e9287 100644
--- a/vcl/inc/vcl/jobset.hxx
+++ b/vcl/inc/vcl/jobset.hxx
@@ -72,8 +72,8 @@ public:
JobSetup& operator=( const JobSetup& rJob );
- BOOL operator==( const JobSetup& rJobSetup ) const;
- BOOL operator!=( const JobSetup& rJobSetup ) const
+ sal_Bool operator==( const JobSetup& rJobSetup ) const;
+ sal_Bool operator!=( const JobSetup& rJobSetup ) const
{ return !(JobSetup::operator==( rJobSetup )); }
friend VCL_DLLPUBLIC SvStream& operator>>( SvStream& rIStream, JobSetup& rJobSetup );
diff --git a/vcl/inc/vcl/keycod.hxx b/vcl/inc/vcl/keycod.hxx
index 487dea1d7c2f..90e370cdbded 100644
--- a/vcl/inc/vcl/keycod.hxx
+++ b/vcl/inc/vcl/keycod.hxx
@@ -62,54 +62,54 @@ enum KeyFuncType { KEYFUNC_DONTKNOW, KEYFUNC_NEW, KEYFUNC_OPEN,
class VCL_DLLPUBLIC KeyCode
{
private:
- USHORT nCode;
+ sal_uInt16 nCode;
KeyFuncType eFunc;
public:
KeyCode() { nCode = 0; eFunc = KEYFUNC_DONTKNOW; }
KeyCode( const ResId& rResId );
- KeyCode( USHORT nKey, USHORT nModifier = 0 )
+ KeyCode( sal_uInt16 nKey, sal_uInt16 nModifier = 0 )
{ nCode = nKey | nModifier; eFunc = KEYFUNC_DONTKNOW; }
- KeyCode( USHORT nKey, BOOL bShift, BOOL bMod1, BOOL bMod2, BOOL bMod3 );
+ KeyCode( sal_uInt16 nKey, sal_Bool bShift, sal_Bool bMod1, sal_Bool bMod2, sal_Bool bMod3 );
KeyCode( KeyFuncType eFunction );
- USHORT GetFullCode() const { return nCode; }
- USHORT GetFullKeyCode() const { return (nCode) ; }
+ sal_uInt16 GetFullCode() const { return nCode; }
+ sal_uInt16 GetFullKeyCode() const { return (nCode) ; }
KeyFuncType GetFullFunction() const { return eFunc; }
- BOOL IsDefinedKeyCodeEqual( const KeyCode& rKeyCode ) const;
+ sal_Bool IsDefinedKeyCodeEqual( const KeyCode& rKeyCode ) const;
- USHORT GetCode() const
+ sal_uInt16 GetCode() const
{ return (nCode & KEY_CODE); }
- USHORT GetModifier() const
+ sal_uInt16 GetModifier() const
{ return (nCode & KEY_MODTYPE); }
- USHORT GetAllModifier() const
+ sal_uInt16 GetAllModifier() const
{ return (nCode & KEY_ALLMODTYPE); }
- BOOL IsShift() const
+ sal_Bool IsShift() const
{ return ((nCode & KEY_SHIFT) != 0); }
- BOOL IsMod1() const
+ sal_Bool IsMod1() const
{ return ((nCode & KEY_MOD1) != 0); }
- BOOL IsMod2() const
+ sal_Bool IsMod2() const
{ return ((nCode & KEY_MOD2) != 0); }
- BOOL IsMod3() const
+ sal_Bool IsMod3() const
{ return ((nCode & KEY_MOD3) != 0); }
- USHORT GetGroup() const
+ sal_uInt16 GetGroup() const
{ return (nCode & KEYGROUP_TYPE); }
XubString GetName( Window* pWindow = NULL ) const;
XubString GetSymbolName( const XubString& rFontName, Window* pWindow = NULL ) const;
- BOOL IsFunction() const
- { return ((eFunc != KEYFUNC_DONTKNOW) ? TRUE : FALSE); }
+ sal_Bool IsFunction() const
+ { return ((eFunc != KEYFUNC_DONTKNOW) ? sal_True : sal_False); }
KeyFuncType GetFunction() const;
KeyCode& operator = ( const KeyCode& rKeyCode );
- BOOL operator ==( const KeyCode& rKeyCode ) const;
- BOOL operator !=( const KeyCode& rKeyCode ) const;
+ sal_Bool operator ==( const KeyCode& rKeyCode ) const;
+ sal_Bool operator !=( const KeyCode& rKeyCode ) const;
};
-inline KeyCode::KeyCode( USHORT nKey, BOOL bShift, BOOL bMod1, BOOL bMod2, BOOL bMod3 )
+inline KeyCode::KeyCode( sal_uInt16 nKey, sal_Bool bShift, sal_Bool bMod1, sal_Bool bMod2, sal_Bool bMod3 )
{
nCode = nKey;
if( bShift )
@@ -123,7 +123,7 @@ inline KeyCode::KeyCode( USHORT nKey, BOOL bShift, BOOL bMod1, BOOL bMod2, BOOL
eFunc = KEYFUNC_DONTKNOW;
}
-inline BOOL KeyCode::operator ==( const KeyCode& rKeyCode ) const
+inline sal_Bool KeyCode::operator ==( const KeyCode& rKeyCode ) const
{
if ( (eFunc == KEYFUNC_DONTKNOW) && (rKeyCode.eFunc == KEYFUNC_DONTKNOW) )
return (nCode == rKeyCode.nCode);
@@ -131,7 +131,7 @@ inline BOOL KeyCode::operator ==( const KeyCode& rKeyCode ) const
return (GetFunction() == rKeyCode.GetFunction());
}
-inline BOOL KeyCode::operator !=( const KeyCode& rKeyCode ) const
+inline sal_Bool KeyCode::operator !=( const KeyCode& rKeyCode ) const
{
if ( (eFunc == KEYFUNC_DONTKNOW) && (rKeyCode.eFunc == KEYFUNC_DONTKNOW) )
return (nCode != rKeyCode.nCode);
@@ -139,7 +139,7 @@ inline BOOL KeyCode::operator !=( const KeyCode& rKeyCode ) const
return (GetFunction() != rKeyCode.GetFunction());
}
-inline BOOL KeyCode::IsDefinedKeyCodeEqual( const KeyCode& rKeyCode ) const
+inline sal_Bool KeyCode::IsDefinedKeyCodeEqual( const KeyCode& rKeyCode ) const
{
if ( (eFunc == KEYFUNC_DONTKNOW) && (rKeyCode.eFunc == KEYFUNC_DONTKNOW) )
return (GetFullKeyCode() == rKeyCode.GetFullKeyCode());
diff --git a/vcl/inc/vcl/keycodes.hxx b/vcl/inc/vcl/keycodes.hxx
index cfd4d11c9a7c..940858020f10 100644
--- a/vcl/inc/vcl/keycodes.hxx
+++ b/vcl/inc/vcl/keycodes.hxx
@@ -39,132 +39,132 @@
// By changes you must also change: rsc/vclrsc.hxx
// Key-Gruppen
-#define KEYGROUP_NUM ((USHORT)::com::sun::star::awt::KeyGroup::NUM)
-#define KEYGROUP_ALPHA ((USHORT)::com::sun::star::awt::KeyGroup::ALPHA)
-#define KEYGROUP_FKEYS ((USHORT)::com::sun::star::awt::KeyGroup::FKEYS)
-#define KEYGROUP_CURSOR ((USHORT)::com::sun::star::awt::KeyGroup::CURSOR)
-#define KEYGROUP_MISC ((USHORT)::com::sun::star::awt::KeyGroup::MISC)
-#define KEYGROUP_TYPE ((USHORT)::com::sun::star::awt::KeyGroup::TYPE)
+#define KEYGROUP_NUM ((sal_uInt16)::com::sun::star::awt::KeyGroup::NUM)
+#define KEYGROUP_ALPHA ((sal_uInt16)::com::sun::star::awt::KeyGroup::ALPHA)
+#define KEYGROUP_FKEYS ((sal_uInt16)::com::sun::star::awt::KeyGroup::FKEYS)
+#define KEYGROUP_CURSOR ((sal_uInt16)::com::sun::star::awt::KeyGroup::CURSOR)
+#define KEYGROUP_MISC ((sal_uInt16)::com::sun::star::awt::KeyGroup::MISC)
+#define KEYGROUP_TYPE ((sal_uInt16)::com::sun::star::awt::KeyGroup::TYPE)
// Key-Codes
-#define KEY_0 ((USHORT)::com::sun::star::awt::Key::NUM0)
-#define KEY_1 ((USHORT)::com::sun::star::awt::Key::NUM1)
-#define KEY_2 ((USHORT)::com::sun::star::awt::Key::NUM2)
-#define KEY_3 ((USHORT)::com::sun::star::awt::Key::NUM3)
-#define KEY_4 ((USHORT)::com::sun::star::awt::Key::NUM4)
-#define KEY_5 ((USHORT)::com::sun::star::awt::Key::NUM5)
-#define KEY_6 ((USHORT)::com::sun::star::awt::Key::NUM6)
-#define KEY_7 ((USHORT)::com::sun::star::awt::Key::NUM7)
-#define KEY_8 ((USHORT)::com::sun::star::awt::Key::NUM8)
-#define KEY_9 ((USHORT)::com::sun::star::awt::Key::NUM9)
-
-#define KEY_A ((USHORT)::com::sun::star::awt::Key::A)
-#define KEY_B ((USHORT)::com::sun::star::awt::Key::B)
-#define KEY_C ((USHORT)::com::sun::star::awt::Key::C)
-#define KEY_D ((USHORT)::com::sun::star::awt::Key::D)
-#define KEY_E ((USHORT)::com::sun::star::awt::Key::E)
-#define KEY_F ((USHORT)::com::sun::star::awt::Key::F)
-#define KEY_G ((USHORT)::com::sun::star::awt::Key::G)
-#define KEY_H ((USHORT)::com::sun::star::awt::Key::H)
-#define KEY_I ((USHORT)::com::sun::star::awt::Key::I)
-#define KEY_J ((USHORT)::com::sun::star::awt::Key::J)
-#define KEY_K ((USHORT)::com::sun::star::awt::Key::K)
-#define KEY_L ((USHORT)::com::sun::star::awt::Key::L)
-#define KEY_M ((USHORT)::com::sun::star::awt::Key::M)
-#define KEY_N ((USHORT)::com::sun::star::awt::Key::N)
-#define KEY_O ((USHORT)::com::sun::star::awt::Key::O)
-#define KEY_P ((USHORT)::com::sun::star::awt::Key::P)
-#define KEY_Q ((USHORT)::com::sun::star::awt::Key::Q)
-#define KEY_R ((USHORT)::com::sun::star::awt::Key::R)
-#define KEY_S ((USHORT)::com::sun::star::awt::Key::S)
-#define KEY_T ((USHORT)::com::sun::star::awt::Key::T)
-#define KEY_U ((USHORT)::com::sun::star::awt::Key::U)
-#define KEY_V ((USHORT)::com::sun::star::awt::Key::V)
-#define KEY_W ((USHORT)::com::sun::star::awt::Key::W)
-#define KEY_X ((USHORT)::com::sun::star::awt::Key::X)
-#define KEY_Y ((USHORT)::com::sun::star::awt::Key::Y)
-#define KEY_Z ((USHORT)::com::sun::star::awt::Key::Z)
-
-#define KEY_F1 ((USHORT)::com::sun::star::awt::Key::F1)
-#define KEY_F2 ((USHORT)::com::sun::star::awt::Key::F2)
-#define KEY_F3 ((USHORT)::com::sun::star::awt::Key::F3)
-#define KEY_F4 ((USHORT)::com::sun::star::awt::Key::F4)
-#define KEY_F5 ((USHORT)::com::sun::star::awt::Key::F5)
-#define KEY_F6 ((USHORT)::com::sun::star::awt::Key::F6)
-#define KEY_F7 ((USHORT)::com::sun::star::awt::Key::F7)
-#define KEY_F8 ((USHORT)::com::sun::star::awt::Key::F8)
-#define KEY_F9 ((USHORT)::com::sun::star::awt::Key::F9)
-#define KEY_F10 ((USHORT)::com::sun::star::awt::Key::F10)
-#define KEY_F11 ((USHORT)::com::sun::star::awt::Key::F11)
-#define KEY_F12 ((USHORT)::com::sun::star::awt::Key::F12)
-#define KEY_F13 ((USHORT)::com::sun::star::awt::Key::F13)
-#define KEY_F14 ((USHORT)::com::sun::star::awt::Key::F14)
-#define KEY_F15 ((USHORT)::com::sun::star::awt::Key::F15)
-#define KEY_F16 ((USHORT)::com::sun::star::awt::Key::F16)
-#define KEY_F17 ((USHORT)::com::sun::star::awt::Key::F17)
-#define KEY_F18 ((USHORT)::com::sun::star::awt::Key::F18)
-#define KEY_F19 ((USHORT)::com::sun::star::awt::Key::F19)
-#define KEY_F20 ((USHORT)::com::sun::star::awt::Key::F20)
-#define KEY_F21 ((USHORT)::com::sun::star::awt::Key::F21)
-#define KEY_F22 ((USHORT)::com::sun::star::awt::Key::F22)
-#define KEY_F23 ((USHORT)::com::sun::star::awt::Key::F23)
-#define KEY_F24 ((USHORT)::com::sun::star::awt::Key::F24)
-#define KEY_F25 ((USHORT)::com::sun::star::awt::Key::F25)
-#define KEY_F26 ((USHORT)::com::sun::star::awt::Key::F26)
-
-#define KEY_DOWN ((USHORT)::com::sun::star::awt::Key::DOWN)
-#define KEY_UP ((USHORT)::com::sun::star::awt::Key::UP)
-#define KEY_LEFT ((USHORT)::com::sun::star::awt::Key::LEFT)
-#define KEY_RIGHT ((USHORT)::com::sun::star::awt::Key::RIGHT)
-#define KEY_HOME ((USHORT)::com::sun::star::awt::Key::HOME)
-#define KEY_END ((USHORT)::com::sun::star::awt::Key::END)
-#define KEY_PAGEUP ((USHORT)::com::sun::star::awt::Key::PAGEUP)
-#define KEY_PAGEDOWN ((USHORT)::com::sun::star::awt::Key::PAGEDOWN)
-
-#define KEY_RETURN ((USHORT)::com::sun::star::awt::Key::RETURN)
-#define KEY_ESCAPE ((USHORT)::com::sun::star::awt::Key::ESCAPE)
-#define KEY_TAB ((USHORT)::com::sun::star::awt::Key::TAB)
-#define KEY_BACKSPACE ((USHORT)::com::sun::star::awt::Key::BACKSPACE)
-#define KEY_SPACE ((USHORT)::com::sun::star::awt::Key::SPACE)
-#define KEY_INSERT ((USHORT)::com::sun::star::awt::Key::INSERT)
-#define KEY_DELETE ((USHORT)::com::sun::star::awt::Key::DELETE)
-
-#define KEY_ADD ((USHORT)::com::sun::star::awt::Key::ADD)
-#define KEY_SUBTRACT ((USHORT)::com::sun::star::awt::Key::SUBTRACT)
-#define KEY_MULTIPLY ((USHORT)::com::sun::star::awt::Key::MULTIPLY)
-#define KEY_DIVIDE ((USHORT)::com::sun::star::awt::Key::DIVIDE)
-#define KEY_POINT ((USHORT)::com::sun::star::awt::Key::POINT)
-#define KEY_COMMA ((USHORT)::com::sun::star::awt::Key::COMMA)
-#define KEY_LESS ((USHORT)::com::sun::star::awt::Key::LESS)
-#define KEY_GREATER ((USHORT)::com::sun::star::awt::Key::GREATER)
-#define KEY_EQUAL ((USHORT)::com::sun::star::awt::Key::EQUAL)
-
-#define KEY_OPEN ((USHORT)::com::sun::star::awt::Key::OPEN)
-#define KEY_CUT ((USHORT)::com::sun::star::awt::Key::CUT)
-#define KEY_COPY ((USHORT)::com::sun::star::awt::Key::COPY)
-#define KEY_PASTE ((USHORT)::com::sun::star::awt::Key::PASTE)
-#define KEY_UNDO ((USHORT)::com::sun::star::awt::Key::UNDO)
-#define KEY_REPEAT ((USHORT)::com::sun::star::awt::Key::REPEAT)
-#define KEY_FIND ((USHORT)::com::sun::star::awt::Key::FIND)
-#define KEY_PROPERTIES ((USHORT)::com::sun::star::awt::Key::PROPERTIES)
-#define KEY_FRONT ((USHORT)::com::sun::star::awt::Key::FRONT)
-#define KEY_CONTEXTMENU ((USHORT)::com::sun::star::awt::Key::CONTEXTMENU)
-#define KEY_MENU ((USHORT)::com::sun::star::awt::Key::MENU)
-#define KEY_HELP ((USHORT)::com::sun::star::awt::Key::HELP)
-#define KEY_HANGUL_HANJA ((USHORT)::com::sun::star::awt::Key::HANGUL_HANJA)
-#define KEY_DECIMAL ((USHORT)::com::sun::star::awt::Key::DECIMAL)
-#define KEY_TILDE ((USHORT)::com::sun::star::awt::Key::TILDE)
-#define KEY_QUOTELEFT ((USHORT)::com::sun::star::awt::Key::QUOTELEFT)
-
-#define KEY_CODE ((USHORT)0x0FFF)
+#define KEY_0 ((sal_uInt16)::com::sun::star::awt::Key::NUM0)
+#define KEY_1 ((sal_uInt16)::com::sun::star::awt::Key::NUM1)
+#define KEY_2 ((sal_uInt16)::com::sun::star::awt::Key::NUM2)
+#define KEY_3 ((sal_uInt16)::com::sun::star::awt::Key::NUM3)
+#define KEY_4 ((sal_uInt16)::com::sun::star::awt::Key::NUM4)
+#define KEY_5 ((sal_uInt16)::com::sun::star::awt::Key::NUM5)
+#define KEY_6 ((sal_uInt16)::com::sun::star::awt::Key::NUM6)
+#define KEY_7 ((sal_uInt16)::com::sun::star::awt::Key::NUM7)
+#define KEY_8 ((sal_uInt16)::com::sun::star::awt::Key::NUM8)
+#define KEY_9 ((sal_uInt16)::com::sun::star::awt::Key::NUM9)
+
+#define KEY_A ((sal_uInt16)::com::sun::star::awt::Key::A)
+#define KEY_B ((sal_uInt16)::com::sun::star::awt::Key::B)
+#define KEY_C ((sal_uInt16)::com::sun::star::awt::Key::C)
+#define KEY_D ((sal_uInt16)::com::sun::star::awt::Key::D)
+#define KEY_E ((sal_uInt16)::com::sun::star::awt::Key::E)
+#define KEY_F ((sal_uInt16)::com::sun::star::awt::Key::F)
+#define KEY_G ((sal_uInt16)::com::sun::star::awt::Key::G)
+#define KEY_H ((sal_uInt16)::com::sun::star::awt::Key::H)
+#define KEY_I ((sal_uInt16)::com::sun::star::awt::Key::I)
+#define KEY_J ((sal_uInt16)::com::sun::star::awt::Key::J)
+#define KEY_K ((sal_uInt16)::com::sun::star::awt::Key::K)
+#define KEY_L ((sal_uInt16)::com::sun::star::awt::Key::L)
+#define KEY_M ((sal_uInt16)::com::sun::star::awt::Key::M)
+#define KEY_N ((sal_uInt16)::com::sun::star::awt::Key::N)
+#define KEY_O ((sal_uInt16)::com::sun::star::awt::Key::O)
+#define KEY_P ((sal_uInt16)::com::sun::star::awt::Key::P)
+#define KEY_Q ((sal_uInt16)::com::sun::star::awt::Key::Q)
+#define KEY_R ((sal_uInt16)::com::sun::star::awt::Key::R)
+#define KEY_S ((sal_uInt16)::com::sun::star::awt::Key::S)
+#define KEY_T ((sal_uInt16)::com::sun::star::awt::Key::T)
+#define KEY_U ((sal_uInt16)::com::sun::star::awt::Key::U)
+#define KEY_V ((sal_uInt16)::com::sun::star::awt::Key::V)
+#define KEY_W ((sal_uInt16)::com::sun::star::awt::Key::W)
+#define KEY_X ((sal_uInt16)::com::sun::star::awt::Key::X)
+#define KEY_Y ((sal_uInt16)::com::sun::star::awt::Key::Y)
+#define KEY_Z ((sal_uInt16)::com::sun::star::awt::Key::Z)
+
+#define KEY_F1 ((sal_uInt16)::com::sun::star::awt::Key::F1)
+#define KEY_F2 ((sal_uInt16)::com::sun::star::awt::Key::F2)
+#define KEY_F3 ((sal_uInt16)::com::sun::star::awt::Key::F3)
+#define KEY_F4 ((sal_uInt16)::com::sun::star::awt::Key::F4)
+#define KEY_F5 ((sal_uInt16)::com::sun::star::awt::Key::F5)
+#define KEY_F6 ((sal_uInt16)::com::sun::star::awt::Key::F6)
+#define KEY_F7 ((sal_uInt16)::com::sun::star::awt::Key::F7)
+#define KEY_F8 ((sal_uInt16)::com::sun::star::awt::Key::F8)
+#define KEY_F9 ((sal_uInt16)::com::sun::star::awt::Key::F9)
+#define KEY_F10 ((sal_uInt16)::com::sun::star::awt::Key::F10)
+#define KEY_F11 ((sal_uInt16)::com::sun::star::awt::Key::F11)
+#define KEY_F12 ((sal_uInt16)::com::sun::star::awt::Key::F12)
+#define KEY_F13 ((sal_uInt16)::com::sun::star::awt::Key::F13)
+#define KEY_F14 ((sal_uInt16)::com::sun::star::awt::Key::F14)
+#define KEY_F15 ((sal_uInt16)::com::sun::star::awt::Key::F15)
+#define KEY_F16 ((sal_uInt16)::com::sun::star::awt::Key::F16)
+#define KEY_F17 ((sal_uInt16)::com::sun::star::awt::Key::F17)
+#define KEY_F18 ((sal_uInt16)::com::sun::star::awt::Key::F18)
+#define KEY_F19 ((sal_uInt16)::com::sun::star::awt::Key::F19)
+#define KEY_F20 ((sal_uInt16)::com::sun::star::awt::Key::F20)
+#define KEY_F21 ((sal_uInt16)::com::sun::star::awt::Key::F21)
+#define KEY_F22 ((sal_uInt16)::com::sun::star::awt::Key::F22)
+#define KEY_F23 ((sal_uInt16)::com::sun::star::awt::Key::F23)
+#define KEY_F24 ((sal_uInt16)::com::sun::star::awt::Key::F24)
+#define KEY_F25 ((sal_uInt16)::com::sun::star::awt::Key::F25)
+#define KEY_F26 ((sal_uInt16)::com::sun::star::awt::Key::F26)
+
+#define KEY_DOWN ((sal_uInt16)::com::sun::star::awt::Key::DOWN)
+#define KEY_UP ((sal_uInt16)::com::sun::star::awt::Key::UP)
+#define KEY_LEFT ((sal_uInt16)::com::sun::star::awt::Key::LEFT)
+#define KEY_RIGHT ((sal_uInt16)::com::sun::star::awt::Key::RIGHT)
+#define KEY_HOME ((sal_uInt16)::com::sun::star::awt::Key::HOME)
+#define KEY_END ((sal_uInt16)::com::sun::star::awt::Key::END)
+#define KEY_PAGEUP ((sal_uInt16)::com::sun::star::awt::Key::PAGEUP)
+#define KEY_PAGEDOWN ((sal_uInt16)::com::sun::star::awt::Key::PAGEDOWN)
+
+#define KEY_RETURN ((sal_uInt16)::com::sun::star::awt::Key::RETURN)
+#define KEY_ESCAPE ((sal_uInt16)::com::sun::star::awt::Key::ESCAPE)
+#define KEY_TAB ((sal_uInt16)::com::sun::star::awt::Key::TAB)
+#define KEY_BACKSPACE ((sal_uInt16)::com::sun::star::awt::Key::BACKSPACE)
+#define KEY_SPACE ((sal_uInt16)::com::sun::star::awt::Key::SPACE)
+#define KEY_INSERT ((sal_uInt16)::com::sun::star::awt::Key::INSERT)
+#define KEY_DELETE ((sal_uInt16)::com::sun::star::awt::Key::DELETE)
+
+#define KEY_ADD ((sal_uInt16)::com::sun::star::awt::Key::ADD)
+#define KEY_SUBTRACT ((sal_uInt16)::com::sun::star::awt::Key::SUBTRACT)
+#define KEY_MULTIPLY ((sal_uInt16)::com::sun::star::awt::Key::MULTIPLY)
+#define KEY_DIVIDE ((sal_uInt16)::com::sun::star::awt::Key::DIVIDE)
+#define KEY_POINT ((sal_uInt16)::com::sun::star::awt::Key::POINT)
+#define KEY_COMMA ((sal_uInt16)::com::sun::star::awt::Key::COMMA)
+#define KEY_LESS ((sal_uInt16)::com::sun::star::awt::Key::LESS)
+#define KEY_GREATER ((sal_uInt16)::com::sun::star::awt::Key::GREATER)
+#define KEY_EQUAL ((sal_uInt16)::com::sun::star::awt::Key::EQUAL)
+
+#define KEY_OPEN ((sal_uInt16)::com::sun::star::awt::Key::OPEN)
+#define KEY_CUT ((sal_uInt16)::com::sun::star::awt::Key::CUT)
+#define KEY_COPY ((sal_uInt16)::com::sun::star::awt::Key::COPY)
+#define KEY_PASTE ((sal_uInt16)::com::sun::star::awt::Key::PASTE)
+#define KEY_UNDO ((sal_uInt16)::com::sun::star::awt::Key::UNDO)
+#define KEY_REPEAT ((sal_uInt16)::com::sun::star::awt::Key::REPEAT)
+#define KEY_FIND ((sal_uInt16)::com::sun::star::awt::Key::FIND)
+#define KEY_PROPERTIES ((sal_uInt16)::com::sun::star::awt::Key::PROPERTIES)
+#define KEY_FRONT ((sal_uInt16)::com::sun::star::awt::Key::FRONT)
+#define KEY_CONTEXTMENU ((sal_uInt16)::com::sun::star::awt::Key::CONTEXTMENU)
+#define KEY_MENU ((sal_uInt16)::com::sun::star::awt::Key::MENU)
+#define KEY_HELP ((sal_uInt16)::com::sun::star::awt::Key::HELP)
+#define KEY_HANGUL_HANJA ((sal_uInt16)::com::sun::star::awt::Key::HANGUL_HANJA)
+#define KEY_DECIMAL ((sal_uInt16)::com::sun::star::awt::Key::DECIMAL)
+#define KEY_TILDE ((sal_uInt16)::com::sun::star::awt::Key::TILDE)
+#define KEY_QUOTELEFT ((sal_uInt16)::com::sun::star::awt::Key::QUOTELEFT)
+
+#define KEY_CODE ((sal_uInt16)0x0FFF)
// Modifier-Tasten
-#define KEY_SHIFT ((USHORT)0x1000)
-#define KEY_MOD1 ((USHORT)0x2000)
-#define KEY_MOD2 ((USHORT)0x4000)
-#define KEY_MOD3 ((USHORT)0x8000)
-#define KEY_MODTYPE ((USHORT)0xF000)
-#define KEY_ALLMODTYPE ((USHORT)0xF000)
+#define KEY_SHIFT ((sal_uInt16)0x1000)
+#define KEY_MOD1 ((sal_uInt16)0x2000)
+#define KEY_MOD2 ((sal_uInt16)0x4000)
+#define KEY_MOD3 ((sal_uInt16)0x8000)
+#define KEY_MODTYPE ((sal_uInt16)0xF000)
+#define KEY_ALLMODTYPE ((sal_uInt16)0xF000)
// extended Modifier-Keys (only used for modkey events)
#define MODKEY_LSHIFT 0x0001
@@ -184,8 +184,8 @@
// - Mouse-Types -
// ---------------
-#define MOUSE_LEFT ((USHORT)0x0001)
-#define MOUSE_MIDDLE ((USHORT)0x0002)
-#define MOUSE_RIGHT ((USHORT)0x0004)
+#define MOUSE_LEFT ((sal_uInt16)0x0001)
+#define MOUSE_MIDDLE ((sal_uInt16)0x0002)
+#define MOUSE_RIGHT ((sal_uInt16)0x0004)
#endif // _SV_KEYCODES_HXX
diff --git a/vcl/inc/vcl/lineinfo.hxx b/vcl/inc/vcl/lineinfo.hxx
index 9b12966a52ff..3a72c25e325b 100644
--- a/vcl/inc/vcl/lineinfo.hxx
+++ b/vcl/inc/vcl/lineinfo.hxx
@@ -42,12 +42,12 @@ namespace basegfx { class B2DPolyPolygon; }
struct ImplLineInfo
{
- ULONG mnRefCount;
+ sal_uIntPtr mnRefCount;
LineStyle meStyle;
long mnWidth;
- USHORT mnDashCount;
+ sal_uInt16 mnDashCount;
long mnDashLen;
- USHORT mnDotCount;
+ sal_uInt16 mnDotCount;
long mnDotLen;
long mnDistance;
@@ -82,9 +82,9 @@ public:
~LineInfo();
LineInfo& operator=( const LineInfo& rLineInfo );
- BOOL operator==( const LineInfo& rLineInfo ) const;
- BOOL operator!=( const LineInfo& rLineInfo ) const { return !(LineInfo::operator==( rLineInfo ) ); }
- BOOL IsSameInstance( const LineInfo& rLineInfo ) const { return( mpImplLineInfo == rLineInfo.mpImplLineInfo ); }
+ sal_Bool operator==( const LineInfo& rLineInfo ) const;
+ sal_Bool operator!=( const LineInfo& rLineInfo ) const { return !(LineInfo::operator==( rLineInfo ) ); }
+ sal_Bool IsSameInstance( const LineInfo& rLineInfo ) const { return( mpImplLineInfo == rLineInfo.mpImplLineInfo ); }
void SetStyle( LineStyle eStyle );
LineStyle GetStyle() const { return mpImplLineInfo->meStyle; }
@@ -92,14 +92,14 @@ public:
void SetWidth( long nWidth );
long GetWidth() const { return mpImplLineInfo->mnWidth; }
- void SetDashCount( USHORT nDashCount );
- USHORT GetDashCount() const { return mpImplLineInfo->mnDashCount; }
+ void SetDashCount( sal_uInt16 nDashCount );
+ sal_uInt16 GetDashCount() const { return mpImplLineInfo->mnDashCount; }
void SetDashLen( long nDashLen );
long GetDashLen() const { return mpImplLineInfo->mnDashLen; }
- void SetDotCount( USHORT nDotCount );
- USHORT GetDotCount() const { return mpImplLineInfo->mnDotCount; }
+ void SetDotCount( sal_uInt16 nDotCount );
+ sal_uInt16 GetDotCount() const { return mpImplLineInfo->mnDotCount; }
void SetDotLen( long nDotLen );
long GetDotLen() const { return mpImplLineInfo->mnDotLen; }
@@ -110,7 +110,7 @@ public:
void SetLineJoin(basegfx::B2DLineJoin eLineJoin);
basegfx::B2DLineJoin GetLineJoin() const { return mpImplLineInfo->meLineJoin; }
- BOOL IsDefault() const { return( !mpImplLineInfo->mnWidth && ( LINE_SOLID == mpImplLineInfo->meStyle ) ); }
+ sal_Bool IsDefault() const { return( !mpImplLineInfo->mnWidth && ( LINE_SOLID == mpImplLineInfo->meStyle ) ); }
friend VCL_DLLPUBLIC SvStream& operator>>( SvStream& rIStm, LineInfo& rLineInfo );
friend VCL_DLLPUBLIC SvStream& operator<<( SvStream& rOStm, const LineInfo& rLineInfo );
diff --git a/vcl/inc/vcl/longcurr.hxx b/vcl/inc/vcl/longcurr.hxx
index 39bd75439ad9..d186dca9d292 100644
--- a/vcl/inc/vcl/longcurr.hxx
+++ b/vcl/inc/vcl/longcurr.hxx
@@ -43,7 +43,7 @@ class LocaleDataWrapper;
class VCL_DLLPUBLIC LongCurrencyFormatter : public FormatterBase
{
private:
- SAL_DLLPRIVATE friend BOOL ImplLongCurrencyReformat( const XubString&, BigInt, BigInt, USHORT, const LocaleDataWrapper&, XubString&, LongCurrencyFormatter& );
+ SAL_DLLPRIVATE friend sal_Bool ImplLongCurrencyReformat( const XubString&, BigInt, BigInt, sal_uInt16, const LocaleDataWrapper&, XubString&, LongCurrencyFormatter& );
SAL_DLLPRIVATE void ImpInit();
protected:
@@ -53,9 +53,9 @@ protected:
BigInt mnMax;
BigInt mnCorrectedValue;
String maCurrencySymbol;
- USHORT mnType;
- USHORT mnDecimalDigits;
- BOOL mbThousandSep;
+ sal_uInt16 mnType;
+ sal_uInt16 mnDecimalDigits;
+ sal_Bool mbThousandSep;
LongCurrencyFormatter();
SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
@@ -66,8 +66,8 @@ public:
virtual void Reformat();
virtual void ReformatAll();
- void SetUseThousandSep( BOOL b );
- BOOL IsUseThousandSep() const { return mbThousandSep; }
+ void SetUseThousandSep( sal_Bool b );
+ sal_Bool IsUseThousandSep() const { return mbThousandSep; }
void SetCurrencySymbol( const String& rStr );
String GetCurrencySymbol() const;
@@ -77,15 +77,15 @@ public:
void SetMax( BigInt nNewMax );
BigInt GetMax() const { return mnMax; }
- void SetDecimalDigits( USHORT nDigits );
- USHORT GetDecimalDigits() const;
+ void SetDecimalDigits( sal_uInt16 nDigits );
+ sal_uInt16 GetDecimalDigits() const;
void SetValue( BigInt nNewValue );
void SetUserValue( BigInt nNewValue );
BigInt GetValue() const;
- BOOL IsValueModified() const;
+ sal_Bool IsValueModified() const;
void SetEmptyValue();
- BOOL IsEmptyValue() const { return !GetField()->GetText().Len(); }
+ sal_Bool IsEmptyValue() const { return !GetField()->GetText().Len(); }
BigInt GetCorrectedValue() const { return mnCorrectedValue; }
@@ -151,12 +151,12 @@ public:
void ReformatAll();
void InsertValue( BigInt nValue,
- USHORT nPos = COMBOBOX_APPEND );
+ sal_uInt16 nPos = COMBOBOX_APPEND );
void RemoveValue( BigInt nValue );
BigInt GetValue() const
{ return LongCurrencyFormatter::GetValue(); }
- BigInt GetValue( USHORT nPos ) const;
- USHORT GetValuePos( BigInt nValue ) const;
+ BigInt GetValue( sal_uInt16 nPos ) const;
+ sal_uInt16 GetValuePos( BigInt nValue ) const;
};
#endif // _LONGCURR_HXX
diff --git a/vcl/inc/vcl/lstbox.h b/vcl/inc/vcl/lstbox.h
index db800229b2d2..c9dbfce508df 100644
--- a/vcl/inc/vcl/lstbox.h
+++ b/vcl/inc/vcl/lstbox.h
@@ -28,11 +28,11 @@
#ifndef _SV_LSTBOX_H
#define _SV_LSTBOX_H
-#define LISTBOX_APPEND ((USHORT)0xFFFF)
-#define LISTBOX_ENTRY_NOTFOUND ((USHORT)0xFFFF)
-#define LISTBOX_ERROR ((USHORT)0xFFFF)
+#define LISTBOX_APPEND ((sal_uInt16)0xFFFF)
+#define LISTBOX_ENTRY_NOTFOUND ((sal_uInt16)0xFFFF)
+#define LISTBOX_ERROR ((sal_uInt16)0xFFFF)
-#define LISTBOX_USERDRAW_SELECTED ((USHORT)0x0001)
+#define LISTBOX_USERDRAW_SELECTED ((sal_uInt16)0x0001)
// --------------------------------------------------------------------
diff --git a/vcl/inc/vcl/lstbox.hxx b/vcl/inc/vcl/lstbox.hxx
index 3659e5aee485..fce38871fa7f 100644
--- a/vcl/inc/vcl/lstbox.hxx
+++ b/vcl/inc/vcl/lstbox.hxx
@@ -49,12 +49,12 @@ private:
ImplListBoxFloatingWindow* mpFloatWin;
ImplWin* mpImplWin;
ImplBtn* mpBtn;
- USHORT mnDDHeight;
- USHORT mnSaveValue;
- BOOL mbDDAutoSize;
+ sal_uInt16 mnDDHeight;
+ sal_uInt16 mnSaveValue;
+ sal_Bool mbDDAutoSize;
Link maSelectHdl;
Link maDoubleClickHdl;
- USHORT mnLineCount;
+ sal_uInt16 mnLineCount;
//#if 0 // _SOLAR__PRIVATE
private:
@@ -75,7 +75,7 @@ protected:
SAL_DLLPRIVATE WinBits ImplInitStyle( WinBits nStyle );
SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
//#endif
- BOOL IsDropDownBox() const { return mpFloatWin ? TRUE : FALSE; }
+ sal_Bool IsDropDownBox() const { return mpFloatWin ? sal_True : sal_False; }
protected:
ListBox( WindowType nType );
@@ -87,7 +87,7 @@ public:
ListBox( Window* pParent, const ResId& rResId );
~ListBox();
- 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_uIntPtr nFlags );
virtual void Resize();
virtual long PreNotify( NotifyEvent& rNEvt );
virtual void StateChanged( StateChangedType nType );
@@ -103,7 +103,7 @@ public:
virtual const Wallpaper& GetDisplayBackground() const;
virtual void SetPosSizePixel( long nX, long nY,
- long nWidth, long nHeight, USHORT nFlags = WINDOW_POSSIZE_ALL );
+ long nWidth, long nHeight, sal_uInt16 nFlags = WINDOW_POSSIZE_ALL );
void SetPosSizePixel( const Point& rNewPos, const Size& rNewSize )
{ Control::SetPosSizePixel( rNewPos, rNewSize ); }
void SetDropDownSizePixel( const Size& rNewSize )
@@ -111,42 +111,42 @@ public:
Rectangle GetDropDownPosSizePixel() const;
- void SetDropDownLineCount( USHORT nLines );
- USHORT GetDropDownLineCount() const;
+ void SetDropDownLineCount( sal_uInt16 nLines );
+ sal_uInt16 GetDropDownLineCount() const;
- void EnableAutoSize( BOOL bAuto );
- BOOL IsAutoSizeEnabled() const { return mbDDAutoSize; }
+ void EnableAutoSize( sal_Bool bAuto );
+ sal_Bool IsAutoSizeEnabled() const { return mbDDAutoSize; }
- void EnableDDAutoWidth( BOOL b );
- BOOL IsDDAutoWidthEnabled() const;
+ void EnableDDAutoWidth( sal_Bool b );
+ sal_Bool IsDDAutoWidthEnabled() const;
- virtual USHORT InsertEntry( const XubString& rStr, USHORT nPos = LISTBOX_APPEND );
- virtual USHORT InsertEntry( const Image& rImage, USHORT nPos = LISTBOX_APPEND );
- virtual USHORT InsertEntry( const XubString& rStr, const Image& rImage, USHORT nPos = LISTBOX_APPEND );
+ virtual sal_uInt16 InsertEntry( const XubString& rStr, sal_uInt16 nPos = LISTBOX_APPEND );
+ virtual sal_uInt16 InsertEntry( const Image& rImage, sal_uInt16 nPos = LISTBOX_APPEND );
+ virtual sal_uInt16 InsertEntry( const XubString& rStr, const Image& rImage, sal_uInt16 nPos = LISTBOX_APPEND );
virtual void RemoveEntry( const XubString& rStr );
- virtual void RemoveEntry( USHORT nPos );
+ virtual void RemoveEntry( sal_uInt16 nPos );
virtual void Clear();
- virtual USHORT GetEntryPos( const XubString& rStr ) const;
- virtual USHORT GetEntryPos( const void* pData ) const;
- Image GetEntryImage( USHORT nPos ) const;
- virtual XubString GetEntry( USHORT nPos ) const;
- virtual USHORT GetEntryCount() const;
+ virtual sal_uInt16 GetEntryPos( const XubString& rStr ) const;
+ virtual sal_uInt16 GetEntryPos( const void* pData ) const;
+ Image GetEntryImage( sal_uInt16 nPos ) const;
+ virtual XubString GetEntry( sal_uInt16 nPos ) const;
+ virtual sal_uInt16 GetEntryCount() const;
- virtual void SelectEntry( const XubString& rStr, BOOL bSelect = TRUE );
- virtual void SelectEntryPos( USHORT nPos, BOOL bSelect = TRUE );
+ virtual void SelectEntry( const XubString& rStr, sal_Bool bSelect = sal_True );
+ virtual void SelectEntryPos( sal_uInt16 nPos, sal_Bool bSelect = sal_True );
- virtual USHORT GetSelectEntryCount() const;
- virtual XubString GetSelectEntry( USHORT nSelIndex = 0 ) const;
- virtual USHORT GetSelectEntryPos( USHORT nSelIndex = 0 ) const;
+ virtual sal_uInt16 GetSelectEntryCount() const;
+ virtual XubString GetSelectEntry( sal_uInt16 nSelIndex = 0 ) const;
+ virtual sal_uInt16 GetSelectEntryPos( sal_uInt16 nSelIndex = 0 ) const;
- virtual BOOL IsEntrySelected( const XubString& rStr ) const;
- virtual BOOL IsEntryPosSelected( USHORT nPos ) const;
+ virtual sal_Bool IsEntrySelected( const XubString& rStr ) const;
+ virtual sal_Bool IsEntryPosSelected( sal_uInt16 nPos ) const;
virtual void SetNoSelection();
- void SetEntryData( USHORT nPos, void* pNewData );
- void* GetEntryData( USHORT nPos ) const;
+ void SetEntryData( sal_uInt16 nPos, void* pNewData );
+ void* GetEntryData( sal_uInt16 nPos ) const;
/** this methods stores a combination of flags from the
LISTBOX_ENTRY_FLAG_* defines at the given entry.
@@ -156,51 +156,51 @@ public:
to change the internal behaviour of the ListBox implementation
for specific entries.
*/
- void SetEntryFlags( USHORT nPos, long nFlags );
+ void SetEntryFlags( sal_uInt16 nPos, long nFlags );
/** this methods gets the current combination of flags from the
LISTBOX_ENTRY_FLAG_* defines from the given entry.
See description of the possible LISTBOX_ENTRY_FLAG_* flags
for details.
*/
- long GetEntryFlags( USHORT nPos ) const;
+ long GetEntryFlags( sal_uInt16 nPos ) const;
- void SetTopEntry( USHORT nPos );
- void ShowProminentEntry( USHORT nPos );
+ void SetTopEntry( sal_uInt16 nPos );
+ void ShowProminentEntry( sal_uInt16 nPos );
void SetTopEntryStr( const XubString& rStr );
- USHORT GetTopEntry() const;
+ sal_uInt16 GetTopEntry() const;
void SetProminentEntryType( ProminentEntry eType );
ProminentEntry GetProminentEntryType() const;
void SaveValue() { mnSaveValue = GetSelectEntryPos(); }
- USHORT GetSavedValue() const { return mnSaveValue; }
+ sal_uInt16 GetSavedValue() const { return mnSaveValue; }
- void SetSeparatorPos( USHORT n );
+ void SetSeparatorPos( sal_uInt16 n );
void SetSeparatorPos();
- USHORT GetSeparatorPos() const;
+ sal_uInt16 GetSeparatorPos() const;
- BOOL IsTravelSelect() const;
- BOOL IsInDropDown() const;
+ sal_Bool IsTravelSelect() const;
+ sal_Bool IsInDropDown() const;
void ToggleDropDown();
- void EnableMultiSelection( BOOL bMulti, BOOL bStackSelection );
- void EnableMultiSelection( BOOL bMulti );
- BOOL IsMultiSelectionEnabled() const;
+ void EnableMultiSelection( sal_Bool bMulti, sal_Bool bStackSelection );
+ void EnableMultiSelection( sal_Bool bMulti );
+ sal_Bool IsMultiSelectionEnabled() const;
- void SetReadOnly( BOOL bReadOnly = TRUE );
- BOOL IsReadOnly() const;
+ void SetReadOnly( sal_Bool bReadOnly = sal_True );
+ sal_Bool IsReadOnly() const;
- long CalcWindowSizePixel( USHORT nLines ) const;
- Rectangle GetBoundingRectangle( USHORT nItem ) const;
+ long CalcWindowSizePixel( sal_uInt16 nLines ) const;
+ Rectangle GetBoundingRectangle( sal_uInt16 nItem ) const;
void SetUserItemSize( const Size& rSz );
const Size& GetUserItemSize() const;
- void EnableUserDraw( BOOL bUserDraw );
- BOOL IsUserDrawEnabled() const;
+ void EnableUserDraw( sal_Bool bUserDraw );
+ sal_Bool IsUserDrawEnabled() const;
- void DrawEntry( const UserDrawEvent& rEvt, BOOL bDrawImage, BOOL bDrawText, BOOL bDrawTextAtImagePos = FALSE );
+ void DrawEntry( const UserDrawEvent& rEvt, sal_Bool bDrawImage, sal_Bool bDrawText, sal_Bool bDrawTextAtImagePos = sal_False );
void SetSelectHdl( const Link& rLink ) { maSelectHdl = rLink; }
const Link& GetSelectHdl() const { return maSelectHdl; }
@@ -210,15 +210,15 @@ public:
Size CalcMinimumSize() const;
virtual Size GetOptimalSize(WindowSizeType eType) const;
Size CalcAdjustedSize( const Size& rPrefSize ) 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 SetMRUEntries( const XubString& rEntries, xub_Unicode cSep = ';' );
XubString GetMRUEntries( xub_Unicode cSep = ';' ) const;
- void SetMaxMRUCount( USHORT n );
- USHORT GetMaxMRUCount() const;
+ void SetMaxMRUCount( sal_uInt16 n );
+ sal_uInt16 GetMaxMRUCount() const;
- USHORT GetDisplayLineCount() const;
+ sal_uInt16 GetDisplayLineCount() const;
void EnableMirroring();
@@ -241,7 +241,7 @@ public:
if no item is at that point.
*/
using Control::GetIndexForPoint;
- long GetIndexForPoint( const Point& rPoint, USHORT& rPos ) const;
+ long GetIndexForPoint( const Point& rPoint, sal_uInt16& rPos ) const;
};
// ----------------
@@ -256,7 +256,7 @@ public:
private:
// Bei MultiListBox nicht erlaubt...
void SaveValue();
- USHORT GetSavedValue();
+ sal_uInt16 GetSavedValue();
public:
MultiListBox( Window* pParent, WinBits nStyle = 0 );
diff --git a/vcl/inc/vcl/mapmod.hxx b/vcl/inc/vcl/mapmod.hxx
index b2ea32958e90..7fd4fbd55f9d 100644
--- a/vcl/inc/vcl/mapmod.hxx
+++ b/vcl/inc/vcl/mapmod.hxx
@@ -49,12 +49,12 @@ class ImplMapMode
friend class OutputDevice;
private:
- ULONG mnRefCount;
+ sal_uIntPtr mnRefCount;
MapUnit meUnit;
Point maOrigin;
Fraction maScaleX;
Fraction maScaleY;
- BOOL mbSimple;
+ sal_Bool mbSimple;
friend SvStream& operator>>( SvStream& rIStm, ImplMapMode& rMapMode );
friend SvStream& operator<<( SvStream& rOStm, const ImplMapMode& rMapMode );
@@ -102,11 +102,11 @@ public:
{ return mpImplMapMode->maScaleY; }
MapMode& operator=( const MapMode& rMapMode );
- BOOL operator==( const MapMode& rMapMode ) const;
- BOOL operator!=( const MapMode& rMapMode ) const
+ sal_Bool operator==( const MapMode& rMapMode ) const;
+ sal_Bool operator!=( const MapMode& rMapMode ) const
{ return !(MapMode::operator==( rMapMode )); }
- BOOL IsDefault() const;
- BOOL IsSameInstance( const MapMode& rMapMode ) const
+ sal_Bool IsDefault() const;
+ sal_Bool IsSameInstance( const MapMode& rMapMode ) const
{ return (mpImplMapMode == rMapMode.mpImplMapMode); }
friend VCL_DLLPUBLIC SvStream& operator>>( SvStream& rIStm, MapMode& rMapMode );
diff --git a/vcl/inc/vcl/menu.hxx b/vcl/inc/vcl/menu.hxx
index c0cc3b5b51d6..c40aa168c111 100644
--- a/vcl/inc/vcl/menu.hxx
+++ b/vcl/inc/vcl/menu.hxx
@@ -66,22 +66,22 @@ namespace vcl { struct MenuLayoutData; }
// - Menu-Types -
// --------------
-#define MENU_APPEND ((USHORT)0xFFFF)
-#define MENU_ITEM_NOTFOUND ((USHORT)0xFFFF)
+#define MENU_APPEND ((sal_uInt16)0xFFFF)
+#define MENU_ITEM_NOTFOUND ((sal_uInt16)0xFFFF)
-#define POPUPMENU_EXECUTE_DOWN ((USHORT)0x0001)
-#define POPUPMENU_EXECUTE_UP ((USHORT)0x0002)
-#define POPUPMENU_EXECUTE_LEFT ((USHORT)0x0004)
-#define POPUPMENU_EXECUTE_RIGHT ((USHORT)0x0008)
+#define POPUPMENU_EXECUTE_DOWN ((sal_uInt16)0x0001)
+#define POPUPMENU_EXECUTE_UP ((sal_uInt16)0x0002)
+#define POPUPMENU_EXECUTE_LEFT ((sal_uInt16)0x0004)
+#define POPUPMENU_EXECUTE_RIGHT ((sal_uInt16)0x0008)
-#define POPUPMENU_NOMOUSEUPCLOSE ((USHORT)0x0010)
+#define POPUPMENU_NOMOUSEUPCLOSE ((sal_uInt16)0x0010)
// By changes you must also change: rsc/vclrsc.hxx
enum MenuItemType { MENUITEM_DONTKNOW, MENUITEM_STRING, MENUITEM_IMAGE,
MENUITEM_STRINGIMAGE, MENUITEM_SEPARATOR };
// By changes you must also change: rsc/vclrsc.hxx
-typedef USHORT MenuItemBits;
+typedef sal_uInt16 MenuItemBits;
#define MIB_CHECKABLE ((MenuItemBits)0x0001)
#define MIB_RADIOCHECK ((MenuItemBits)0x0002)
#define MIB_AUTOCHECK ((MenuItemBits)0x0004)
@@ -138,18 +138,18 @@ private:
XubString aTitleText; // PopupMenu-Text
- ULONG nEventId;
- USHORT mnHighlightedItemPos; // for native menues: keeps track of the highlighted item
- USHORT nMenuFlags;
- USHORT nDefaultItem; // Id vom Default-Item
- USHORT nSelectedId;
+ sal_uIntPtr nEventId;
+ sal_uInt16 mnHighlightedItemPos; // for native menues: keeps track of the highlighted item
+ sal_uInt16 nMenuFlags;
+ sal_uInt16 nDefaultItem; // Id vom Default-Item
+ sal_uInt16 nSelectedId;
// Fuer Ausgabe:
- USHORT nCheckPos;
- USHORT nImagePos;
- USHORT nTextPos;
+ sal_uInt16 nCheckPos;
+ sal_uInt16 nImagePos;
+ sal_uInt16 nTextPos;
- BOOL bIsMenuBar : 1, // Handelt es sich um den MenuBar
+ sal_Bool bIsMenuBar : 1, // Handelt es sich um den MenuBar
bCanceled : 1, // Waehrend eines Callbacks abgebrochen
bInCallback : 1, // In Activate/Deactivate
bKilled : 1; // Gekillt...
@@ -163,24 +163,24 @@ protected:
SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
SAL_DLLPRIVATE Menu* ImplGetStartMenu();
SAL_DLLPRIVATE Menu* ImplFindSelectMenu();
- SAL_DLLPRIVATE Menu* ImplFindMenu( USHORT nId );
+ SAL_DLLPRIVATE Menu* ImplFindMenu( sal_uInt16 nId );
SAL_DLLPRIVATE Size ImplCalcSize( Window* pWin );
- SAL_DLLPRIVATE BOOL ImplIsVisible( USHORT nPos ) const;
- SAL_DLLPRIVATE BOOL ImplIsSelectable( USHORT nPos ) const;
- SAL_DLLPRIVATE USHORT ImplGetVisibleItemCount() const;
- SAL_DLLPRIVATE USHORT ImplGetFirstVisible() const;
- SAL_DLLPRIVATE USHORT ImplGetPrevVisible( USHORT nPos ) const;
- SAL_DLLPRIVATE USHORT ImplGetNextVisible( USHORT nPos ) const;
- SAL_DLLPRIVATE void ImplPaint( Window* pWin, USHORT nBorder, long nOffY = 0, MenuItemData* pThisDataOnly = 0, BOOL bHighlighted = FALSE, bool bLayout = false ) const;
+ SAL_DLLPRIVATE sal_Bool ImplIsVisible( sal_uInt16 nPos ) const;
+ SAL_DLLPRIVATE sal_Bool ImplIsSelectable( sal_uInt16 nPos ) const;
+ SAL_DLLPRIVATE sal_uInt16 ImplGetVisibleItemCount() const;
+ SAL_DLLPRIVATE sal_uInt16 ImplGetFirstVisible() const;
+ SAL_DLLPRIVATE sal_uInt16 ImplGetPrevVisible( sal_uInt16 nPos ) const;
+ SAL_DLLPRIVATE sal_uInt16 ImplGetNextVisible( sal_uInt16 nPos ) const;
+ SAL_DLLPRIVATE void ImplPaint( Window* pWin, sal_uInt16 nBorder, long nOffY = 0, MenuItemData* pThisDataOnly = 0, sal_Bool bHighlighted = sal_False, bool bLayout = false ) const;
SAL_DLLPRIVATE void ImplSelect();
- SAL_DLLPRIVATE void ImplCallHighlight( USHORT nHighlightItem );
- SAL_DLLPRIVATE void ImplCallEventListeners( ULONG nEvent, USHORT nPos );
+ SAL_DLLPRIVATE void ImplCallHighlight( sal_uInt16 nHighlightItem );
+ SAL_DLLPRIVATE void ImplCallEventListeners( sal_uIntPtr nEvent, sal_uInt16 nPos );
DECL_DLLPRIVATE_LINK( ImplCallSelect, Menu* );
SAL_DLLPRIVATE void ImplFillLayoutData() const;
SAL_DLLPRIVATE SalMenu* ImplGetSalMenu() { return mpSalMenu; }
SAL_DLLPRIVATE void ImplSetSalMenu( SalMenu *pMenu );
- SAL_DLLPRIVATE const XubString& ImplGetHelpText( USHORT nItemId ) const;
+ SAL_DLLPRIVATE const XubString& ImplGetHelpText( sal_uInt16 nItemId ) const;
// returns native check and option menu symbol height;
// return value is Max( rCheckHeight, rRadioHeight )
@@ -191,7 +191,7 @@ public:
SAL_DLLPRIVATE Menu* ImplGetStartedFrom() const;
Menu();
- Menu( BOOL bMenuBar );
+ Menu( sal_Bool bMenuBar );
SAL_DLLPRIVATE Window* ImplGetWindow() const { return pWindow; }
@@ -205,93 +205,93 @@ public:
virtual void Select();
virtual void RequestHelp( const HelpEvent& rHEvt );
- void InsertItem( USHORT nItemId, const XubString& rStr,
+ void InsertItem( sal_uInt16 nItemId, const XubString& rStr,
MenuItemBits nItemBits = 0,
- USHORT nPos = MENU_APPEND );
- void InsertItem( USHORT nItemId, const Image& rImage,
+ sal_uInt16 nPos = MENU_APPEND );
+ void InsertItem( sal_uInt16 nItemId, const Image& rImage,
MenuItemBits nItemBits = 0,
- USHORT nPos = MENU_APPEND );
- void InsertItem( USHORT nItemId,
+ sal_uInt16 nPos = MENU_APPEND );
+ void InsertItem( sal_uInt16 nItemId,
const XubString& rString, const Image& rImage,
MenuItemBits nItemBits = 0,
- USHORT nPos = MENU_APPEND );
- void InsertItem( const ResId& rResId, USHORT nPos = MENU_APPEND );
- void InsertSeparator( USHORT nPos = MENU_APPEND );
- void RemoveItem( USHORT nPos );
- void CopyItem( const Menu& rMenu, USHORT nPos,
- USHORT nNewPos = MENU_APPEND );
+ sal_uInt16 nPos = MENU_APPEND );
+ void InsertItem( const ResId& rResId, sal_uInt16 nPos = MENU_APPEND );
+ void InsertSeparator( sal_uInt16 nPos = MENU_APPEND );
+ void RemoveItem( sal_uInt16 nPos );
+ void CopyItem( const Menu& rMenu, sal_uInt16 nPos,
+ sal_uInt16 nNewPos = MENU_APPEND );
void Clear();
void CreateAutoMnemonics();
- void SetMenuFlags( USHORT nFlags ) { nMenuFlags = nFlags; }
- USHORT GetMenuFlags() const { return nMenuFlags; }
+ void SetMenuFlags( sal_uInt16 nFlags ) { nMenuFlags = nFlags; }
+ sal_uInt16 GetMenuFlags() const { return nMenuFlags; }
- USHORT GetItemCount() const;
- USHORT GetItemId( USHORT nPos ) const;
- USHORT GetItemPos( USHORT nItemId ) const;
- MenuItemType GetItemType( USHORT nPos ) const;
- USHORT GetCurItemId() const;
+ sal_uInt16 GetItemCount() const;
+ sal_uInt16 GetItemId( sal_uInt16 nPos ) const;
+ sal_uInt16 GetItemPos( sal_uInt16 nItemId ) const;
+ MenuItemType GetItemType( sal_uInt16 nPos ) const;
+ sal_uInt16 GetCurItemId() const;
- void SetDefaultItem( USHORT nItemId ) { nDefaultItem = nItemId; }
- USHORT GetDefaultItem() const { return nDefaultItem; }
+ void SetDefaultItem( sal_uInt16 nItemId ) { nDefaultItem = nItemId; }
+ sal_uInt16 GetDefaultItem() const { return nDefaultItem; }
- void SetItemBits( USHORT nItemId, MenuItemBits nBits );
- MenuItemBits GetItemBits( USHORT nItemId ) const;
+ void SetItemBits( sal_uInt16 nItemId, MenuItemBits nBits );
+ MenuItemBits GetItemBits( sal_uInt16 nItemId ) const;
- void SetUserValue( USHORT nItemId, ULONG nValue );
- ULONG GetUserValue( USHORT nItemId ) const;
+ void SetUserValue( sal_uInt16 nItemId, sal_uIntPtr nValue );
+ sal_uIntPtr GetUserValue( sal_uInt16 nItemId ) const;
- void SetPopupMenu( USHORT nItemId, PopupMenu* pMenu );
- PopupMenu* GetPopupMenu( USHORT nItemId ) const;
+ void SetPopupMenu( sal_uInt16 nItemId, PopupMenu* pMenu );
+ PopupMenu* GetPopupMenu( sal_uInt16 nItemId ) const;
- void SetAccelKey( USHORT nItemId, const KeyCode& rKeyCode );
- KeyCode GetAccelKey( USHORT nItemId ) const;
+ void SetAccelKey( sal_uInt16 nItemId, const KeyCode& rKeyCode );
+ KeyCode GetAccelKey( sal_uInt16 nItemId ) const;
- void CheckItem( USHORT nItemId, BOOL bCheck = TRUE );
- BOOL IsItemChecked( USHORT nItemId ) const;
+ void CheckItem( sal_uInt16 nItemId, sal_Bool bCheck = sal_True );
+ sal_Bool IsItemChecked( sal_uInt16 nItemId ) const;
- void SelectItem( USHORT nItemId );
+ void SelectItem( sal_uInt16 nItemId );
void DeSelect() { SelectItem( 0xFFFF ); } // MENUITEMPOS_INVALID
- void EnableItem( USHORT nItemId, BOOL bEnable = TRUE );
- BOOL IsItemEnabled( USHORT nItemId ) const;
+ void EnableItem( sal_uInt16 nItemId, sal_Bool bEnable = sal_True );
+ sal_Bool IsItemEnabled( sal_uInt16 nItemId ) const;
- void ShowItem( USHORT nItemId, BOOL bVisible = TRUE );
- void HideItem( USHORT nItemId ) { ShowItem( nItemId, FALSE ); }
+ void ShowItem( sal_uInt16 nItemId, sal_Bool bVisible = sal_True );
+ void HideItem( sal_uInt16 nItemId ) { ShowItem( nItemId, sal_False ); }
- BOOL IsItemVisible( USHORT nItemId ) const;
- BOOL IsItemPosVisible( USHORT nItemPos ) const;
- BOOL IsMenuVisible() const;
- BOOL IsMenuBar() const { return bIsMenuBar; }
+ sal_Bool IsItemVisible( sal_uInt16 nItemId ) const;
+ sal_Bool IsItemPosVisible( sal_uInt16 nItemPos ) const;
+ sal_Bool IsMenuVisible() const;
+ sal_Bool IsMenuBar() const { return bIsMenuBar; }
- void RemoveDisabledEntries( BOOL bCheckPopups = TRUE, BOOL bRemoveEmptyPopups = FALSE );
- BOOL HasValidEntries( BOOL bCheckPopups = TRUE );
+ void RemoveDisabledEntries( sal_Bool bCheckPopups = sal_True, sal_Bool bRemoveEmptyPopups = sal_False );
+ sal_Bool HasValidEntries( sal_Bool bCheckPopups = sal_True );
- void SetItemText( USHORT nItemId, const XubString& rStr );
- XubString GetItemText( USHORT nItemId ) const;
+ void SetItemText( sal_uInt16 nItemId, const XubString& rStr );
+ XubString GetItemText( sal_uInt16 nItemId ) const;
- void SetItemImage( USHORT nItemId, const Image& rImage );
- Image GetItemImage( USHORT nItemId ) const;
- void SetItemImageAngle( USHORT nItemId, long nAngle10 );
- long GetItemImageAngle( USHORT nItemId ) const;
- void SetItemImageMirrorMode( USHORT nItemId, BOOL bMirror );
- BOOL GetItemImageMirrorMode( USHORT ) const;
+ void SetItemImage( sal_uInt16 nItemId, const Image& rImage );
+ Image GetItemImage( sal_uInt16 nItemId ) const;
+ void SetItemImageAngle( sal_uInt16 nItemId, long nAngle10 );
+ long GetItemImageAngle( sal_uInt16 nItemId ) const;
+ void SetItemImageMirrorMode( sal_uInt16 nItemId, sal_Bool bMirror );
+ sal_Bool GetItemImageMirrorMode( sal_uInt16 ) const;
- void SetItemCommand( USHORT nItemId, const XubString& rCommand );
- const XubString& GetItemCommand( USHORT nItemId ) const;
+ void SetItemCommand( sal_uInt16 nItemId, const XubString& rCommand );
+ const XubString& GetItemCommand( sal_uInt16 nItemId ) const;
- void SetHelpText( USHORT nItemId, const XubString& rString );
- const XubString& GetHelpText( USHORT nItemId ) const;
+ void SetHelpText( sal_uInt16 nItemId, const XubString& rString );
+ const XubString& GetHelpText( sal_uInt16 nItemId ) const;
- void SetTipHelpText( USHORT nItemId, const XubString& rString );
- const XubString& GetTipHelpText( USHORT nItemId ) const;
+ void SetTipHelpText( sal_uInt16 nItemId, const XubString& rString );
+ const XubString& GetTipHelpText( sal_uInt16 nItemId ) const;
- void SetHelpCommand( USHORT nItemId, const XubString& rString );
- const XubString& GetHelpCommand( USHORT nItemId ) const;
+ void SetHelpCommand( sal_uInt16 nItemId, const XubString& rString );
+ const XubString& GetHelpCommand( sal_uInt16 nItemId ) const;
- void SetHelpId( USHORT nItemId, ULONG nHelpId );
- ULONG GetHelpId( USHORT nItemId ) const;
+ void SetHelpId( sal_uInt16 nItemId, sal_uIntPtr nHelpId );
+ sal_uIntPtr GetHelpId( sal_uInt16 nItemId ) const;
void SetActivateHdl( const Link& rLink ) { aActivateHdl = rLink; }
const Link& GetActivateHdl() const { return aActivateHdl; }
@@ -307,7 +307,7 @@ public:
void SetLogo( const MenuLogo& rLogo );
void SetLogo();
- BOOL HasLogo() const { return pLogo ? TRUE : FALSE; }
+ sal_Bool HasLogo() const { return pLogo ? sal_True : sal_False; }
MenuLogo GetLogo() const;
void AddEventListener( const Link& rEventListener );
@@ -322,7 +322,7 @@ public:
// returns the system's menu handle if native menues are supported
// pData must point to a SystemMenuData structure
- BOOL GetSystemMenuData( SystemMenuData* pData ) const;
+ sal_Bool GetSystemMenuData( SystemMenuData* pData ) const;
// accessibility helpers
@@ -331,41 +331,41 @@ public:
// returns the bounding box for the character at index nIndex
// where nIndex is relative to the starting index of the item
// with id nItemId (in coordinates of the displaying window)
- Rectangle GetCharacterBounds( USHORT nItemId, long nIndex ) const;
+ Rectangle GetCharacterBounds( sal_uInt16 nItemId, long nIndex ) const;
// -1 is returned if no character is at that point
// if an index is found the corresponding item id is filled in (else 0)
- long GetIndexForPoint( const Point& rPoint, USHORT& rItemID ) const;
+ long GetIndexForPoint( const Point& rPoint, sal_uInt16& rItemID ) const;
// returns the number of lines in the result of GetDisplayText()
long GetLineCount() const;
// returns the interval [start,end] of line nLine
// returns [-1,-1] for an invalid line
Pair GetLineStartEnd( long nLine ) const;
// like GetLineStartEnd but first finds the line number for the item
- Pair GetItemStartEnd( USHORT nItemId ) const;
+ Pair GetItemStartEnd( sal_uInt16 nItemId ) const;
// returns the item id for line nLine or 0 if nLine is invalid
- USHORT GetDisplayItemId( long nLine ) const;
+ sal_uInt16 GetDisplayItemId( long nLine ) const;
// returns the bounding rectangle for an item at pos nItemPos
- Rectangle GetBoundingRectangle( USHORT nItemPos ) const;
- BOOL ConvertPoint( Point& rPoint, Window* pReferenceWindow ) const;
+ Rectangle GetBoundingRectangle( sal_uInt16 nItemPos ) const;
+ sal_Bool ConvertPoint( Point& rPoint, Window* pReferenceWindow ) const;
::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > GetAccessible();
void SetAccessible( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rxAccessible );
// gets the activation key of the specified item
- KeyEvent GetActivationKey( USHORT nItemId ) const;
+ KeyEvent GetActivationKey( sal_uInt16 nItemId ) const;
Window* GetWindow() const { return pWindow; }
- void SetAccessibleName( USHORT nItemId, const XubString& rStr );
- XubString GetAccessibleName( USHORT nItemId ) const;
+ void SetAccessibleName( sal_uInt16 nItemId, const XubString& rStr );
+ XubString GetAccessibleName( sal_uInt16 nItemId ) const;
- void SetAccessibleDescription( USHORT nItemId, const XubString& rStr );
- XubString GetAccessibleDescription( USHORT nItemId ) const;
+ void SetAccessibleDescription( sal_uInt16 nItemId, const XubString& rStr );
+ XubString GetAccessibleDescription( sal_uInt16 nItemId ) const;
// returns whether the item a position nItemPos is highlighted or not.
- bool IsHighlighted( USHORT nItemPos ) const;
+ bool IsHighlighted( sal_uInt16 nItemPos ) const;
- void HighlightItem( USHORT nItemPos );
+ void HighlightItem( sal_uInt16 nItemPos );
void DeHighlight() { HighlightItem( 0xFFFF ); } // MENUITEMPOS_INVALID
@@ -381,10 +381,10 @@ class VCL_DLLPUBLIC MenuBar : public Menu
Link maCloserHdl;
Link maFloatHdl;
Link maHideHdl;
- BOOL mbCloserVisible;
- BOOL mbFloatBtnVisible;
- BOOL mbHideBtnVisible;
- BOOL mbDisplayable;
+ sal_Bool mbCloserVisible;
+ sal_Bool mbFloatBtnVisible;
+ sal_Bool mbHideBtnVisible;
+ sal_Bool mbDisplayable;
//#if 0 // _SOLAR__PRIVATE
friend class Application;
@@ -394,8 +394,8 @@ class VCL_DLLPUBLIC MenuBar : public Menu
friend class SystemWindow;
SAL_DLLPRIVATE static Window* ImplCreate( Window* pParent, Window* pWindow, MenuBar* pMenu );
- SAL_DLLPRIVATE static void ImplDestroy( MenuBar* pMenu, BOOL bDelete );
- SAL_DLLPRIVATE BOOL ImplHandleKeyEvent( const KeyEvent& rKEvent, BOOL bFromMenu = TRUE );
+ SAL_DLLPRIVATE static void ImplDestroy( MenuBar* pMenu, sal_Bool bDelete );
+ SAL_DLLPRIVATE sal_Bool ImplHandleKeyEvent( const KeyEvent& rKEvent, sal_Bool bFromMenu = sal_True );
//#endif
public:
@@ -406,20 +406,20 @@ public:
MenuBar& operator =( const MenuBar& rMenu );
- void ShowCloser( BOOL bShow = TRUE );
- BOOL HasCloser() const { return mbCloserVisible; }
- void ShowFloatButton( BOOL bShow = TRUE );
- BOOL HasFloatButton() const { return mbFloatBtnVisible; }
- void ShowHideButton( BOOL bShow = TRUE );
- BOOL HasHideButton() const { return mbHideBtnVisible; }
- void ShowButtons( BOOL bClose, BOOL bFloat, BOOL bHide );
-
- void SelectEntry( USHORT nId );
- BOOL HandleMenuActivateEvent( Menu *pMenu ) const;
- BOOL HandleMenuDeActivateEvent( Menu *pMenu ) const;
- BOOL HandleMenuHighlightEvent( Menu *pMenu, USHORT nEventId ) const;
- BOOL HandleMenuCommandEvent( Menu *pMenu, USHORT nEventId ) const;
- BOOL HandleMenuButtonEvent( Menu *pMenu, USHORT nEventId ) const;
+ void ShowCloser( sal_Bool bShow = sal_True );
+ sal_Bool HasCloser() const { return mbCloserVisible; }
+ void ShowFloatButton( sal_Bool bShow = sal_True );
+ sal_Bool HasFloatButton() const { return mbFloatBtnVisible; }
+ void ShowHideButton( sal_Bool bShow = sal_True );
+ sal_Bool HasHideButton() const { return mbHideBtnVisible; }
+ void ShowButtons( sal_Bool bClose, sal_Bool bFloat, sal_Bool bHide );
+
+ void SelectEntry( sal_uInt16 nId );
+ sal_Bool HandleMenuActivateEvent( Menu *pMenu ) const;
+ sal_Bool HandleMenuDeActivateEvent( Menu *pMenu ) const;
+ sal_Bool HandleMenuHighlightEvent( Menu *pMenu, sal_uInt16 nEventId ) const;
+ sal_Bool HandleMenuCommandEvent( Menu *pMenu, sal_uInt16 nEventId ) const;
+ sal_Bool HandleMenuButtonEvent( Menu *pMenu, sal_uInt16 nEventId ) const;
void SetCloserHdl( const Link& rLink ) { maCloserHdl = rLink; }
const Link& GetCloserHdl() const { return maCloserHdl; }
@@ -432,31 +432,31 @@ public:
// - if a menubar is not displayable, its MenuBarWindow will never be shown
// and it will be hidden if it was visible before
// - note: if a menubar is diplayable, this does not necessarily mean that it is currently visible
- void SetDisplayable( BOOL bDisplayable );
- BOOL IsDisplayable() const { return mbDisplayable; }
+ void SetDisplayable( sal_Bool bDisplayable );
+ sal_Bool IsDisplayable() const { return mbDisplayable; }
struct MenuBarButtonCallbackArg
{
- USHORT nId; // Id of the button
+ sal_uInt16 nId; // Id of the button
bool bHighlight; // highlight on/off
MenuBar* pMenuBar; // menubar the button belongs to
};
// add an arbitrary button to the menubar (will appear next to closer)
// passed link will be call with a MenuBarButtonCallbackArg on press
- USHORT AddMenuBarButton( const Image&, const Link&, USHORT nPos = 0 );
+ sal_uInt16 AddMenuBarButton( const Image&, const Link&, sal_uInt16 nPos = 0 );
// add an arbitrary button to the menubar (will appear next to closer)
// passed link will be call with a MenuBarButtonCallbackArg on press
// passed string will be set as tooltip
- USHORT AddMenuBarButton( const Image&, const Link&, const String&, USHORT nPos = 0 );
+ sal_uInt16 AddMenuBarButton( const Image&, const Link&, const String&, sal_uInt16 nPos = 0 );
// set the highlight link for additional button with ID nId
// highlight link will be called with a MenuBarButtonHighlightArg
// the bHighlight member of that struct shall contain the new state
- void SetMenuBarButtonHighlightHdl( USHORT nId, const Link& );
+ void SetMenuBarButtonHighlightHdl( sal_uInt16 nId, const Link& );
// returns the rectangle occupied by the additional button named nId
// coordinates are relative to the systemwindiow the menubar is attached to
// if the menubar is unattached an empty rectangle is returned
- Rectangle GetMenuBarButtonRectPixel( USHORT nId );
- void RemoveMenuBarButton( USHORT nId );
+ Rectangle GetMenuBarButtonRectPixel( sal_uInt16 nId );
+ void RemoveMenuBarButton( sal_uInt16 nId );
};
inline MenuBar& MenuBar::operator =( const MenuBar& rMenu )
@@ -483,9 +483,9 @@ private:
SAL_DLLPRIVATE MenuFloatingWindow* ImplGetFloatingWindow() const { return (MenuFloatingWindow*)Menu::ImplGetWindow(); }
protected:
- SAL_DLLPRIVATE USHORT ImplExecute( Window* pWindow, const Rectangle& rRect, ULONG nPopupFlags, Menu* pStaredFrom, BOOL bPreSelectFirst );
- SAL_DLLPRIVATE long ImplCalcHeight( USHORT nEntries ) const;
- SAL_DLLPRIVATE USHORT ImplCalcVisEntries( long nMaxHeight, USHORT nStartEntry = 0, USHORT* pLastVisible = NULL ) const;
+ SAL_DLLPRIVATE sal_uInt16 ImplExecute( Window* pWindow, const Rectangle& rRect, sal_uIntPtr nPopupFlags, Menu* pStaredFrom, sal_Bool bPreSelectFirst );
+ SAL_DLLPRIVATE long ImplCalcHeight( sal_uInt16 nEntries ) const;
+ SAL_DLLPRIVATE sal_uInt16 ImplCalcVisEntries( long nMaxHeight, sal_uInt16 nStartEntry = 0, sal_uInt16* pLastVisible = NULL ) const;
public:
PopupMenu();
@@ -496,15 +496,15 @@ public:
void SetText( const XubString& rTitle ) { aTitleText = rTitle; }
const XubString& GetText() const { return aTitleText; }
- USHORT Execute( Window* pWindow, const Point& rPopupPos );
- USHORT Execute( Window* pWindow, const Rectangle& rRect, USHORT nFlags = 0 );
+ sal_uInt16 Execute( Window* pWindow, const Point& rPopupPos );
+ sal_uInt16 Execute( Window* pWindow, const Rectangle& rRect, sal_uInt16 nFlags = 0 );
// Fuer das TestTool
- void EndExecute( USHORT nSelect = 0 );
- void SelectEntry( USHORT nId );
- void SetSelectedEntry( USHORT nId ); // for use by native submenu only
+ void EndExecute( sal_uInt16 nSelect = 0 );
+ void SelectEntry( sal_uInt16 nId );
+ void SetSelectedEntry( sal_uInt16 nId ); // for use by native submenu only
- static BOOL IsInExecute();
+ static sal_Bool IsInExecute();
static PopupMenu* GetActivePopupMenu();
PopupMenu& operator =( const PopupMenu& rMenu );
diff --git a/vcl/inc/vcl/menubtn.hxx b/vcl/inc/vcl/menubtn.hxx
index 1c7122054a4f..41f8b55bc057 100644
--- a/vcl/inc/vcl/menubtn.hxx
+++ b/vcl/inc/vcl/menubtn.hxx
@@ -39,7 +39,7 @@ class PopupMenu;
// - MenuButton-Types -
// --------------------
-#define MENUBUTTON_MENUMODE_TIMED ((USHORT)0x0001)
+#define MENUBUTTON_MENUMODE_TIMED ((sal_uInt16)0x0001)
// --------------
// - MenuButton -
@@ -52,8 +52,8 @@ private:
Timer* mpMenuTimer;
PopupMenu* mpOwnMenu;
PopupMenu* mpMenu;
- USHORT mnCurItemId;
- USHORT mnMenuMode;
+ sal_uInt16 mnCurItemId;
+ sal_uInt16 mnMenuMode;
Link maActivateHdl;
Link maSelectHdl;
@@ -81,13 +81,13 @@ public:
virtual void Activate();
virtual void Select();
- void SetMenuMode( USHORT nMode );
- USHORT GetMenuMode() const { return mnMenuMode; }
+ void SetMenuMode( sal_uInt16 nMode );
+ sal_uInt16 GetMenuMode() const { return mnMenuMode; }
void SetPopupMenu( PopupMenu* pNewMenu );
PopupMenu* GetPopupMenu() const { return mpMenu; }
- USHORT GetCurItemId() const { return mnCurItemId; }
+ sal_uInt16 GetCurItemId() const { return mnCurItemId; }
void SetActivateHdl( const Link& rLink ) { maActivateHdl = rLink; }
const Link& GetActivateHdl() const { return maActivateHdl; }
diff --git a/vcl/inc/vcl/metaact.hxx b/vcl/inc/vcl/metaact.hxx
index 38ceff6e0690..413f477b4e88 100644
--- a/vcl/inc/vcl/metaact.hxx
+++ b/vcl/inc/vcl/metaact.hxx
@@ -143,8 +143,8 @@ Meta##Name##Action::~Meta##Name##Action() {}
class VCL_DLLPUBLIC MetaAction
{
private:
- ULONG mnRefCount;
- UINT16 mnType;
+ sal_uIntPtr mnRefCount;
+ sal_uInt16 mnType;
virtual sal_Bool Compare( const MetaAction& ) const;
@@ -153,7 +153,7 @@ protected:
public:
MetaAction();
- MetaAction( USHORT nType );
+ MetaAction( sal_uInt16 nType );
virtual void Execute( OutputDevice* pOut );
@@ -167,8 +167,8 @@ public:
sal_Bool IsEqual( const MetaAction& ) const;
- USHORT GetType() const { return mnType; }
- ULONG GetRefCount() const { return mnRefCount; }
+ sal_uInt16 GetType() const { return mnType; }
+ sal_uIntPtr GetRefCount() const { return mnRefCount; }
void ResetRefCount() { mnRefCount = 1; }
void Duplicate() { mnRefCount++; }
void Delete() { if ( 0 == --mnRefCount ) delete this; }
@@ -491,8 +491,8 @@ private:
Point maPt;
XubString maStr;
- USHORT mnIndex;
- USHORT mnLen;
+ sal_uInt16 mnIndex;
+ sal_uInt16 mnLen;
virtual sal_Bool Compare( const MetaAction& ) const;
@@ -500,15 +500,15 @@ public:
DECL_META_ACTION( Text, META_TEXT_ACTION )
MetaTextAction( const Point& rPt, const XubString& rStr,
- USHORT nIndex, USHORT nLen );
+ sal_uInt16 nIndex, sal_uInt16 nLen );
virtual void Move( long nHorzMove, long nVertMove );
virtual void Scale( double fScaleX, double fScaleY );
const Point& GetPoint() const { return maPt; }
const XubString& GetText() const { return maStr; }
- USHORT GetIndex() const { return mnIndex; }
- USHORT GetLen() const { return mnLen; }
+ sal_uInt16 GetIndex() const { return mnIndex; }
+ sal_uInt16 GetLen() const { return mnLen; }
};
// -----------------------
@@ -522,8 +522,8 @@ private:
Point maStartPt;
XubString maStr;
sal_Int32* mpDXAry;
- USHORT mnIndex;
- USHORT mnLen;
+ sal_uInt16 mnIndex;
+ sal_uInt16 mnLen;
virtual sal_Bool Compare( const MetaAction& ) const;
@@ -536,8 +536,8 @@ public:
MetaTextArrayAction( const Point& rStartPt,
const XubString& rStr,
const sal_Int32* pDXAry,
- USHORT nIndex,
- USHORT nLen );
+ sal_uInt16 nIndex,
+ sal_uInt16 nLen );
virtual void Execute( OutputDevice* pOut );
@@ -551,8 +551,8 @@ public:
const Point& GetPoint() const { return maStartPt; }
const XubString& GetText() const { return maStr; }
- USHORT GetIndex() const { return mnIndex; }
- USHORT GetLen() const { return mnLen; }
+ sal_uInt16 GetIndex() const { return mnIndex; }
+ sal_uInt16 GetLen() const { return mnLen; }
sal_Int32* GetDXArray() const { return mpDXAry; }
};
@@ -567,8 +567,8 @@ private:
Point maPt;
XubString maStr;
sal_uInt32 mnWidth;
- USHORT mnIndex;
- USHORT mnLen;
+ sal_uInt16 mnIndex;
+ sal_uInt16 mnLen;
virtual sal_Bool Compare( const MetaAction& ) const;
@@ -577,7 +577,7 @@ public:
MetaStretchTextAction( const Point& rPt, sal_uInt32 nWidth,
const XubString& rStr,
- USHORT nIndex, USHORT nLen );
+ sal_uInt16 nIndex, sal_uInt16 nLen );
virtual void Move( long nHorzMove, long nVertMove );
virtual void Scale( double fScaleX, double fScaleY );
@@ -585,8 +585,8 @@ public:
const Point& GetPoint() const { return maPt; }
const XubString& GetText() const { return maStr; }
sal_uInt32 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; }
};
// ----------------------
@@ -599,7 +599,7 @@ private:
Rectangle maRect;
XubString maStr;
- USHORT mnStyle;
+ sal_uInt16 mnStyle;
virtual sal_Bool Compare( const MetaAction& ) const;
@@ -607,14 +607,14 @@ public:
DECL_META_ACTION( TextRect, META_TEXTRECT_ACTION )
MetaTextRectAction( const Rectangle& rRect,
- const XubString& rStr, USHORT nStyle );
+ const XubString& rStr, sal_uInt16 nStyle );
virtual void Move( long nHorzMove, long nVertMove );
virtual void Scale( double fScaleX, double fScaleY );
const Rectangle& GetRect() const { return maRect; }
const XubString& GetText() const { return maStr; }
- USHORT GetStyle() const { return mnStyle; }
+ sal_uInt16 GetStyle() const { return mnStyle; }
};
// ----------------------
@@ -1028,20 +1028,20 @@ class VCL_DLLPUBLIC MetaClipRegionAction : public MetaAction
private:
Region maRegion;
- BOOL mbClip;
+ sal_Bool mbClip;
virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( ClipRegion, META_CLIPREGION_ACTION )
- MetaClipRegionAction( const Region& rRegion, BOOL bClip );
+ MetaClipRegionAction( const Region& rRegion, sal_Bool bClip );
virtual void Move( long nHorzMove, long nVertMove );
virtual void Scale( double fScaleX, double fScaleY );
const Region& GetRegion() const { return maRegion; }
- BOOL IsClipping() const { return mbClip; }
+ sal_Bool IsClipping() const { return mbClip; }
};
// ---------------------------------
@@ -1123,17 +1123,17 @@ class VCL_DLLPUBLIC MetaLineColorAction : public MetaAction
private:
Color maColor;
- BOOL mbSet;
+ sal_Bool mbSet;
virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( LineColor, META_LINECOLOR_ACTION )
- MetaLineColorAction( const Color& rColor, BOOL bSet );
+ MetaLineColorAction( const Color& rColor, sal_Bool bSet );
const Color& GetColor() const { return maColor; }
- BOOL IsSetting() const { return mbSet; }
+ sal_Bool IsSetting() const { return mbSet; }
};
// -----------------------
@@ -1145,17 +1145,17 @@ class VCL_DLLPUBLIC MetaFillColorAction : public MetaAction
private:
Color maColor;
- BOOL mbSet;
+ sal_Bool mbSet;
virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( FillColor, META_FILLCOLOR_ACTION )
- MetaFillColorAction( const Color& rColor, BOOL bSet );
+ MetaFillColorAction( const Color& rColor, sal_Bool bSet );
const Color& GetColor() const { return maColor; }
- BOOL IsSetting() const { return mbSet; }
+ sal_Bool IsSetting() const { return mbSet; }
};
// -----------------------
@@ -1187,17 +1187,17 @@ class VCL_DLLPUBLIC MetaTextFillColorAction : public MetaAction
private:
Color maColor;
- BOOL mbSet;
+ sal_Bool mbSet;
virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( TextFillColor, META_TEXTFILLCOLOR_ACTION )
- MetaTextFillColorAction( const Color& rColor, BOOL bSet );
+ MetaTextFillColorAction( const Color& rColor, sal_Bool bSet );
const Color& GetColor() const { return maColor; }
- BOOL IsSetting() const { return mbSet; }
+ sal_Bool IsSetting() const { return mbSet; }
};
// ---------------------------
@@ -1209,17 +1209,17 @@ class VCL_DLLPUBLIC MetaTextLineColorAction : public MetaAction
private:
Color maColor;
- BOOL mbSet;
+ sal_Bool mbSet;
virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( TextLineColor, META_TEXTLINECOLOR_ACTION )
- MetaTextLineColorAction( const Color& rColor, BOOL bSet );
+ MetaTextLineColorAction( const Color& rColor, sal_Bool bSet );
const Color& GetColor() const { return maColor; }
- BOOL IsSetting() const { return mbSet; }
+ sal_Bool IsSetting() const { return mbSet; }
};
// ---------------------------
@@ -1231,17 +1231,17 @@ class VCL_DLLPUBLIC MetaOverlineColorAction : public MetaAction
private:
Color maColor;
- BOOL mbSet;
+ sal_Bool mbSet;
virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( OverlineColor, META_OVERLINECOLOR_ACTION )
- MetaOverlineColorAction( const Color& rColor, BOOL bSet );
+ MetaOverlineColorAction( const Color& rColor, sal_Bool bSet );
const Color& GetColor() const { return maColor; }
- BOOL IsSetting() const { return mbSet; }
+ sal_Bool IsSetting() const { return mbSet; }
};
// -----------------------
@@ -1316,16 +1316,16 @@ class VCL_DLLPUBLIC MetaPushAction : public MetaAction
{
private:
- USHORT mnFlags;
+ sal_uInt16 mnFlags;
virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( Push, META_PUSH_ACTION )
- MetaPushAction( USHORT nFlags );
+ MetaPushAction( sal_uInt16 nFlags );
- USHORT GetFlags() const { return mnFlags; }
+ sal_uInt16 GetFlags() const { return mnFlags; }
};
// -----------------
@@ -1368,20 +1368,20 @@ class VCL_DLLPUBLIC MetaTransparentAction : public MetaAction
private:
PolyPolygon maPolyPoly;
- USHORT mnTransPercent;
+ sal_uInt16 mnTransPercent;
virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( Transparent, META_TRANSPARENT_ACTION )
- MetaTransparentAction( const PolyPolygon& rPolyPoly, USHORT nTransPercent );
+ MetaTransparentAction( const PolyPolygon& rPolyPoly, sal_uInt16 nTransPercent );
virtual void Move( long nHorzMove, long nVertMove );
virtual void Scale( double fScaleX, double fScaleY );
const PolyPolygon& GetPolyPolygon() const { return maPolyPoly; }
- USHORT GetTransparence() const { return mnTransPercent; }
+ sal_uInt16 GetTransparence() const { return mnTransPercent; }
};
// ------------------------------
@@ -1453,17 +1453,17 @@ class VCL_DLLPUBLIC MetaRefPointAction : public MetaAction
private:
Point maRefPoint;
- BOOL mbSet;
+ sal_Bool mbSet;
virtual sal_Bool Compare( const MetaAction& ) const;
public:
DECL_META_ACTION( RefPoint, META_REFPOINT_ACTION )
- MetaRefPointAction( const Point& rRefPoint, BOOL bSet );
+ MetaRefPointAction( const Point& rRefPoint, sal_Bool bSet );
const Point& GetRefPoint() const { return maRefPoint; }
- BOOL IsSetting() const { return mbSet; }
+ sal_Bool IsSetting() const { return mbSet; }
};
// ---------------------
@@ -1477,9 +1477,9 @@ private:
ByteString maComment;
sal_Int32 mnValue;
sal_uInt32 mnDataSize;
- BYTE* mpData;
+ sal_uInt8* mpData;
- SAL_DLLPRIVATE void ImplInitDynamicData( const BYTE* pData, sal_uInt32 nDataSize );
+ SAL_DLLPRIVATE void ImplInitDynamicData( const sal_uInt8* pData, sal_uInt32 nDataSize );
virtual sal_Bool Compare( const MetaAction& ) const;
protected:
@@ -1488,8 +1488,8 @@ protected:
public:
MetaCommentAction( sal_Int32 nValue = 0L );
MetaCommentAction( const MetaCommentAction& rAct );
- MetaCommentAction( const ByteString& rComment, sal_Int32 nValue = 0L, const BYTE* pData = NULL, sal_uInt32 nDataSize = 0UL );
- MetaCommentAction( const BYTE* pData, sal_uInt32 nDataSize );
+ MetaCommentAction( const ByteString& rComment, sal_Int32 nValue = 0L, const sal_uInt8* pData = NULL, sal_uInt32 nDataSize = 0UL );
+ MetaCommentAction( const sal_uInt8* pData, sal_uInt32 nDataSize );
virtual void Move( long nHorzMove, long nVertMove );
virtual void Scale( double fScaleX, double fScaleY );
@@ -1502,7 +1502,7 @@ public:
const ByteString& GetComment() const { return maComment; }
sal_Int32 GetValue() const { return mnValue; }
sal_uInt32 GetDataSize() const { return mnDataSize; }
- const BYTE* GetData() const { return mpData; }
+ const sal_uInt8* GetData() const { return mpData; }
};
// ------------------------
diff --git a/vcl/inc/vcl/metric.hxx b/vcl/inc/vcl/metric.hxx
index eae6b38c5f9d..d444b1848b89 100644
--- a/vcl/inc/vcl/metric.hxx
+++ b/vcl/inc/vcl/metric.hxx
@@ -53,14 +53,14 @@ public:
~FontInfo();
FontType GetType() const;
- BOOL IsDeviceFont() const;
- BOOL SupportsLatin() const;
- BOOL SupportsCJK() const;
- BOOL SupportsCTL() const;
+ sal_Bool IsDeviceFont() const;
+ sal_Bool SupportsLatin() const;
+ sal_Bool SupportsCJK() const;
+ sal_Bool SupportsCTL() const;
FontInfo& operator=( const FontInfo& );
- BOOL operator==( const FontInfo& ) const;
- BOOL operator!=( const FontInfo& rInfo ) const
+ sal_Bool operator==( const FontInfo& ) const;
+ sal_Bool operator!=( const FontInfo& rInfo ) const
{ return !operator==( rInfo ); }
};
@@ -83,8 +83,8 @@ public:
long GetSlant() const;
FontMetric& operator=( const FontMetric& rMetric );
- BOOL operator==( const FontMetric& rMetric ) const;
- BOOL operator!=( const FontMetric& rMetric ) const
+ sal_Bool operator==( const FontMetric& rMetric ) const;
+ sal_Bool operator!=( const FontMetric& rMetric ) const
{ return !operator==( rMetric ); }
};
@@ -101,8 +101,8 @@ public:
FontCharMap();
~FontCharMap();
- BOOL IsDefaultMap() const;
- BOOL HasChar( sal_uInt32 ) const;
+ sal_Bool IsDefaultMap() const;
+ sal_Bool HasChar( sal_uInt32 ) const;
int CountCharsInRange( sal_uInt32 cMin, sal_uInt32 cMax ) const;
int GetCharCount() const;
@@ -135,21 +135,21 @@ class VCL_DLLPUBLIC TextRectInfo
private:
long mnMaxWidth;
- USHORT mnLineCount;
- BOOL mbEllipsis;
+ sal_uInt16 mnLineCount;
+ sal_Bool mbEllipsis;
public:
TextRectInfo();
- USHORT GetLineCount() const { return mnLineCount; }
+ sal_uInt16 GetLineCount() const { return mnLineCount; }
long GetMaxLineWidth() const { return mnMaxWidth; }
- BOOL IsEllipses() const { return mbEllipsis; }
+ sal_Bool IsEllipses() const { return mbEllipsis; }
- BOOL operator ==( const TextRectInfo& rInfo ) const
+ sal_Bool operator ==( const TextRectInfo& rInfo ) const
{ return ((mnMaxWidth == rInfo.mnMaxWidth) &&
(mnLineCount == rInfo.mnLineCount) &&
(mbEllipsis == rInfo.mbEllipsis)); }
- BOOL operator !=( const TextRectInfo& rInfo ) const
+ sal_Bool operator !=( const TextRectInfo& rInfo ) const
{ return !(TextRectInfo::operator==( rInfo )); }
};
@@ -157,7 +157,7 @@ inline TextRectInfo::TextRectInfo()
{
mnMaxWidth = 0;
mnLineCount = 0;
- mbEllipsis = FALSE;
+ mbEllipsis = sal_False;
}
#endif // _SV_METRIC_HXX
diff --git a/vcl/inc/vcl/mnemonic.hxx b/vcl/inc/vcl/mnemonic.hxx
index 804b261b79b4..2a09a5776d10 100644
--- a/vcl/inc/vcl/mnemonic.hxx
+++ b/vcl/inc/vcl/mnemonic.hxx
@@ -57,7 +57,7 @@
(MNEMONIC_RANGE_4_END-MNEMONIC_RANGE_4_START+1))
#define MNEMONIC_CHAR ((sal_Unicode)'~')
-#define MNEMONIC_INDEX_NOTFOUND ((USHORT)0xFFFF)
+#define MNEMONIC_INDEX_NOTFOUND ((sal_uInt16)0xFFFF)
// -------------------------
// - MnemonicGenerator -
@@ -67,18 +67,18 @@ class VCL_DLLPUBLIC MnemonicGenerator
{
private:
// 0 == Mnemonic; >0 == count of characters
- BYTE maMnemonics[MAX_MNEMONICS];
+ sal_uInt8 maMnemonics[MAX_MNEMONICS];
::com::sun::star::uno::Reference< ::com::sun::star::i18n::XCharacterClassification > mxCharClass;
protected:
- SAL_DLLPRIVATE USHORT ImplGetMnemonicIndex( sal_Unicode c );
+ SAL_DLLPRIVATE sal_uInt16 ImplGetMnemonicIndex( sal_Unicode c );
SAL_DLLPRIVATE sal_Unicode ImplFindMnemonic( const XubString& rKey );
public:
MnemonicGenerator();
void RegisterMnemonic( const XubString& rKey );
- BOOL CreateMnemonic( XubString& rKey );
+ sal_Bool CreateMnemonic( XubString& rKey );
::com::sun::star::uno::Reference< ::com::sun::star::i18n::XCharacterClassification > GetCharClass();
// returns a string where all '~'-characters and CJK mnemonics of the form (~A) are completely removed
diff --git a/vcl/inc/vcl/morebtn.hxx b/vcl/inc/vcl/morebtn.hxx
index 687ef7c40a01..90ce463042f9 100644
--- a/vcl/inc/vcl/morebtn.hxx
+++ b/vcl/inc/vcl/morebtn.hxx
@@ -43,9 +43,9 @@ class VCL_DLLPUBLIC MoreButton : public PushButton
{
private:
ImplMoreButtonData* mpMBData;
- ULONG mnDelta;
+ sal_uIntPtr mnDelta;
MapUnit meUnit;
- BOOL mbState;
+ sal_Bool mbState;
// Copy assignment is forbidden and not implemented.
SAL_DLLPRIVATE MoreButton( const MoreButton & );
@@ -67,15 +67,15 @@ public:
void AddWindow( Window* pWindow );
void RemoveWindow( Window* pWindow );
- void SetDelta( ULONG nNewDelta ) { mnDelta = nNewDelta; }
- ULONG GetDelta() const { return mnDelta; }
+ void SetDelta( sal_uIntPtr nNewDelta ) { mnDelta = nNewDelta; }
+ sal_uIntPtr GetDelta() const { return mnDelta; }
void SetMapUnit( MapUnit eNewUnit = MAP_PIXEL ) { meUnit = eNewUnit; }
MapUnit GetMapUnit() const { return meUnit; }
using PushButton::SetState;
- void SetState( BOOL bNewState = TRUE );
- BOOL GetState() const { return mbState; }
+ void SetState( sal_Bool bNewState = sal_True );
+ sal_Bool GetState() const { return mbState; }
void SetText( const XubString& rNewText );
XubString GetText() const;
@@ -86,7 +86,7 @@ public:
XubString GetLessText() const;
};
-inline void MoreButton::SetState( BOOL bNewState )
+inline void MoreButton::SetState( sal_Bool bNewState )
{
if ( mbState != bNewState )
Click();
diff --git a/vcl/inc/vcl/msgbox.hxx b/vcl/inc/vcl/msgbox.hxx
index a6cd60a9d5e3..5e0604464bea 100644
--- a/vcl/inc/vcl/msgbox.hxx
+++ b/vcl/inc/vcl/msgbox.hxx
@@ -44,8 +44,8 @@ class CheckBox;
// Return-Werte von Execute
//!!! bei Aenderungen \basic\source\runtime\methods.cxx msgbox anpassen
-#define RET_OK TRUE
-#define RET_CANCEL FALSE
+#define RET_OK sal_True
+#define RET_CANCEL sal_False
#define RET_YES 2
#define RET_NO 3
#define RET_RETRY 4
@@ -71,12 +71,12 @@ protected:
XubString maMessText;
Image maImage;
Image maImageHC;
- USHORT mnSoundType;
- BOOL mbHelpBtn;
- BOOL mbSound;
+ sal_uInt16 mnSoundType;
+ sal_Bool mbHelpBtn;
+ sal_Bool mbSound;
CheckBox* mpCheckBox;
XubString maCheckBoxText;
- BOOL mbCheck;
+ sal_Bool mbCheck;
SAL_DLLPRIVATE void ImplInitMessBoxData();
SAL_DLLPRIVATE void ImplInitButtons();
@@ -100,14 +100,14 @@ public:
void SetImage( const Image& rImage ) { maImage = rImage; }
const Image& GetImage() const { return maImage; }
- BOOL SetModeImage( const Image& rImage, BmpColorMode eMode = BMP_COLOR_NORMAL );
+ sal_Bool SetModeImage( const Image& rImage, BmpColorMode eMode = BMP_COLOR_NORMAL );
const Image& GetModeImage( BmpColorMode eMode = BMP_COLOR_NORMAL ) const;
void SetDefaultCheckBoxText();
void SetCheckBoxText( const XubString& rText ) { maCheckBoxText = rText;}
const XubString& GetCheckBoxText() const { return maCheckBoxText;}
- void SetCheckBoxState( BOOL bCheck );
- BOOL GetCheckBoxState() const;
+ void SetCheckBoxState( sal_Bool bCheck );
+ sal_Bool GetCheckBoxState() const;
virtual Size GetOptimalSize(WindowSizeType eType) const;
};
diff --git a/vcl/inc/vcl/octree.hxx b/vcl/inc/vcl/octree.hxx
index a7ce5e49c31d..43c46afac56a 100644
--- a/vcl/inc/vcl/octree.hxx
+++ b/vcl/inc/vcl/octree.hxx
@@ -44,15 +44,15 @@
typedef struct OctreeNode
{
- ULONG nCount;
- ULONG nRed;
- ULONG nGreen;
- ULONG nBlue;
+ sal_uIntPtr nCount;
+ sal_uIntPtr nRed;
+ sal_uIntPtr nGreen;
+ sal_uIntPtr nBlue;
OctreeNode* pChild[ 8 ];
OctreeNode* pNext;
OctreeNode* pNextInCache;
- USHORT nPalIndex;
- BOOL bLeaf;
+ sal_uInt16 nPalIndex;
+ sal_Bool bLeaf;
} NODE;
typedef NODE* PNODE;
@@ -70,15 +70,15 @@ class VCL_DLLPUBLIC Octree
private:
BitmapPalette aPal;
- ULONG nMax;
- ULONG nLeafCount;
- ULONG nLevel;
+ sal_uIntPtr nMax;
+ sal_uIntPtr nLeafCount;
+ sal_uIntPtr nLevel;
PNODE pTree;
PNODE pReduce[ OCTREE_BITS + 1 ];
BitmapColor* pColor;
ImpNodeCache* pNodeCache;
const BitmapReadAccess* pAcc;
- USHORT nPalIndex;
+ sal_uInt16 nPalIndex;
Octree() {};
@@ -92,21 +92,21 @@ private:
public:
- Octree( const BitmapReadAccess& rReadAcc, ULONG nColors );
- Octree( ULONG nColors );
+ Octree( const BitmapReadAccess& rReadAcc, sal_uIntPtr nColors );
+ Octree( sal_uIntPtr nColors );
~Octree();
void AddColor( const BitmapColor& rColor );
inline const BitmapPalette& GetPalette();
- inline USHORT GetBestPaletteIndex( const BitmapColor& rColor );
+ inline sal_uInt16 GetBestPaletteIndex( const BitmapColor& rColor );
};
// ------------------------------------------------------------------------
inline const BitmapPalette& Octree::GetPalette()
{
- aPal.SetEntryCount( (USHORT) nLeafCount );
+ aPal.SetEntryCount( (sal_uInt16) nLeafCount );
nPalIndex = 0;
CreatePalette( pTree );
return aPal;
@@ -114,7 +114,7 @@ inline const BitmapPalette& Octree::GetPalette()
// ------------------------------------------------------------------------
-inline USHORT Octree::GetBestPaletteIndex( const BitmapColor& rColor )
+inline sal_uInt16 Octree::GetBestPaletteIndex( const BitmapColor& rColor )
{
pColor = &(BitmapColor&) rColor;
nPalIndex = 65535;
@@ -131,13 +131,13 @@ class VCL_DLLPUBLIC InverseColorMap
{
private:
- BYTE* pBuffer;
- BYTE* pMap;
- const ULONG nBits;
+ sal_uInt8* pBuffer;
+ sal_uInt8* pMap;
+ const sal_uIntPtr nBits;
//#if 0 // _SOLAR__PRIVATE
- SAL_DLLPRIVATE void ImplCreateBuffers( const ULONG nMax );
+ SAL_DLLPRIVATE void ImplCreateBuffers( const sal_uIntPtr nMax );
//#endif // __PRIVATE
@@ -146,16 +146,16 @@ public:
InverseColorMap( const BitmapPalette& rPal );
~InverseColorMap();
- inline USHORT GetBestPaletteIndex( const BitmapColor& rColor );
+ inline sal_uInt16 GetBestPaletteIndex( const BitmapColor& rColor );
};
// ------------------------------------------------------------------------
-inline USHORT InverseColorMap::GetBestPaletteIndex( const BitmapColor& rColor )
+inline sal_uInt16 InverseColorMap::GetBestPaletteIndex( const BitmapColor& rColor )
{
- return pMap[ ( ( (ULONG) rColor.GetRed() >> nBits ) << OCTREE_BITS_1 ) |
- ( ( (ULONG) rColor.GetGreen() >> nBits ) << OCTREE_BITS ) |
- ( (ULONG) rColor.GetBlue() >> nBits ) ];
+ return pMap[ ( ( (sal_uIntPtr) rColor.GetRed() >> nBits ) << OCTREE_BITS_1 ) |
+ ( ( (sal_uIntPtr) rColor.GetGreen() >> nBits ) << OCTREE_BITS ) |
+ ( (sal_uIntPtr) rColor.GetBlue() >> nBits ) ];
}
#endif // _SV_OCTREE_HXX
diff --git a/vcl/inc/vcl/outdev.h b/vcl/inc/vcl/outdev.h
index 43a1e9cf2cea..6ca85bff768a 100644
--- a/vcl/inc/vcl/outdev.h
+++ b/vcl/inc/vcl/outdev.h
@@ -47,14 +47,14 @@ class GetDevSizeList;
// -----------------------
// flags for mnMatchType member
-#define IMPL_DEVFONT_SCALABLE ((ULONG)0x00000001)
-#define IMPL_DEVFONT_SYMBOL ((ULONG)0x00000002)
-#define IMPL_DEVFONT_NONESYMBOL ((ULONG)0x00000004)
-#define IMPL_DEVFONT_LIGHT ((ULONG)0x00000010)
-#define IMPL_DEVFONT_BOLD ((ULONG)0x00000020)
-#define IMPL_DEVFONT_NORMAL ((ULONG)0x00000040)
-#define IMPL_DEVFONT_NONEITALIC ((ULONG)0x00000100)
-#define IMPL_DEVFONT_ITALIC ((ULONG)0x00000200)
+#define IMPL_DEVFONT_SCALABLE ((sal_uIntPtr)0x00000001)
+#define IMPL_DEVFONT_SYMBOL ((sal_uIntPtr)0x00000002)
+#define IMPL_DEVFONT_NONESYMBOL ((sal_uIntPtr)0x00000004)
+#define IMPL_DEVFONT_LIGHT ((sal_uIntPtr)0x00000010)
+#define IMPL_DEVFONT_BOLD ((sal_uIntPtr)0x00000020)
+#define IMPL_DEVFONT_NORMAL ((sal_uIntPtr)0x00000040)
+#define IMPL_DEVFONT_NONEITALIC ((sal_uIntPtr)0x00000100)
+#define IMPL_DEVFONT_ITALIC ((sal_uIntPtr)0x00000200)
// TODO: rename ImplDevFontListData to PhysicalFontFamily
class ImplDevFontListData
@@ -85,8 +85,8 @@ friend class ImplDevFontList; // TODO: remove soon
String maName; // Fontname (original font family name)
String maSearchName; // normalized font family name
String maMapNames; // fontname aliases
- ULONG mnTypeFaces; // Typeface Flags
- ULONG mnMatchType; // MATCH - Type
+ sal_uIntPtr mnTypeFaces; // Typeface Flags
+ sal_uIntPtr mnMatchType; // MATCH - Type
String maMatchFamilyName; // MATCH - FamilyName
FontWeight meMatchWeight; // MATCH - Weight
FontWidth meMatchWidth; // MATCH - Width
@@ -161,9 +161,9 @@ struct ImplFontSubstEntry
String maReplaceName;
String maSearchName;
String maSearchReplaceName;
- USHORT mnFlags;
+ sal_uInt16 mnFlags;
- ImplFontSubstEntry( const String& rFontName, const String& rSubstFontName, USHORT nSubstFlags );
+ ImplFontSubstEntry( const String& rFontName, const String& rSubstFontName, sal_uInt16 nSubstFlags );
};
class ImplDirectFontSubstitution
@@ -173,14 +173,14 @@ private:
typedef std::list<ImplFontSubstEntry> FontSubstList;
FontSubstList maFontSubstList;
public:
- void AddFontSubstitute( const String& rFontName, const String& rSubstName, USHORT nFlags );
+ void AddFontSubstitute( const String& rFontName, const String& rSubstName, sal_uInt16 nFlags );
void RemoveFontSubstitute( int nIndex );
- bool GetFontSubstitute( int nIndex, String& rFontName, String& rSubstName, USHORT& rFlags ) const;
+ bool GetFontSubstitute( int nIndex, String& rFontName, String& rSubstName, sal_uInt16& rFlags ) const;
int GetFontSubstituteCount() const { return maFontSubstList.size(); };
bool Empty() const { return maFontSubstList.empty(); }
void Clear() { maFontSubstList.clear(); }
- bool FindFontSubstitute( String& rSubstName, const String& rFontName, USHORT nFlags ) const;
+ bool FindFontSubstitute( String& rSubstName, const String& rFontName, sal_uInt16 nFlags ) const;
};
// PreMatchFontSubstitution
diff --git a/vcl/inc/vcl/outdev.hxx b/vcl/inc/vcl/outdev.hxx
index 9b748f2b5937..5358e31e60f5 100644
--- a/vcl/inc/vcl/outdev.hxx
+++ b/vcl/inc/vcl/outdev.hxx
@@ -151,54 +151,54 @@ struct KerningPair
// ----------------------
// Flags for Push()
-#define PUSH_LINECOLOR ((USHORT)0x0001)
-#define PUSH_FILLCOLOR ((USHORT)0x0002)
-#define PUSH_FONT ((USHORT)0x0004)
-#define PUSH_TEXTCOLOR ((USHORT)0x0008)
-#define PUSH_MAPMODE ((USHORT)0x0010)
-#define PUSH_CLIPREGION ((USHORT)0x0020)
-#define PUSH_RASTEROP ((USHORT)0x0040)
-#define PUSH_TEXTFILLCOLOR ((USHORT)0x0080)
-#define PUSH_TEXTALIGN ((USHORT)0x0100)
-#define PUSH_REFPOINT ((USHORT)0x0200)
-#define PUSH_TEXTLINECOLOR ((USHORT)0x0400)
-#define PUSH_TEXTLAYOUTMODE ((USHORT)0x0800)
-#define PUSH_TEXTLANGUAGE ((USHORT)0x1000)
-#define PUSH_OVERLINECOLOR ((USHORT)0x2000)
+#define PUSH_LINECOLOR ((sal_uInt16)0x0001)
+#define PUSH_FILLCOLOR ((sal_uInt16)0x0002)
+#define PUSH_FONT ((sal_uInt16)0x0004)
+#define PUSH_TEXTCOLOR ((sal_uInt16)0x0008)
+#define PUSH_MAPMODE ((sal_uInt16)0x0010)
+#define PUSH_CLIPREGION ((sal_uInt16)0x0020)
+#define PUSH_RASTEROP ((sal_uInt16)0x0040)
+#define PUSH_TEXTFILLCOLOR ((sal_uInt16)0x0080)
+#define PUSH_TEXTALIGN ((sal_uInt16)0x0100)
+#define PUSH_REFPOINT ((sal_uInt16)0x0200)
+#define PUSH_TEXTLINECOLOR ((sal_uInt16)0x0400)
+#define PUSH_TEXTLAYOUTMODE ((sal_uInt16)0x0800)
+#define PUSH_TEXTLANGUAGE ((sal_uInt16)0x1000)
+#define PUSH_OVERLINECOLOR ((sal_uInt16)0x2000)
#define PUSH_ALLTEXT (PUSH_TEXTCOLOR | PUSH_TEXTFILLCOLOR | PUSH_TEXTLINECOLOR | PUSH_OVERLINECOLOR | PUSH_TEXTALIGN | PUSH_TEXTLAYOUTMODE | PUSH_TEXTLANGUAGE)
#define PUSH_ALLFONT (PUSH_ALLTEXT | PUSH_FONT)
-#define PUSH_ALL ((USHORT)0xFFFF)
+#define PUSH_ALL ((sal_uInt16)0xFFFF)
// Flags for DrawText()
-#define TEXT_DRAW_DISABLE ((USHORT)0x0001)
-#define TEXT_DRAW_MNEMONIC ((USHORT)0x0002)
-#define TEXT_DRAW_MONO ((USHORT)0x0004)
-#define TEXT_DRAW_CLIP ((USHORT)0x0008)
-#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_MULTILINE ((USHORT)0x1000)
-#define TEXT_DRAW_WORDBREAK ((USHORT)0x2000)
-#define TEXT_DRAW_NEWSELLIPSIS ((USHORT)0x4000)
-
-#define TEXT_DRAW_WORDBREAK_HYPHENATION (((USHORT)0x8000) | TEXT_DRAW_WORDBREAK)
+#define TEXT_DRAW_DISABLE ((sal_uInt16)0x0001)
+#define TEXT_DRAW_MNEMONIC ((sal_uInt16)0x0002)
+#define TEXT_DRAW_MONO ((sal_uInt16)0x0004)
+#define TEXT_DRAW_CLIP ((sal_uInt16)0x0008)
+#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_MULTILINE ((sal_uInt16)0x1000)
+#define TEXT_DRAW_WORDBREAK ((sal_uInt16)0x2000)
+#define TEXT_DRAW_NEWSELLIPSIS ((sal_uInt16)0x4000)
+
+#define TEXT_DRAW_WORDBREAK_HYPHENATION (((sal_uInt16)0x8000) | TEXT_DRAW_WORDBREAK)
// Flags for CopyArea()
-#define COPYAREA_WINDOWINVALIDATE ((USHORT)0x0001)
+#define COPYAREA_WINDOWINVALIDATE ((sal_uInt16)0x0001)
// Flags for DrawImage()
-#define IMAGE_DRAW_DISABLE ((USHORT)0x0001)
-#define IMAGE_DRAW_HIGHLIGHT ((USHORT)0x0002)
-#define IMAGE_DRAW_DEACTIVE ((USHORT)0x0004)
-#define IMAGE_DRAW_COLORTRANSFORM ((USHORT)0x0008)
-#define IMAGE_DRAW_SEMITRANSPARENT ((USHORT)0x0010)
-#define IMAGE_DRAW_MONOCHROME_BLACK ((USHORT)0x0020)
-#define IMAGE_DRAW_MONOCHROME_WHITE ((USHORT)0x0040)
+#define IMAGE_DRAW_DISABLE ((sal_uInt16)0x0001)
+#define IMAGE_DRAW_HIGHLIGHT ((sal_uInt16)0x0002)
+#define IMAGE_DRAW_DEACTIVE ((sal_uInt16)0x0004)
+#define IMAGE_DRAW_COLORTRANSFORM ((sal_uInt16)0x0008)
+#define IMAGE_DRAW_SEMITRANSPARENT ((sal_uInt16)0x0010)
+#define IMAGE_DRAW_MONOCHROME_BLACK ((sal_uInt16)0x0020)
+#define IMAGE_DRAW_MONOCHROME_WHITE ((sal_uInt16)0x0040)
#define IMAGE_DRAW_3DLOOK 0
#define IMAGE_DRAW_BTNLOOK 0
@@ -208,63 +208,63 @@ struct KerningPair
#define WAVE_NORMAL 3
// Grid
-#define GRID_DOTS ((ULONG)0x00000001)
-#define GRID_HORZLINES ((ULONG)0x00000002)
-#define GRID_VERTLINES ((ULONG)0x00000004)
+#define GRID_DOTS ((sal_uIntPtr)0x00000001)
+#define GRID_HORZLINES ((sal_uIntPtr)0x00000002)
+#define GRID_VERTLINES ((sal_uIntPtr)0x00000004)
#define GRID_LINES (GRID_HORZLINES | GRID_VERTLINES)
// LayoutModes for Complex Text Layout
-#define TEXT_LAYOUT_DEFAULT ((ULONG)0x00000000)
-#define TEXT_LAYOUT_BIDI_LTR ((ULONG)0x00000000)
-#define TEXT_LAYOUT_BIDI_RTL ((ULONG)0x00000001)
-#define TEXT_LAYOUT_BIDI_STRONG ((ULONG)0x00000002)
-#define TEXT_LAYOUT_TEXTORIGIN_LEFT ((ULONG)0x00000004)
-#define TEXT_LAYOUT_TEXTORIGIN_RIGHT ((ULONG)0x00000008)
-#define TEXT_LAYOUT_COMPLEX_DISABLED ((ULONG)0x00000100)
-#define TEXT_LAYOUT_ENABLE_LIGATURES ((ULONG)0x00000200)
-#define TEXT_LAYOUT_SUBSTITUTE_DIGITS ((ULONG)0x00000400)
+#define TEXT_LAYOUT_DEFAULT ((sal_uIntPtr)0x00000000)
+#define TEXT_LAYOUT_BIDI_LTR ((sal_uIntPtr)0x00000000)
+#define TEXT_LAYOUT_BIDI_RTL ((sal_uIntPtr)0x00000001)
+#define TEXT_LAYOUT_BIDI_STRONG ((sal_uIntPtr)0x00000002)
+#define TEXT_LAYOUT_TEXTORIGIN_LEFT ((sal_uIntPtr)0x00000004)
+#define TEXT_LAYOUT_TEXTORIGIN_RIGHT ((sal_uIntPtr)0x00000008)
+#define TEXT_LAYOUT_COMPLEX_DISABLED ((sal_uIntPtr)0x00000100)
+#define TEXT_LAYOUT_ENABLE_LIGATURES ((sal_uIntPtr)0x00000200)
+#define TEXT_LAYOUT_SUBSTITUTE_DIGITS ((sal_uIntPtr)0x00000400)
// DrawModes
-#define DRAWMODE_DEFAULT ((ULONG)0x00000000)
-#define DRAWMODE_BLACKLINE ((ULONG)0x00000001)
-#define DRAWMODE_BLACKFILL ((ULONG)0x00000002)
-#define DRAWMODE_BLACKTEXT ((ULONG)0x00000004)
-#define DRAWMODE_BLACKBITMAP ((ULONG)0x00000008)
-#define DRAWMODE_BLACKGRADIENT ((ULONG)0x00000010)
-#define DRAWMODE_GRAYLINE ((ULONG)0x00000020)
-#define DRAWMODE_GRAYFILL ((ULONG)0x00000040)
-#define DRAWMODE_GRAYTEXT ((ULONG)0x00000080)
-#define DRAWMODE_GRAYBITMAP ((ULONG)0x00000100)
-#define DRAWMODE_GRAYGRADIENT ((ULONG)0x00000200)
-#define DRAWMODE_NOFILL ((ULONG)0x00000400)
-#define DRAWMODE_NOBITMAP ((ULONG)0x00000800)
-#define DRAWMODE_NOGRADIENT ((ULONG)0x00001000)
-#define DRAWMODE_GHOSTEDLINE ((ULONG)0x00002000)
-#define DRAWMODE_GHOSTEDFILL ((ULONG)0x00004000)
-#define DRAWMODE_GHOSTEDTEXT ((ULONG)0x00008000)
-#define DRAWMODE_GHOSTEDBITMAP ((ULONG)0x00010000)
-#define DRAWMODE_GHOSTEDGRADIENT ((ULONG)0x00020000)
-#define DRAWMODE_WHITELINE ((ULONG)0x00100000)
-#define DRAWMODE_WHITEFILL ((ULONG)0x00200000)
-#define DRAWMODE_WHITETEXT ((ULONG)0x00400000)
-#define DRAWMODE_WHITEBITMAP ((ULONG)0x00800000)
-#define DRAWMODE_WHITEGRADIENT ((ULONG)0x01000000)
-#define DRAWMODE_SETTINGSLINE ((ULONG)0x02000000)
-#define DRAWMODE_SETTINGSFILL ((ULONG)0x04000000)
-#define DRAWMODE_SETTINGSTEXT ((ULONG)0x08000000)
-#define DRAWMODE_SETTINGSGRADIENT ((ULONG)0x10000000)
-#define DRAWMODE_NOTRANSPARENCY ((ULONG)0x80000000)
+#define DRAWMODE_DEFAULT ((sal_uIntPtr)0x00000000)
+#define DRAWMODE_BLACKLINE ((sal_uIntPtr)0x00000001)
+#define DRAWMODE_BLACKFILL ((sal_uIntPtr)0x00000002)
+#define DRAWMODE_BLACKTEXT ((sal_uIntPtr)0x00000004)
+#define DRAWMODE_BLACKBITMAP ((sal_uIntPtr)0x00000008)
+#define DRAWMODE_BLACKGRADIENT ((sal_uIntPtr)0x00000010)
+#define DRAWMODE_GRAYLINE ((sal_uIntPtr)0x00000020)
+#define DRAWMODE_GRAYFILL ((sal_uIntPtr)0x00000040)
+#define DRAWMODE_GRAYTEXT ((sal_uIntPtr)0x00000080)
+#define DRAWMODE_GRAYBITMAP ((sal_uIntPtr)0x00000100)
+#define DRAWMODE_GRAYGRADIENT ((sal_uIntPtr)0x00000200)
+#define DRAWMODE_NOFILL ((sal_uIntPtr)0x00000400)
+#define DRAWMODE_NOBITMAP ((sal_uIntPtr)0x00000800)
+#define DRAWMODE_NOGRADIENT ((sal_uIntPtr)0x00001000)
+#define DRAWMODE_GHOSTEDLINE ((sal_uIntPtr)0x00002000)
+#define DRAWMODE_GHOSTEDFILL ((sal_uIntPtr)0x00004000)
+#define DRAWMODE_GHOSTEDTEXT ((sal_uIntPtr)0x00008000)
+#define DRAWMODE_GHOSTEDBITMAP ((sal_uIntPtr)0x00010000)
+#define DRAWMODE_GHOSTEDGRADIENT ((sal_uIntPtr)0x00020000)
+#define DRAWMODE_WHITELINE ((sal_uIntPtr)0x00100000)
+#define DRAWMODE_WHITEFILL ((sal_uIntPtr)0x00200000)
+#define DRAWMODE_WHITETEXT ((sal_uIntPtr)0x00400000)
+#define DRAWMODE_WHITEBITMAP ((sal_uIntPtr)0x00800000)
+#define DRAWMODE_WHITEGRADIENT ((sal_uIntPtr)0x01000000)
+#define DRAWMODE_SETTINGSLINE ((sal_uIntPtr)0x02000000)
+#define DRAWMODE_SETTINGSFILL ((sal_uIntPtr)0x04000000)
+#define DRAWMODE_SETTINGSTEXT ((sal_uIntPtr)0x08000000)
+#define DRAWMODE_SETTINGSGRADIENT ((sal_uIntPtr)0x10000000)
+#define DRAWMODE_NOTRANSPARENCY ((sal_uIntPtr)0x80000000)
// Antialiasing
-#define ANTIALIASING_DISABLE_TEXT ((USHORT)0x0001)
-#define ANTIALIASING_ENABLE_B2DDRAW ((USHORT)0x0002)
-#define ANTIALIASING_PIXELSNAPHAIRLINE ((USHORT)0x0004)
+#define ANTIALIASING_DISABLE_TEXT ((sal_uInt16)0x0001)
+#define ANTIALIASING_ENABLE_B2DDRAW ((sal_uInt16)0x0002)
+#define ANTIALIASING_PIXELSNAPHAIRLINE ((sal_uInt16)0x0004)
// AddFontSubstitute
-#define FONT_SUBSTITUTE_ALWAYS ((USHORT)0x0001)
-#define FONT_SUBSTITUTE_SCREENONLY ((USHORT)0x0002)
+#define FONT_SUBSTITUTE_ALWAYS ((sal_uInt16)0x0001)
+#define FONT_SUBSTITUTE_SCREENONLY ((sal_uInt16)0x0002)
-#define DEFAULTFONT_FLAGS_ONLYONE ((ULONG)0x00000001)
+#define DEFAULTFONT_FLAGS_ONLYONE ((sal_uIntPtr)0x00000001)
enum OutDevType { OUTDEV_DONTKNOW, OUTDEV_WINDOW, OUTDEV_PRINTER, OUTDEV_VIRDEV };
@@ -335,8 +335,8 @@ private:
mutable long mnTextOffY;
mutable long mnEmphasisAscent;
mutable long mnEmphasisDescent;
- ULONG mnDrawMode;
- ULONG mnTextLayoutMode;
+ sal_uIntPtr mnDrawMode;
+ sal_uIntPtr mnTextLayoutMode;
ImplMapRes maMapRes;
ImplThresholdRes maThresRes;
OutDevType meOutDevType;
@@ -354,9 +354,9 @@ private:
AllSettings maSettings;
MapMode maMapMode;
Point maRefPoint;
- USHORT mnAntialiasing;
+ sal_uInt16 mnAntialiasing;
LanguageType meTextLanguage;
- mutable BOOL mbMap:1,
+ mutable sal_Bool mbMap:1,
mbMapIsDefault:1,
mbClipRegion:1,
mbBackground:1,
@@ -382,8 +382,8 @@ public:
SAL_DLLPRIVATE sal_Int32 ImplGetDPIX() const { return mnDPIX; }
SAL_DLLPRIVATE sal_Int32 ImplGetDPIY() const { return mnDPIY; }
SAL_DLLPRIVATE int ImplGetGraphics() const;
- SAL_DLLPRIVATE void ImplReleaseGraphics( BOOL bRelease = TRUE );
- SAL_DLLPRIVATE BOOL ImplHasMirroredGraphics();
+ SAL_DLLPRIVATE void ImplReleaseGraphics( sal_Bool bRelease = sal_True );
+ SAL_DLLPRIVATE sal_Bool ImplHasMirroredGraphics();
SAL_DLLPRIVATE void ImplReMirror( Point &rPoint ) const;
SAL_DLLPRIVATE void ImplReMirror( Rectangle &rRect ) const;
SAL_DLLPRIVATE void ImplReMirror( Region &rRegion ) const;
@@ -412,15 +412,15 @@ public:
SAL_DLLPRIVATE long ImplGetTextWidth( const SalLayout& ) const;
static
SAL_DLLPRIVATE XubString ImplGetEllipsisString( const OutputDevice& rTargetDevice, const XubString& rStr,
- long nMaxWidth, USHORT nStyle, const ::vcl::ITextLayout& _rLayout );
+ long nMaxWidth, sal_uInt16 nStyle, const ::vcl::ITextLayout& _rLayout );
static
SAL_DLLPRIVATE void ImplDrawText( OutputDevice& rTargetDevice, const Rectangle& rRect,
- const String& rOrigStr, USHORT nStyle,
+ const String& rOrigStr, sal_uInt16 nStyle,
MetricVector* pVector, String* pDisplayText, ::vcl::ITextLayout& _rLayout );
SAL_DLLPRIVATE void ImplDrawTextBackground( const SalLayout& );
- SAL_DLLPRIVATE void ImplDrawTextLines( SalLayout&, FontStrikeout eStrikeout, FontUnderline eUnderline, FontUnderline eOverline, BOOL bWordLine, BOOL bUnderlineAbove );
+ SAL_DLLPRIVATE void ImplDrawTextLines( SalLayout&, FontStrikeout eStrikeout, FontUnderline eUnderline, FontUnderline eOverline, sal_Bool bWordLine, sal_Bool bUnderlineAbove );
SAL_DLLPRIVATE bool ImplDrawRotateText( SalLayout& );
- SAL_DLLPRIVATE void ImplDrawTextDirect( SalLayout&, BOOL bTextLines );
+ SAL_DLLPRIVATE void ImplDrawTextDirect( SalLayout&, sal_Bool bTextLines );
SAL_DLLPRIVATE void ImplDrawSpecialText( SalLayout& );
SAL_DLLPRIVATE void ImplDrawText( SalLayout& );
SAL_DLLPRIVATE Rectangle ImplGetTextBoundRect( const SalLayout& );
@@ -431,16 +431,16 @@ public:
SAL_DLLPRIVATE void ImplInitTextLineSize();
SAL_DLLPRIVATE void ImplInitAboveTextLineSize();
SAL_DLLPRIVATE void ImplDrawWaveLine( long nBaseX, long nBaseY, long nStartX, long nStartY, long nWidth, long nHeight, long nLineWidth, short nOrientation, const Color& rColor );
- SAL_DLLPRIVATE void ImplDrawWaveTextLine( long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontUnderline eTextLine, Color aColor, BOOL bIsAbove );
- SAL_DLLPRIVATE void ImplDrawStraightTextLine( long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontUnderline eTextLine, Color aColor, BOOL bIsAbove );
+ SAL_DLLPRIVATE void ImplDrawWaveTextLine( long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontUnderline eTextLine, Color aColor, sal_Bool bIsAbove );
+ SAL_DLLPRIVATE void ImplDrawStraightTextLine( long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontUnderline eTextLine, Color aColor, sal_Bool bIsAbove );
SAL_DLLPRIVATE void ImplDrawStrikeoutLine( long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontStrikeout eStrikeout, Color aColor );
SAL_DLLPRIVATE void ImplDrawStrikeoutChar( long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontStrikeout eStrikeout, Color aColor );
- SAL_DLLPRIVATE void ImplDrawTextLine( long nBaseX, long nX, long nY, long nWidth, FontStrikeout eStrikeout, FontUnderline eUnderline, FontUnderline eOverline, BOOL bUnderlineAbove );
+ SAL_DLLPRIVATE void ImplDrawTextLine( long nBaseX, long nX, long nY, long nWidth, FontStrikeout eStrikeout, FontUnderline eUnderline, FontUnderline eOverline, sal_Bool bUnderlineAbove );
SAL_DLLPRIVATE void ImplDrawMnemonicLine( long nX, long nY, long nWidth );
- SAL_DLLPRIVATE void ImplGetEmphasisMark( PolyPolygon& rPolyPoly, BOOL& rPolyLine, Rectangle& rRect1, Rectangle& rRect2, long& rYOff, long& rWidth, FontEmphasisMark eEmphasis, long nHeight, short nOrient );
- SAL_DLLPRIVATE void ImplDrawEmphasisMark( long nBaseX, long nX, long nY, const PolyPolygon& rPolyPoly, BOOL bPolyLine, const Rectangle& rRect1, const Rectangle& rRect2 );
+ SAL_DLLPRIVATE void ImplGetEmphasisMark( PolyPolygon& rPolyPoly, sal_Bool& rPolyLine, Rectangle& rRect1, Rectangle& rRect2, long& rYOff, long& rWidth, FontEmphasisMark eEmphasis, long nHeight, short nOrient );
+ SAL_DLLPRIVATE void ImplDrawEmphasisMark( long nBaseX, long nX, long nY, const PolyPolygon& rPolyPoly, sal_Bool bPolyLine, const Rectangle& rRect1, const Rectangle& rRect2 );
static
- SAL_DLLPRIVATE long ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo, long nWidth, const XubString& rStr, USHORT nStyle, const ::vcl::ITextLayout& _rLayout );
+ SAL_DLLPRIVATE long ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo, long nWidth, const XubString& rStr, sal_uInt16 nStyle, const ::vcl::ITextLayout& _rLayout );
SAL_DLLPRIVATE void ImplInitFontList() const;
SAL_DLLPRIVATE void ImplUpdateFontData( bool bNewFontLists );
SAL_DLLPRIVATE static void ImplUpdateAllFontData( bool bNewFontLists );
@@ -470,13 +470,13 @@ public:
SAL_DLLPRIVATE void ImplDrawPolygon( const Polygon& rPoly, const PolyPolygon* pClipPolyPoly = NULL );
SAL_DLLPRIVATE void ImplDrawPolyPolygon( const PolyPolygon& rPolyPoly, const PolyPolygon* pClipPolyPoly = NULL );
- SAL_DLLPRIVATE void ImplDrawPolyPolygon( USHORT nPoly, const PolyPolygon& rPolyPoly );
- SAL_DLLPRIVATE void ImplDrawLinearGradient( const Rectangle& rRect, const Gradient& rGradient, BOOL bMtf, const PolyPolygon* pClipPolyPoly );
- SAL_DLLPRIVATE void ImplDrawComplexGradient( const Rectangle& rRect, const Gradient& rGradient, BOOL bMtf, const PolyPolygon* pClipPolyPoly );
+ SAL_DLLPRIVATE void ImplDrawPolyPolygon( sal_uInt16 nPoly, const PolyPolygon& rPolyPoly );
+ SAL_DLLPRIVATE void ImplDrawLinearGradient( const Rectangle& rRect, const Gradient& rGradient, sal_Bool bMtf, const PolyPolygon* pClipPolyPoly );
+ SAL_DLLPRIVATE void ImplDrawComplexGradient( const Rectangle& rRect, const Gradient& rGradient, sal_Bool bMtf, const PolyPolygon* pClipPolyPoly );
- SAL_DLLPRIVATE void ImplDrawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch, BOOL bMtf );
- SAL_DLLPRIVATE void ImplCalcHatchValues( const Rectangle& rRect, long nDist, USHORT nAngle10, Point& rPt1, Point& rPt2, Size& rInc, Point& rEndPt1 );
- SAL_DLLPRIVATE void ImplDrawHatchLine( const Line& rLine, const PolyPolygon& rPolyPoly, Point* pPtBuffer, BOOL bMtf );
+ SAL_DLLPRIVATE void ImplDrawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch, sal_Bool bMtf );
+ SAL_DLLPRIVATE void ImplCalcHatchValues( const Rectangle& rRect, long nDist, sal_uInt16 nAngle10, Point& rPt1, Point& rPt2, Size& rInc, Point& rEndPt1 );
+ SAL_DLLPRIVATE void ImplDrawHatchLine( const Line& rLine, const PolyPolygon& rPolyPoly, Point* pPtBuffer, sal_Bool bMtf );
SAL_DLLPRIVATE void ImplDrawWallpaper( long nX, long nY, long nWidth, long nHeight, const Wallpaper& rWallpaper );
SAL_DLLPRIVATE void ImplDrawColorWallpaper( long nX, long nY, long nWidth, long nHeight, const Wallpaper& rWallpaper );
@@ -487,14 +487,14 @@ public:
SAL_DLLPRIVATE void ImplDrawOutDevDirect( const OutputDevice* pSrcDev, void* pPosAry );
SAL_DLLPRIVATE void ImplDrawBitmap( const Point& rDestPt, const Size& rDestSize,
const Point& rSrcPtPixel, const Size& rSrcSizePixel,
- const Bitmap& rBitmap, const ULONG nAction );
+ const Bitmap& rBitmap, const sal_uIntPtr nAction );
SAL_DLLPRIVATE void ImplDrawBitmapEx( const Point& rDestPt, const Size& rDestSize,
const Point& rSrcPtPixel, const Size& rSrcSizePixel,
- const BitmapEx& rBitmapEx, const ULONG nAction );
+ const BitmapEx& rBitmapEx, const sal_uIntPtr nAction );
SAL_DLLPRIVATE void ImplDrawMask( const Point& rDestPt, const Size& rDestSize,
const Point& rSrcPtPixel, const Size& rSrcSizePixel,
const Bitmap& rBitmap, const Color& rMaskColor,
- const ULONG nAction );
+ const sal_uIntPtr nAction );
SAL_DLLPRIVATE void ImplDrawAlpha( const Bitmap& rBmp, const AlphaMask& rAlpha,
const Point& rDestPt, const Size& rDestSize,
const Point& rSrcPtPixel, const Size& rSrcSizePixel );
@@ -534,14 +534,14 @@ public:
SAL_DLLPRIVATE void ImplGetFrameBitmap( const Point& rPt, const Size& rSize,
Bitmap& rBitmap ) const;
- SAL_DLLPRIVATE BOOL ImplIsRecordLayout() const;
+ SAL_DLLPRIVATE sal_Bool ImplIsRecordLayout() const;
void ImplAddDevFontSubstitute( const XubString& rFontName,
const XubString& rReplaceFontName,
- USHORT nFlags = 0 );
+ sal_uInt16 nFlags = 0 );
SAL_DLLPRIVATE static FontEmphasisMark ImplGetEmphasisMarkStyle( const Font& rFont );
- SAL_DLLPRIVATE static BOOL ImplIsUnderlineAbove( const Font& );
+ SAL_DLLPRIVATE static sal_Bool ImplIsUnderlineAbove( const Font& );
// tells whether this output device is RTL in an LTR UI or LTR in a RTL UI
SAL_DLLPRIVATE bool ImplIsAntiparallel() const ;
@@ -591,8 +591,8 @@ public:
FontStrikeout eStrikeout,
FontUnderline eUnderline,
FontUnderline eOverline,
- BOOL bUnderlineAbove = FALSE );
- static BOOL IsTextUnderlineAbove( const Font& rFont );
+ sal_Bool bUnderlineAbove = sal_False );
+ static sal_Bool IsTextUnderlineAbove( const Font& rFont );
void DrawText( const Point& rStartPt, const XubString& rStr,
xub_StrLen nIndex = 0, xub_StrLen nLen = STRING_LEN,
@@ -610,15 +610,15 @@ public:
bool GetCaretPositions( const XubString&, sal_Int32* pCaretXArray,
xub_StrLen nIndex, xub_StrLen nLen,
sal_Int32* pDXAry = NULL, long nWidth = 0,
- BOOL bCellBreaking = TRUE ) const;
- void DrawStretchText( const Point& rStartPt, ULONG nWidth,
+ sal_Bool bCellBreaking = sal_True ) const;
+ void DrawStretchText( const Point& rStartPt, sal_uIntPtr nWidth,
const XubString& rStr,
xub_StrLen nIndex = 0, xub_StrLen nLen = STRING_LEN );
xub_StrLen GetTextBreak( const XubString& rStr, long nTextWidth,
xub_StrLen nIndex = 0, xub_StrLen nLen = STRING_LEN,
- long nCharExtra = 0, BOOL bCellBreaking = TRUE ) const;
+ long nCharExtra = 0, sal_Bool bCellBreaking = sal_True ) const;
xub_StrLen GetTextBreak( const XubString& rStr, long nTextWidth,
- USHORT nExtraChar, xub_StrLen& rExtraCharPos,
+ sal_uInt16 nExtraChar, xub_StrLen& rExtraCharPos,
xub_StrLen nIndex, xub_StrLen nLen,
long nCharExtra = 0 ) const;
/** Generate MetaTextActions for the text rect
@@ -631,47 +631,47 @@ public:
*/
void AddTextRectActions( const Rectangle& rRect,
const String& rOrigStr,
- USHORT nStyle,
+ sal_uInt16 nStyle,
GDIMetaFile& rMtf );
void DrawText( const Rectangle& rRect,
- const XubString& rStr, USHORT nStyle = 0,
+ const XubString& rStr, sal_uInt16 nStyle = 0,
MetricVector* pVector = NULL, String* pDisplayText = NULL,
::vcl::ITextLayout* _pTextLayout = NULL );
Rectangle GetTextRect( const Rectangle& rRect,
- const XubString& rStr, USHORT nStyle = TEXT_DRAW_WORDBREAK,
+ const XubString& rStr, sal_uInt16 nStyle = TEXT_DRAW_WORDBREAK,
TextRectInfo* pInfo = NULL,
const ::vcl::ITextLayout* _pTextLayout = NULL ) const;
XubString GetEllipsisString( const XubString& rStr, long nMaxWidth,
- USHORT nStyle = TEXT_DRAW_ENDELLIPSIS ) const;
+ sal_uInt16 nStyle = TEXT_DRAW_ENDELLIPSIS ) const;
void DrawCtrlText( const Point& rPos, const XubString& rStr,
xub_StrLen nIndex = 0, xub_StrLen nLen = STRING_LEN,
- USHORT nStyle = TEXT_DRAW_MNEMONIC, MetricVector* pVector = NULL, String* pDisplayText = NULL );
+ sal_uInt16 nStyle = TEXT_DRAW_MNEMONIC, MetricVector* pVector = NULL, String* pDisplayText = NULL );
long GetCtrlTextWidth( const XubString& rStr, xub_StrLen nIndex = 0,
xub_StrLen nLen = STRING_LEN,
- USHORT nStyle = TEXT_DRAW_MNEMONIC ) const;
+ sal_uInt16 nStyle = TEXT_DRAW_MNEMONIC ) const;
static XubString GetNonMnemonicString( const XubString& rStr, xub_StrLen& rMnemonicPos );
static XubString GetNonMnemonicString( const XubString& rStr )
{ xub_StrLen nDummy; return GetNonMnemonicString( rStr, nDummy ); }
- ULONG GetKerningPairCount() const;
- void GetKerningPairs( ULONG nPairs, KerningPair* pKernPairs ) const;
+ sal_uIntPtr GetKerningPairCount() const;
+ void GetKerningPairs( sal_uIntPtr nPairs, KerningPair* pKernPairs ) const;
- BOOL GetTextBoundRect( Rectangle& rRect,
+ sal_Bool GetTextBoundRect( Rectangle& rRect,
const String& rStr, xub_StrLen nBase = 0, xub_StrLen nIndex = 0, xub_StrLen nLen = STRING_LEN,
- ULONG nLayoutWidth = 0, const sal_Int32* pDXArray = NULL ) const;
- BOOL GetTextOutline( PolyPolygon&,
+ sal_uIntPtr nLayoutWidth = 0, const sal_Int32* pDXArray = NULL ) const;
+ sal_Bool GetTextOutline( PolyPolygon&,
const String& rStr, xub_StrLen nBase = 0, xub_StrLen nIndex = 0,
- xub_StrLen nLen = STRING_LEN, BOOL bOptimize = TRUE,
- ULONG nLayoutWidth = 0, const sal_Int32* pDXArray = NULL ) const;
- BOOL GetTextOutlines( PolyPolyVector&,
+ xub_StrLen nLen = STRING_LEN, sal_Bool bOptimize = sal_True,
+ sal_uIntPtr nLayoutWidth = 0, const sal_Int32* pDXArray = NULL ) const;
+ sal_Bool GetTextOutlines( PolyPolyVector&,
const String& rStr, xub_StrLen nBase = 0, xub_StrLen nIndex = 0,
- xub_StrLen nLen = STRING_LEN, BOOL bOptimize = TRUE,
- ULONG nLayoutWidth = 0, const sal_Int32* pDXArray = NULL ) const;
- BOOL GetTextOutlines( ::basegfx::B2DPolyPolygonVector&,
+ xub_StrLen nLen = STRING_LEN, sal_Bool bOptimize = sal_True,
+ sal_uIntPtr nLayoutWidth = 0, const sal_Int32* pDXArray = NULL ) const;
+ sal_Bool GetTextOutlines( ::basegfx::B2DPolyPolygonVector&,
const String& rStr, xub_StrLen nBase = 0, xub_StrLen nIndex = 0,
- xub_StrLen nLen = STRING_LEN, BOOL bOptimize = TRUE,
- ULONG nLayoutWidth = 0, const sal_Int32* pDXArray = NULL ) const;
- BOOL GetGlyphBoundRects( const Point& rOrigin, const String& rStr, int nIndex,
+ xub_StrLen nLen = STRING_LEN, sal_Bool bOptimize = sal_True,
+ sal_uIntPtr nLayoutWidth = 0, const sal_Int32* pDXArray = NULL ) const;
+ sal_Bool GetGlyphBoundRects( const Point& rOrigin, const String& rStr, int nIndex,
int nLen, int nBase, MetricVector& rVector );
void DrawPixel( const Point& rPt );
@@ -735,7 +735,7 @@ public:
void DrawRect( const Rectangle& rRect );
void DrawRect( const Rectangle& rRect,
- ULONG nHorzRount, ULONG nVertRound );
+ sal_uIntPtr nHorzRount, sal_uIntPtr nVertRound );
void DrawEllipse( const Rectangle& rRect );
void DrawArc( const Rectangle& rRect,
const Point& rStartPt, const Point& rEndPt );
@@ -751,7 +751,7 @@ public:
const OutputDevice& rOutDev );
void CopyArea( const Point& rDestPt,
const Point& rSrcPt, const Size& rSrcSize,
- USHORT nFlags = 0 );
+ sal_uInt16 nFlags = 0 );
void DrawBitmap( const Point& rDestPt,
const Bitmap& rBitmap );
@@ -778,9 +778,9 @@ public:
const Bitmap& rBitmap, const Color& rMaskColor );
void DrawImage( const Point& rPos,
- const Image& rImage, USHORT nStyle = 0 );
+ const Image& rImage, sal_uInt16 nStyle = 0 );
void DrawImage( const Point& rPos, const Size& rSize,
- const Image& rImage, USHORT nStyle = 0 );
+ const Image& rImage, sal_uInt16 nStyle = 0 );
void DrawGradient( const Rectangle& rRect, const Gradient& rGradient );
void DrawGradient( const PolyPolygon& rPolyPoly, const Gradient& rGradient );
@@ -801,10 +801,10 @@ public:
#endif
void DrawWallpaper( const Rectangle& rRect, const Wallpaper& rWallpaper );
- void DrawWaveLine( const Point& rStartPos, const Point& rEndPos, USHORT nStyle );
- void DrawGrid( const Rectangle& rRect, const Size& rDist, ULONG nFlags );
+ void DrawWaveLine( const Point& rStartPos, const Point& rEndPos, sal_uInt16 nStyle );
+ void DrawGrid( const Rectangle& rRect, const Size& rDist, sal_uIntPtr nFlags );
- void DrawTransparent( const PolyPolygon& rPolyPoly, USHORT nTransparencePercent );
+ void DrawTransparent( const PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent );
void DrawTransparent( const basegfx::B2DPolyPolygon& rB2DPolyPoly, double fTransparency);
void DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos, const Size& rSize, const Gradient& rTransparenceGradient );
@@ -817,41 +817,41 @@ public:
*/
BitmapEx GetBitmapEx( const Point& rSrcPt, const Size& rSize ) const;
- void EnableMapMode( BOOL bEnable = TRUE );
- BOOL IsMapModeEnabled() const { return mbMap; }
+ void EnableMapMode( sal_Bool bEnable = sal_True );
+ sal_Bool IsMapModeEnabled() const { return mbMap; }
// Enabling/disabling RTL only makes sense for OutputDevices that use a mirroring SalGraphisLayout
- void EnableRTL( BOOL bEnable = TRUE);
- BOOL IsRTLEnabled() const { return mbEnableRTL; }
+ void EnableRTL( sal_Bool bEnable = sal_True);
+ sal_Bool IsRTLEnabled() const { return mbEnableRTL; }
void SetConnectMetaFile( GDIMetaFile* pMtf );
GDIMetaFile* GetConnectMetaFile() const { return mpMetaFile; }
- void EnableOutput( BOOL bEnable = TRUE );
- BOOL IsOutputEnabled() const { return mbOutput; }
- BOOL IsDeviceOutput() const { return mbDevOutput; }
- BOOL IsDeviceOutputNecessary() const { return (mbOutput && mbDevOutput); }
- BOOL IsOutputNecessary() const { return ((mbOutput && mbDevOutput) || (mpMetaFile != NULL)); }
+ void EnableOutput( sal_Bool bEnable = sal_True );
+ sal_Bool IsOutputEnabled() const { return mbOutput; }
+ sal_Bool IsDeviceOutput() const { return mbDevOutput; }
+ sal_Bool IsDeviceOutputNecessary() const { return (mbOutput && mbDevOutput); }
+ sal_Bool IsOutputNecessary() const { return ((mbOutput && mbDevOutput) || (mpMetaFile != NULL)); }
void SetClipRegion();
void SetClipRegion( const Region& rRegion );
void SetTriangleClipRegion( const PolyPolygon &rRegion );
Region GetClipRegion() const;
- BOOL IsClipRegion() const { return mbClipRegion; }
+ sal_Bool IsClipRegion() const { return mbClipRegion; }
Region GetActiveClipRegion() const;
void MoveClipRegion( long nHorzMove, long nVertMove );
void IntersectClipRegion( const Rectangle& rRect );
void IntersectClipRegion( const Region& rRegion );
- void SetAntialiasing( USHORT nMode = 0 );
- USHORT GetAntialiasing() const { return mnAntialiasing; }
+ void SetAntialiasing( sal_uInt16 nMode = 0 );
+ sal_uInt16 GetAntialiasing() const { return mnAntialiasing; }
- void SetDrawMode( ULONG nDrawMode );
- ULONG GetDrawMode() const { return mnDrawMode; }
+ void SetDrawMode( sal_uIntPtr nDrawMode );
+ sal_uIntPtr GetDrawMode() const { return mnDrawMode; }
- void SetLayoutMode( ULONG nTextLayoutMode );
- ULONG GetLayoutMode() const { return mnTextLayoutMode; }
+ void SetLayoutMode( sal_uIntPtr nTextLayoutMode );
+ sal_uIntPtr GetLayoutMode() const { return mnTextLayoutMode; }
void SetDigitLanguage( LanguageType );
LanguageType GetDigitLanguage() const { return meTextLanguage; }
@@ -872,18 +872,18 @@ public:
void SetLineColor();
void SetLineColor( const Color& rColor );
const Color& GetLineColor() const { return maLineColor; }
- BOOL IsLineColor() const { return mbLineColor; }
+ sal_Bool IsLineColor() const { return mbLineColor; }
void SetFillColor();
void SetFillColor( const Color& rColor );
const Color& GetFillColor() const { return maFillColor; }
- BOOL IsFillColor() const { return mbFillColor; }
+ sal_Bool IsFillColor() const { return mbFillColor; }
void SetBackground();
void SetBackground( const Wallpaper& rBackground );
const Wallpaper& GetBackground() const { return maBackground; }
- BOOL IsBackground() const { return mbBackground; }
+ sal_Bool IsBackground() const { return mbBackground; }
void SetFont( const Font& rNewFont );
const Font& GetFont() const { return maFont; }
@@ -899,15 +899,15 @@ public:
void SetTextFillColor( const Color& rColor );
Color GetTextFillColor() const;
- BOOL IsTextFillColor() const { return !maFont.IsTransparent(); }
+ sal_Bool IsTextFillColor() const { return !maFont.IsTransparent(); }
void SetTextLineColor();
void SetTextLineColor( const Color& rColor );
const Color& GetTextLineColor() const { return maTextLineColor; }
- BOOL IsTextLineColor() const { return (maTextLineColor.GetTransparency() == 0); }
+ sal_Bool IsTextLineColor() const { return (maTextLineColor.GetTransparency() == 0); }
void SetOverlineColor();
void SetOverlineColor( const Color& rColor );
const Color& GetOverlineColor() const { return maOverlineColor; }
- BOOL IsOverlineColor() const { return (maOverlineColor.GetTransparency() == 0); }
+ sal_Bool IsOverlineColor() const { return (maOverlineColor.GetTransparency() == 0); }
void SetTextAlign( TextAlign eAlign );
TextAlign GetTextAlign() const { return maFont.GetAlign(); }
@@ -921,12 +921,12 @@ public:
virtual void SetMapMode( const MapMode& rNewMapMode );
virtual void SetRelativeMapMode( const MapMode& rNewMapMode );
const MapMode& GetMapMode() const { return maMapMode; }
- BOOL IsMapMode() const { return mbMap; }
+ sal_Bool IsMapMode() const { return mbMap; }
void SetRefPoint();
void SetRefPoint( const Point& rRefPoint );
const Point& GetRefPoint() const { return maRefPoint; }
- BOOL IsRefPoint() const { return mbRefPoint; }
+ sal_Bool IsRefPoint() const { return mbRefPoint; }
// #i75163#
basegfx::B2DHomMatrix GetViewTransformation() const;
@@ -1027,7 +1027,7 @@ public:
const MapMode* pMapModeSource,
const MapMode* pMapModeDest ) const;
long* LogicToLogic( long* pX,
- USHORT nCount,
+ sal_uInt16 nCount,
const MapMode* pMapModeSource,
const MapMode* pMapModeDest ) const;
static Point LogicToLogic( const Point& rPtSource,
@@ -1063,16 +1063,16 @@ public:
void Erase();
void Erase( const Rectangle& rRect ) { DrawWallpaper( rRect, GetBackground() ); }
- BOOL AddTempDevFont( const String& rFileURL, const String& rFontName );
+ sal_Bool AddTempDevFont( const String& rFileURL, const String& rFontName );
int GetDevFontCount() const;
FontInfo GetDevFont( int nDevFontIndex ) const;
int GetDevFontSizeCount( const Font& ) const;
Size GetDevFontSize( const Font& rFont, int nSizeIndex ) const;
- BOOL IsFontAvailable( const String& rFontName ) const;
+ sal_Bool IsFontAvailable( const String& rFontName ) const;
FontMetric GetFontMetric() const;
FontMetric GetFontMetric( const Font& rFont ) const;
- BOOL GetFontCharMap( FontCharMap& rFontCharMap ) const;
+ sal_Bool GetFontCharMap( FontCharMap& rFontCharMap ) const;
xub_StrLen HasGlyphs( const Font& rFont, const String& rStr,
xub_StrLen nIndex = 0, xub_StrLen nLen = STRING_LEN ) const;
@@ -1090,9 +1090,9 @@ public:
xub_StrLen* pKashidaPosDropped // invalid kashida positions (out)
) const;
- USHORT GetBitCount() const;
+ sal_uInt16 GetBitCount() const;
- BOOL GetTextIsRTL( const String&, xub_StrLen nIndex,
+ sal_Bool GetTextIsRTL( const String&, xub_StrLen nIndex,
xub_StrLen nLen ) const;
/** Query the existence and depth of the alpha channel
@@ -1100,17 +1100,17 @@ public:
@return 0, if no alpha channel available, and the bit depth of
the alpha channel otherwise.
*/
- USHORT GetAlphaBitCount() const;
- ULONG GetColorCount() const;
+ sal_uInt16 GetAlphaBitCount() const;
+ sal_uIntPtr GetColorCount() const;
- void Push( USHORT nFlags = PUSH_ALL );
+ void Push( sal_uInt16 nFlags = PUSH_ALL );
void Pop();
/** Query availability of alpha channel
- @return TRUE, if this device has an alpha channel.
+ @return sal_True, if this device has an alpha channel.
*/
- BOOL HasAlpha();
+ sal_Bool HasAlpha();
/** Added return value to see if EPS could be painted directly.
Theoreticaly, handing over a matrix would be needed to handle
@@ -1132,17 +1132,17 @@ public:
static void EndFontSubstitution();
static void AddFontSubstitute( const XubString& rFontName,
const XubString& rReplaceFontName,
- USHORT nFlags = 0 );
- static void RemoveFontSubstitute( USHORT n );
- static USHORT GetFontSubstituteCount();
- static void GetFontSubstitute( USHORT n,
+ sal_uInt16 nFlags = 0 );
+ static void RemoveFontSubstitute( sal_uInt16 n );
+ static sal_uInt16 GetFontSubstituteCount();
+ static void GetFontSubstitute( sal_uInt16 n,
XubString& rFontName,
XubString& rReplaceFontName,
- USHORT& rFlags );
+ sal_uInt16& rFlags );
- static Font GetDefaultFont( USHORT nType,
+ static Font GetDefaultFont( sal_uInt16 nType,
LanguageType eLang,
- ULONG nFlags,
+ sal_uIntPtr nFlags,
const OutputDevice* pOutDev = NULL );
/** helper method removing transparencies from a metafile (e.g. for printing)
@@ -1186,17 +1186,17 @@ public:
// These all just call through to the private mpGraphics functions of the same name.
// Query the platform layer for control support
- BOOL IsNativeControlSupported( ControlType nType, ControlPart nPart );
+ sal_Bool IsNativeControlSupported( ControlType nType, ControlPart nPart );
// Query the native control to determine if it was acted upon
- BOOL HitTestNativeControl( ControlType nType,
+ sal_Bool HitTestNativeControl( ControlType nType,
ControlPart nPart,
const Region& rControlRegion,
const Point& aPos,
- BOOL& rIsInside );
+ sal_Bool& rIsInside );
// Request rendering of a particular control and/or part
- BOOL DrawNativeControl( ControlType nType,
+ sal_Bool DrawNativeControl( ControlType nType,
ControlPart nPart,
const Region& rControlRegion,
ControlState nState,
@@ -1204,7 +1204,7 @@ public:
::rtl::OUString aCaption );
// Request rendering of a caption string for a control
- BOOL DrawNativeControlText( ControlType nType,
+ sal_Bool DrawNativeControlText( ControlType nType,
ControlPart nPart,
const Region& rControlRegion,
ControlState nState,
@@ -1212,7 +1212,7 @@ public:
::rtl::OUString aCaption );
// Query the native control's actual drawing region (including adornment)
- BOOL GetNativeControlRegion( ControlType nType,
+ sal_Bool GetNativeControlRegion( ControlType nType,
ControlPart nPart,
const Region& rControlRegion,
ControlState nState,
diff --git a/vcl/inc/vcl/outfont.hxx b/vcl/inc/vcl/outfont.hxx
index 4bbf7176ddb2..86b992e16031 100644
--- a/vcl/inc/vcl/outfont.hxx
+++ b/vcl/inc/vcl/outfont.hxx
@@ -235,7 +235,7 @@ protected:
ImplDevFontListData* ImplFindByTokenNames( const String& ) const;
ImplDevFontListData* ImplFindByAliasName( const String& rSearchName, const String& rShortName ) const;
ImplDevFontListData* ImplFindBySubstFontAttr( const utl::FontNameAttr& ) const;
- ImplDevFontListData* ImplFindByAttributes( ULONG nSearchType, FontWeight, FontWidth,
+ ImplDevFontListData* ImplFindByAttributes( sal_uIntPtr nSearchType, FontWeight, FontWidth,
FontFamily, FontItalic, const String& rSearchFamily ) const;
ImplDevFontListData* FindDefaultFont() const;
@@ -254,8 +254,8 @@ private:
struct ImplKernPairData
{
- USHORT mnChar1;
- USHORT mnChar2;
+ sal_uInt16 mnChar1;
+ sal_uInt16 mnChar2;
long mnKern;
};
@@ -335,8 +335,8 @@ public: // TODO: make data members private
ImplFontMetricData maMetric; // Font Metric
const ConvertChar* mpConversion; // used e.g. for StarBats->StarSymbol
long mnLineHeight;
- ULONG mnRefCount;
- USHORT mnSetFontFlags; // Flags returned by SalGraphics::SetFont()
+ sal_uIntPtr mnRefCount;
+ sal_uInt16 mnSetFontFlags; // Flags returned by SalGraphics::SetFont()
short mnOwnOrientation; // text angle if lower layers don't rotate text themselves
short mnOrientation; // text angle in 3600 system
bool mbInit; // true if maMetric member is valid
@@ -393,7 +393,7 @@ public:
void AddLine( ImplTextLineInfo* pLine );
void Clear();
- ImplTextLineInfo* GetLine( USHORT nLine ) const
+ ImplTextLineInfo* GetLine( sal_uInt16 nLine ) const
{ return mpLines[nLine]; }
xub_StrLen Count() const { return mnLines; }
diff --git a/vcl/inc/vcl/pdfextoutdevdata.hxx b/vcl/inc/vcl/pdfextoutdevdata.hxx
index 5dda4b0f79fa..b12fea61e6c1 100644
--- a/vcl/inc/vcl/pdfextoutdevdata.hxx
+++ b/vcl/inc/vcl/pdfextoutdevdata.hxx
@@ -170,7 +170,7 @@ public :
rOutputRect, e.g. for cropped graphics.
*/
void EndGroup( const Graphic& rGraphic,
- BYTE nTransparency,
+ sal_uInt8 nTransparency,
const Rectangle& rOutputRect,
const Rectangle& rVisibleOutputRect );
//--->i56629
@@ -408,7 +408,7 @@ public :
SetStructureAttribute sets an attribute of the current structural element to a
new value. A consistency check is performed before actually setting the value;
- if the check fails, the function returns <FALSE/> and the attribute remains
+ if the check fails, the function returns <sal_False/> and the attribute remains
unchanged.
@param eAttr
@@ -418,15 +418,15 @@ public :
the value to set the attribute to
@returns
- <TRUE/> if the value was valid and the change has been performed,
- <FALSE/> if the attribute or value was invalid; attribute remains unchanged
+ <sal_True/> if the value was valid and the change has been performed,
+ <sal_False/> if the attribute or value was invalid; attribute remains unchanged
*/
bool SetStructureAttribute( PDFWriter::StructAttribute eAttr, PDFWriter::StructAttributeValue eVal );
/** set a structure attribute on the current structural element
SetStructureAttributeNumerical sets an attribute of the current structural element
to a new numerical value. A consistency check is performed before actually setting
- the value; if the check fails, the function returns <FALSE/> and the attribute
+ the value; if the check fails, the function returns <sal_False/> and the attribute
remains unchanged.
@param eAttr
@@ -436,8 +436,8 @@ public :
the value to set the attribute to
@returns
- <TRUE/> if the value was valid and the change has been performed,
- <FALSE/> if the attribute or value was invalid; attribute remains unchanged
+ <sal_True/> if the value was valid and the change has been performed,
+ <sal_False/> if the attribute or value was invalid; attribute remains unchanged
*/
bool SetStructureAttributeNumerical( PDFWriter::StructAttribute eAttr, sal_Int32 nValue );
/** set the bounding box of a structural element
diff --git a/vcl/inc/vcl/pdfwriter.hxx b/vcl/inc/vcl/pdfwriter.hxx
index 419814e5ce97..0e87605942bf 100644
--- a/vcl/inc/vcl/pdfwriter.hxx
+++ b/vcl/inc/vcl/pdfwriter.hxx
@@ -235,7 +235,7 @@ public:
rtl::OUString Name; // a distinct name to identify the control
rtl::OUString Description;// descriptive text for the contro (e.g. for tool tip)
rtl::OUString Text; // user text to appear on the control
- USHORT TextStyle; // style flags
+ sal_uInt16 TextStyle; // style flags
bool ReadOnly;
Rectangle Location; // describes the area filled by the control
bool Border; // true: widget should have a border, false: no border
@@ -666,7 +666,7 @@ The following structure describes the permissions used in PDF security
/* functions for graphics state */
/* flag values: see vcl/outdev.hxx */
- void Push( USHORT nFlags = 0xffff );
+ void Push( sal_uInt16 nFlags = 0xffff );
void Pop();
void SetClipRegion();
@@ -675,9 +675,9 @@ The following structure describes the permissions used in PDF security
void IntersectClipRegion( const Rectangle& rRect );
void IntersectClipRegion( const basegfx::B2DPolyPolygon& rRegion );
- void SetAntialiasing( USHORT nMode = 0 );
+ void SetAntialiasing( sal_uInt16 nMode = 0 );
- void SetLayoutMode( ULONG nMode );
+ void SetLayoutMode( sal_uIntPtr nMode );
void SetDigitLanguage( LanguageType eLang );
void SetLineColor( const Color& rColor );
@@ -708,16 +708,16 @@ The following structure describes the permissions used in PDF security
FontStrikeout eStrikeout,
FontUnderline eUnderline,
FontUnderline eOverline,
- BOOL bUnderlineAbove = FALSE );
+ sal_Bool bUnderlineAbove = sal_False );
void DrawTextArray( const Point& rStartPt, const XubString& rStr,
const sal_Int32* pDXAry = NULL,
xub_StrLen nIndex = 0,
xub_StrLen nLen = STRING_LEN );
- void DrawStretchText( const Point& rStartPt, ULONG nWidth,
+ void DrawStretchText( const Point& rStartPt, sal_uIntPtr nWidth,
const XubString& rStr,
xub_StrLen nIndex = 0, xub_StrLen nLen = STRING_LEN );
void DrawText( const Rectangle& rRect,
- const XubString& rStr, USHORT nStyle = 0 );
+ const XubString& rStr, sal_uInt16 nStyle = 0 );
void DrawPixel( const Point& rPt, const Color& rColor );
void DrawPixel( const Point& rPt )
@@ -737,7 +737,7 @@ The following structure describes the permissions used in PDF security
void DrawPolyPolygon( const PolyPolygon& rPolyPoly );
void DrawRect( const Rectangle& rRect );
void DrawRect( const Rectangle& rRect,
- ULONG nHorzRount, ULONG nVertRound );
+ sal_uIntPtr nHorzRount, sal_uIntPtr nVertRound );
void DrawEllipse( const Rectangle& rRect );
void DrawArc( const Rectangle& rRect,
const Point& rStartPt, const Point& rEndPt );
@@ -777,7 +777,7 @@ The following structure describes the permissions used in PDF security
void DrawWallpaper( const Rectangle& rRect, const Wallpaper& rWallpaper );
void DrawTransparent( const PolyPolygon& rPolyPoly,
- USHORT nTransparencePercent );
+ sal_uInt16 nTransparencePercent );
/** Start a transparency group
@@ -810,7 +810,7 @@ The following structure describes the permissions used in PDF security
@param nTransparencePercent
The transparency factor
*/
- void EndTransparencyGroup( const Rectangle& rBoundRect, USHORT nTransparencePercent );
+ void EndTransparencyGroup( const Rectangle& rBoundRect, sal_uInt16 nTransparencePercent );
/** End a transparency group with an alpha mask
@@ -1127,7 +1127,7 @@ The following structure describes the permissions used in PDF security
SetStructureAttribute sets an attribute of the current structural element to a
new value. A consistency check is performed before actually setting the value;
- if the check fails, the function returns <FALSE/> and the attribute remains
+ if the check fails, the function returns <sal_False/> and the attribute remains
unchanged.
@param eAttr
@@ -1137,15 +1137,15 @@ The following structure describes the permissions used in PDF security
the value to set the attribute to
@returns
- <TRUE/> if the value was valid and the change has been performed,
- <FALSE/> if the attribute or value was invalid; attribute remains unchanged
+ <sal_True/> if the value was valid and the change has been performed,
+ <sal_False/> if the attribute or value was invalid; attribute remains unchanged
*/
bool SetStructureAttribute( enum StructAttribute eAttr, enum StructAttributeValue eVal );
/** set a structure attribute on the current structural element
SetStructureAttributeNumerical sets an attribute of the current structural element
to a new numerical value. A consistency check is performed before actually setting
- the value; if the check fails, the function returns <FALSE/> and the attribute
+ the value; if the check fails, the function returns <sal_False/> and the attribute
remains unchanged.
@param eAttr
@@ -1155,8 +1155,8 @@ The following structure describes the permissions used in PDF security
the value to set the attribute to
@returns
- <TRUE/> if the value was valid and the change has been performed,
- <FALSE/> if the attribute or value was invalid; attribute remains unchanged
+ <sal_True/> if the value was valid and the change has been performed,
+ <sal_False/> if the attribute or value was invalid; attribute remains unchanged
*/
bool SetStructureAttributeNumerical( enum StructAttribute eAttr, sal_Int32 nValue );
/** set the bounding box of a structural element
diff --git a/vcl/inc/vcl/pointr.hxx b/vcl/inc/vcl/pointr.hxx
index b90b3b04d134..5456eb86d94a 100644
--- a/vcl/inc/vcl/pointr.hxx
+++ b/vcl/inc/vcl/pointr.hxx
@@ -50,9 +50,9 @@ public:
PointerStyle GetStyle() const { return meStyle; }
- BOOL operator==( const Pointer& rPointer ) const
+ sal_Bool operator==( const Pointer& rPointer ) const
{ return (meStyle == rPointer.meStyle); }
- BOOL operator!=( const Pointer& rPointer ) const
+ sal_Bool operator!=( const Pointer& rPointer ) const
{ return !(Pointer::operator==( rPointer )); }
};
diff --git a/vcl/inc/vcl/polyscan.hxx b/vcl/inc/vcl/polyscan.hxx
index 1c699e36623d..7c1ac4fd1184 100644
--- a/vcl/inc/vcl/polyscan.hxx
+++ b/vcl/inc/vcl/polyscan.hxx
@@ -89,26 +89,26 @@ public:
void Set( long nStart, long nEnd );
void Set( const PolyScanSegment& rSegment ) { Set( rSegment.mnStart, rSegment.mnEnd ); }
- inline BOOL GetFirstX( long& rX );
- inline BOOL GetNextX( long& rX );
+ inline sal_Bool GetFirstX( long& rX );
+ inline sal_Bool GetNextX( long& rX );
- BOOL GetFirstSegment( PolyScanSegment& rSegment );
- BOOL GetNextSegment( PolyScanSegment& rSegment );
+ sal_Bool GetFirstSegment( PolyScanSegment& rSegment );
+ sal_Bool GetNextSegment( PolyScanSegment& rSegment );
};
// ------------------------------------------------------------------------
-inline BOOL PolyScanline::GetFirstX( long& rX )
+inline sal_Bool PolyScanline::GetFirstX( long& rX )
{
mpAct = mpFirst;
- return( mpAct ? ( rX = mpAct->mnX, mpAct = mpAct->mpNext, TRUE ) : FALSE );
+ return( mpAct ? ( rX = mpAct->mnX, mpAct = mpAct->mpNext, sal_True ) : sal_False );
}
// ------------------------------------------------------------------------
-inline BOOL PolyScanline::GetNextX( long& rX )
+inline sal_Bool PolyScanline::GetNextX( long& rX )
{
- return( mpAct ? ( rX = mpAct->mnX, mpAct = mpAct->mpNext, TRUE ) : FALSE );
+ return( mpAct ? ( rX = mpAct->mnX, mpAct = mpAct->mpNext, sal_True ) : sal_False );
}
// ---------------
@@ -148,8 +148,8 @@ public:
Rectangle GetBoundRect() const { return Rectangle( mnLeft, mnTop, mnRight, mnBottom ); }
- ULONG Count() const { return Height(); }
- PolyScanline* operator[]( ULONG nPos ) const;
+ sal_uIntPtr Count() const { return Height(); }
+ PolyScanline* operator[]( sal_uIntPtr nPos ) const;
};
#endif // _SV_POLYSCAN_HXX
diff --git a/vcl/inc/vcl/ppdparser.hxx b/vcl/inc/vcl/ppdparser.hxx
index c7a1e09b81e4..5e95ac48f724 100644
--- a/vcl/inc/vcl/ppdparser.hxx
+++ b/vcl/inc/vcl/ppdparser.hxx
@@ -157,7 +157,7 @@ private:
// some basic attributes
bool m_bColorDevice;
bool m_bType42Capable;
- ULONG m_nLanguageLevel;
+ sal_uIntPtr m_nLanguageLevel;
rtl_TextEncoding m_aFileEncoding;
@@ -219,7 +219,7 @@ public:
bool isColorDevice() const { return m_bColorDevice; }
bool isType42Capable() const { return m_bType42Capable; }
- ULONG getLanguageLevel() const { return m_nLanguageLevel; }
+ sal_uIntPtr getLanguageLevel() const { return m_nLanguageLevel; }
String getDefaultPaperDimension() const;
void getDefaultPaperDimension( int& rWidth, int& rHeight ) const
@@ -327,8 +327,8 @@ public:
void getUnconstrainedValues( const PPDKey*, ::std::list< const PPDValue* >& rValues );
// for printer setup
- void* getStreamableBuffer( ULONG& rBytes ) const;
- void rebuildFromStreamBuffer( void* pBuffer, ULONG nBytes );
+ void* getStreamableBuffer( sal_uIntPtr& rBytes ) const;
+ void rebuildFromStreamBuffer( void* pBuffer, sal_uIntPtr nBytes );
// convenience
int getRenderResolution() const;
diff --git a/vcl/inc/vcl/print.hxx b/vcl/inc/vcl/print.hxx
index 96822d9bc756..7e9c6922802f 100644
--- a/vcl/inc/vcl/print.hxx
+++ b/vcl/inc/vcl/print.hxx
@@ -76,18 +76,18 @@ class VCL_DLLPUBLIC PrinterPage
{
GDIMetaFile* mpMtf;
JobSetup maJobSetup;
- UINT16 mbNewJobSetup;
+ sal_uInt16 mbNewJobSetup;
public:
PrinterPage() : mpMtf( new GDIMetaFile() ) {}
- PrinterPage( GDIMetaFile* pMtf, BOOL bNewJobSetup, const JobSetup& rSetup ) :
+ PrinterPage( GDIMetaFile* pMtf, sal_Bool bNewJobSetup, const JobSetup& rSetup ) :
mpMtf( pMtf ), maJobSetup( rSetup ), mbNewJobSetup( bNewJobSetup ) {}
~PrinterPage() { delete mpMtf; }
GDIMetaFile* GetGDIMetaFile() const { return mpMtf; }
const JobSetup& GetJobSetup() const { return maJobSetup; }
- BOOL IsNewJobSetup() const { return (mbNewJobSetup != 0); }
+ sal_Bool IsNewJobSetup() const { return (mbNewJobSetup != 0); }
friend VCL_DLLPUBLIC SvStream& operator<<( SvStream& rOStm, const PrinterPage& rPage )
{ rOStm << rPage.mbNewJobSetup; rOStm << rPage.maJobSetup; rPage.mpMtf->Write( rOStm ); return rOStm; }
@@ -163,51 +163,51 @@ class VCL_DLLPUBLIC PrinterOptions
{
private:
- BOOL mbReduceTransparency;
+ sal_Bool mbReduceTransparency;
PrinterTransparencyMode meReducedTransparencyMode;
- BOOL mbReduceGradients;
+ sal_Bool mbReduceGradients;
PrinterGradientMode meReducedGradientsMode;
- USHORT mnReducedGradientStepCount;
- BOOL mbReduceBitmaps;
+ sal_uInt16 mnReducedGradientStepCount;
+ sal_Bool mbReduceBitmaps;
PrinterBitmapMode meReducedBitmapMode;
- USHORT mnReducedBitmapResolution;
- BOOL mbReducedBitmapsIncludeTransparency;
- BOOL mbConvertToGreyscales;
+ sal_uInt16 mnReducedBitmapResolution;
+ sal_Bool mbReducedBitmapsIncludeTransparency;
+ sal_Bool mbConvertToGreyscales;
public:
PrinterOptions();
~PrinterOptions();
- BOOL IsReduceTransparency() const { return mbReduceTransparency; }
- void SetReduceTransparency( BOOL bSet ) { mbReduceTransparency = bSet; }
+ sal_Bool IsReduceTransparency() const { return mbReduceTransparency; }
+ void SetReduceTransparency( sal_Bool bSet ) { mbReduceTransparency = bSet; }
PrinterTransparencyMode GetReducedTransparencyMode() const { return meReducedTransparencyMode; }
void SetReducedTransparencyMode( PrinterTransparencyMode eMode ) { meReducedTransparencyMode = eMode; }
- BOOL IsReduceGradients() const { return mbReduceGradients; }
- void SetReduceGradients( BOOL bSet ) { mbReduceGradients = bSet; }
+ sal_Bool IsReduceGradients() const { return mbReduceGradients; }
+ void SetReduceGradients( sal_Bool bSet ) { mbReduceGradients = bSet; }
PrinterGradientMode GetReducedGradientMode() const { return meReducedGradientsMode; }
void SetReducedGradientMode( PrinterGradientMode eMode ) { meReducedGradientsMode = eMode; }
- USHORT GetReducedGradientStepCount() const { return mnReducedGradientStepCount; }
- void SetReducedGradientStepCount( USHORT nStepCount ) { mnReducedGradientStepCount = nStepCount; }
+ sal_uInt16 GetReducedGradientStepCount() const { return mnReducedGradientStepCount; }
+ void SetReducedGradientStepCount( sal_uInt16 nStepCount ) { mnReducedGradientStepCount = nStepCount; }
- BOOL IsReduceBitmaps() const { return mbReduceBitmaps; }
- void SetReduceBitmaps( BOOL bSet ) { mbReduceBitmaps = bSet; }
+ sal_Bool IsReduceBitmaps() const { return mbReduceBitmaps; }
+ void SetReduceBitmaps( sal_Bool bSet ) { mbReduceBitmaps = bSet; }
PrinterBitmapMode GetReducedBitmapMode() const { return meReducedBitmapMode; }
void SetReducedBitmapMode( PrinterBitmapMode eMode ) { meReducedBitmapMode = eMode; }
- USHORT GetReducedBitmapResolution() const { return mnReducedBitmapResolution; }
- void SetReducedBitmapResolution( USHORT nResolution ) { mnReducedBitmapResolution = nResolution; }
+ sal_uInt16 GetReducedBitmapResolution() const { return mnReducedBitmapResolution; }
+ void SetReducedBitmapResolution( sal_uInt16 nResolution ) { mnReducedBitmapResolution = nResolution; }
- BOOL IsReducedBitmapIncludesTransparency() const { return mbReducedBitmapsIncludeTransparency; }
- void SetReducedBitmapIncludesTransparency( BOOL bSet ) { mbReducedBitmapsIncludeTransparency = bSet; }
+ sal_Bool IsReducedBitmapIncludesTransparency() const { return mbReducedBitmapsIncludeTransparency; }
+ void SetReducedBitmapIncludesTransparency( sal_Bool bSet ) { mbReducedBitmapsIncludeTransparency = bSet; }
- BOOL IsConvertToGreyscales() const { return mbConvertToGreyscales; }
- void SetConvertToGreyscales( BOOL bSet ) { mbConvertToGreyscales = bSet; }
+ sal_Bool IsConvertToGreyscales() const { return mbConvertToGreyscales; }
+ void SetConvertToGreyscales( sal_Bool bSet ) { mbConvertToGreyscales = bSet; }
};
// -----------
@@ -234,21 +234,21 @@ private:
JobSetup maJobSetup;
Point maPageOffset;
Size maPaperSize;
- ULONG mnError;
- USHORT mnCurPage;
- USHORT mnCurPrintPage;
- USHORT mnPageQueueSize;
- USHORT mnCopyCount;
- BOOL mbDefPrinter;
- BOOL mbPrinting;
- BOOL mbJobActive;
- BOOL mbCollateCopy;
- BOOL mbPrintFile;
- BOOL mbInPrintPage;
- BOOL mbNewJobSetup;
- BOOL mbIsQueuePrinter;
- BOOL mbUserSetupCompleted;
- BOOL mbUserSetupResult;
+ sal_uIntPtr mnError;
+ sal_uInt16 mnCurPage;
+ sal_uInt16 mnCurPrintPage;
+ sal_uInt16 mnPageQueueSize;
+ sal_uInt16 mnCopyCount;
+ sal_Bool mbDefPrinter;
+ sal_Bool mbPrinting;
+ sal_Bool mbJobActive;
+ sal_Bool mbCollateCopy;
+ sal_Bool mbPrintFile;
+ sal_Bool mbInPrintPage;
+ sal_Bool mbNewJobSetup;
+ sal_Bool mbIsQueuePrinter;
+ sal_Bool mbUserSetupCompleted;
+ sal_Bool mbUserSetupResult;
Link maErrorHdl;
SAL_DLLPRIVATE void ImplInitData();
@@ -263,11 +263,11 @@ private:
SAL_DLLPRIVATE bool StartJob( const rtl::OUString& rJobName, boost::shared_ptr<vcl::PrinterController>& );
- static SAL_DLLPRIVATE ULONG ImplSalPrinterErrorCodeToVCL( ULONG nError );
+ static SAL_DLLPRIVATE sal_uIntPtr ImplSalPrinterErrorCodeToVCL( sal_uIntPtr nError );
private:
SAL_DLLPRIVATE void ImplEndPrint();
- SAL_DLLPRIVATE BOOL EndJob();
+ SAL_DLLPRIVATE sal_Bool EndJob();
SAL_DLLPRIVATE Printer( const Printer& rPrinter );
SAL_DLLPRIVATE Printer& operator =( const Printer& rPrinter );
public:
@@ -279,8 +279,8 @@ public:
protected:
- void SetSelfAsQueuePrinter( BOOL bQueuePrinter ) { mbIsQueuePrinter = bQueuePrinter; }
- BOOL IsQueuePrinter() const { return mbIsQueuePrinter; }
+ void SetSelfAsQueuePrinter( sal_Bool bQueuePrinter ) { mbIsQueuePrinter = bQueuePrinter; }
+ sal_Bool IsQueuePrinter() const { return mbIsQueuePrinter; }
public:
Printer();
@@ -298,68 +298,68 @@ public:
const XubString& GetName() const { return maPrinterName; }
const XubString& GetDriverName() const { return maDriver; }
- BOOL IsDefPrinter() const { return mbDefPrinter; }
- BOOL IsDisplayPrinter() const { return mpDisplayDev != NULL; }
- BOOL IsValid() const { return !IsDisplayPrinter(); }
+ sal_Bool IsDefPrinter() const { return mbDefPrinter; }
+ sal_Bool IsDisplayPrinter() const { return mpDisplayDev != NULL; }
+ sal_Bool IsValid() const { return !IsDisplayPrinter(); }
- ULONG GetCapabilities( USHORT nType ) const;
- BOOL HasSupport( PrinterSupport eFeature ) const;
+ sal_uIntPtr GetCapabilities( sal_uInt16 nType ) const;
+ sal_Bool HasSupport( PrinterSupport eFeature ) const;
- BOOL SetJobSetup( const JobSetup& rSetup );
+ sal_Bool SetJobSetup( const JobSetup& rSetup );
const JobSetup& GetJobSetup() const { return maJobSetup; }
String GetJobValue( const String& rKey ) const { return maJobSetup.GetValue( rKey ); }
void SetJobValue( const String& rKey, const String& rValue ) { maJobSetup.SetValue( rKey, rValue ); }
- BOOL Setup( Window* pWindow = NULL );
- BOOL SetPrinterProps( const Printer* pPrinter );
+ sal_Bool Setup( Window* pWindow = NULL );
+ sal_Bool SetPrinterProps( const Printer* pPrinter );
void SetPrinterOptions( const PrinterOptions& rOptions ) { *mpPrinterOptions = rOptions; }
const PrinterOptions& GetPrinterOptions() const { return( *mpPrinterOptions ); }
- BOOL SetOrientation( Orientation eOrient );
+ sal_Bool SetOrientation( Orientation eOrient );
Orientation GetOrientation() const;
DuplexMode GetDuplexMode() const;
- BOOL SetDuplexMode( DuplexMode );
+ sal_Bool SetDuplexMode( DuplexMode );
// returns the angle that a landscape page will be turned counterclockwise
// wrt to portrait. The return value may be only valid for
// the current paper
int GetLandscapeAngle() const;
- BOOL SetPaperBin( USHORT nPaperBin );
- USHORT GetPaperBin() const;
- BOOL SetPaper( Paper ePaper );
- BOOL SetPaperSizeUser( const Size& rSize );
- BOOL SetPaperSizeUser( const Size& rSize, bool bMatchNearest );
+ sal_Bool SetPaperBin( sal_uInt16 nPaperBin );
+ sal_uInt16 GetPaperBin() const;
+ sal_Bool SetPaper( Paper ePaper );
+ sal_Bool SetPaperSizeUser( const Size& rSize );
+ sal_Bool SetPaperSizeUser( const Size& rSize, bool bMatchNearest );
Paper GetPaper() const;
// returns number of available paper formats
int GetPaperInfoCount() const;
// returns info about paper format nPaper
const PaperInfo& GetPaperInfo( int nPaper ) const;
- USHORT GetPaperBinCount() const;
- XubString GetPaperBinName( USHORT nPaperBin ) const;
+ sal_uInt16 GetPaperBinCount() const;
+ XubString GetPaperBinName( sal_uInt16 nPaperBin ) const;
const Size& GetPaperSizePixel() const { return maPaperSize; }
Size GetPaperSize() const { return PixelToLogic( maPaperSize ); }
const Point& GetPageOffsetPixel() const { return maPageOffset; }
Point GetPageOffset() const { return PixelToLogic( maPageOffset ); }
- BOOL SetCopyCount( USHORT nCopy, BOOL bCollate = FALSE );
- USHORT GetCopyCount() const { return mnCopyCount; }
- BOOL IsCollateCopy() const { return mbCollateCopy; }
+ sal_Bool SetCopyCount( sal_uInt16 nCopy, sal_Bool bCollate = sal_False );
+ sal_uInt16 GetCopyCount() const { return mnCopyCount; }
+ sal_Bool IsCollateCopy() const { return mbCollateCopy; }
- BOOL IsPrinting() const { return mbPrinting; }
+ sal_Bool IsPrinting() const { return mbPrinting; }
void SetPrintFile( const XubString& rFileName ) { maPrintFile = rFileName; }
const XubString& GetPrintFile() const { return maPrintFile; }
- void EnablePrintFile( BOOL bEnable ) { mbPrintFile = bEnable; }
- BOOL IsPrintFileEnabled() const { return mbPrintFile; }
- BOOL AbortJob();
+ void EnablePrintFile( sal_Bool bEnable ) { mbPrintFile = bEnable; }
+ sal_Bool IsPrintFileEnabled() const { return mbPrintFile; }
+ sal_Bool AbortJob();
const XubString& GetCurJobName() const { return maJobName; }
- USHORT GetCurPage() const { return mnCurPage; }
- BOOL IsJobActive() const { return mbJobActive; }
+ sal_uInt16 GetCurPage() const { return mnCurPage; }
+ sal_Bool IsJobActive() const { return mbJobActive; }
- ULONG GetError() const { return ERRCODE_TOERROR(mnError); }
- ULONG GetErrorCode() const { return mnError; }
+ sal_uIntPtr GetError() const { return ERRCODE_TOERROR(mnError); }
+ sal_uIntPtr GetErrorCode() const { return mnError; }
void SetErrorHdl( const Link& rLink ) { maErrorHdl = rLink; }
const Link& GetErrorHdl() const { return maErrorHdl; }
@@ -532,7 +532,7 @@ public:
SAL_DLLPRIVATE int getPageCountProtected() const;
SAL_DLLPRIVATE com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > getPageParametersProtected( int i_nPage ) const;
- SAL_DLLPRIVATE ULONG removeTransparencies( GDIMetaFile& i_rIn, GDIMetaFile& o_rOut );
+ SAL_DLLPRIVATE sal_uIntPtr removeTransparencies( GDIMetaFile& i_rIn, GDIMetaFile& o_rOut );
};
class VCL_DLLPUBLIC PrinterOptionsHelper
diff --git a/vcl/inc/vcl/printergfx.hxx b/vcl/inc/vcl/printergfx.hxx
index 790021ae3adc..4198c9d5e86e 100644
--- a/vcl/inc/vcl/printergfx.hxx
+++ b/vcl/inc/vcl/printergfx.hxx
@@ -364,14 +364,14 @@ public:
const Point** pPolygonList);
void DrawPolyLineBezier (sal_uInt32 nPoints,
const Point* pPath,
- const BYTE* pFlgAry );
+ const sal_uInt8* pFlgAry );
void DrawPolygonBezier (sal_uInt32 nPoints,
const Point* pPath,
- const BYTE* pFlgAry);
+ const sal_uInt8* pFlgAry);
void DrawPolyPolygonBezier (sal_uInt32 nPoly,
const sal_uInt32* pPoints,
const Point* const* pPtAry,
- const BYTE* const* pFlgAry);
+ const sal_uInt8* const* pFlgAry);
// eps
sal_Bool DrawEPS ( const Rectangle& rBoundingBox, void* pPtr, sal_uInt32 nSize);
diff --git a/vcl/inc/vcl/prntypes.hxx b/vcl/inc/vcl/prntypes.hxx
index 6b2af991f2dd..51862ba565e0 100644
--- a/vcl/inc/vcl/prntypes.hxx
+++ b/vcl/inc/vcl/prntypes.hxx
@@ -48,48 +48,48 @@ enum Orientation { ORIENTATION_PORTRAIT, ORIENTATION_LANDSCAPE };
// - QueueInfo-Types -
// -------------------
-#define QUEUE_STATUS_READY ((ULONG)0x00000001)
-#define QUEUE_STATUS_PAUSED ((ULONG)0x00000002)
-#define QUEUE_STATUS_PENDING_DELETION ((ULONG)0x00000004)
-#define QUEUE_STATUS_BUSY ((ULONG)0x00000008)
-#define QUEUE_STATUS_INITIALIZING ((ULONG)0x00000010)
-#define QUEUE_STATUS_WAITING ((ULONG)0x00000020)
-#define QUEUE_STATUS_WARMING_UP ((ULONG)0x00000040)
-#define QUEUE_STATUS_PROCESSING ((ULONG)0x00000080)
-#define QUEUE_STATUS_PRINTING ((ULONG)0x00000100)
-#define QUEUE_STATUS_OFFLINE ((ULONG)0x00000200)
-#define QUEUE_STATUS_ERROR ((ULONG)0x00000400)
-#define QUEUE_STATUS_SERVER_UNKNOWN ((ULONG)0x00000800)
-#define QUEUE_STATUS_PAPER_JAM ((ULONG)0x00001000)
-#define QUEUE_STATUS_PAPER_OUT ((ULONG)0x00002000)
-#define QUEUE_STATUS_MANUAL_FEED ((ULONG)0x00004000)
-#define QUEUE_STATUS_PAPER_PROBLEM ((ULONG)0x00008000)
-#define QUEUE_STATUS_IO_ACTIVE ((ULONG)0x00010000)
-#define QUEUE_STATUS_OUTPUT_BIN_FULL ((ULONG)0x00020000)
-#define QUEUE_STATUS_TONER_LOW ((ULONG)0x00040000)
-#define QUEUE_STATUS_NO_TONER ((ULONG)0x00080000)
-#define QUEUE_STATUS_PAGE_PUNT ((ULONG)0x00100000)
-#define QUEUE_STATUS_USER_INTERVENTION ((ULONG)0x00200000)
-#define QUEUE_STATUS_OUT_OF_MEMORY ((ULONG)0x00400000)
-#define QUEUE_STATUS_DOOR_OPEN ((ULONG)0x00800000)
-#define QUEUE_STATUS_POWER_SAVE ((ULONG)0x01000000)
+#define QUEUE_STATUS_READY ((sal_uIntPtr)0x00000001)
+#define QUEUE_STATUS_PAUSED ((sal_uIntPtr)0x00000002)
+#define QUEUE_STATUS_PENDING_DELETION ((sal_uIntPtr)0x00000004)
+#define QUEUE_STATUS_BUSY ((sal_uIntPtr)0x00000008)
+#define QUEUE_STATUS_INITIALIZING ((sal_uIntPtr)0x00000010)
+#define QUEUE_STATUS_WAITING ((sal_uIntPtr)0x00000020)
+#define QUEUE_STATUS_WARMING_UP ((sal_uIntPtr)0x00000040)
+#define QUEUE_STATUS_PROCESSING ((sal_uIntPtr)0x00000080)
+#define QUEUE_STATUS_PRINTING ((sal_uIntPtr)0x00000100)
+#define QUEUE_STATUS_OFFLINE ((sal_uIntPtr)0x00000200)
+#define QUEUE_STATUS_ERROR ((sal_uIntPtr)0x00000400)
+#define QUEUE_STATUS_SERVER_UNKNOWN ((sal_uIntPtr)0x00000800)
+#define QUEUE_STATUS_PAPER_JAM ((sal_uIntPtr)0x00001000)
+#define QUEUE_STATUS_PAPER_OUT ((sal_uIntPtr)0x00002000)
+#define QUEUE_STATUS_MANUAL_FEED ((sal_uIntPtr)0x00004000)
+#define QUEUE_STATUS_PAPER_PROBLEM ((sal_uIntPtr)0x00008000)
+#define QUEUE_STATUS_IO_ACTIVE ((sal_uIntPtr)0x00010000)
+#define QUEUE_STATUS_OUTPUT_BIN_FULL ((sal_uIntPtr)0x00020000)
+#define QUEUE_STATUS_TONER_LOW ((sal_uIntPtr)0x00040000)
+#define QUEUE_STATUS_NO_TONER ((sal_uIntPtr)0x00080000)
+#define QUEUE_STATUS_PAGE_PUNT ((sal_uIntPtr)0x00100000)
+#define QUEUE_STATUS_USER_INTERVENTION ((sal_uIntPtr)0x00200000)
+#define QUEUE_STATUS_OUT_OF_MEMORY ((sal_uIntPtr)0x00400000)
+#define QUEUE_STATUS_DOOR_OPEN ((sal_uIntPtr)0x00800000)
+#define QUEUE_STATUS_POWER_SAVE ((sal_uIntPtr)0x01000000)
-#define QUEUE_JOBS_DONTKNOW ((ULONG)0xFFFFFFFF)
+#define QUEUE_JOBS_DONTKNOW ((sal_uIntPtr)0xFFFFFFFF)
// -----------------
// - Printer-Types -
// -----------------
-#define PRINTER_CAPABILITIES_SUPPORTDIALOG ((USHORT)1)
-#define PRINTER_CAPABILITIES_COPIES ((USHORT)2)
-#define PRINTER_CAPABILITIES_COLLATECOPIES ((USHORT)3)
-#define PRINTER_CAPABILITIES_SETORIENTATION ((USHORT)4)
-#define PRINTER_CAPABILITIES_SETPAPERBIN ((USHORT)5)
-#define PRINTER_CAPABILITIES_SETPAPERSIZE ((USHORT)6)
-#define PRINTER_CAPABILITIES_SETPAPER ((USHORT)7)
-#define PRINTER_CAPABILITIES_FAX ((USHORT)8)
-#define PRINTER_CAPABILITIES_PDF ((USHORT)9)
-#define PRINTER_CAPABILITIES_EXTERNALDIALOG ((USHORT)10)
-#define PRINTER_CAPABILITIES_SETDUPLEX ((USHORT)11)
+#define PRINTER_CAPABILITIES_SUPPORTDIALOG ((sal_uInt16)1)
+#define PRINTER_CAPABILITIES_COPIES ((sal_uInt16)2)
+#define PRINTER_CAPABILITIES_COLLATECOPIES ((sal_uInt16)3)
+#define PRINTER_CAPABILITIES_SETORIENTATION ((sal_uInt16)4)
+#define PRINTER_CAPABILITIES_SETPAPERBIN ((sal_uInt16)5)
+#define PRINTER_CAPABILITIES_SETPAPERSIZE ((sal_uInt16)6)
+#define PRINTER_CAPABILITIES_SETPAPER ((sal_uInt16)7)
+#define PRINTER_CAPABILITIES_FAX ((sal_uInt16)8)
+#define PRINTER_CAPABILITIES_PDF ((sal_uInt16)9)
+#define PRINTER_CAPABILITIES_EXTERNALDIALOG ((sal_uInt16)10)
+#define PRINTER_CAPABILITIES_SETDUPLEX ((sal_uInt16)11)
#endif // _SV_PRNTYPES_HXX
diff --git a/vcl/inc/vcl/ptrstyle.hxx b/vcl/inc/vcl/ptrstyle.hxx
index 796613bd5726..be6991635bb7 100644
--- a/vcl/inc/vcl/ptrstyle.hxx
+++ b/vcl/inc/vcl/ptrstyle.hxx
@@ -34,7 +34,7 @@
// - Pointer-Types -
// -----------------
-typedef USHORT PointerStyle;
+typedef sal_uInt16 PointerStyle;
#define POINTER_ARROW ((PointerStyle)0)
#define POINTER_NULL ((PointerStyle)1)
diff --git a/vcl/inc/vcl/regband.hxx b/vcl/inc/vcl/regband.hxx
index 2e34fdcd5677..6492c1ad39ff 100644
--- a/vcl/inc/vcl/regband.hxx
+++ b/vcl/inc/vcl/regband.hxx
@@ -57,7 +57,7 @@ struct ImplRegionBandSep
ImplRegionBandSep* mpNextSep;
long mnXLeft;
long mnXRight;
- BOOL mbRemoved;
+ sal_Bool mbRemoved;
};
enum LineType { LINE_ASCENDING, LINE_DESCENDING, LINE_HORIZONTAL };
@@ -68,7 +68,7 @@ struct ImplRegionBandPoint
ImplRegionBandPoint* mpNextBandPoint;
long mnX;
long mnLineId;
- BOOL mbEndPoint;
+ sal_Bool mbEndPoint;
LineType meLineType;
};
@@ -85,7 +85,7 @@ public:
ImplRegionBandPoint* mpFirstBandPoint; // root of the list with lines
long mnYTop; // actual boundary of the band
long mnYBottom;
- BOOL mbTouched;
+ sal_Bool mbTouched;
// create y-band with boundaries
ImplRegionBand( long nYTop, long nYBottom );
@@ -94,10 +94,10 @@ public:
The new ImplRegionBand object will
be a copy of this band.
@param bIgnorePoints
- When <TRUE/> (the default) the
+ When <sal_True/> (the default) the
band points pointed to by
mpFirstBandPoint are not copied.
- When <FALSE/> they are copied.
+ When <sal_False/> they are copied.
You need the points when you are
planning to call ProcessPoints()
later on.
@@ -110,14 +110,14 @@ public:
long GetXRightBoundary() const;
// combine overlapping bands
- BOOL OptimizeBand();
+ sal_Bool OptimizeBand();
// generate separations from lines and process
// union with existing separations
void ProcessPoints();
// insert point in the list for later processing
- BOOL InsertPoint( long nX, long nLineID,
- BOOL bEndPoint, LineType eLineType );
+ sal_Bool InsertPoint( long nX, long nLineID,
+ sal_Bool bEndPoint, LineType eLineType );
void Union( long nXLeft, long nXRight );
void Intersect( long nXLeft, long nXRight );
@@ -127,13 +127,13 @@ public:
void MoveX( long nHorzMove );
void ScaleX( double fHorzScale );
- BOOL IsInside( long nX );
- BOOL IsInside( long nLeft, long nRight );
- BOOL IsOver( long nLeft, long nRight );
+ sal_Bool IsInside( long nX );
+ sal_Bool IsInside( long nLeft, long nRight );
+ sal_Bool IsOver( long nLeft, long nRight );
- BOOL IsEmpty() const { return ((!mpFirstSep) && (!mpFirstBandPoint)); }
+ sal_Bool IsEmpty() const { return ((!mpFirstSep) && (!mpFirstBandPoint)); }
- BOOL operator==( const ImplRegionBand& rRegionBand ) const;
+ sal_Bool operator==( const ImplRegionBand& rRegionBand ) const;
/** Split the called band at the given vertical coordinate. After the
split the called band will cover the upper part not including nY.
diff --git a/vcl/inc/vcl/region.h b/vcl/inc/vcl/region.h
index b10f0eaf0f0f..b45ab91be149 100644
--- a/vcl/inc/vcl/region.h
+++ b/vcl/inc/vcl/region.h
@@ -49,7 +49,7 @@ struct ImplRegionHandle
Region* mpRegion;
ImplRegionBand* mpCurrRectBand;
ImplRegionBandSep* mpCurrRectBandSep;
- BOOL mbFirst;
+ sal_Bool mbFirst;
};
// ------------------
@@ -72,8 +72,8 @@ public:
ImplRegionBase( int nCount = 1 ); // TODO: replace manual refcounting
virtual ~ImplRegionBase();
public:
- ULONG mnRefCount;
- ULONG mnRectCount;
+ sal_uIntPtr mnRefCount;
+ sal_uIntPtr mnRectCount;
PolyPolygon* mpPolyPoly;
basegfx::B2DPolyPolygon* mpB2DPolyPoly;
};
@@ -98,14 +98,14 @@ public:
void CreateBandRange( long nYTop, long nYBottom );
void InsertBands( long nYTop, long nYBottom );
- BOOL InsertSingleBand( ImplRegionBand* mpImplRegionBand,
+ sal_Bool InsertSingleBand( ImplRegionBand* mpImplRegionBand,
long nYBandPosition );
- BOOL InsertLine( const Point & rFirstPoint,
+ sal_Bool InsertLine( const Point & rFirstPoint,
const Point & rSecondPoint,
long nLineID );
- BOOL InsertPoint( const Point &rPoint,
+ sal_Bool InsertPoint( const Point &rPoint,
long nLineID,
- BOOL bEndPoint, LineType eLineType );
+ sal_Bool bEndPoint, LineType eLineType );
/** Insert one band either after another band or as the first or only
band. Both the forward as well as the backward links are updated.
@@ -125,7 +125,7 @@ public:
void XOr( long nLeft, long nTop, long nRight, long nBottom );
// remove emtpy rects
- BOOL OptimizeBandList();
+ sal_Bool OptimizeBandList();
friend SvStream& operator>>( SvStream& rIStm, Region& rRegion );
friend SvStream& operator<<( SvStream& rOStm, const Region& rRegion );
diff --git a/vcl/inc/vcl/region.hxx b/vcl/inc/vcl/region.hxx
index ddfba57ffdcf..ba33d69485b8 100644
--- a/vcl/inc/vcl/region.hxx
+++ b/vcl/inc/vcl/region.hxx
@@ -69,12 +69,12 @@ private:
SAL_DLLPRIVATE inline void ImplPolyPolyRegionToBandRegion();
SAL_DLLPRIVATE const ImplRegion* ImplGetImplRegion() const { return mpImplRegion; }
SAL_DLLPRIVATE ImplRegion* ImplGetImplRegion() { return mpImplRegion; }
- SAL_DLLPRIVATE BOOL ImplGetFirstRect( ImplRegionInfo& rImplRegionInfo,
+ SAL_DLLPRIVATE sal_Bool ImplGetFirstRect( ImplRegionInfo& rImplRegionInfo,
long& nX, long& nY, long& nWidth, long& nHeight ) const;
- SAL_DLLPRIVATE BOOL ImplGetNextRect( ImplRegionInfo& rImplRegionInfo,
+ SAL_DLLPRIVATE sal_Bool ImplGetNextRect( ImplRegionInfo& rImplRegionInfo,
long& nX, long& nY, long& nWidth, long& nHeight ) const;
SAL_DLLPRIVATE void ImplBeginAddRect( );
- SAL_DLLPRIVATE BOOL ImplAddRect( const Rectangle& rRect );
+ SAL_DLLPRIVATE sal_Bool ImplAddRect( const Rectangle& rRect );
SAL_DLLPRIVATE void ImplEndAddRect( );
#ifdef DBG_UTIL
@@ -93,48 +93,48 @@ public:
void Move( long nHorzMove, long nVertMove );
void Scale( double fScaleX, double fScaleY );
- BOOL Union( const Rectangle& rRegion );
- BOOL Intersect( const Rectangle& rRegion );
- BOOL Exclude( const Rectangle& rRegion );
- BOOL XOr( const Rectangle& rRegion );
- BOOL Union( const Region& rRegion );
- BOOL Intersect( const Region& rRegion );
- BOOL Exclude( const Region& rRegion );
- BOOL XOr( const Region& rRegion );
+ sal_Bool Union( const Rectangle& rRegion );
+ sal_Bool Intersect( const Rectangle& rRegion );
+ sal_Bool Exclude( const Rectangle& rRegion );
+ sal_Bool XOr( const Rectangle& rRegion );
+ sal_Bool Union( const Region& rRegion );
+ sal_Bool Intersect( const Region& rRegion );
+ sal_Bool Exclude( const Region& rRegion );
+ sal_Bool XOr( const Region& rRegion );
RegionType GetType() const;
- BOOL IsEmpty() const { return GetType() == REGION_EMPTY; };
- BOOL IsNull() const { return GetType() == REGION_NULL; };
+ sal_Bool IsEmpty() const { return GetType() == REGION_EMPTY; };
+ sal_Bool IsNull() const { return GetType() == REGION_NULL; };
void SetEmpty();
void SetNull();
Rectangle GetBoundRect() const;
- BOOL HasPolyPolygon() const;
+ sal_Bool HasPolyPolygon() const;
PolyPolygon GetPolyPolygon() const;
- // returns an empty polypolygon in case HasPolyPolygon is FALSE
+ // returns an empty polypolygon in case HasPolyPolygon is sal_False
const basegfx::B2DPolyPolygon GetB2DPolyPolygon() const;
// returns a PolyPolygon either copied from the set PolyPolygon region
// or created from the constituent rectangles
basegfx::B2DPolyPolygon ConvertToB2DPolyPolygon();
- ULONG GetRectCount() const;
+ sal_uIntPtr GetRectCount() const;
RegionHandle BeginEnumRects();
- BOOL GetEnumRects( RegionHandle hRegionHandle, Rectangle& rRect );
- BOOL GetNextEnumRect( RegionHandle hRegionHandle, Rectangle& rRect )
+ sal_Bool GetEnumRects( RegionHandle hRegionHandle, Rectangle& rRect );
+ sal_Bool GetNextEnumRect( RegionHandle hRegionHandle, Rectangle& rRect )
{ return GetEnumRects( hRegionHandle, rRect ); }
void EndEnumRects( RegionHandle hRegionHandle );
- BOOL IsInside( const Point& rPoint ) const;
- BOOL IsInside( const Rectangle& rRect ) const;
- BOOL IsOver( const Rectangle& rRect ) const;
+ sal_Bool IsInside( const Point& rPoint ) const;
+ sal_Bool IsInside( const Rectangle& rRect ) const;
+ sal_Bool IsOver( const Rectangle& rRect ) const;
Region& operator=( const Region& rRegion );
Region& operator=( const Rectangle& rRect );
- BOOL operator==( const Region& rRegion ) const;
- BOOL operator!=( const Region& rRegion ) const
+ sal_Bool operator==( const Region& rRegion ) const;
+ sal_Bool operator!=( const Region& rRegion ) const
{ return !(Region::operator==( rRegion )); }
friend VCL_DLLPUBLIC SvStream& operator>>( SvStream& rIStm, Region& rRegion );
diff --git a/vcl/inc/vcl/salbmp.hxx b/vcl/inc/vcl/salbmp.hxx
index 4aca4a9277e9..e12d5a21152c 100644
--- a/vcl/inc/vcl/salbmp.hxx
+++ b/vcl/inc/vcl/salbmp.hxx
@@ -45,16 +45,16 @@ public:
virtual ~SalBitmap();
virtual bool Create( const Size& rSize,
- USHORT nBitCount,
+ sal_uInt16 nBitCount,
const BitmapPalette& rPal ) = 0;
virtual bool Create( const SalBitmap& rSalBmp ) = 0;
virtual bool Create( const SalBitmap& rSalBmp,
SalGraphics* pGraphics ) = 0;
virtual bool Create( const SalBitmap& rSalBmp,
- USHORT nNewBitCount ) = 0;
+ sal_uInt16 nNewBitCount ) = 0;
virtual void Destroy() = 0;
virtual Size GetSize() const = 0;
- virtual USHORT GetBitCount() const = 0;
+ virtual sal_uInt16 GetBitCount() const = 0;
virtual BitmapBuffer* AcquireBuffer( bool bReadOnly ) = 0;
virtual void ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly ) = 0;
diff --git a/vcl/inc/vcl/salbtype.hxx b/vcl/inc/vcl/salbtype.hxx
index bbb70efcdf22..7105313da5cf 100644
--- a/vcl/inc/vcl/salbtype.hxx
+++ b/vcl/inc/vcl/salbtype.hxx
@@ -42,9 +42,9 @@
// - Memory -
// ----------
-typedef BYTE* HPBYTE;
+typedef sal_uInt8* HPBYTE;
typedef HPBYTE Scanline;
-typedef const BYTE* ConstHPBYTE;
+typedef const sal_uInt8* ConstHPBYTE;
typedef ConstHPBYTE ConstScanline;
// ------------------
@@ -84,22 +84,22 @@ typedef ConstHPBYTE ConstScanline;
// ------------------------------------------------------------------
#define MASK_TO_COLOR( d_nVal, d_RM, d_GM, d_BM, d_RS, d_GS, d_BS, d_Col ) \
-ULONG _def_cR = (BYTE) ( d_RS < 0L ? ( (d_nVal) & d_RM ) << -d_RS : ( (d_nVal) & d_RM ) >> d_RS ); \
-ULONG _def_cG = (BYTE) ( d_GS < 0L ? ( (d_nVal) & d_GM ) << -d_GS : ( (d_nVal) & d_GM ) >> d_GS ); \
-ULONG _def_cB = (BYTE) ( d_BS < 0L ? ( (d_nVal) & d_BM ) << -d_BS : ( (d_nVal) & d_BM ) >> d_BS ); \
-d_Col = BitmapColor( (BYTE) ( _def_cR | ( ( _def_cR & mnROr ) >> mnROrShift ) ), \
- (BYTE) ( _def_cG | ( ( _def_cG & mnGOr ) >> mnGOrShift ) ), \
- (BYTE) ( _def_cB | ( ( _def_cB & mnBOr ) >> mnBOrShift ) ) );
+sal_uIntPtr _def_cR = (sal_uInt8) ( d_RS < 0L ? ( (d_nVal) & d_RM ) << -d_RS : ( (d_nVal) & d_RM ) >> d_RS ); \
+sal_uIntPtr _def_cG = (sal_uInt8) ( d_GS < 0L ? ( (d_nVal) & d_GM ) << -d_GS : ( (d_nVal) & d_GM ) >> d_GS ); \
+sal_uIntPtr _def_cB = (sal_uInt8) ( d_BS < 0L ? ( (d_nVal) & d_BM ) << -d_BS : ( (d_nVal) & d_BM ) >> d_BS ); \
+d_Col = BitmapColor( (sal_uInt8) ( _def_cR | ( ( _def_cR & mnROr ) >> mnROrShift ) ), \
+ (sal_uInt8) ( _def_cG | ( ( _def_cG & mnGOr ) >> mnGOrShift ) ), \
+ (sal_uInt8) ( _def_cB | ( ( _def_cB & mnBOr ) >> mnBOrShift ) ) );
// ------------------------------------------------------------------
#define COLOR_TO_MASK( d_rCol, d_RM, d_GM, d_BM, d_RS, d_GS, d_BS ) \
-( ( ( ( d_RS < 0L ) ? ( (UINT32) (d_rCol).GetRed() >> -d_RS ) : \
- ( (UINT32) (d_rCol).GetRed() << d_RS ) ) & d_RM ) | \
- ( ( ( d_GS < 0L ) ? ( (UINT32) (d_rCol).GetGreen() >> -d_GS ) : \
- ( (UINT32) (d_rCol).GetGreen() << d_GS ) ) & d_GM ) | \
- ( ( ( d_BS < 0L ) ? ( (UINT32) (d_rCol).GetBlue() >> -d_BS ) : \
- ( (UINT32) (d_rCol).GetBlue() << d_BS ) ) & d_BM ) )
+( ( ( ( d_RS < 0L ) ? ( (sal_uInt32) (d_rCol).GetRed() >> -d_RS ) : \
+ ( (sal_uInt32) (d_rCol).GetRed() << d_RS ) ) & d_RM ) | \
+ ( ( ( d_GS < 0L ) ? ( (sal_uInt32) (d_rCol).GetGreen() >> -d_GS ) : \
+ ( (sal_uInt32) (d_rCol).GetGreen() << d_GS ) ) & d_GM ) | \
+ ( ( ( d_BS < 0L ) ? ( (sal_uInt32) (d_rCol).GetBlue() >> -d_BS ) : \
+ ( (sal_uInt32) (d_rCol).GetBlue() << d_BS ) ) & d_BM ) )
// ---------------
// - BitmapColor -
@@ -116,53 +116,53 @@ private:
// !!! zugegriffen wird, darf diese Klasse weder
// !!! in der Groesse noch der Reihenfolge der
// !!! Member veraendert werden (KA 02.09.97)
- BYTE mcBlueOrIndex;
- BYTE mcGreen;
- BYTE mcRed;
- BYTE mbIndex;
+ sal_uInt8 mcBlueOrIndex;
+ sal_uInt8 mcGreen;
+ sal_uInt8 mcRed;
+ sal_uInt8 mbIndex;
public:
inline BitmapColor();
inline BitmapColor( const BitmapColor& rBitmapColor );
- inline BitmapColor( BYTE cRed, BYTE cGreen, BYTE cBlue );
+ inline BitmapColor( sal_uInt8 cRed, sal_uInt8 cGreen, sal_uInt8 cBlue );
inline BitmapColor( const Color& rColor );
- inline BitmapColor( BYTE cIndex );
+ inline BitmapColor( sal_uInt8 cIndex );
inline ~BitmapColor() {};
- inline BOOL operator==( const BitmapColor& rBitmapColor ) const;
- inline BOOL operator!=( const BitmapColor& rBitmapColor ) const;
+ inline sal_Bool operator==( const BitmapColor& rBitmapColor ) const;
+ inline sal_Bool operator!=( const BitmapColor& rBitmapColor ) const;
inline BitmapColor& operator=( const BitmapColor& rBitmapColor );
- inline BOOL IsIndex() const;
+ inline sal_Bool IsIndex() const;
- inline BYTE GetRed() const;
- inline void SetRed( BYTE cRed );
+ inline sal_uInt8 GetRed() const;
+ inline void SetRed( sal_uInt8 cRed );
- inline BYTE GetGreen() const;
- inline void SetGreen( BYTE cGreen );
+ inline sal_uInt8 GetGreen() const;
+ inline void SetGreen( sal_uInt8 cGreen );
- inline BYTE GetBlue() const;
- inline void SetBlue( BYTE cBlue );
+ inline sal_uInt8 GetBlue() const;
+ inline void SetBlue( sal_uInt8 cBlue );
- inline BYTE GetIndex() const;
- inline void SetIndex( BYTE cIndex );
+ inline sal_uInt8 GetIndex() const;
+ inline void SetIndex( sal_uInt8 cIndex );
operator Color() const;
- inline operator BYTE() const;
+ inline operator sal_uInt8() const;
- inline BYTE GetBlueOrIndex() const;
+ inline sal_uInt8 GetBlueOrIndex() const;
inline BitmapColor& Invert();
- inline BYTE GetLuminance() const;
- inline BitmapColor& IncreaseLuminance( BYTE cGreyInc );
- inline BitmapColor& DecreaseLuminance( BYTE cGreyDec );
+ inline sal_uInt8 GetLuminance() const;
+ inline BitmapColor& IncreaseLuminance( sal_uInt8 cGreyInc );
+ inline BitmapColor& DecreaseLuminance( sal_uInt8 cGreyDec );
- inline BitmapColor& Merge( const BitmapColor& rColor, BYTE cTransparency );
- inline BitmapColor& Merge( BYTE cR, BYTE cG, BYTE cB, BYTE cTransparency );
+ inline BitmapColor& Merge( const BitmapColor& rColor, sal_uInt8 cTransparency );
+ inline BitmapColor& Merge( sal_uInt8 cR, sal_uInt8 cG, sal_uInt8 cB, sal_uInt8 cTransparency );
- inline ULONG GetColorError( const BitmapColor& rBitmapColor ) const;
+ inline sal_uIntPtr GetColorError( const BitmapColor& rBitmapColor ) const;
};
// ---------------
@@ -179,7 +179,7 @@ class VCL_DLLPUBLIC BitmapPalette
private:
BitmapColor* mpBitmapColor;
- USHORT mnCount;
+ sal_uInt16 mnCount;
//#if 0 // _SOLAR__PRIVATE
@@ -193,21 +193,21 @@ public:
inline BitmapPalette();
inline BitmapPalette( const BitmapPalette& rBitmapPalette );
- inline BitmapPalette( USHORT nCount );
+ inline BitmapPalette( sal_uInt16 nCount );
inline ~BitmapPalette();
inline BitmapPalette& operator=( const BitmapPalette& rBitmapPalette );
- inline BOOL operator==( const BitmapPalette& rBitmapPalette ) const;
- inline BOOL operator!=( const BitmapPalette& rBitmapPalette ) const;
- inline BOOL operator!();
+ inline sal_Bool operator==( const BitmapPalette& rBitmapPalette ) const;
+ inline sal_Bool operator!=( const BitmapPalette& rBitmapPalette ) const;
+ inline sal_Bool operator!();
- inline USHORT GetEntryCount() const;
- inline void SetEntryCount( USHORT nCount );
+ inline sal_uInt16 GetEntryCount() const;
+ inline void SetEntryCount( sal_uInt16 nCount );
- inline const BitmapColor& operator[]( USHORT nIndex ) const;
- inline BitmapColor& operator[]( USHORT nIndex );
+ inline const BitmapColor& operator[]( sal_uInt16 nIndex ) const;
+ inline BitmapColor& operator[]( sal_uInt16 nIndex );
- inline USHORT GetBestIndex( const BitmapColor& rCol ) const;
+ inline sal_uInt16 GetBestIndex( const BitmapColor& rCol ) const;
bool IsGreyPalette() const;
};
@@ -217,29 +217,29 @@ public:
class VCL_DLLPUBLIC ColorMask
{
- ULONG mnRMask;
- ULONG mnGMask;
- ULONG mnBMask;
+ sal_uIntPtr mnRMask;
+ sal_uIntPtr mnGMask;
+ sal_uIntPtr mnBMask;
long mnRShift;
long mnGShift;
long mnBShift;
- ULONG mnROrShift;
- ULONG mnGOrShift;
- ULONG mnBOrShift;
- ULONG mnROr;
- ULONG mnGOr;
- ULONG mnBOr;
+ sal_uIntPtr mnROrShift;
+ sal_uIntPtr mnGOrShift;
+ sal_uIntPtr mnBOrShift;
+ sal_uIntPtr mnROr;
+ sal_uIntPtr mnGOr;
+ sal_uIntPtr mnBOr;
- SAL_DLLPRIVATE inline long ImplCalcMaskShift( ULONG nMask, ULONG& rOr, ULONG& rOrShift ) const;
+ SAL_DLLPRIVATE inline long ImplCalcMaskShift( sal_uIntPtr nMask, sal_uIntPtr& rOr, sal_uIntPtr& rOrShift ) const;
public:
- inline ColorMask( ULONG nRedMask = 0UL, ULONG nGreenMask = 0UL, ULONG nBlueMask = 0UL );
+ inline ColorMask( sal_uIntPtr nRedMask = 0UL, sal_uIntPtr nGreenMask = 0UL, sal_uIntPtr nBlueMask = 0UL );
inline ~ColorMask() {}
- inline ULONG GetRedMask() const;
- inline ULONG GetGreenMask() const;
- inline ULONG GetBlueMask() const;
+ inline sal_uIntPtr GetRedMask() const;
+ inline sal_uIntPtr GetGreenMask() const;
+ inline sal_uIntPtr GetBlueMask() const;
inline void GetColorFor8Bit( BitmapColor& rColor, ConstHPBYTE pPixel ) const;
inline void SetColorFor8Bit( const BitmapColor& rColor, HPBYTE pPixel ) const;
@@ -262,14 +262,14 @@ public:
struct VCL_DLLPUBLIC BitmapBuffer
{
- ULONG mnFormat;
+ sal_uIntPtr mnFormat;
long mnWidth;
long mnHeight;
long mnScanlineSize;
- USHORT mnBitCount;
+ sal_uInt16 mnBitCount;
ColorMask maColorMask;
BitmapPalette maPalette;
- BYTE* mpBits;
+ sal_uInt8* mpBits;
BitmapBuffer(){}
~BitmapBuffer() {}
@@ -280,7 +280,7 @@ struct VCL_DLLPUBLIC BitmapBuffer
// ---------------------
VCL_DLLPUBLIC BitmapBuffer* StretchAndConvert( const BitmapBuffer& rSrcBuffer, const SalTwoRect& rTwoRect,
- ULONG nDstBitmapFormat, BitmapPalette* pDstPal = NULL, ColorMask* pDstMask = NULL );
+ sal_uIntPtr nDstBitmapFormat, BitmapPalette* pDstPal = NULL, ColorMask* pDstMask = NULL );
// ------------------------------------------------------------------
@@ -288,17 +288,17 @@ inline BitmapColor::BitmapColor() :
mcBlueOrIndex ( 0 ),
mcGreen ( 0 ),
mcRed ( 0 ),
- mbIndex ( FALSE )
+ mbIndex ( sal_False )
{
}
// ------------------------------------------------------------------
-inline BitmapColor::BitmapColor( BYTE cRed, BYTE cGreen, BYTE cBlue ) :
+inline BitmapColor::BitmapColor( sal_uInt8 cRed, sal_uInt8 cGreen, sal_uInt8 cBlue ) :
mcBlueOrIndex ( cBlue ),
mcGreen ( cGreen ),
mcRed ( cRed ),
- mbIndex ( FALSE )
+ mbIndex ( sal_False )
{
}
@@ -324,17 +324,17 @@ inline BitmapColor::BitmapColor( const Color& rColor ) :
// ------------------------------------------------------------------
-inline BitmapColor::BitmapColor( BYTE cIndex ) :
+inline BitmapColor::BitmapColor( sal_uInt8 cIndex ) :
mcBlueOrIndex ( cIndex ),
mcGreen ( 0 ),
mcRed ( 0 ),
- mbIndex ( TRUE )
+ mbIndex ( sal_True )
{
}
// ------------------------------------------------------------------
-inline BOOL BitmapColor::operator==( const BitmapColor& rBitmapColor ) const
+inline sal_Bool BitmapColor::operator==( const BitmapColor& rBitmapColor ) const
{
return( ( mcBlueOrIndex == rBitmapColor.mcBlueOrIndex ) &&
( mbIndex ? rBitmapColor.mbIndex :
@@ -343,7 +343,7 @@ inline BOOL BitmapColor::operator==( const BitmapColor& rBitmapColor ) const
// ------------------------------------------------------------------
-inline BOOL BitmapColor::operator!=( const BitmapColor& rBitmapColor ) const
+inline sal_Bool BitmapColor::operator!=( const BitmapColor& rBitmapColor ) const
{
return !( *this == rBitmapColor );
}
@@ -362,14 +362,14 @@ inline BitmapColor& BitmapColor::operator=( const BitmapColor& rBitmapColor )
// ------------------------------------------------------------------
-inline BOOL BitmapColor::IsIndex() const
+inline sal_Bool BitmapColor::IsIndex() const
{
return mbIndex;
}
// ------------------------------------------------------------------
-inline BYTE BitmapColor::GetRed() const
+inline sal_uInt8 BitmapColor::GetRed() const
{
DBG_ASSERT( !mbIndex, "Pixel represents index into colortable!" );
return mcRed;
@@ -377,7 +377,7 @@ inline BYTE BitmapColor::GetRed() const
// ------------------------------------------------------------------
-inline void BitmapColor::SetRed( BYTE cRed )
+inline void BitmapColor::SetRed( sal_uInt8 cRed )
{
DBG_ASSERT( !mbIndex, "Pixel represents index into colortable!" );
mcRed = cRed;
@@ -385,7 +385,7 @@ inline void BitmapColor::SetRed( BYTE cRed )
// ------------------------------------------------------------------
-inline BYTE BitmapColor::GetGreen() const
+inline sal_uInt8 BitmapColor::GetGreen() const
{
DBG_ASSERT( !mbIndex, "Pixel represents index into colortable!" );
return mcGreen;
@@ -393,7 +393,7 @@ inline BYTE BitmapColor::GetGreen() const
// ------------------------------------------------------------------
-inline void BitmapColor::SetGreen( BYTE cGreen )
+inline void BitmapColor::SetGreen( sal_uInt8 cGreen )
{
DBG_ASSERT( !mbIndex, "Pixel represents index into colortable!" );
mcGreen = cGreen;
@@ -401,7 +401,7 @@ inline void BitmapColor::SetGreen( BYTE cGreen )
// ------------------------------------------------------------------
-inline BYTE BitmapColor::GetBlue() const
+inline sal_uInt8 BitmapColor::GetBlue() const
{
DBG_ASSERT( !mbIndex, "Pixel represents index into colortable!" );
return mcBlueOrIndex;
@@ -409,7 +409,7 @@ inline BYTE BitmapColor::GetBlue() const
// ------------------------------------------------------------------
-inline void BitmapColor::SetBlue( BYTE cBlue )
+inline void BitmapColor::SetBlue( sal_uInt8 cBlue )
{
DBG_ASSERT( !mbIndex, "Pixel represents index into colortable!" );
mcBlueOrIndex = cBlue;
@@ -417,7 +417,7 @@ inline void BitmapColor::SetBlue( BYTE cBlue )
// ------------------------------------------------------------------
-inline BYTE BitmapColor::GetIndex() const
+inline sal_uInt8 BitmapColor::GetIndex() const
{
DBG_ASSERT( mbIndex, "Pixel represents color values!" );
return mcBlueOrIndex;
@@ -425,7 +425,7 @@ inline BYTE BitmapColor::GetIndex() const
// ------------------------------------------------------------------
-inline void BitmapColor::SetIndex( BYTE cIndex )
+inline void BitmapColor::SetIndex( sal_uInt8 cIndex )
{
DBG_ASSERT( mbIndex, "Pixel represents color values!" );
mcBlueOrIndex = cIndex;
@@ -441,7 +441,7 @@ inline BitmapColor::operator Color() const
// ------------------------------------------------------------------
-inline BitmapColor::operator BYTE() const
+inline BitmapColor::operator sal_uInt8() const
{
DBG_ASSERT( mbIndex, "Pixel represents color values!" );
return mcBlueOrIndex;
@@ -449,7 +449,7 @@ inline BitmapColor::operator BYTE() const
// ------------------------------------------------------------------
-inline BYTE BitmapColor::GetBlueOrIndex() const
+inline sal_uInt8 BitmapColor::GetBlueOrIndex() const
{
// #i47518# Yield a value regardless of mbIndex
return mcBlueOrIndex;
@@ -467,39 +467,39 @@ inline BitmapColor& BitmapColor::Invert()
// ------------------------------------------------------------------
-inline BYTE BitmapColor::GetLuminance() const
+inline sal_uInt8 BitmapColor::GetLuminance() const
{
DBG_ASSERT( !mbIndex, "Pixel represents index into colortable!" );
- return( (BYTE) ( ( mcBlueOrIndex * 28UL + mcGreen * 151UL + mcRed * 77UL ) >> 8UL ) );
+ return( (sal_uInt8) ( ( mcBlueOrIndex * 28UL + mcGreen * 151UL + mcRed * 77UL ) >> 8UL ) );
}
// ------------------------------------------------------------------
-inline BitmapColor& BitmapColor::IncreaseLuminance( BYTE cGreyInc )
+inline BitmapColor& BitmapColor::IncreaseLuminance( sal_uInt8 cGreyInc )
{
DBG_ASSERT( !mbIndex, "Pixel represents index into colortable!" );
- mcBlueOrIndex = (BYTE) MinMax( (long) mcBlueOrIndex + cGreyInc, 0L, 255L );
- mcGreen = (BYTE) MinMax( (long) mcGreen + cGreyInc, 0L, 255L );
- mcRed = (BYTE) MinMax( (long) mcRed + cGreyInc, 0L, 255L );
+ mcBlueOrIndex = (sal_uInt8) MinMax( (long) mcBlueOrIndex + cGreyInc, 0L, 255L );
+ mcGreen = (sal_uInt8) MinMax( (long) mcGreen + cGreyInc, 0L, 255L );
+ mcRed = (sal_uInt8) MinMax( (long) mcRed + cGreyInc, 0L, 255L );
return *this;
}
// ------------------------------------------------------------------
-inline BitmapColor& BitmapColor::DecreaseLuminance( BYTE cGreyDec )
+inline BitmapColor& BitmapColor::DecreaseLuminance( sal_uInt8 cGreyDec )
{
DBG_ASSERT( !mbIndex, "Pixel represents index into colortable!" );
- mcBlueOrIndex = (BYTE) MinMax( (long) mcBlueOrIndex - cGreyDec, 0L, 255L );
- mcGreen = (BYTE) MinMax( (long) mcGreen - cGreyDec, 0L, 255L );
- mcRed = (BYTE) MinMax( (long) mcRed - cGreyDec, 0L, 255L );
+ mcBlueOrIndex = (sal_uInt8) MinMax( (long) mcBlueOrIndex - cGreyDec, 0L, 255L );
+ mcGreen = (sal_uInt8) MinMax( (long) mcGreen - cGreyDec, 0L, 255L );
+ mcRed = (sal_uInt8) MinMax( (long) mcRed - cGreyDec, 0L, 255L );
return *this;
}
// ------------------------------------------------------------------
-inline BitmapColor& BitmapColor::Merge( const BitmapColor& rBitmapColor, BYTE cTransparency )
+inline BitmapColor& BitmapColor::Merge( const BitmapColor& rBitmapColor, sal_uInt8 cTransparency )
{
DBG_ASSERT( !mbIndex, "Pixel represents index into colortable!" );
DBG_ASSERT( !rBitmapColor.mbIndex, "Pixel represents index into colortable!" );
@@ -512,7 +512,7 @@ inline BitmapColor& BitmapColor::Merge( const BitmapColor& rBitmapColor, BYTE cT
// ------------------------------------------------------------------
-inline BitmapColor& BitmapColor::Merge( BYTE cR, BYTE cG, BYTE cB, BYTE cTransparency )
+inline BitmapColor& BitmapColor::Merge( sal_uInt8 cR, sal_uInt8 cG, sal_uInt8 cB, sal_uInt8 cTransparency )
{
DBG_ASSERT( !mbIndex, "Pixel represents index into colortable!" );
mcBlueOrIndex = COLOR_CHANNEL_MERGE( mcBlueOrIndex, cB, cTransparency );
@@ -524,11 +524,11 @@ inline BitmapColor& BitmapColor::Merge( BYTE cR, BYTE cG, BYTE cB, BYTE cTranspa
// ------------------------------------------------------------------
-inline ULONG BitmapColor::GetColorError( const BitmapColor& rBitmapColor ) const
+inline sal_uIntPtr BitmapColor::GetColorError( const BitmapColor& rBitmapColor ) const
{
DBG_ASSERT( !mbIndex, "Pixel represents index into colortable!" );
DBG_ASSERT( !rBitmapColor.mbIndex, "Pixel represents index into colortable!" );
- return( (ULONG) ( labs( mcBlueOrIndex - rBitmapColor.mcBlueOrIndex ) +
+ return( (sal_uIntPtr) ( labs( mcBlueOrIndex - rBitmapColor.mcBlueOrIndex ) +
labs( mcGreen - rBitmapColor.mcGreen ) +
labs( mcRed - rBitmapColor.mcRed ) ) );
}
@@ -548,8 +548,8 @@ inline BitmapPalette::BitmapPalette( const BitmapPalette& rBitmapPalette ) :
{
if( mnCount )
{
- const ULONG nSize = mnCount * sizeof( BitmapColor );
- mpBitmapColor = (BitmapColor*) new BYTE[ nSize ];
+ const sal_uIntPtr nSize = mnCount * sizeof( BitmapColor );
+ mpBitmapColor = (BitmapColor*) new sal_uInt8[ nSize ];
memcpy( mpBitmapColor, rBitmapPalette.mpBitmapColor, nSize );
}
else
@@ -558,13 +558,13 @@ inline BitmapPalette::BitmapPalette( const BitmapPalette& rBitmapPalette ) :
// ------------------------------------------------------------------
-inline BitmapPalette::BitmapPalette( USHORT nCount ) :
+inline BitmapPalette::BitmapPalette( sal_uInt16 nCount ) :
mnCount( nCount )
{
if( mnCount )
{
- const ULONG nSize = mnCount * sizeof( BitmapColor );
- mpBitmapColor = (BitmapColor*) new BYTE[ nSize ];
+ const sal_uIntPtr nSize = mnCount * sizeof( BitmapColor );
+ mpBitmapColor = (BitmapColor*) new sal_uInt8[ nSize ];
memset( mpBitmapColor, 0, nSize );
}
else
@@ -575,20 +575,20 @@ inline BitmapPalette::BitmapPalette( USHORT nCount ) :
inline BitmapPalette::~BitmapPalette()
{
- delete[] (BYTE*) mpBitmapColor;
+ delete[] (sal_uInt8*) mpBitmapColor;
}
// ------------------------------------------------------------------
inline BitmapPalette& BitmapPalette::operator=( const BitmapPalette& rBitmapPalette )
{
- delete[] (BYTE*) mpBitmapColor;
+ delete[] (sal_uInt8*) mpBitmapColor;
mnCount = rBitmapPalette.mnCount;
if( mnCount )
{
- const ULONG nSize = mnCount * sizeof( BitmapColor );
- mpBitmapColor = (BitmapColor*) new BYTE[ nSize ];
+ const sal_uIntPtr nSize = mnCount * sizeof( BitmapColor );
+ mpBitmapColor = (BitmapColor*) new sal_uInt8[ nSize ];
memcpy( mpBitmapColor, rBitmapPalette.mpBitmapColor, nSize );
}
else
@@ -599,19 +599,19 @@ inline BitmapPalette& BitmapPalette::operator=( const BitmapPalette& rBitmapPale
// ------------------------------------------------------------------
-inline BOOL BitmapPalette::operator==( const BitmapPalette& rBitmapPalette ) const
+inline sal_Bool BitmapPalette::operator==( const BitmapPalette& rBitmapPalette ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( rBitmapPalette.mnCount == mnCount )
{
- bRet = TRUE;
+ bRet = sal_True;
- for( USHORT i = 0; i < mnCount; i++ )
+ for( sal_uInt16 i = 0; i < mnCount; i++ )
{
if( mpBitmapColor[ i ] != rBitmapPalette.mpBitmapColor[ i ] )
{
- bRet = FALSE;
+ bRet = sal_False;
break;
}
}
@@ -622,44 +622,44 @@ inline BOOL BitmapPalette::operator==( const BitmapPalette& rBitmapPalette ) con
// ------------------------------------------------------------------
-inline BOOL BitmapPalette::operator!=( const BitmapPalette& rBitmapPalette ) const
+inline sal_Bool BitmapPalette::operator!=( const BitmapPalette& rBitmapPalette ) const
{
return !( *this == rBitmapPalette );
}
// ------------------------------------------------------------------
-inline BOOL BitmapPalette::operator!()
+inline sal_Bool BitmapPalette::operator!()
{
return( !mnCount || !mpBitmapColor );
}
// ------------------------------------------------------------------
-inline USHORT BitmapPalette::GetEntryCount() const
+inline sal_uInt16 BitmapPalette::GetEntryCount() const
{
return mnCount;
}
// ------------------------------------------------------------------
-inline void BitmapPalette::SetEntryCount( USHORT nCount )
+inline void BitmapPalette::SetEntryCount( sal_uInt16 nCount )
{
if( !nCount )
{
- delete[] (BYTE*) mpBitmapColor;
+ delete[] (sal_uInt8*) mpBitmapColor;
mpBitmapColor = NULL;
mnCount = 0;
}
else if( nCount != mnCount )
{
- const ULONG nNewSize = nCount * sizeof( BitmapColor );
- const ULONG nMinSize = Min( mnCount, nCount ) * sizeof( BitmapColor );
- BYTE* pNewColor = new BYTE[ nNewSize ];
+ const sal_uIntPtr nNewSize = nCount * sizeof( BitmapColor );
+ const sal_uIntPtr nMinSize = Min( mnCount, nCount ) * sizeof( BitmapColor );
+ sal_uInt8* pNewColor = new sal_uInt8[ nNewSize ];
if ( nMinSize && mpBitmapColor )
memcpy( pNewColor, mpBitmapColor, nMinSize );
- delete[] (BYTE*) mpBitmapColor;
+ delete[] (sal_uInt8*) mpBitmapColor;
memset( pNewColor + nMinSize, 0, nNewSize - nMinSize );
mpBitmapColor = (BitmapColor*) pNewColor;
mnCount = nCount;
@@ -668,7 +668,7 @@ inline void BitmapPalette::SetEntryCount( USHORT nCount )
// ------------------------------------------------------------------
-inline const BitmapColor& BitmapPalette::operator[]( USHORT nIndex ) const
+inline const BitmapColor& BitmapPalette::operator[]( sal_uInt16 nIndex ) const
{
DBG_ASSERT( nIndex < mnCount, "Palette index is out of range!" );
return mpBitmapColor[ nIndex ];
@@ -676,7 +676,7 @@ inline const BitmapColor& BitmapPalette::operator[]( USHORT nIndex ) const
// ------------------------------------------------------------------
-inline BitmapColor& BitmapPalette::operator[]( USHORT nIndex )
+inline BitmapColor& BitmapPalette::operator[]( sal_uInt16 nIndex )
{
DBG_ASSERT( nIndex < mnCount, "Palette index is out of range!" );
return mpBitmapColor[ nIndex ];
@@ -693,17 +693,17 @@ inline BitmapColor* BitmapPalette::ImplGetColorBuffer() const
//#endif
// ------------------------------------------------------------------
-inline USHORT BitmapPalette::GetBestIndex( const BitmapColor& rCol ) const
+inline sal_uInt16 BitmapPalette::GetBestIndex( const BitmapColor& rCol ) const
{
- USHORT nRetIndex = 0;
+ sal_uInt16 nRetIndex = 0;
if( mpBitmapColor && mnCount )
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
for( long j = 0L; ( j < mnCount ) && !bFound; j++ )
if( rCol == mpBitmapColor[ j ] )
- nRetIndex = ( (USHORT) j ), bFound = TRUE;
+ nRetIndex = ( (sal_uInt16) j ), bFound = sal_True;
if( !bFound )
{
@@ -711,7 +711,7 @@ inline USHORT BitmapPalette::GetBestIndex( const BitmapColor& rCol ) const
for( long i = nRetIndex - 1; i >= 0L; i-- )
if ( ( nActErr = rCol.GetColorError( mpBitmapColor[ i ] ) ) < nLastErr )
- nLastErr = nActErr, nRetIndex = (USHORT) i;
+ nLastErr = nActErr, nRetIndex = (sal_uInt16) i;
}
}
@@ -720,7 +720,7 @@ inline USHORT BitmapPalette::GetBestIndex( const BitmapColor& rCol ) const
// ------------------------------------------------------------------
-inline ColorMask::ColorMask( ULONG nRedMask, ULONG nGreenMask, ULONG nBlueMask ) :
+inline ColorMask::ColorMask( sal_uIntPtr nRedMask, sal_uIntPtr nGreenMask, sal_uIntPtr nBlueMask ) :
mnRMask( nRedMask ),
mnGMask( nGreenMask ),
mnBMask( nBlueMask ),
@@ -738,48 +738,48 @@ inline ColorMask::ColorMask( ULONG nRedMask, ULONG nGreenMask, ULONG nBlueMask )
// ------------------------------------------------------------------
-inline long ColorMask::ImplCalcMaskShift( ULONG nMask, ULONG& rOr, ULONG& rOrShift ) const
+inline long ColorMask::ImplCalcMaskShift( sal_uIntPtr nMask, sal_uIntPtr& rOr, sal_uIntPtr& rOrShift ) const
{
long nShift;
long nRet;
- ULONG nLen = 0UL;
+ sal_uIntPtr nLen = 0UL;
// bei welchen Bits faengt die Maske an
- for( nShift = 31L; ( nShift >= 0L ) && !( nMask & ( 1 << (ULONG) nShift ) ); nShift-- )
+ for( nShift = 31L; ( nShift >= 0L ) && !( nMask & ( 1 << (sal_uIntPtr) nShift ) ); nShift-- )
{}
nRet = nShift;
// XXX Anzahl der gesetzten Bits ermitteln => nach rechts bis Null laufen
- while( ( nShift >= 0L ) && ( nMask & ( 1 << (ULONG) nShift ) ) )
+ while( ( nShift >= 0L ) && ( nMask & ( 1 << (sal_uIntPtr) nShift ) ) )
{
nShift--;
nLen++;
}
rOrShift = 8L - nLen;
- rOr = (BYTE) ( ( 0xffUL >> nLen ) << rOrShift );
+ rOr = (sal_uInt8) ( ( 0xffUL >> nLen ) << rOrShift );
return( nRet -= 7 );
}
// ------------------------------------------------------------------
-inline ULONG ColorMask::GetRedMask() const
+inline sal_uIntPtr ColorMask::GetRedMask() const
{
return mnRMask;
}
// ------------------------------------------------------------------
-inline ULONG ColorMask::GetGreenMask() const
+inline sal_uIntPtr ColorMask::GetGreenMask() const
{
return mnGMask;
}
// ------------------------------------------------------------------
-inline ULONG ColorMask::GetBlueMask() const
+inline sal_uIntPtr ColorMask::GetBlueMask() const
{
return mnBMask;
}
@@ -788,7 +788,7 @@ inline ULONG ColorMask::GetBlueMask() const
inline void ColorMask::GetColorFor8Bit( BitmapColor& rColor, ConstHPBYTE pPixel ) const
{
- const UINT32 nVal = *pPixel;
+ const sal_uInt32 nVal = *pPixel;
MASK_TO_COLOR( nVal, mnRMask, mnGMask, mnBMask, mnRShift, mnGShift, mnBShift, rColor );
}
@@ -796,7 +796,7 @@ inline void ColorMask::GetColorFor8Bit( BitmapColor& rColor, ConstHPBYTE pPixel
inline void ColorMask::SetColorFor8Bit( const BitmapColor& rColor, HPBYTE pPixel ) const
{
- *pPixel = (BYTE) COLOR_TO_MASK( rColor, mnRMask, mnGMask, mnBMask, mnRShift, mnGShift, mnBShift );
+ *pPixel = (sal_uInt8) COLOR_TO_MASK( rColor, mnRMask, mnGMask, mnBMask, mnRShift, mnGShift, mnBShift );
}
// ------------------------------------------------------------------
@@ -804,9 +804,9 @@ inline void ColorMask::SetColorFor8Bit( const BitmapColor& rColor, HPBYTE pPixel
inline void ColorMask::GetColorFor16BitMSB( BitmapColor& rColor, ConstHPBYTE pPixel ) const
{
#ifdef OSL_BIGENDIAN
- const UINT32 nVal = *(UINT16*) pPixel;
+ const sal_uInt32 nVal = *(sal_uInt16*) pPixel;
#else
- const UINT32 nVal = pPixel[ 1 ] | ( (UINT32) pPixel[ 0 ] << 8UL );
+ const sal_uInt32 nVal = pPixel[ 1 ] | ( (sal_uInt32) pPixel[ 0 ] << 8UL );
#endif
MASK_TO_COLOR( nVal, mnRMask, mnGMask, mnBMask, mnRShift, mnGShift, mnBShift, rColor );
@@ -816,13 +816,13 @@ inline void ColorMask::GetColorFor16BitMSB( BitmapColor& rColor, ConstHPBYTE pPi
inline void ColorMask::SetColorFor16BitMSB( const BitmapColor& rColor, HPBYTE pPixel ) const
{
- const UINT16 nVal = (UINT16)COLOR_TO_MASK( rColor, mnRMask, mnGMask, mnBMask, mnRShift, mnGShift, mnBShift );
+ const sal_uInt16 nVal = (sal_uInt16)COLOR_TO_MASK( rColor, mnRMask, mnGMask, mnBMask, mnRShift, mnGShift, mnBShift );
#ifdef OSL_BIGENDIAN
- *(UINT16*) pPixel = nVal;
+ *(sal_uInt16*) pPixel = nVal;
#else
- pPixel[ 0 ] = (BYTE)(nVal >> 8U);
- pPixel[ 1 ] = (BYTE) nVal;
+ pPixel[ 0 ] = (sal_uInt8)(nVal >> 8U);
+ pPixel[ 1 ] = (sal_uInt8) nVal;
#endif
}
@@ -831,9 +831,9 @@ inline void ColorMask::SetColorFor16BitMSB( const BitmapColor& rColor, HPBYTE pP
inline void ColorMask::GetColorFor16BitLSB( BitmapColor& rColor, ConstHPBYTE pPixel ) const
{
#ifdef OSL_BIGENDIAN
- const UINT32 nVal = pPixel[ 0 ] | ( (UINT32) pPixel[ 1 ] << 8UL );
+ const sal_uInt32 nVal = pPixel[ 0 ] | ( (sal_uInt32) pPixel[ 1 ] << 8UL );
#else
- const UINT32 nVal = *(UINT16*) pPixel;
+ const sal_uInt32 nVal = *(sal_uInt16*) pPixel;
#endif
MASK_TO_COLOR( nVal, mnRMask, mnGMask, mnBMask, mnRShift, mnGShift, mnBShift, rColor );
@@ -843,13 +843,13 @@ inline void ColorMask::GetColorFor16BitLSB( BitmapColor& rColor, ConstHPBYTE pPi
inline void ColorMask::SetColorFor16BitLSB( const BitmapColor& rColor, HPBYTE pPixel ) const
{
- const UINT16 nVal = (UINT16)COLOR_TO_MASK( rColor, mnRMask, mnGMask, mnBMask, mnRShift, mnGShift, mnBShift );
+ const sal_uInt16 nVal = (sal_uInt16)COLOR_TO_MASK( rColor, mnRMask, mnGMask, mnBMask, mnRShift, mnGShift, mnBShift );
#ifdef OSL_BIGENDIAN
- pPixel[ 0 ] = (BYTE) nVal;
- pPixel[ 1 ] = (BYTE)(nVal >> 8U);
+ pPixel[ 0 ] = (sal_uInt8) nVal;
+ pPixel[ 1 ] = (sal_uInt8)(nVal >> 8U);
#else
- *(UINT16*) pPixel = nVal;
+ *(sal_uInt16*) pPixel = nVal;
#endif
}
@@ -858,7 +858,7 @@ inline void ColorMask::SetColorFor16BitLSB( const BitmapColor& rColor, HPBYTE pP
inline void ColorMask::GetColorFor24Bit( BitmapColor& rColor, ConstHPBYTE pPixel ) const
{
- const UINT32 nVal = pPixel[ 0 ] | ( (UINT32) pPixel[ 1 ] << 8UL ) | ( (UINT32) pPixel[ 2 ] << 16UL );
+ const sal_uInt32 nVal = pPixel[ 0 ] | ( (sal_uInt32) pPixel[ 1 ] << 8UL ) | ( (sal_uInt32) pPixel[ 2 ] << 16UL );
MASK_TO_COLOR( nVal, mnRMask, mnGMask, mnBMask, mnRShift, mnGShift, mnBShift, rColor );
}
@@ -866,8 +866,8 @@ inline void ColorMask::GetColorFor24Bit( BitmapColor& rColor, ConstHPBYTE pPixel
inline void ColorMask::SetColorFor24Bit( const BitmapColor& rColor, HPBYTE pPixel ) const
{
- const UINT32 nVal = COLOR_TO_MASK( rColor, mnRMask, mnGMask, mnBMask, mnRShift, mnGShift, mnBShift );
- pPixel[ 0 ] = (BYTE) nVal; pPixel[ 1 ] = (BYTE) ( nVal >> 8UL ); pPixel[ 2 ] = (BYTE) ( nVal >> 16UL );
+ const sal_uInt32 nVal = COLOR_TO_MASK( rColor, mnRMask, mnGMask, mnBMask, mnRShift, mnGShift, mnBShift );
+ pPixel[ 0 ] = (sal_uInt8) nVal; pPixel[ 1 ] = (sal_uInt8) ( nVal >> 8UL ); pPixel[ 2 ] = (sal_uInt8) ( nVal >> 16UL );
}
// ------------------------------------------------------------------
@@ -875,10 +875,10 @@ inline void ColorMask::SetColorFor24Bit( const BitmapColor& rColor, HPBYTE pPixe
inline void ColorMask::GetColorFor32Bit( BitmapColor& rColor, ConstHPBYTE pPixel ) const
{
#ifdef OSL_BIGENDIAN
- const UINT32 nVal = (UINT32) pPixel[ 0 ] | ( (UINT32) pPixel[ 1 ] << 8UL ) |
- ( (UINT32) pPixel[ 2 ] << 16UL ) | ( (UINT32) pPixel[ 3 ] << 24UL );
+ const sal_uInt32 nVal = (sal_uInt32) pPixel[ 0 ] | ( (sal_uInt32) pPixel[ 1 ] << 8UL ) |
+ ( (sal_uInt32) pPixel[ 2 ] << 16UL ) | ( (sal_uInt32) pPixel[ 3 ] << 24UL );
#else
- const UINT32 nVal = *(UINT32*) pPixel;
+ const sal_uInt32 nVal = *(sal_uInt32*) pPixel;
#endif
MASK_TO_COLOR( nVal, mnRMask, mnGMask, mnBMask, mnRShift, mnGShift, mnBShift, rColor );
@@ -889,11 +889,11 @@ inline void ColorMask::GetColorFor32Bit( BitmapColor& rColor, ConstHPBYTE pPixel
inline void ColorMask::SetColorFor32Bit( const BitmapColor& rColor, HPBYTE pPixel ) const
{
#ifdef OSL_BIGENDIAN
- const UINT32 nVal = COLOR_TO_MASK( rColor, mnRMask, mnGMask, mnBMask, mnRShift, mnGShift, mnBShift );
- pPixel[ 0 ] = (BYTE) nVal; pPixel[ 1 ] = (BYTE) ( nVal >> 8UL );
- pPixel[ 2 ] = (BYTE) ( nVal >> 16UL ); pPixel[ 3 ] = (BYTE) ( nVal >> 24UL );
+ const sal_uInt32 nVal = COLOR_TO_MASK( rColor, mnRMask, mnGMask, mnBMask, mnRShift, mnGShift, mnBShift );
+ pPixel[ 0 ] = (sal_uInt8) nVal; pPixel[ 1 ] = (sal_uInt8) ( nVal >> 8UL );
+ pPixel[ 2 ] = (sal_uInt8) ( nVal >> 16UL ); pPixel[ 3 ] = (sal_uInt8) ( nVal >> 24UL );
#else
- *(UINT32*) pPixel = COLOR_TO_MASK( rColor, mnRMask, mnGMask, mnBMask, mnRShift, mnGShift, mnBShift );
+ *(sal_uInt32*) pPixel = COLOR_TO_MASK( rColor, mnRMask, mnGMask, mnBMask, mnRShift, mnGShift, mnBShift );
#endif
}
diff --git a/vcl/inc/vcl/salctype.hxx b/vcl/inc/vcl/salctype.hxx
index 1566f02a1299..837deabf73ce 100644
--- a/vcl/inc/vcl/salctype.hxx
+++ b/vcl/inc/vcl/salctype.hxx
@@ -62,9 +62,9 @@ public:
Graphic maGraphic;
SvStream& mrStm;
- ULONG mnFormat;
+ sal_uIntPtr mnFormat;
- ConvertData( const Graphic& rGraphic, SvStream& rStm, ULONG nFormat ) :
+ ConvertData( const Graphic& rGraphic, SvStream& rStm, sal_uIntPtr nFormat ) :
maGraphic( rGraphic ), mrStm( rStm ), mnFormat( nFormat ) {}
~ConvertData() {}
};
@@ -73,8 +73,8 @@ public:
// - Callback -
// ------------
-typedef ULONG (*SALGRFCVTPROC)( void* pInst,
- ULONG nInFormat, void* pInBuffer, ULONG nInBufSize,
- ULONG nOutFormat, void** ppOutBuffer );
+typedef sal_uIntPtr (*SALGRFCVTPROC)( void* pInst,
+ sal_uIntPtr nInFormat, void* pInBuffer, sal_uIntPtr nInBufSize,
+ sal_uIntPtr nOutFormat, void** ppOutBuffer );
#endif // _SV_SALCTYPE_HXX
diff --git a/vcl/inc/vcl/salframe.hxx b/vcl/inc/vcl/salframe.hxx
index 08548d7dda40..9f013384ceb0 100644
--- a/vcl/inc/vcl/salframe.hxx
+++ b/vcl/inc/vcl/salframe.hxx
@@ -65,55 +65,55 @@ struct SystemEnvData;
// - SalFrameTypes -
// -----------------
-#define SAL_FRAME_TOTOP_RESTOREWHENMIN ((USHORT)0x0001)
-#define SAL_FRAME_TOTOP_FOREGROUNDTASK ((USHORT)0x0002)
-#define SAL_FRAME_TOTOP_GRABFOCUS ((USHORT)0x0004)
-#define SAL_FRAME_TOTOP_GRABFOCUS_ONLY ((USHORT)0x0008)
+#define SAL_FRAME_TOTOP_RESTOREWHENMIN ((sal_uInt16)0x0001)
+#define SAL_FRAME_TOTOP_FOREGROUNDTASK ((sal_uInt16)0x0002)
+#define SAL_FRAME_TOTOP_GRABFOCUS ((sal_uInt16)0x0004)
+#define SAL_FRAME_TOTOP_GRABFOCUS_ONLY ((sal_uInt16)0x0008)
-#define SAL_FRAME_ENDEXTTEXTINPUT_COMPLETE ((USHORT)0x0001)
-#define SAL_FRAME_ENDEXTTEXTINPUT_CANCEL ((USHORT)0x0002)
+#define SAL_FRAME_ENDEXTTEXTINPUT_COMPLETE ((sal_uInt16)0x0001)
+#define SAL_FRAME_ENDEXTTEXTINPUT_CANCEL ((sal_uInt16)0x0002)
// -----------------
// - SalFrameStyle -
// -----------------
-#define SAL_FRAME_STYLE_DEFAULT ((ULONG)0x00000001)
-#define SAL_FRAME_STYLE_MOVEABLE ((ULONG)0x00000002)
-#define SAL_FRAME_STYLE_SIZEABLE ((ULONG)0x00000004)
-#define SAL_FRAME_STYLE_CLOSEABLE ((ULONG)0x00000008)
+#define SAL_FRAME_STYLE_DEFAULT ((sal_uIntPtr)0x00000001)
+#define SAL_FRAME_STYLE_MOVEABLE ((sal_uIntPtr)0x00000002)
+#define SAL_FRAME_STYLE_SIZEABLE ((sal_uIntPtr)0x00000004)
+#define SAL_FRAME_STYLE_CLOSEABLE ((sal_uIntPtr)0x00000008)
// no shadow effect on WindowsXP
-#define SAL_FRAME_STYLE_NOSHADOW ((ULONG)0x00000010)
+#define SAL_FRAME_STYLE_NOSHADOW ((sal_uIntPtr)0x00000010)
// indicate tooltip windows, so they can always be topmost
-#define SAL_FRAME_STYLE_TOOLTIP ((ULONG)0x00000020)
+#define SAL_FRAME_STYLE_TOOLTIP ((sal_uIntPtr)0x00000020)
// windows without windowmanager decoration, this typically only applies to floating windows
-#define SAL_FRAME_STYLE_OWNERDRAWDECORATION ((ULONG)0x00000040)
+#define SAL_FRAME_STYLE_OWNERDRAWDECORATION ((sal_uIntPtr)0x00000040)
// dialogs
-#define SAL_FRAME_STYLE_DIALOG ((ULONG)0x00000080)
+#define SAL_FRAME_STYLE_DIALOG ((sal_uIntPtr)0x00000080)
// partial fullscreen: fullscreen on one monitor of a multimonitor display
-#define SAL_FRAME_STYLE_PARTIAL_FULLSCREEN ((ULONG)0x00800000)
+#define SAL_FRAME_STYLE_PARTIAL_FULLSCREEN ((sal_uIntPtr)0x00800000)
// plugged system child window
-#define SAL_FRAME_STYLE_PLUG ((ULONG)0x10000000)
+#define SAL_FRAME_STYLE_PLUG ((sal_uIntPtr)0x10000000)
// system child window inside another SalFrame
-#define SAL_FRAME_STYLE_SYSTEMCHILD ((ULONG)0x08000000)
+#define SAL_FRAME_STYLE_SYSTEMCHILD ((sal_uIntPtr)0x08000000)
// floating window
-#define SAL_FRAME_STYLE_FLOAT ((ULONG)0x20000000)
+#define SAL_FRAME_STYLE_FLOAT ((sal_uIntPtr)0x20000000)
// floating window that needs to be focusable
-#define SAL_FRAME_STYLE_FLOAT_FOCUSABLE ((ULONG)0x04000000)
+#define SAL_FRAME_STYLE_FLOAT_FOCUSABLE ((sal_uIntPtr)0x04000000)
// toolwindows should be painted with a smaller decoration
-#define SAL_FRAME_STYLE_TOOLWINDOW ((ULONG)0x40000000)
+#define SAL_FRAME_STYLE_TOOLWINDOW ((sal_uIntPtr)0x40000000)
// the window containing the intro bitmap, aka splashscreen
-#define SAL_FRAME_STYLE_INTRO ((ULONG)0x80000000)
+#define SAL_FRAME_STYLE_INTRO ((sal_uIntPtr)0x80000000)
/*
-#define SAL_FRAME_STYLE_MINABLE ((ULONG)0x00000008)
-#define SAL_FRAME_STYLE_MAXABLE ((ULONG)0x00000010)
-#define SAL_FRAME_STYLE_BORDER ((ULONG)0x00000040)
-#define SAL_FRAME_STYLE_DOC ((ULONG)0x00004000)
-#define SAL_FRAME_STYLE_DIALOG ((ULONG)0x00008000)
-#define SAL_FRAME_STYLE_TOOL ((ULONG)0x00010000)
-#define SAL_FRAME_STYLE_FULLSIZE ((ULONG)0x00020000)
+#define SAL_FRAME_STYLE_MINABLE ((sal_uIntPtr)0x00000008)
+#define SAL_FRAME_STYLE_MAXABLE ((sal_uIntPtr)0x00000010)
+#define SAL_FRAME_STYLE_BORDER ((sal_uIntPtr)0x00000040)
+#define SAL_FRAME_STYLE_DOC ((sal_uIntPtr)0x00004000)
+#define SAL_FRAME_STYLE_DIALOG ((sal_uIntPtr)0x00008000)
+#define SAL_FRAME_STYLE_TOOL ((sal_uIntPtr)0x00010000)
+#define SAL_FRAME_STYLE_FULLSIZE ((sal_uIntPtr)0x00020000)
*/
// ----------------------------------------
@@ -128,10 +128,10 @@ typedef sal_uInt64 SalExtStyle;
// - Flags for SetPosSize -
// ------------------------
-#define SAL_FRAME_POSSIZE_X ((USHORT)0x0001)
-#define SAL_FRAME_POSSIZE_Y ((USHORT)0x0002)
-#define SAL_FRAME_POSSIZE_WIDTH ((USHORT)0x0004)
-#define SAL_FRAME_POSSIZE_HEIGHT ((USHORT)0x0008)
+#define SAL_FRAME_POSSIZE_X ((sal_uInt16)0x0001)
+#define SAL_FRAME_POSSIZE_Y ((sal_uInt16)0x0002)
+#define SAL_FRAME_POSSIZE_WIDTH ((sal_uInt16)0x0004)
+#define SAL_FRAME_POSSIZE_HEIGHT ((sal_uInt16)0x0008)
#ifdef __cplusplus
@@ -163,10 +163,10 @@ public:
// Event must be destroyed, when Frame is destroyed
// When Event is called, SalInstance::Yield() must be returned
- virtual BOOL PostEvent( void* pData ) = 0;
+ virtual sal_Bool PostEvent( void* pData ) = 0;
virtual void SetTitle( const XubString& rTitle ) = 0;
- virtual void SetIcon( USHORT nIcon ) = 0;
+ virtual void SetIcon( sal_uInt16 nIcon ) = 0;
virtual void SetRepresentedURL( const rtl::OUString& );
virtual void SetMenu( SalMenu *pSalMenu ) = 0;
virtual void DrawMenuBar() = 0;
@@ -175,13 +175,13 @@ public:
// Before the window is visible, a resize event
// must be sent with the correct size
- virtual void Show( BOOL bVisible, BOOL bNoActivate = FALSE ) = 0;
- virtual void Enable( BOOL bEnable ) = 0;
+ virtual void Show( sal_Bool bVisible, sal_Bool bNoActivate = sal_False ) = 0;
+ virtual void Enable( sal_Bool bEnable ) = 0;
// Set ClientSize and Center the Window to the desktop
// and send/post a resize message
virtual void SetMinClientSize( long nWidth, long nHeight ) = 0;
virtual void SetMaxClientSize( long nWidth, long nHeight ) = 0;
- virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, USHORT nFlags ) = 0;
+ virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags ) = 0;
virtual void GetClientSize( long& rWidth, long& rHeight ) = 0;
virtual void GetWorkArea( Rectangle& rRect ) = 0;
virtual SalFrame* GetParent() const = 0;
@@ -189,20 +189,20 @@ public:
SalFrameGeometry GetGeometry();
const SalFrameGeometry& GetUnmirroredGeometry() const { return maGeometry; }
virtual void SetWindowState( const SalFrameState* pState ) = 0;
- virtual BOOL GetWindowState( SalFrameState* pState ) = 0;
- virtual void ShowFullScreen( BOOL bFullScreen, sal_Int32 nDisplay ) = 0;
+ virtual sal_Bool GetWindowState( SalFrameState* pState ) = 0;
+ virtual void ShowFullScreen( sal_Bool bFullScreen, sal_Int32 nDisplay ) = 0;
// Enable/Disable ScreenSaver, SystemAgents, ...
- virtual void StartPresentation( BOOL bStart ) = 0;
+ virtual void StartPresentation( sal_Bool bStart ) = 0;
// Show Window over all other Windows
- virtual void SetAlwaysOnTop( BOOL bOnTop ) = 0;
+ virtual void SetAlwaysOnTop( sal_Bool bOnTop ) = 0;
// Window to top and grab focus
- virtual void ToTop( USHORT nFlags ) = 0;
+ virtual void ToTop( sal_uInt16 nFlags ) = 0;
// this function can call with the same
// pointer style
virtual void SetPointer( PointerStyle ePointerStyle ) = 0;
- virtual void CaptureMouse( BOOL bMouse ) = 0;
+ virtual void CaptureMouse( sal_Bool bMouse ) = 0;
virtual void SetPointerPos( long nX, long nY ) = 0;
// flush output buffer
@@ -212,15 +212,15 @@ public:
virtual void Sync() = 0;
virtual void SetInputContext( SalInputContext* pContext ) = 0;
- virtual void EndExtTextInput( USHORT nFlags ) = 0;
+ virtual void EndExtTextInput( sal_uInt16 nFlags ) = 0;
- virtual String GetKeyName( USHORT nKeyCode ) = 0;
- virtual String GetSymbolKeyName( const XubString& rFontName, USHORT nKeyCode ) = 0;
+ virtual String GetKeyName( sal_uInt16 nKeyCode ) = 0;
+ virtual String GetSymbolKeyName( const XubString& rFontName, sal_uInt16 nKeyCode ) = 0;
// returns in 'rKeyCode' the single keycode that translates to the given unicode when using a keyboard layout of language 'aLangType'
- // returns FALSE if no mapping exists or function not supported
+ // returns sal_False if no mapping exists or function not supported
// this is required for advanced menu support
- virtual BOOL MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode ) = 0;
+ virtual sal_Bool MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode ) = 0;
// returns the input language used for the last key stroke
// may be LANGUAGE_DONTKNOW if not supported by the OS
@@ -244,7 +244,7 @@ public:
// get current modifier, button mask and mouse position
struct SalPointerState
{
- ULONG mnState;
+ sal_uIntPtr mnState;
Point maPos; // in frame coordinates
};
@@ -264,7 +264,7 @@ public:
// set clip region to none (-> rectangular windows, normal state)
virtual void ResetClipRegion() = 0;
// start setting the clipregion consisting of nRects rectangles
- virtual void BeginSetClipRegion( ULONG nRects ) = 0;
+ virtual void BeginSetClipRegion( sal_uIntPtr nRects ) = 0;
// add a rectangle to the clip region
virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ) = 0;
// done setting up the clipregion
@@ -282,7 +282,7 @@ public:
// Call the callback set; this sometimes necessary for implementation classes
// that should not now more than necessary about the SalFrame implementation
// (e.g. input methods, printer update handlers).
- long CallCallback( USHORT nEvent, const void* pEvent ) const
+ long CallCallback( sal_uInt16 nEvent, const void* pEvent ) const
{ return m_pProc ? m_pProc( m_pWindow, const_cast<SalFrame*>(this), nEvent, pEvent ) : 0; }
};
diff --git a/vcl/inc/vcl/salgdi.hxx b/vcl/inc/vcl/salgdi.hxx
index 510e797678b0..19fceacc6749 100644
--- a/vcl/inc/vcl/salgdi.hxx
+++ b/vcl/inc/vcl/salgdi.hxx
@@ -66,13 +66,13 @@ namespace basegfx {
// - SalGraphics-Codes -
// ---------------------
-#define SAL_SETFONT_REMOVEANDMATCHNEW ((USHORT)0x0001)
-#define SAL_SETFONT_USEDRAWTEXT ((USHORT)0x0002)
-#define SAL_SETFONT_USEDRAWTEXTARRAY ((USHORT)0x0004)
-#define SAL_SETFONT_UNICODE ((USHORT)0x0008)
-#define SAL_SETFONT_BADFONT ((USHORT)0x1000)
+#define SAL_SETFONT_REMOVEANDMATCHNEW ((sal_uInt16)0x0001)
+#define SAL_SETFONT_USEDRAWTEXT ((sal_uInt16)0x0002)
+#define SAL_SETFONT_USEDRAWTEXTARRAY ((sal_uInt16)0x0004)
+#define SAL_SETFONT_UNICODE ((sal_uInt16)0x0008)
+#define SAL_SETFONT_BADFONT ((sal_uInt16)0x1000)
-#define SAL_COPYAREA_WINDOWINVALIDATE ((USHORT)0x0001)
+#define SAL_COPYAREA_WINDOWINVALIDATE ((sal_uInt16)0x0001)
// -------------------
// - common typedefs -
@@ -114,25 +114,25 @@ public:
virtual ~SalGraphics();
protected:
- virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight ) = 0;
+ virtual sal_Bool unionClipRegion( long nX, long nY, long nWidth, long nHeight ) = 0;
virtual bool unionClipRegion( const ::basegfx::B2DPolyPolygon& ) = 0;
// draw --> LineColor and FillColor and RasterOp and ClipRegion
virtual void drawPixel( long nX, long nY ) = 0;
virtual void drawPixel( long nX, long nY, SalColor nSalColor ) = 0;
virtual void drawLine( long nX1, long nY1, long nX2, long nY2 ) = 0;
virtual void drawRect( long nX, long nY, long nWidth, long nHeight ) = 0;
- virtual void drawPolyLine( ULONG nPoints, const SalPoint* pPtAry ) = 0;
- virtual void drawPolygon( ULONG nPoints, const SalPoint* pPtAry ) = 0;
+ virtual void drawPolyLine( sal_uIntPtr nPoints, const SalPoint* pPtAry ) = 0;
+ virtual void drawPolygon( sal_uIntPtr nPoints, const SalPoint* pPtAry ) = 0;
virtual void drawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pPoints, PCONSTSALPOINT* pPtAry ) = 0;
virtual bool drawPolyPolygon( const ::basegfx::B2DPolyPolygon&, double fTransparency ) = 0;
virtual bool drawPolyLine( const ::basegfx::B2DPolygon&, const ::basegfx::B2DVector& rLineWidths, basegfx::B2DLineJoin ) = 0;
- virtual sal_Bool drawPolyLineBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry ) = 0;
- virtual sal_Bool drawPolygonBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry ) = 0;
- virtual sal_Bool drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt32* pPoints, const SalPoint* const* pPtAry, const BYTE* const* pFlgAry ) = 0;
+ virtual sal_Bool drawPolyLineBezier( sal_uIntPtr nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry ) = 0;
+ virtual sal_Bool drawPolygonBezier( sal_uIntPtr nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry ) = 0;
+ virtual sal_Bool drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt32* pPoints, const SalPoint* const* pPtAry, const sal_uInt8* const* pFlgAry ) = 0;
// CopyArea --> No RasterOp, but ClipRegion
virtual void copyArea( long nDestX, long nDestY, long nSrcX, long nSrcY, long nSrcWidth,
- long nSrcHeight, USHORT nFlags ) = 0;
+ long nSrcHeight, sal_uInt16 nFlags ) = 0;
// CopyBits and DrawBitmap --> RasterOp and ClipRegion
// CopyBits() --> pSrcGraphics == NULL, then CopyBits on same Graphics
@@ -153,20 +153,20 @@ protected:
// invert --> ClipRegion (only Windows or VirDevs)
virtual void invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags) = 0;
- virtual void invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nFlags ) = 0;
+ virtual void invert( sal_uIntPtr nPoints, const SalPoint* pPtAry, SalInvert nFlags ) = 0;
- virtual BOOL drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize ) = 0;
+ virtual sal_Bool drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uIntPtr nSize ) = 0;
// native widget rendering methods that require mirroring
- virtual BOOL hitTestNativeControl( ControlType nType, ControlPart nPart, const Region& rControlRegion,
- const Point& aPos, BOOL& rIsInside );
- virtual BOOL drawNativeControl( ControlType nType, ControlPart nPart, const Region& rControlRegion,
+ virtual sal_Bool hitTestNativeControl( ControlType nType, ControlPart nPart, const Region& rControlRegion,
+ const Point& aPos, sal_Bool& rIsInside );
+ virtual sal_Bool drawNativeControl( ControlType nType, ControlPart nPart, const Region& rControlRegion,
ControlState nState, const ImplControlValue& aValue,
const rtl::OUString& aCaption );
- virtual BOOL drawNativeControlText( ControlType nType, ControlPart nPart, const Region& rControlRegion,
+ virtual sal_Bool drawNativeControlText( ControlType nType, ControlPart nPart, const Region& rControlRegion,
ControlState nState, const ImplControlValue& aValue,
const rtl::OUString& aCaption );
- virtual BOOL getNativeControlRegion( ControlType nType, ControlPart nPart, const Region& rControlRegion, ControlState nState,
+ virtual sal_Bool getNativeControlRegion( ControlType nType, ControlPart nPart, const Region& rControlRegion, ControlState nState,
const ImplControlValue& aValue, const rtl::OUString& aCaption,
Region &rNativeBoundingRegion, Region &rNativeContentRegion );
@@ -199,7 +199,7 @@ public:
// get device resolution
virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY ) = 0;
// get the depth of the device
- virtual USHORT GetBitCount() = 0;
+ virtual sal_uInt16 GetBitCount() = 0;
// get the width of the device
virtual long GetGraphicsWidth() const = 0;
@@ -207,7 +207,7 @@ public:
virtual void ResetClipRegion() = 0;
// begin setting the clip region, add rectangles to the
// region with the UnionClipRegion call
- virtual void BeginSetClipRegion( ULONG nCount ) = 0;
+ virtual void BeginSetClipRegion( sal_uIntPtr nCount ) = 0;
// all rectangles were added and the clip region should be set now
virtual void EndSetClipRegion() = 0;
@@ -229,7 +229,7 @@ public:
// set the text color to a specific color
virtual void SetTextColor( SalColor nSalColor ) = 0;
// set the font
- virtual USHORT SetFont( ImplFontSelectData*, int nFallbackLevel ) = 0;
+ virtual sal_uInt16 SetFont( ImplFontSelectData*, int nFallbackLevel ) = 0;
// release the fonts
void ReleaseFonts() { SetFont( NULL, 0 ); }
// get the current font's metrics
@@ -237,7 +237,7 @@ public:
// get kernign pairs of the current font
// return only PairCount if (pKernPairs == NULL)
- virtual ULONG GetKernPairs( ULONG nMaxPairCount, ImplKernPairData* ) = 0;
+ virtual sal_uIntPtr GetKernPairs( sal_uIntPtr nMaxPairCount, ImplKernPairData* ) = 0;
// get the repertoire of the current font
virtual ImplFontCharMap* GetImplFontCharMap() const = 0;
// graphics must fill supplied font list
@@ -248,7 +248,7 @@ public:
virtual bool AddTempDevFont( ImplDevFontList*, const String& rFileURL, const String& rFontName ) = 0;
// CreateFontSubset: a method to get a subset of glyhps of a font
// inside a new valid font file
- // returns TRUE if creation of subset was successfull
+ // returns sal_True if creation of subset was successfull
// parameters: rToFile: contains a osl file URL to write the subset to
// pFont: describes from which font to create a subset
// pGlyphIDs: the glyph ids to be extracted
@@ -258,7 +258,7 @@ public:
// rInfo: additional outgoing information
// implementation note: encoding 0 with glyph id 0 should be added implicitly
// as "undefined character"
- virtual BOOL CreateFontSubset( const rtl::OUString& rToFile,
+ virtual sal_Bool CreateFontSubset( const rtl::OUString& rToFile,
const ImplFontData* pFont,
sal_Int32* pGlyphIDs,
sal_uInt8* pEncoding,
@@ -302,8 +302,8 @@ public:
Int32Vector& rWidths,
Ucs2UIntMap& rUnicodeEnc ) = 0;
- virtual BOOL GetGlyphBoundRect( long nIndex, Rectangle& ) = 0;
- virtual BOOL GetGlyphOutline( long nIndex, basegfx::B2DPolyPolygon& ) = 0;
+ virtual sal_Bool GetGlyphBoundRect( long nIndex, Rectangle& ) = 0;
+ virtual sal_Bool GetGlyphOutline( long nIndex, basegfx::B2DPolyPolygon& ) = 0;
virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel ) = 0;
virtual void DrawServerFontLayout( const ServerFontLayout& ) = 0;
@@ -348,7 +348,7 @@ public:
void mirror( long& nX, const OutputDevice *pOutDev, bool bBack = false ) const;
void mirror( long& nX, long& nWidth, const OutputDevice *pOutDev, bool bBack = false ) const;
- BOOL mirror( sal_uInt32 nPoints, const SalPoint *pPtAry, SalPoint *pPtAry2, const OutputDevice *pOutDev, bool bBack = false ) const;
+ sal_Bool mirror( sal_uInt32 nPoints, const SalPoint *pPtAry, SalPoint *pPtAry2, const OutputDevice *pOutDev, bool bBack = false ) const;
void mirror( Rectangle& rRect, const OutputDevice*, bool bBack = false ) const;
void mirror( Region& rRgn, const OutputDevice *pOutDev, bool bBack = false ) const;
void mirror( ControlType,const ImplControlValue&,const OutputDevice*,bool bBack = false) const;
@@ -358,34 +358,34 @@ public:
// non virtual methods; these do eventual coordinate mirroring and
// then delegate to protected virtual methods
- BOOL UnionClipRegion( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev );
- BOOL UnionClipRegion( const ::basegfx::B2DPolyPolygon&, const OutputDevice* );
+ sal_Bool UnionClipRegion( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev );
+ sal_Bool UnionClipRegion( const ::basegfx::B2DPolyPolygon&, const OutputDevice* );
// draw --> LineColor and FillColor and RasterOp and ClipRegion
void DrawPixel( long nX, long nY, const OutputDevice *pOutDev );
void DrawPixel( long nX, long nY, SalColor nSalColor, const OutputDevice *pOutDev );
void DrawLine( long nX1, long nY1, long nX2, long nY2, const OutputDevice *pOutDev );
void DrawRect( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev );
- void DrawPolyLine( ULONG nPoints, const SalPoint* pPtAry, const OutputDevice *pOutDev );
- void DrawPolygon( ULONG nPoints, const SalPoint* pPtAry, const OutputDevice *pOutDev );
+ void DrawPolyLine( sal_uIntPtr nPoints, const SalPoint* pPtAry, const OutputDevice *pOutDev );
+ void DrawPolygon( sal_uIntPtr nPoints, const SalPoint* pPtAry, const OutputDevice *pOutDev );
void DrawPolyPolygon( sal_uInt32 nPoly,
const sal_uInt32* pPoints,
PCONSTSALPOINT* pPtAry,
const OutputDevice *pOutDev );
bool DrawPolyPolygon( const ::basegfx::B2DPolyPolygon&, double fTransparency, const OutputDevice* );
bool DrawPolyLine( const basegfx::B2DPolygon&, const basegfx::B2DVector& rLineWidths, basegfx::B2DLineJoin, const OutputDevice* );
- sal_Bool DrawPolyLineBezier( ULONG nPoints,
+ sal_Bool DrawPolyLineBezier( sal_uIntPtr nPoints,
const SalPoint* pPtAry,
- const BYTE* pFlgAry,
+ const sal_uInt8* pFlgAry,
const OutputDevice *pOutDev );
- sal_Bool DrawPolygonBezier( ULONG nPoints,
+ sal_Bool DrawPolygonBezier( sal_uIntPtr nPoints,
const SalPoint* pPtAry,
- const BYTE* pFlgAry,
+ const sal_uInt8* pFlgAry,
const OutputDevice *pOutDev );
sal_Bool DrawPolyPolygonBezier( sal_uInt32 nPoly,
const sal_uInt32* pPoints,
const SalPoint* const* pPtAry,
- const BYTE* const* pFlgAry,
+ const sal_uInt8* const* pFlgAry,
const OutputDevice *pOutDev );
// CopyArea --> No RasterOp, but ClipRegion
@@ -395,7 +395,7 @@ public:
long nSrcY,
long nSrcWidth,
long nSrcHeight,
- USHORT nFlags,
+ sal_uInt16 nFlags,
const OutputDevice *pOutDev );
// CopyBits and DrawBitmap --> RasterOp and ClipRegion
@@ -426,27 +426,27 @@ public:
// invert --> ClipRegion (only Windows)
void Invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags, const OutputDevice *pOutDev );
- void Invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nFlags, const OutputDevice *pOutDev );
+ void Invert( sal_uIntPtr nPoints, const SalPoint* pPtAry, SalInvert nFlags, const OutputDevice *pOutDev );
- BOOL DrawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize, const OutputDevice *pOutDev );
+ sal_Bool DrawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uIntPtr nSize, const OutputDevice *pOutDev );
//-------------------------------------
// Native Widget Rendering functions
//-------------------------------------
// Query the platform layer for control support
- virtual BOOL IsNativeControlSupported( ControlType nType, ControlPart nPart );
+ virtual sal_Bool IsNativeControlSupported( ControlType nType, ControlPart nPart );
// Query the native control to determine if it was acted upon
- BOOL HitTestNativeControl( ControlType nType,
+ sal_Bool HitTestNativeControl( ControlType nType,
ControlPart nPart,
const Region& rControlRegion,
const Point& aPos,
- BOOL& rIsInside,
+ sal_Bool& rIsInside,
const OutputDevice *pOutDev );
// Request rendering of a particular control and/or part
- BOOL DrawNativeControl( ControlType nType,
+ sal_Bool DrawNativeControl( ControlType nType,
ControlPart nPart,
const Region& rControlRegion,
ControlState nState,
@@ -455,7 +455,7 @@ public:
const OutputDevice *pOutDev );
// Request rendering of a caption string for a control
- BOOL DrawNativeControlText( ControlType nType,
+ sal_Bool DrawNativeControlText( ControlType nType,
ControlPart nPart,
const Region& rControlRegion,
ControlState nState,
@@ -464,7 +464,7 @@ public:
const OutputDevice *pOutDev );
// Query the native control's actual drawing region (including adornment)
- BOOL GetNativeControlRegion( ControlType nType,
+ sal_Bool GetNativeControlRegion( ControlType nType,
ControlPart nPart,
const Region& rControlRegion,
ControlState nState,
@@ -477,7 +477,7 @@ public:
static void AddDevFontSubstitute( OutputDevice* pOutDev,
const String& rFontName,
const String& rReplaceFontName,
- USHORT nFlags = 0 );
+ sal_uInt16 nFlags = 0 );
bool DrawAlphaBitmap( const SalTwoRect&,
const SalBitmap& rSourceBitmap,
diff --git a/vcl/inc/vcl/salgtype.hxx b/vcl/inc/vcl/salgtype.hxx
index f70a5c532f73..5cad30aa788b 100644
--- a/vcl/inc/vcl/salgtype.hxx
+++ b/vcl/inc/vcl/salgtype.hxx
@@ -34,11 +34,11 @@
// - SalColor -
// ------------
-typedef UINT32 SalColor;
-#define MAKE_SALCOLOR( r, g, b ) ((SalColor)(((UINT32)((UINT8)(b))))|(((UINT32)((UINT8)(g)))<<8)|(((UINT32)((UINT8)(r)))<<16))
-#define SALCOLOR_RED( n ) ((UINT8)((n)>>16))
-#define SALCOLOR_GREEN( n ) ((UINT8)(((UINT16)(n)) >> 8))
-#define SALCOLOR_BLUE( n ) ((UINT8)(n))
+typedef sal_uInt32 SalColor;
+#define MAKE_SALCOLOR( r, g, b ) ((SalColor)(((sal_uInt32)((sal_uInt8)(b))))|(((sal_uInt32)((sal_uInt8)(g)))<<8)|(((sal_uInt32)((sal_uInt8)(r)))<<16))
+#define SALCOLOR_RED( n ) ((sal_uInt8)((n)>>16))
+#define SALCOLOR_GREEN( n ) ((sal_uInt8)(((sal_uInt16)(n)) >> 8))
+#define SALCOLOR_BLUE( n ) ((sal_uInt8)(n))
#define SALCOLOR_NONE (~(SalColor)0)
// ------------
// - SalPoint -
@@ -73,7 +73,7 @@ struct SalTwoRect
// - SalROPColor -
// ---------------
-typedef USHORT SalROPColor;
+typedef sal_uInt16 SalROPColor;
#define SAL_ROP_0 ((SalROPColor)0)
#define SAL_ROP_1 ((SalROPColor)1)
#define SAL_ROP_INVERT ((SalROPColor)2)
@@ -82,7 +82,7 @@ typedef USHORT SalROPColor;
// - SalInvert -
// -------------
-typedef USHORT SalInvert;
+typedef sal_uInt16 SalInvert;
#define SAL_INVERT_HIGHLIGHT ((SalInvert)0x0001)
#define SAL_INVERT_50 ((SalInvert)0x0002)
#define SAL_INVERT_TRACKFRAME ((SalInvert)0x0004)
diff --git a/vcl/inc/vcl/salinst.hxx b/vcl/inc/vcl/salinst.hxx
index 9b92bf95e3fe..eb340f2796fa 100644
--- a/vcl/inc/vcl/salinst.hxx
+++ b/vcl/inc/vcl/salinst.hxx
@@ -88,12 +88,12 @@ public:
// Frame
// DisplayName for Unix ???
- virtual SalFrame* CreateChildFrame( SystemParentData* pParent, ULONG nStyle ) = 0;
- virtual SalFrame* CreateFrame( SalFrame* pParent, ULONG nStyle ) = 0;
+ virtual SalFrame* CreateChildFrame( SystemParentData* pParent, sal_uIntPtr nStyle ) = 0;
+ virtual SalFrame* CreateFrame( SalFrame* pParent, sal_uIntPtr nStyle ) = 0;
virtual void DestroyFrame( SalFrame* pFrame ) = 0;
// Object (System Child Window)
- virtual SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, BOOL bShow = TRUE ) = 0;
+ virtual SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, sal_Bool bShow = sal_True ) = 0;
virtual void DestroyObject( SalObject* pObject ) = 0;
// VirtualDevice
@@ -102,7 +102,7 @@ public:
// pData allows for using a system dependent graphics or device context
virtual SalVirtualDevice* CreateVirtualDevice( SalGraphics* pGraphics,
long nDX, long nDY,
- USHORT nBitCount, const SystemGraphicsData *pData = NULL ) = 0;
+ sal_uInt16 nBitCount, const SystemGraphicsData *pData = NULL ) = 0;
virtual void DestroyVirtualDevice( SalVirtualDevice* pDevice ) = 0;
// Printer
@@ -131,17 +131,17 @@ public:
// YieldMutex
virtual vos::IMutex* GetYieldMutex() = 0;
- virtual ULONG ReleaseYieldMutex() = 0;
- virtual void AcquireYieldMutex( ULONG nCount ) = 0;
+ virtual sal_uIntPtr ReleaseYieldMutex() = 0;
+ virtual void AcquireYieldMutex( sal_uIntPtr nCount ) = 0;
// wait next event and dispatch
// must returned by UserEvent (SalFrame::PostEvent)
// and timer
virtual void Yield( bool bWait, bool bHandleAllCurrentEvents ) = 0;
- virtual bool AnyInput( USHORT nType ) = 0;
+ virtual bool AnyInput( sal_uInt16 nType ) = 0;
// Menues
- virtual SalMenu* CreateMenu( BOOL bMenuBar ) = 0;
+ virtual SalMenu* CreateMenu( sal_Bool bMenuBar ) = 0;
virtual void DestroyMenu( SalMenu* pMenu) = 0;
virtual SalMenuItem* CreateMenuItem( const SalItemParams* pItemData ) = 0;
virtual void DestroyMenuItem( SalMenuItem* pItem ) = 0;
@@ -211,6 +211,6 @@ void DeInitSalMain();
// ----------
// Callbacks (indepen in \sv\source\app\svmain.cxx)
-VCL_DLLPUBLIC BOOL SVMain();
+VCL_DLLPUBLIC sal_Bool SVMain();
#endif // _SV_SALINST_HXX
diff --git a/vcl/inc/vcl/salmenu.hxx b/vcl/inc/vcl/salmenu.hxx
index cc0438c4e177..d6b5bd784079 100644
--- a/vcl/inc/vcl/salmenu.hxx
+++ b/vcl/inc/vcl/salmenu.hxx
@@ -40,7 +40,7 @@ class SalFrame;
struct SalItemParams
{
- USHORT nId; // item Id
+ sal_uInt16 nId; // item Id
MenuItemType eType; // MenuItem-Type
MenuItemBits nBits; // MenuItem-Bits
Menu* pMenu; // Pointer to Menu
@@ -51,12 +51,12 @@ struct SalItemParams
struct SalMenuButtonItem
{
- USHORT mnId;
+ sal_uInt16 mnId;
Image maImage;
rtl::OUString maToolTipText;
SalMenuButtonItem() : mnId( 0 ) {}
- SalMenuButtonItem( USHORT i_nId, const Image& rImg, const rtl::OUString& i_rTTText = rtl::OUString() )
+ SalMenuButtonItem( sal_uInt16 i_nId, const Image& rImg, const rtl::OUString& i_rTTText = rtl::OUString() )
: mnId( i_nId ), maImage( rImg ), maToolTipText( i_rTTText ) {}
};
@@ -73,27 +73,27 @@ public:
SalMenu() {}
virtual ~SalMenu();
- virtual BOOL VisibleMenuBar() = 0; // must return TRUE to actually DISPLAY native menu bars
+ virtual sal_Bool VisibleMenuBar() = 0; // must return sal_True to actually DISPLAY native menu bars
// otherwise only menu messages are processed (eg, OLE on Windows)
virtual void InsertItem( SalMenuItem* pSalMenuItem, unsigned nPos ) = 0;
virtual void RemoveItem( unsigned nPos ) = 0;
virtual void SetSubMenu( SalMenuItem* pSalMenuItem, SalMenu* pSubMenu, unsigned nPos ) = 0;
virtual void SetFrame( const SalFrame* pFrame ) = 0;
- virtual void CheckItem( unsigned nPos, BOOL bCheck ) = 0;
- virtual void EnableItem( unsigned nPos, BOOL bEnable ) = 0;
+ virtual void CheckItem( unsigned nPos, sal_Bool bCheck ) = 0;
+ virtual void EnableItem( unsigned nPos, sal_Bool bEnable ) = 0;
virtual void SetItemText( unsigned nPos, SalMenuItem* pSalMenuItem, const XubString& rText )= 0;
virtual void SetItemImage( unsigned nPos, SalMenuItem* pSalMenuItem, const Image& rImage ) = 0;
virtual void SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, const KeyCode& rKeyCode, const XubString& rKeyName ) = 0;
virtual void GetSystemMenuData( SystemMenuData* pData ) = 0;
- virtual bool ShowNativePopupMenu(FloatingWindow * pWin, const Rectangle& rRect, ULONG nFlags);
+ virtual bool ShowNativePopupMenu(FloatingWindow * pWin, const Rectangle& rRect, sal_uIntPtr nFlags);
virtual bool AddMenuBarButton( const SalMenuButtonItem& ); // return false if not implemented or failure
- virtual void RemoveMenuBarButton( USHORT nId );
+ virtual void RemoveMenuBarButton( sal_uInt16 nId );
// return an empty rectangle if not implemented
// return Rectangle( Point( -1, -1 ), Size( 1, 1 ) ) if menu bar buttons implemented
// but rectangle cannot be determined
- virtual Rectangle GetMenuBarButtonRectPixel( USHORT i_nItemId, SalFrame* i_pReferenceFrame );
+ virtual Rectangle GetMenuBarButtonRectPixel( sal_uInt16 i_nItemId, SalFrame* i_pReferenceFrame );
};
diff --git a/vcl/inc/vcl/salnativewidgets.hxx b/vcl/inc/vcl/salnativewidgets.hxx
index 8e98791d9f78..e60277e6b3bf 100644
--- a/vcl/inc/vcl/salnativewidgets.hxx
+++ b/vcl/inc/vcl/salnativewidgets.hxx
@@ -328,12 +328,12 @@ class VCL_DLLPUBLIC TabitemValue
};
inline ~TabitemValue() {};
- BOOL isLeftAligned() { return (mnAlignment & TABITEM_LEFTALIGNED) != 0; }
- BOOL isRightAligned() { return (mnAlignment & TABITEM_RIGHTALIGNED) != 0; }
- BOOL isBothAligned() { return isLeftAligned() && isRightAligned(); }
- BOOL isNotAligned() { return (mnAlignment & (TABITEM_LEFTALIGNED | TABITEM_RIGHTALIGNED)) == 0; }
- BOOL isFirst() { return (mnAlignment & TABITEM_FIRST_IN_GROUP) != 0; }
- BOOL isLast() { return (mnAlignment & TABITEM_LAST_IN_GROUP) != 0; }
+ sal_Bool isLeftAligned() { return (mnAlignment & TABITEM_LEFTALIGNED) != 0; }
+ sal_Bool isRightAligned() { return (mnAlignment & TABITEM_RIGHTALIGNED) != 0; }
+ sal_Bool isBothAligned() { return isLeftAligned() && isRightAligned(); }
+ sal_Bool isNotAligned() { return (mnAlignment & (TABITEM_LEFTALIGNED | TABITEM_RIGHTALIGNED)) == 0; }
+ sal_Bool isFirst() { return (mnAlignment & TABITEM_FIRST_IN_GROUP) != 0; }
+ sal_Bool isLast() { return (mnAlignment & TABITEM_LAST_IN_GROUP) != 0; }
};
/* SpinbuttonValue:
@@ -366,9 +366,9 @@ class VCL_DLLPUBLIC SpinbuttonValue
class ToolbarValue
{
public:
- ToolbarValue() { mbIsTopDockingArea = FALSE; }
+ ToolbarValue() { mbIsTopDockingArea = sal_False; }
Rectangle maGripRect;
- BOOL mbIsTopDockingArea; // indicates that this is the top aligned dockingarea
+ sal_Bool mbIsTopDockingArea; // indicates that this is the top aligned dockingarea
// adjacent to the menubar
};
diff --git a/vcl/inc/vcl/salobj.hxx b/vcl/inc/vcl/salobj.hxx
index e453bf5c6f87..a47bb2dcd6d8 100644
--- a/vcl/inc/vcl/salobj.hxx
+++ b/vcl/inc/vcl/salobj.hxx
@@ -39,9 +39,9 @@ struct SystemEnvData;
// - SalObject-Types -
// -------------------
-#define SAL_OBJECT_CLIP_INCLUDERECTS ((USHORT)0x0001)
-#define SAL_OBJECT_CLIP_EXCLUDERECTS ((USHORT)0x0002)
-#define SAL_OBJECT_CLIP_ABSOLUTE ((USHORT)0x0004)
+#define SAL_OBJECT_CLIP_INCLUDERECTS ((sal_uInt16)0x0001)
+#define SAL_OBJECT_CLIP_EXCLUDERECTS ((sal_uInt16)0x0002)
+#define SAL_OBJECT_CLIP_ABSOLUTE ((sal_uInt16)0x0004)
// -------------
// - SalObject -
@@ -51,21 +51,21 @@ class VCL_DLLPUBLIC SalObject
{
void* m_pInst;
SALOBJECTPROC m_pCallback;
- BOOL m_bMouseTransparent:1,
+ sal_Bool m_bMouseTransparent:1,
m_bEraseBackground:1;
public:
- SalObject() : m_pInst( NULL ), m_pCallback( NULL ), m_bMouseTransparent( FALSE ), m_bEraseBackground( TRUE ) {}
+ SalObject() : m_pInst( NULL ), m_pCallback( NULL ), m_bMouseTransparent( sal_False ), m_bEraseBackground( sal_True ) {}
virtual ~SalObject();
virtual void ResetClipRegion() = 0;
- virtual USHORT GetClipRegionType() = 0;
- virtual void BeginSetClipRegion( ULONG nRects ) = 0;
+ virtual sal_uInt16 GetClipRegionType() = 0;
+ virtual void BeginSetClipRegion( sal_uIntPtr nRects ) = 0;
virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ) = 0;
virtual void EndSetClipRegion() = 0;
virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight ) = 0;
- virtual void Show( BOOL bVisible ) = 0;
- virtual void Enable( BOOL nEnable ) = 0;
+ virtual void Show( sal_Bool bVisible ) = 0;
+ virtual void Enable( sal_Bool nEnable ) = 0;
virtual void GrabFocus() = 0;
virtual void SetBackground() = 0;
@@ -75,15 +75,15 @@ public:
void SetCallback( void* pInst, SALOBJECTPROC pProc )
{ m_pInst = pInst; m_pCallback = pProc; }
- long CallCallback( USHORT nEvent, const void* pEvent )
+ long CallCallback( sal_uInt16 nEvent, const void* pEvent )
{ return m_pCallback ? m_pCallback( m_pInst, this, nEvent, pEvent ) : 0; }
- void SetMouseTransparent( BOOL bMouseTransparent )
+ void SetMouseTransparent( sal_Bool bMouseTransparent )
{ m_bMouseTransparent = bMouseTransparent; }
- BOOL IsMouseTransparent()
+ sal_Bool IsMouseTransparent()
{ return m_bMouseTransparent; }
- void EnableEraseBackground( BOOL bEnable )
+ void EnableEraseBackground( sal_Bool bEnable )
{ m_bEraseBackground = bEnable; }
- BOOL IsEraseBackgroundEnabled()
+ sal_Bool IsEraseBackgroundEnabled()
{ return m_bEraseBackground; }
};
diff --git a/vcl/inc/vcl/salprn.hxx b/vcl/inc/vcl/salprn.hxx
index 19f023108349..b85c3430001f 100644
--- a/vcl/inc/vcl/salprn.hxx
+++ b/vcl/inc/vcl/salprn.hxx
@@ -50,8 +50,8 @@ struct VCL_DLLPUBLIC SalPrinterQueueInfo
XubString maDriver;
XubString maLocation;
XubString maComment;
- ULONG mnStatus;
- ULONG mnJobs;
+ sal_uIntPtr mnStatus;
+ sal_uIntPtr mnJobs;
void* mpSysData;
SalPrinterQueueInfo();
@@ -77,23 +77,23 @@ public:
virtual SalGraphics* GetGraphics() = 0;
virtual void ReleaseGraphics( SalGraphics* pGraphics ) = 0;
- virtual BOOL Setup( SalFrame* pFrame, ImplJobSetup* pSetupData ) = 0;
+ virtual sal_Bool Setup( SalFrame* pFrame, ImplJobSetup* pSetupData ) = 0;
// This function set the driver data and
// set the new indepen data in pSetupData
- virtual BOOL SetPrinterData( ImplJobSetup* pSetupData ) = 0;
+ virtual sal_Bool SetPrinterData( ImplJobSetup* pSetupData ) = 0;
// This function merged the indepen driver data
// and set the new indepen data in pSetupData
// Only the data must changed, where the bit
// in nFlags is set
- virtual BOOL SetData( ULONG nFlags, ImplJobSetup* pSetupData ) = 0;
+ virtual sal_Bool SetData( sal_uIntPtr nFlags, ImplJobSetup* pSetupData ) = 0;
virtual void GetPageInfo( const ImplJobSetup* pSetupData,
long& rOutWidth, long& rOutHeight,
long& rPageOffX, long& rPageOffY,
long& rPageWidth, long& rPageHeight ) = 0;
- virtual ULONG GetCapabilities( const ImplJobSetup* pSetupData, USHORT nType ) = 0;
- virtual ULONG GetPaperBinCount( const ImplJobSetup* pSetupData ) = 0;
- virtual String GetPaperBinName( const ImplJobSetup* pSetupData, ULONG nPaperBin ) = 0;
+ virtual sal_uIntPtr GetCapabilities( const ImplJobSetup* pSetupData, sal_uInt16 nType ) = 0;
+ virtual sal_uIntPtr GetPaperBinCount( const ImplJobSetup* pSetupData ) = 0;
+ virtual String GetPaperBinName( const ImplJobSetup* pSetupData, sal_uIntPtr nPaperBin ) = 0;
// fills m_aPaperFormats and sets m_bPapersInit to true
virtual void InitPaperFormats( const ImplJobSetup* pSetupData ) = 0;
// returns angle that a landscape page will be turned counterclockwise wrt to portrait
@@ -110,27 +110,27 @@ public: // public for Sal Implementation
SalPrinter() {}
virtual ~SalPrinter();
- virtual BOOL StartJob( const String* pFileName,
+ virtual sal_Bool StartJob( const String* pFileName,
const String& rJobName,
const String& rAppName,
- ULONG nCopies,
+ sal_uIntPtr nCopies,
bool bCollate,
bool bDirect,
ImplJobSetup* pSetupData ) = 0;
// implement for pull model print systems only,
- // default implementations (see salvtables.cxx) just returns FALSE
- virtual BOOL StartJob( const String* pFileName,
+ // default implementations (see salvtables.cxx) just returns sal_False
+ virtual sal_Bool StartJob( const String* pFileName,
const String& rJobName,
const String& rAppName,
ImplJobSetup* pSetupData,
vcl::PrinterController& rController );
- virtual BOOL EndJob() = 0;
- virtual BOOL AbortJob() = 0;
- virtual SalGraphics* StartPage( ImplJobSetup* pSetupData, BOOL bNewJobData ) = 0;
- virtual BOOL EndPage() = 0;
- virtual ULONG GetErrorCode() = 0;
+ virtual sal_Bool EndJob() = 0;
+ virtual sal_Bool AbortJob() = 0;
+ virtual SalGraphics* StartPage( ImplJobSetup* pSetupData, sal_Bool bNewJobData ) = 0;
+ virtual sal_Bool EndPage() = 0;
+ virtual sal_uIntPtr GetErrorCode() = 0;
};
diff --git a/vcl/inc/vcl/salptype.hxx b/vcl/inc/vcl/salptype.hxx
index 8613ead5301a..21c3ca4e71ea 100644
--- a/vcl/inc/vcl/salptype.hxx
+++ b/vcl/inc/vcl/salptype.hxx
@@ -34,10 +34,10 @@
// - SalJobSetupFlags -
// --------------------
-#define SAL_JOBSET_ORIENTATION ((ULONG)0x00000001)
-#define SAL_JOBSET_PAPERBIN ((ULONG)0x00000002)
-#define SAL_JOBSET_PAPERSIZE ((ULONG)0x00000004)
-#define SAL_JOBSET_DUPLEXMODE ((ULONG)0x00000008)
+#define SAL_JOBSET_ORIENTATION ((sal_uIntPtr)0x00000001)
+#define SAL_JOBSET_PAPERBIN ((sal_uIntPtr)0x00000002)
+#define SAL_JOBSET_PAPERSIZE ((sal_uIntPtr)0x00000004)
+#define SAL_JOBSET_DUPLEXMODE ((sal_uIntPtr)0x00000008)
#define SAL_JOBSET_ALL (SAL_JOBSET_ORIENTATION |\
SAL_JOBSET_PAPERBIN |\
SAL_JOBSET_PAPERSIZE |\
diff --git a/vcl/inc/vcl/saltimer.hxx b/vcl/inc/vcl/saltimer.hxx
index d693070138d2..d92721e64351 100644
--- a/vcl/inc/vcl/saltimer.hxx
+++ b/vcl/inc/vcl/saltimer.hxx
@@ -50,7 +50,7 @@ public:
virtual ~SalTimer();
// AutoRepeat and Restart
- virtual void Start( ULONG nMS ) = 0;
+ virtual void Start( sal_uIntPtr nMS ) = 0;
virtual void Stop() = 0;
// Callbacks (indepen in \sv\source\app\timer.cxx)
diff --git a/vcl/inc/vcl/salvd.hxx b/vcl/inc/vcl/salvd.hxx
index fcbe1fb35383..6aa3222c5d96 100644
--- a/vcl/inc/vcl/salvd.hxx
+++ b/vcl/inc/vcl/salvd.hxx
@@ -49,7 +49,7 @@ public: // public for Sal Implementation
virtual void ReleaseGraphics( SalGraphics* pGraphics ) = 0;
// Set new size, without saving the old contents
- virtual BOOL SetSize( long nNewDX, long nNewDY ) = 0;
+ virtual sal_Bool SetSize( long nNewDX, long nNewDY ) = 0;
/// Get actual VDev size in pixel
virtual void GetSize( long& rWidth, long& rHeight ) = 0;
diff --git a/vcl/inc/vcl/salwtype.hxx b/vcl/inc/vcl/salwtype.hxx
index 95b3806d648b..ceb49d2cefa6 100644
--- a/vcl/inc/vcl/salwtype.hxx
+++ b/vcl/inc/vcl/salwtype.hxx
@@ -45,68 +45,68 @@ class ImplFontSelectData;
// Muessen mit den Defines in cmdevt.hxx uebereinstimmen, da diese
// nicht konvertiert werden
-#define SAL_EXTTEXTINPUT_ATTR_GRAYWAVELINE ((USHORT)0x0100)
-#define SAL_EXTTEXTINPUT_ATTR_UNDERLINE ((USHORT)0x0200)
-#define SAL_EXTTEXTINPUT_ATTR_BOLDUNDERLINE ((USHORT)0x0400)
-#define SAL_EXTTEXTINPUT_ATTR_DOTTEDUNDERLINE ((USHORT)0x0800)
-#define SAL_EXTTEXTINPUT_ATTR_DASHDOTUNDERLINE ((USHORT)0x1000)
-#define SAL_EXTTEXTINPUT_ATTR_HIGHLIGHT ((USHORT)0x2000)
-#define SAL_EXTTEXTINPUT_ATTR_REDTEXT ((USHORT)0x4000)
-#define SAL_EXTTEXTINPUT_ATTR_HALFTONETEXT ((USHORT)0x8000)
-
-#define SAL_EXTTEXTINPUT_CURSOR_INVISIBLE ((USHORT)0x0001)
-#define SAL_EXTTEXTINPUT_CURSOR_OVERWRITE ((USHORT)0x0002)
+#define SAL_EXTTEXTINPUT_ATTR_GRAYWAVELINE ((sal_uInt16)0x0100)
+#define SAL_EXTTEXTINPUT_ATTR_UNDERLINE ((sal_uInt16)0x0200)
+#define SAL_EXTTEXTINPUT_ATTR_BOLDUNDERLINE ((sal_uInt16)0x0400)
+#define SAL_EXTTEXTINPUT_ATTR_DOTTEDUNDERLINE ((sal_uInt16)0x0800)
+#define SAL_EXTTEXTINPUT_ATTR_DASHDOTUNDERLINE ((sal_uInt16)0x1000)
+#define SAL_EXTTEXTINPUT_ATTR_HIGHLIGHT ((sal_uInt16)0x2000)
+#define SAL_EXTTEXTINPUT_ATTR_REDTEXT ((sal_uInt16)0x4000)
+#define SAL_EXTTEXTINPUT_ATTR_HALFTONETEXT ((sal_uInt16)0x8000)
+
+#define SAL_EXTTEXTINPUT_CURSOR_INVISIBLE ((sal_uInt16)0x0001)
+#define SAL_EXTTEXTINPUT_CURSOR_OVERWRITE ((sal_uInt16)0x0002)
// ------------
// - SalEvent -
// ------------
-#define SALEVENT_MOUSEMOVE ((USHORT)1)
-#define SALEVENT_MOUSELEAVE ((USHORT)2)
-#define SALEVENT_MOUSEBUTTONDOWN ((USHORT)3)
-#define SALEVENT_MOUSEBUTTONUP ((USHORT)4)
-#define SALEVENT_KEYINPUT ((USHORT)5)
-#define SALEVENT_KEYUP ((USHORT)6)
-#define SALEVENT_KEYMODCHANGE ((USHORT)7)
-#define SALEVENT_PAINT ((USHORT)8)
-#define SALEVENT_RESIZE ((USHORT)9)
-#define SALEVENT_GETFOCUS ((USHORT)10)
-#define SALEVENT_LOSEFOCUS ((USHORT)11)
-#define SALEVENT_CLOSE ((USHORT)12)
-#define SALEVENT_SHUTDOWN ((USHORT)13)
-#define SALEVENT_SETTINGSCHANGED ((USHORT)14)
-#define SALEVENT_VOLUMECHANGED ((USHORT)15)
-#define SALEVENT_PRINTERCHANGED ((USHORT)16)
-#define SALEVENT_DISPLAYCHANGED ((USHORT)17)
-#define SALEVENT_FONTCHANGED ((USHORT)18)
-#define SALEVENT_DATETIMECHANGED ((USHORT)19)
-#define SALEVENT_KEYBOARDCHANGED ((USHORT)20)
-#define SALEVENT_WHEELMOUSE ((USHORT)21)
-#define SALEVENT_USEREVENT ((USHORT)22)
-#define SALEVENT_MOUSEACTIVATE ((USHORT)23)
-#define SALEVENT_EXTTEXTINPUT ((USHORT)24)
-#define SALEVENT_ENDEXTTEXTINPUT ((USHORT)25)
-#define SALEVENT_EXTTEXTINPUTPOS ((USHORT)26)
-#define SALEVENT_INPUTCONTEXTCHANGE ((USHORT)27)
-#define SALEVENT_MOVE ((USHORT)28)
-#define SALEVENT_MOVERESIZE ((USHORT)29)
-#define SALEVENT_CLOSEPOPUPS ((USHORT)30)
-#define SALEVENT_EXTERNALKEYINPUT ((USHORT)31)
-#define SALEVENT_EXTERNALKEYUP ((USHORT)32)
-#define SALEVENT_MENUCOMMAND ((USHORT)33)
-#define SALEVENT_MENUHIGHLIGHT ((USHORT)34)
-#define SALEVENT_MENUACTIVATE ((USHORT)35)
-#define SALEVENT_MENUDEACTIVATE ((USHORT)36)
-#define SALEVENT_EXTERNALMOUSEMOVE ((USHORT)37)
-#define SALEVENT_EXTERNALMOUSEBUTTONDOWN ((USHORT)38)
-#define SALEVENT_EXTERNALMOUSEBUTTONUP ((USHORT)39)
-#define SALEVENT_INPUTLANGUAGECHANGE ((USHORT)40)
-#define SALEVENT_SHOWDIALOG ((USHORT)41)
-#define SALEVENT_MENUBUTTONCOMMAND ((USHORT)42)
-#define SALEVENT_SURROUNDINGTEXTREQUEST ((USHORT)43)
-#define SALEVENT_SURROUNDINGTEXTSELECTIONCHANGE ((USHORT)44)
-#define SALEVENT_STARTRECONVERSION ((USHORT)45)
-#define SALEVENT_COUNT ((USHORT)45)
+#define SALEVENT_MOUSEMOVE ((sal_uInt16)1)
+#define SALEVENT_MOUSELEAVE ((sal_uInt16)2)
+#define SALEVENT_MOUSEBUTTONDOWN ((sal_uInt16)3)
+#define SALEVENT_MOUSEBUTTONUP ((sal_uInt16)4)
+#define SALEVENT_KEYINPUT ((sal_uInt16)5)
+#define SALEVENT_KEYUP ((sal_uInt16)6)
+#define SALEVENT_KEYMODCHANGE ((sal_uInt16)7)
+#define SALEVENT_PAINT ((sal_uInt16)8)
+#define SALEVENT_RESIZE ((sal_uInt16)9)
+#define SALEVENT_GETFOCUS ((sal_uInt16)10)
+#define SALEVENT_LOSEFOCUS ((sal_uInt16)11)
+#define SALEVENT_CLOSE ((sal_uInt16)12)
+#define SALEVENT_SHUTDOWN ((sal_uInt16)13)
+#define SALEVENT_SETTINGSCHANGED ((sal_uInt16)14)
+#define SALEVENT_VOLUMECHANGED ((sal_uInt16)15)
+#define SALEVENT_PRINTERCHANGED ((sal_uInt16)16)
+#define SALEVENT_DISPLAYCHANGED ((sal_uInt16)17)
+#define SALEVENT_FONTCHANGED ((sal_uInt16)18)
+#define SALEVENT_DATETIMECHANGED ((sal_uInt16)19)
+#define SALEVENT_KEYBOARDCHANGED ((sal_uInt16)20)
+#define SALEVENT_WHEELMOUSE ((sal_uInt16)21)
+#define SALEVENT_USEREVENT ((sal_uInt16)22)
+#define SALEVENT_MOUSEACTIVATE ((sal_uInt16)23)
+#define SALEVENT_EXTTEXTINPUT ((sal_uInt16)24)
+#define SALEVENT_ENDEXTTEXTINPUT ((sal_uInt16)25)
+#define SALEVENT_EXTTEXTINPUTPOS ((sal_uInt16)26)
+#define SALEVENT_INPUTCONTEXTCHANGE ((sal_uInt16)27)
+#define SALEVENT_MOVE ((sal_uInt16)28)
+#define SALEVENT_MOVERESIZE ((sal_uInt16)29)
+#define SALEVENT_CLOSEPOPUPS ((sal_uInt16)30)
+#define SALEVENT_EXTERNALKEYINPUT ((sal_uInt16)31)
+#define SALEVENT_EXTERNALKEYUP ((sal_uInt16)32)
+#define SALEVENT_MENUCOMMAND ((sal_uInt16)33)
+#define SALEVENT_MENUHIGHLIGHT ((sal_uInt16)34)
+#define SALEVENT_MENUACTIVATE ((sal_uInt16)35)
+#define SALEVENT_MENUDEACTIVATE ((sal_uInt16)36)
+#define SALEVENT_EXTERNALMOUSEMOVE ((sal_uInt16)37)
+#define SALEVENT_EXTERNALMOUSEBUTTONDOWN ((sal_uInt16)38)
+#define SALEVENT_EXTERNALMOUSEBUTTONUP ((sal_uInt16)39)
+#define SALEVENT_INPUTLANGUAGECHANGE ((sal_uInt16)40)
+#define SALEVENT_SHOWDIALOG ((sal_uInt16)41)
+#define SALEVENT_MENUBUTTONCOMMAND ((sal_uInt16)42)
+#define SALEVENT_SURROUNDINGTEXTREQUEST ((sal_uInt16)43)
+#define SALEVENT_SURROUNDINGTEXTSELECTIONCHANGE ((sal_uInt16)44)
+#define SALEVENT_STARTRECONVERSION ((sal_uInt16)45)
+#define SALEVENT_COUNT ((sal_uInt16)45)
// MOUSELEAVE must send, when the pointer leave the client area and
// the mouse is not captured
@@ -114,39 +114,39 @@ class ImplFontSelectData;
// MAC: Ctrl+Button is MOUSE_RIGHT
struct SalMouseEvent
{
- ULONG mnTime; // Time in ms, when event is created
+ sal_uIntPtr mnTime; // Time in ms, when event is created
long mnX; // X-Position (Pixel, TopLeft-Output)
long mnY; // Y-Position (Pixel, TopLeft-Output)
- USHORT mnButton; // 0-MouseMove/MouseLeave, MOUSE_LEFT, MOUSE_RIGHT, MOUSE_MIDDLE
- USHORT mnCode; // SV-ModifierCode (KEY_SHIFT | KEY_MOD1 | KEY_MOD2 | MOUSE_LEFT | MOUSE_MIDDLE | MOUSE_RIGHT)
+ sal_uInt16 mnButton; // 0-MouseMove/MouseLeave, MOUSE_LEFT, MOUSE_RIGHT, MOUSE_MIDDLE
+ sal_uInt16 mnCode; // SV-ModifierCode (KEY_SHIFT | KEY_MOD1 | KEY_MOD2 | MOUSE_LEFT | MOUSE_MIDDLE | MOUSE_RIGHT)
};
// KEYINPUT and KEYUP
struct SalKeyEvent
{
- ULONG mnTime; // Time in ms, when event is created
- USHORT mnCode; // SV-KeyCode (KEY_xxx | KEY_SHIFT | KEY_MOD1 | KEY_MOD2)
- USHORT mnCharCode; // SV-CharCode
- USHORT mnRepeat; // Repeat-Count (KeyInputs-1)
+ sal_uIntPtr mnTime; // Time in ms, when event is created
+ sal_uInt16 mnCode; // SV-KeyCode (KEY_xxx | KEY_SHIFT | KEY_MOD1 | KEY_MOD2)
+ sal_uInt16 mnCharCode; // SV-CharCode
+ sal_uInt16 mnRepeat; // Repeat-Count (KeyInputs-1)
};
// MENUEVENT
struct SalMenuEvent
{
- USHORT mnId; // Menu item ID
+ sal_uInt16 mnId; // Menu item ID
void* mpMenu; // pointer to VCL menu (class Menu)
SalMenuEvent() : mnId( 0 ), mpMenu( NULL ) {}
- SalMenuEvent( USHORT i_nId, void* i_pMenu )
+ SalMenuEvent( sal_uInt16 i_nId, void* i_pMenu )
: mnId( i_nId ), mpMenu( i_pMenu ) {}
};
// KEYMODCHANGE
struct SalKeyModEvent
{
- ULONG mnTime; // Time in ms, when event is created
- USHORT mnCode; // SV-ModifierCode (KEY_SHIFT | KEY_MOD1 | KEY_MOD2)
- USHORT mnModKeyCode; // extended Modifier (MODKEY_LEFT, MODKEY_RIGHT, MODKEY_PRESS, MODKEY_RELEASE)
+ sal_uIntPtr mnTime; // Time in ms, when event is created
+ sal_uInt16 mnCode; // SV-ModifierCode (KEY_SHIFT | KEY_MOD1 | KEY_MOD2)
+ sal_uInt16 mnModKeyCode; // extended Modifier (MODKEY_LEFT, MODKEY_RIGHT, MODKEY_PRESS, MODKEY_RELEASE)
};
// PAINT
@@ -169,21 +169,21 @@ struct SalPaintEvent
// pEvent == pData
// WHEELMOUSE
-#define SAL_WHEELMOUSE_EVENT_PAGESCROLL ((ULONG)0xFFFFFFFF)
+#define SAL_WHEELMOUSE_EVENT_PAGESCROLL ((sal_uIntPtr)0xFFFFFFFF)
struct SalWheelMouseEvent
{
- ULONG mnTime; // Time in ms, when event is created
+ sal_uIntPtr mnTime; // Time in ms, when event is created
long mnX; // X-Position (Pixel, TopLeft-Output)
long mnY; // Y-Position (Pixel, TopLeft-Output)
long mnDelta; // Anzahl Drehungen
long mnNotchDelta; // Anzahl feste Drehungen
- ULONG mnScrollLines; // Aktuelle Anzahl zu scrollende Zeilen
- USHORT mnCode; // SV-ModifierCode (KEY_SHIFT | KEY_MOD1 | KEY_MOD2 | MOUSE_LEFT | MOUSE_MIDDLE | MOUSE_RIGHT)
- BOOL mbHorz; // Horizontal
- BOOL mbDeltaIsPixel; // delta value is a pixel value (on mac)
+ sal_uIntPtr mnScrollLines; // Aktuelle Anzahl zu scrollende Zeilen
+ sal_uInt16 mnCode; // SV-ModifierCode (KEY_SHIFT | KEY_MOD1 | KEY_MOD2 | MOUSE_LEFT | MOUSE_MIDDLE | MOUSE_RIGHT)
+ sal_Bool mbHorz; // Horizontal
+ sal_Bool mbDeltaIsPixel; // delta value is a pixel value (on mac)
SalWheelMouseEvent()
- : mnTime( 0 ), mnX( 0 ), mnY( 0 ), mnDelta( 0 ), mnNotchDelta( 0 ), mnScrollLines( 0 ), mnCode( 0 ), mbHorz( FALSE ), mbDeltaIsPixel( FALSE )
+ : mnTime( 0 ), mnX( 0 ), mnY( 0 ), mnDelta( 0 ), mnNotchDelta( 0 ), mnScrollLines( 0 ), mnCode( 0 ), mbHorz( sal_False ), mbDeltaIsPixel( sal_False )
{}
};
@@ -199,13 +199,13 @@ struct SalMouseActivateEvent
// EXTTEXTINPUT
struct SalExtTextInputEvent
{
- ULONG mnTime; // Time in ms, when event is created
+ sal_uIntPtr mnTime; // Time in ms, when event is created
UniString maText; // Text
- const USHORT* mpTextAttr; // Text-Attribute
- ULONG mnCursorPos; // Cursor-Position
- ULONG mnDeltaStart; // Start-Position der letzten Aenderung
- BYTE mnCursorFlags; // SAL_EXTTEXTINPUT_CURSOR_xxx
- BOOL mbOnlyCursor; // TRUE: Nur Cursor-Position wurde geaendert
+ const sal_uInt16* mpTextAttr; // Text-Attribute
+ sal_uIntPtr mnCursorPos; // Cursor-Position
+ sal_uIntPtr mnDeltaStart; // Start-Position der letzten Aenderung
+ sal_uInt8 mnCursorFlags; // SAL_EXTTEXTINPUT_CURSOR_xxx
+ sal_Bool mbOnlyCursor; // sal_True: Nur Cursor-Position wurde geaendert
};
#endif // __cplusplus
@@ -237,8 +237,8 @@ struct SalInputContextChangeEvent
struct SalSurroundingTextRequestEvent
{
UniString maText; // Text
- ULONG mnStart; // The beggining index of selected range
- ULONG mnEnd; // The end index of selected range
+ sal_uIntPtr mnStart; // The beggining index of selected range
+ sal_uIntPtr mnEnd; // The end index of selected range
};
#endif // __cplusplus
@@ -248,8 +248,8 @@ struct SalSurroundingTextRequestEvent
// SURROUNDINGTEXTSELECTIONCHANGE
struct SalSurroundingTextSelectionChangeEvent
{
- ULONG mnStart; // The beggining index of selected range
- ULONG mnEnd; // The end index of selected range
+ sal_uIntPtr mnStart; // The beggining index of selected range
+ sal_uIntPtr mnEnd; // The end index of selected range
};
#endif // __cplusplus
@@ -259,50 +259,50 @@ struct SalSurroundingTextSelectionChangeEvent
// ------------------
typedef long (*SALFRAMEPROC)( Window* pInst, SalFrame* pFrame,
- USHORT nEvent, const void* pEvent );
+ sal_uInt16 nEvent, const void* pEvent );
// --------------------
// - SalObject-Events -
// --------------------
-#define SALOBJ_EVENT_GETFOCUS ((USHORT)1)
-#define SALOBJ_EVENT_LOSEFOCUS ((USHORT)2)
-#define SALOBJ_EVENT_TOTOP ((USHORT)3)
-#define SALOBJ_EVENT_COUNT ((USHORT)4)
+#define SALOBJ_EVENT_GETFOCUS ((sal_uInt16)1)
+#define SALOBJ_EVENT_LOSEFOCUS ((sal_uInt16)2)
+#define SALOBJ_EVENT_TOTOP ((sal_uInt16)3)
+#define SALOBJ_EVENT_COUNT ((sal_uInt16)4)
// ------------------
// - SalObject-Types -
// ------------------
typedef long (*SALOBJECTPROC)( void* pInst, SalObject* pObject,
- USHORT nEvent, const void* pEvent );
+ sal_uInt16 nEvent, const void* pEvent );
// -----------------
// - SalFrameState -
// -----------------
// Must be the same as in syswin.hxx
-#define SAL_FRAMESTATE_MASK_X ((ULONG)0x00000001)
-#define SAL_FRAMESTATE_MASK_Y ((ULONG)0x00000002)
-#define SAL_FRAMESTATE_MASK_WIDTH ((ULONG)0x00000004)
-#define SAL_FRAMESTATE_MASK_HEIGHT ((ULONG)0x00000008)
-#define SAL_FRAMESTATE_MASK_MAXIMIZED_X ((ULONG)0x00000100)
-#define SAL_FRAMESTATE_MASK_MAXIMIZED_Y ((ULONG)0x00000200)
-#define SAL_FRAMESTATE_MASK_MAXIMIZED_WIDTH ((ULONG)0x00000400)
-#define SAL_FRAMESTATE_MASK_MAXIMIZED_HEIGHT ((ULONG)0x00000800)
-#define SAL_FRAMESTATE_MASK_STATE ((ULONG)0x00000010)
-
-#define SAL_FRAMESTATE_NORMAL ((ULONG)0x00000001)
-#define SAL_FRAMESTATE_MINIMIZED ((ULONG)0x00000002)
-#define SAL_FRAMESTATE_MAXIMIZED ((ULONG)0x00000004)
-#define SAL_FRAMESTATE_ROLLUP ((ULONG)0x00000008)
-#define SAL_FRAMESTATE_MAXIMIZED_HORZ ((ULONG)0x00000010)
-#define SAL_FRAMESTATE_MAXIMIZED_VERT ((ULONG)0x00000020)
-#define SAL_FRAMESTATE_SYSTEMMASK ((ULONG)0x0000FFFF)
+#define SAL_FRAMESTATE_MASK_X ((sal_uIntPtr)0x00000001)
+#define SAL_FRAMESTATE_MASK_Y ((sal_uIntPtr)0x00000002)
+#define SAL_FRAMESTATE_MASK_WIDTH ((sal_uIntPtr)0x00000004)
+#define SAL_FRAMESTATE_MASK_HEIGHT ((sal_uIntPtr)0x00000008)
+#define SAL_FRAMESTATE_MASK_MAXIMIZED_X ((sal_uIntPtr)0x00000100)
+#define SAL_FRAMESTATE_MASK_MAXIMIZED_Y ((sal_uIntPtr)0x00000200)
+#define SAL_FRAMESTATE_MASK_MAXIMIZED_WIDTH ((sal_uIntPtr)0x00000400)
+#define SAL_FRAMESTATE_MASK_MAXIMIZED_HEIGHT ((sal_uIntPtr)0x00000800)
+#define SAL_FRAMESTATE_MASK_STATE ((sal_uIntPtr)0x00000010)
+
+#define SAL_FRAMESTATE_NORMAL ((sal_uIntPtr)0x00000001)
+#define SAL_FRAMESTATE_MINIMIZED ((sal_uIntPtr)0x00000002)
+#define SAL_FRAMESTATE_MAXIMIZED ((sal_uIntPtr)0x00000004)
+#define SAL_FRAMESTATE_ROLLUP ((sal_uIntPtr)0x00000008)
+#define SAL_FRAMESTATE_MAXIMIZED_HORZ ((sal_uIntPtr)0x00000010)
+#define SAL_FRAMESTATE_MAXIMIZED_VERT ((sal_uIntPtr)0x00000020)
+#define SAL_FRAMESTATE_SYSTEMMASK ((sal_uIntPtr)0x0000FFFF)
struct SalFrameState
{
- ULONG mnMask;
+ sal_uIntPtr mnMask;
long mnX;
long mnY;
long mnWidth;
@@ -311,7 +311,7 @@ struct SalFrameState
long mnMaximizedY;
long mnMaximizedWidth;
long mnMaximizedHeight;
- ULONG mnState;
+ sal_uIntPtr mnState;
};
// -------------------
@@ -320,11 +320,11 @@ struct SalFrameState
// Muessen mit den Defines in inputctx.hxx uebereinstimmen, da diese
// nicht konvertiert werden
-#define SAL_INPUTCONTEXT_TEXT ((ULONG)0x00000001)
-#define SAL_INPUTCONTEXT_EXTTEXTINPUT ((ULONG)0x00000002)
-#define SAL_INPUTCONTEXT_EXTTEXTINPUT_ON ((ULONG)0x00000004)
-#define SAL_INPUTCONTEXT_EXTTEXTINPUT_OFF ((ULONG)0x00000008)
-#define SAL_INPUTCONTEXT_CHANGELANGUAGE ((ULONG)0x00000010)
+#define SAL_INPUTCONTEXT_TEXT ((sal_uIntPtr)0x00000001)
+#define SAL_INPUTCONTEXT_EXTTEXTINPUT ((sal_uIntPtr)0x00000002)
+#define SAL_INPUTCONTEXT_EXTTEXTINPUT_ON ((sal_uIntPtr)0x00000004)
+#define SAL_INPUTCONTEXT_EXTTEXTINPUT_OFF ((sal_uIntPtr)0x00000008)
+#define SAL_INPUTCONTEXT_CHANGELANGUAGE ((sal_uIntPtr)0x00000010)
#ifdef __cplusplus
@@ -332,7 +332,7 @@ struct SalInputContext
{
ImplFontSelectData* mpFont;
LanguageType meLanguage;
- ULONG mnOptions;
+ sal_uIntPtr mnOptions;
};
#endif // __cplusplus
diff --git a/vcl/inc/vcl/scrbar.hxx b/vcl/inc/vcl/scrbar.hxx
index f993cb7304e4..9025da334d44 100644
--- a/vcl/inc/vcl/scrbar.hxx
+++ b/vcl/inc/vcl/scrbar.hxx
@@ -67,12 +67,12 @@ private:
long mnLineSize;
long mnPageSize;
long mnDelta;
- USHORT mnDragDraw;
- USHORT mnStateFlags;
+ sal_uInt16 mnDragDraw;
+ sal_uInt16 mnStateFlags;
ScrollType meScrollType;
ScrollType meDDScrollType;
- BOOL mbCalcSize;
- BOOL mbFullDrag;
+ sal_Bool mbCalcSize;
+ sal_Bool mbFullDrag;
Link maScrollHdl;
Link maEndScrollHdl;
@@ -81,17 +81,17 @@ private:
SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle );
SAL_DLLPRIVATE void ImplInitStyle( WinBits nStyle );
SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
- SAL_DLLPRIVATE void ImplUpdateRects( BOOL bUpdate = TRUE );
+ SAL_DLLPRIVATE void ImplUpdateRects( sal_Bool bUpdate = sal_True );
SAL_DLLPRIVATE long ImplCalcThumbPos( long nPixPos );
SAL_DLLPRIVATE long ImplCalcThumbPosPix( long nPos );
- SAL_DLLPRIVATE void ImplCalc( BOOL bUpdate = TRUE );
- SAL_DLLPRIVATE void ImplDraw( USHORT nDrawFlags, OutputDevice* pOutDev );
+ SAL_DLLPRIVATE void ImplCalc( sal_Bool bUpdate = sal_True );
+ SAL_DLLPRIVATE void ImplDraw( sal_uInt16 nDrawFlags, OutputDevice* pOutDev );
using Window::ImplScroll;
- SAL_DLLPRIVATE long ImplScroll( long nNewPos, BOOL bCallEndScroll );
- SAL_DLLPRIVATE long ImplDoAction( BOOL bCallEndScroll );
- SAL_DLLPRIVATE void ImplDoMouseAction( const Point& rPos, BOOL bCallAction = TRUE );
+ SAL_DLLPRIVATE long ImplScroll( long nNewPos, sal_Bool bCallEndScroll );
+ SAL_DLLPRIVATE long ImplDoAction( sal_Bool bCallEndScroll );
+ SAL_DLLPRIVATE void ImplDoMouseAction( const Point& rPos, sal_Bool bCallAction = sal_True );
SAL_DLLPRIVATE void ImplInvert();
- SAL_DLLPRIVATE BOOL ImplDrawNative( USHORT nDrawFlags );
+ SAL_DLLPRIVATE sal_Bool ImplDrawNative( sal_uInt16 nDrawFlags );
SAL_DLLPRIVATE void ImplDragThumb( const Point& rMousePos );
DECL_DLLPRIVATE_LINK( ImplTimerHdl, Timer* );
DECL_DLLPRIVATE_LINK( ImplAutoTimerHdl, AutoTimer* );
@@ -105,7 +105,7 @@ public:
virtual void Tracking( const TrackingEvent& rTEvt );
virtual void KeyInput( const KeyEvent& rKEvt );
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_uIntPtr nFlags );
virtual void Resize();
virtual void StateChanged( StateChangedType nType );
virtual void DataChanged( const DataChangedEvent& rDCEvt );
@@ -120,9 +120,9 @@ public:
long DoScroll( long nNewPos );
long DoScrollAction( ScrollType eScrollType );
- void EnableDrag( BOOL bEnable = TRUE )
+ void EnableDrag( sal_Bool bEnable = sal_True )
{ mbFullDrag = bEnable; }
- BOOL IsDragEnabled() const { return mbFullDrag; }
+ sal_Bool IsDragEnabled() const { return mbFullDrag; }
void SetRangeMin( long nNewRange );
long GetRangeMin() const { return mnMinRange; }
diff --git a/vcl/inc/vcl/seleng.hxx b/vcl/inc/vcl/seleng.hxx
index 65539c947778..0e33fa2785d2 100644
--- a/vcl/inc/vcl/seleng.hxx
+++ b/vcl/inc/vcl/seleng.hxx
@@ -54,11 +54,11 @@ public:
virtual void DestroyAnchor() = 0;
// Cursor neu setzen, dabei die beim Anker beginnende
- // Selektion der neuen Cursor-Position anpassen. TRUE == Ok
- virtual BOOL SetCursorAtPoint( const Point& rPointPixel,
- BOOL bDontSelectAtCursor = FALSE ) = 0;
+ // Selektion der neuen Cursor-Position anpassen. sal_True == Ok
+ virtual sal_Bool SetCursorAtPoint( const Point& rPointPixel,
+ sal_Bool bDontSelectAtCursor = sal_False ) = 0;
- virtual BOOL IsSelectionAtPoint( const Point& rPointPixel ) = 0;
+ virtual sal_Bool IsSelectionAtPoint( const Point& rPointPixel ) = 0;
virtual void DeselectAtPoint( const Point& rPointPixel ) = 0;
// Anker loeschen & alles deselektieren
virtual void DeselectAll() = 0;
@@ -88,14 +88,14 @@ private:
MouseEvent aLastMove;
SelectionMode eSelMode;
// Stufigkeit fuer Mausbewegungen waehrend einer Selektion
- USHORT nMouseSensitivity;
- USHORT nLockedMods;
- USHORT nFlags;
+ sal_uInt16 nMouseSensitivity;
+ sal_uInt16 nLockedMods;
+ sal_uInt16 nFlags;
//#if 0 // _SOLAR__PRIVATE
DECL_DLLPRIVATE_LINK( ImpWatchDog, Timer * );
//#endif
- inline BOOL ShouldDeselect( BOOL bModifierKey1 ) const;
+ inline sal_Bool ShouldDeselect( sal_Bool bModifierKey1 ) const;
// determines to deselect or not when Ctrl-key is pressed on CursorPosChanging
public:
@@ -103,13 +103,13 @@ public:
FunctionSet* pFunctions = NULL );
~SelectionEngine();
- // TRUE: Event wurde von Selection-Engine verarbeitet.
- BOOL SelMouseButtonDown( const MouseEvent& rMEvt );
- BOOL SelMouseButtonUp( const MouseEvent& rMEvt );
- BOOL SelMouseMove( const MouseEvent& rMEvt );
+ // sal_True: Event wurde von Selection-Engine verarbeitet.
+ sal_Bool SelMouseButtonDown( const MouseEvent& rMEvt );
+ sal_Bool SelMouseButtonUp( const MouseEvent& rMEvt );
+ sal_Bool SelMouseMove( const MouseEvent& rMEvt );
// Tastatur
- void CursorPosChanging( BOOL bShift, BOOL bMod1 );
+ void CursorPosChanging( sal_Bool bShift, sal_Bool bMod1 );
// wird benoetigt, um bei ausserhalb des Bereichs stehender
// Maus ueber einen Timer Move-Events zu erzeugen
@@ -117,16 +117,16 @@ public:
{ aArea = rNewArea; }
const Rectangle& GetVisibleArea() const { return aArea; }
- void SetAddMode( BOOL);
- BOOL IsAddMode() const;
+ void SetAddMode( sal_Bool);
+ sal_Bool IsAddMode() const;
- void AddAlways( BOOL bOn );
- BOOL IsAlwaysAdding() const;
+ void AddAlways( sal_Bool bOn );
+ sal_Bool IsAlwaysAdding() const;
- void EnableDrag( BOOL bOn );
- BOOL IsDragEnabled() const;
+ void EnableDrag( sal_Bool bOn );
+ sal_Bool IsDragEnabled() const;
void ActivateDragMode();
- BOOL IsInDragMode() const;
+ sal_Bool IsInDragMode() const;
void SetSelectionMode( SelectionMode eMode );
SelectionMode GetSelectionMode() const { return eSelMode; }
@@ -135,9 +135,9 @@ public:
{ pFunctionSet = pFuncs; }
const FunctionSet* GetFunctionSet() const { return pFunctionSet; }
- void SetMouseSensitivity( USHORT nSensitivity )
+ void SetMouseSensitivity( sal_uInt16 nSensitivity )
{ nMouseSensitivity = nSensitivity; }
- USHORT GetMouseSensitivity() const
+ sal_uInt16 GetMouseSensitivity() const
{ return nMouseSensitivity; }
const Point& GetMousePosPixel() const
@@ -147,20 +147,20 @@ public:
void SetWindow( Window*);
Window* GetWindow() const { return pWin; }
- void LockModifiers( USHORT nModifiers )
+ void LockModifiers( sal_uInt16 nModifiers )
{ nLockedMods = nModifiers; }
- USHORT GetLockedModifiers() const { return nLockedMods; }
+ sal_uInt16 GetLockedModifiers() const { return nLockedMods; }
- BOOL IsInSelection() const;
+ sal_Bool IsInSelection() const;
void Reset();
void Command( const CommandEvent& rCEvt );
- BOOL HasAnchor() const;
- void SetAnchor( BOOL bAnchor );
+ sal_Bool HasAnchor() const;
+ void SetAnchor( sal_Bool bAnchor );
// wird im Ctor eingeschaltet
- void ExpandSelectionOnMouseMove( BOOL bExpand = TRUE )
+ void ExpandSelectionOnMouseMove( sal_Bool bExpand = sal_True )
{
if( bExpand )
nFlags |= SELENG_EXPANDONMOVE;
@@ -169,23 +169,23 @@ public:
}
};
-inline BOOL SelectionEngine::IsDragEnabled() const
+inline sal_Bool SelectionEngine::IsDragEnabled() const
{
if ( nFlags & SELENG_DRG_ENAB )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
-inline BOOL SelectionEngine::IsAddMode() const
+inline sal_Bool SelectionEngine::IsAddMode() const
{
if ( nFlags & (SELENG_IN_ADD | SELENG_ADD_ALW) )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
-inline void SelectionEngine::SetAddMode( BOOL bNewMode )
+inline void SelectionEngine::SetAddMode( sal_Bool bNewMode )
{
if ( bNewMode )
nFlags |= SELENG_IN_ADD;
@@ -193,7 +193,7 @@ inline void SelectionEngine::SetAddMode( BOOL bNewMode )
nFlags &= (~SELENG_IN_ADD);
}
-inline void SelectionEngine::EnableDrag( BOOL bOn )
+inline void SelectionEngine::EnableDrag( sal_Bool bOn )
{
if ( bOn )
nFlags |= SELENG_DRG_ENAB;
@@ -201,7 +201,7 @@ inline void SelectionEngine::EnableDrag( BOOL bOn )
nFlags &= (~SELENG_DRG_ENAB);
}
-inline void SelectionEngine::AddAlways( BOOL bOn )
+inline void SelectionEngine::AddAlways( sal_Bool bOn )
{
if( bOn )
nFlags |= SELENG_ADD_ALW;
@@ -209,39 +209,39 @@ inline void SelectionEngine::AddAlways( BOOL bOn )
nFlags &= (~SELENG_ADD_ALW);
}
-inline BOOL SelectionEngine::IsAlwaysAdding() const
+inline sal_Bool SelectionEngine::IsAlwaysAdding() const
{
if ( nFlags & SELENG_ADD_ALW )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
-inline BOOL SelectionEngine::IsInDragMode() const
+inline sal_Bool SelectionEngine::IsInDragMode() const
{
if ( nFlags & SELENG_IN_DRG )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
-inline BOOL SelectionEngine::IsInSelection() const
+inline sal_Bool SelectionEngine::IsInSelection() const
{
if ( nFlags & SELENG_IN_SEL )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
-inline BOOL SelectionEngine::HasAnchor() const
+inline sal_Bool SelectionEngine::HasAnchor() const
{
if ( nFlags & SELENG_HAS_ANCH )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
-inline void SelectionEngine::SetAnchor( BOOL bAnchor )
+inline void SelectionEngine::SetAnchor( sal_Bool bAnchor )
{
if ( bAnchor )
nFlags |= SELENG_HAS_ANCH;
diff --git a/vcl/inc/vcl/settings.hxx b/vcl/inc/vcl/settings.hxx
index 24fd30750501..56eb0eedf8c3 100644
--- a/vcl/inc/vcl/settings.hxx
+++ b/vcl/inc/vcl/settings.hxx
@@ -56,10 +56,10 @@ class ImplMachineData
ImplMachineData( const ImplMachineData& rData );
private:
- ULONG mnRefCount;
- ULONG mnOptions;
- ULONG mnScreenOptions;
- ULONG mnPrintOptions;
+ sal_uIntPtr mnRefCount;
+ sal_uIntPtr mnOptions;
+ sal_uIntPtr mnScreenOptions;
+ sal_uIntPtr mnPrintOptions;
long mnScreenRasterFontDeviation;
};
@@ -79,17 +79,17 @@ public:
MachineSettings( const MachineSettings& rSet );
~MachineSettings();
- void SetOptions( ULONG nOptions )
+ void SetOptions( sal_uIntPtr nOptions )
{ CopyData(); mpData->mnOptions = nOptions; }
- ULONG GetOptions() const
+ sal_uIntPtr GetOptions() const
{ return mpData->mnOptions; }
- void SetScreenOptions( ULONG nOptions )
+ void SetScreenOptions( sal_uIntPtr nOptions )
{ CopyData(); mpData->mnScreenOptions = nOptions; }
- ULONG GetScreenOptions() const
+ sal_uIntPtr GetScreenOptions() const
{ return mpData->mnScreenOptions; }
- void SetPrintOptions( ULONG nOptions )
+ void SetPrintOptions( sal_uIntPtr nOptions )
{ CopyData(); mpData->mnPrintOptions = nOptions; }
- ULONG GetPrintOptions() const
+ sal_uIntPtr GetPrintOptions() const
{ return mpData->mnPrintOptions; }
void SetScreenRasterFontDeviation( long nDeviation )
@@ -99,8 +99,8 @@ public:
const MachineSettings& operator =( const MachineSettings& rSet );
- BOOL operator ==( const MachineSettings& rSet ) const;
- BOOL operator !=( const MachineSettings& rSet ) const
+ sal_Bool operator ==( const MachineSettings& rSet ) const;
+ sal_Bool operator !=( const MachineSettings& rSet ) const
{ return !(*this == rSet); }
};
@@ -116,49 +116,49 @@ class ImplMouseData
ImplMouseData( const ImplMouseData& rData );
private:
- ULONG mnRefCount;
- ULONG mnOptions;
- ULONG mnDoubleClkTime;
+ sal_uIntPtr mnRefCount;
+ sal_uIntPtr mnOptions;
+ sal_uIntPtr mnDoubleClkTime;
long mnDoubleClkWidth;
long mnDoubleClkHeight;
long mnStartDragWidth;
long mnStartDragHeight;
- USHORT mnStartDragCode;
- USHORT mnDragMoveCode;
- USHORT mnDragCopyCode;
- USHORT mnDragLinkCode;
- USHORT mnContextMenuCode;
- USHORT mnContextMenuClicks;
- BOOL mbContextMenuDown;
- ULONG mnScrollRepeat;
- ULONG mnButtonStartRepeat;
- ULONG mnButtonRepeat;
- ULONG mnActionDelay;
- ULONG mnMenuDelay;
- ULONG mnFollow;
- USHORT mnMiddleButtonAction;
- USHORT mnWheelBehavior;
- BOOL mbAlign1;
+ sal_uInt16 mnStartDragCode;
+ sal_uInt16 mnDragMoveCode;
+ sal_uInt16 mnDragCopyCode;
+ sal_uInt16 mnDragLinkCode;
+ sal_uInt16 mnContextMenuCode;
+ sal_uInt16 mnContextMenuClicks;
+ sal_Bool mbContextMenuDown;
+ sal_uIntPtr mnScrollRepeat;
+ sal_uIntPtr mnButtonStartRepeat;
+ sal_uIntPtr mnButtonRepeat;
+ sal_uIntPtr mnActionDelay;
+ sal_uIntPtr mnMenuDelay;
+ sal_uIntPtr mnFollow;
+ sal_uInt16 mnMiddleButtonAction;
+ sal_uInt16 mnWheelBehavior;
+ sal_Bool mbAlign1;
};
// -----------------
// - MouseSettings -
// -----------------
-#define MOUSE_OPTION_AUTOFOCUS ((ULONG)0x00000001)
-#define MOUSE_OPTION_AUTOCENTERPOS ((ULONG)0x00000002)
-#define MOUSE_OPTION_AUTODEFBTNPOS ((ULONG)0x00000004)
+#define MOUSE_OPTION_AUTOFOCUS ((sal_uIntPtr)0x00000001)
+#define MOUSE_OPTION_AUTOCENTERPOS ((sal_uIntPtr)0x00000002)
+#define MOUSE_OPTION_AUTODEFBTNPOS ((sal_uIntPtr)0x00000004)
-#define MOUSE_FOLLOW_MENU ((ULONG)0x00000001)
-#define MOUSE_FOLLOW_DDLIST ((ULONG)0x00000002)
+#define MOUSE_FOLLOW_MENU ((sal_uIntPtr)0x00000001)
+#define MOUSE_FOLLOW_DDLIST ((sal_uIntPtr)0x00000002)
-#define MOUSE_MIDDLE_NOTHING ((USHORT)0)
-#define MOUSE_MIDDLE_AUTOSCROLL ((USHORT)1)
-#define MOUSE_MIDDLE_PASTESELECTION ((USHORT)2)
+#define MOUSE_MIDDLE_NOTHING ((sal_uInt16)0)
+#define MOUSE_MIDDLE_AUTOSCROLL ((sal_uInt16)1)
+#define MOUSE_MIDDLE_PASTESELECTION ((sal_uInt16)2)
-#define MOUSE_WHEEL_DISABLE ((USHORT)0)
-#define MOUSE_WHEEL_FOCUS_ONLY ((USHORT)1)
-#define MOUSE_WHEEL_ALWAYS ((USHORT)2)
+#define MOUSE_WHEEL_DISABLE ((sal_uInt16)0)
+#define MOUSE_WHEEL_FOCUS_ONLY ((sal_uInt16)1)
+#define MOUSE_WHEEL_ALWAYS ((sal_uInt16)2)
class VCL_DLLPUBLIC MouseSettings
{
@@ -172,14 +172,14 @@ public:
MouseSettings( const MouseSettings& rSet );
~MouseSettings();
- void SetOptions( ULONG nOptions )
+ void SetOptions( sal_uIntPtr nOptions )
{ CopyData(); mpData->mnOptions = nOptions; }
- ULONG GetOptions() const
+ sal_uIntPtr GetOptions() const
{ return mpData->mnOptions; }
- void SetDoubleClickTime( ULONG nDoubleClkTime )
+ void SetDoubleClickTime( sal_uIntPtr nDoubleClkTime )
{ CopyData(); mpData->mnDoubleClkTime = nDoubleClkTime; }
- ULONG GetDoubleClickTime() const
+ sal_uIntPtr GetDoubleClickTime() const
{ return mpData->mnDoubleClkTime; }
void SetDoubleClickWidth( long nDoubleClkWidth )
{ CopyData(); mpData->mnDoubleClkWidth = nDoubleClkWidth; }
@@ -198,76 +198,76 @@ public:
{ CopyData(); mpData->mnStartDragHeight = nDragHeight; }
long GetStartDragHeight() const
{ return mpData->mnStartDragHeight; }
- void SetStartDragCode( USHORT nCode )
+ void SetStartDragCode( sal_uInt16 nCode )
{ CopyData(); mpData->mnStartDragCode = nCode; }
- USHORT GetStartDragCode() const
+ sal_uInt16 GetStartDragCode() const
{ return mpData->mnStartDragCode; }
- void SetDragMoveCode( USHORT nCode )
+ void SetDragMoveCode( sal_uInt16 nCode )
{ CopyData(); mpData->mnDragMoveCode = nCode; }
- USHORT GetDragMoveCode() const
+ sal_uInt16 GetDragMoveCode() const
{ return mpData->mnDragMoveCode; }
- void SetDragCopyCode( USHORT nCode )
+ void SetDragCopyCode( sal_uInt16 nCode )
{ CopyData(); mpData->mnDragCopyCode = nCode; }
- USHORT GetDragCopyCode() const
+ sal_uInt16 GetDragCopyCode() const
{ return mpData->mnDragCopyCode; }
- void SetDragLinkCode( USHORT nCode )
+ void SetDragLinkCode( sal_uInt16 nCode )
{ CopyData(); mpData->mnDragLinkCode = nCode; }
- USHORT GetDragLinkCode() const
+ sal_uInt16 GetDragLinkCode() const
{ return mpData->mnDragLinkCode; }
- void SetContextMenuCode( USHORT nCode )
+ void SetContextMenuCode( sal_uInt16 nCode )
{ CopyData(); mpData->mnContextMenuCode = nCode; }
- USHORT GetContextMenuCode() const
+ sal_uInt16 GetContextMenuCode() const
{ return mpData->mnContextMenuCode; }
- void SetContextMenuClicks( USHORT nClicks )
+ void SetContextMenuClicks( sal_uInt16 nClicks )
{ CopyData(); mpData->mnContextMenuClicks = nClicks; }
- USHORT GetContextMenuClicks() const
+ sal_uInt16 GetContextMenuClicks() const
{ return mpData->mnContextMenuClicks; }
- void SetContextMenuDown( BOOL bDown )
+ void SetContextMenuDown( sal_Bool bDown )
{ CopyData(); mpData->mbContextMenuDown = bDown; }
- BOOL GetContextMenuDown() const
+ sal_Bool GetContextMenuDown() const
{ return mpData->mbContextMenuDown; }
- void SetScrollRepeat( ULONG nRepeat )
+ void SetScrollRepeat( sal_uIntPtr nRepeat )
{ CopyData(); mpData->mnScrollRepeat = nRepeat; }
- ULONG GetScrollRepeat() const
+ sal_uIntPtr GetScrollRepeat() const
{ return mpData->mnScrollRepeat; }
- void SetButtonStartRepeat( ULONG nRepeat )
+ void SetButtonStartRepeat( sal_uIntPtr nRepeat )
{ CopyData(); mpData->mnButtonStartRepeat = nRepeat; }
- ULONG GetButtonStartRepeat() const
+ sal_uIntPtr GetButtonStartRepeat() const
{ return mpData->mnButtonStartRepeat; }
- void SetButtonRepeat( ULONG nRepeat )
+ void SetButtonRepeat( sal_uIntPtr nRepeat )
{ CopyData(); mpData->mnButtonRepeat = nRepeat; }
- ULONG GetButtonRepeat() const
+ sal_uIntPtr GetButtonRepeat() const
{ return mpData->mnButtonRepeat; }
- void SetActionDelay( ULONG nDelay )
+ void SetActionDelay( sal_uIntPtr nDelay )
{ CopyData(); mpData->mnActionDelay = nDelay; }
- ULONG GetActionDelay() const
+ sal_uIntPtr GetActionDelay() const
{ return mpData->mnActionDelay; }
- void SetMenuDelay( ULONG nDelay )
+ void SetMenuDelay( sal_uIntPtr nDelay )
{ CopyData(); mpData->mnMenuDelay = nDelay; }
- ULONG GetMenuDelay() const
+ sal_uIntPtr GetMenuDelay() const
{ return mpData->mnMenuDelay; }
- void SetFollow( ULONG nFollow )
+ void SetFollow( sal_uIntPtr nFollow )
{ CopyData(); mpData->mnFollow = nFollow; }
- ULONG GetFollow() const
+ sal_uIntPtr GetFollow() const
{ return mpData->mnFollow; }
- void SetMiddleButtonAction( USHORT nAction )
+ void SetMiddleButtonAction( sal_uInt16 nAction )
{ CopyData(); mpData->mnMiddleButtonAction = nAction; }
- USHORT GetMiddleButtonAction() const
+ sal_uInt16 GetMiddleButtonAction() const
{ return mpData->mnMiddleButtonAction; }
- void SetWheelBehavior( USHORT nBehavior )
+ void SetWheelBehavior( sal_uInt16 nBehavior )
{ CopyData(); mpData->mnWheelBehavior = nBehavior; }
- USHORT GetWheelBehavior() const
+ sal_uInt16 GetWheelBehavior() const
{ return mpData->mnWheelBehavior; }
const MouseSettings& operator =( const MouseSettings& rSet );
- BOOL operator ==( const MouseSettings& rSet ) const;
- BOOL operator !=( const MouseSettings& rSet ) const
+ sal_Bool operator ==( const MouseSettings& rSet ) const;
+ sal_Bool operator !=( const MouseSettings& rSet ) const
{ return !(*this == rSet); }
};
@@ -283,16 +283,16 @@ class ImplKeyboardData
ImplKeyboardData( const ImplKeyboardData& rData );
private:
- ULONG mnRefCount;
+ sal_uIntPtr mnRefCount;
Accelerator maStandardAccel;
- ULONG mnOptions;
+ sal_uIntPtr mnOptions;
};
// --------------------
// - KeyboardSettings -
// --------------------
-#define KEYBOARD_OPTION_QUICKCURSOR ((ULONG)0x00000001)
+#define KEYBOARD_OPTION_QUICKCURSOR ((sal_uIntPtr)0x00000001)
class VCL_DLLPUBLIC KeyboardSettings
{
@@ -311,15 +311,15 @@ public:
const Accelerator& GetStandardAccel() const
{ return mpData->maStandardAccel; }
- void SetOptions( ULONG nOptions )
+ void SetOptions( sal_uIntPtr nOptions )
{ CopyData(); mpData->mnOptions = nOptions; }
- ULONG GetOptions() const
+ sal_uIntPtr GetOptions() const
{ return mpData->mnOptions; }
const KeyboardSettings& operator =( const KeyboardSettings& rSet );
- BOOL operator ==( const KeyboardSettings& rSet ) const;
- BOOL operator !=( const KeyboardSettings& rSet ) const
+ sal_Bool operator ==( const KeyboardSettings& rSet ) const;
+ sal_Bool operator !=( const KeyboardSettings& rSet ) const
{ return !(*this == rSet); }
};
@@ -336,7 +336,7 @@ class ImplStyleData
void SetStandardStyles();
private:
- ULONG mnRefCount;
+ sal_uIntPtr mnRefCount;
void* mpStyleData_NotUsedYet;
@@ -412,30 +412,30 @@ private:
long mnIconHorzSpace;
long mnIconVertSpace;
long mnAntialiasedMin;
- ULONG mnCursorBlinkTime;
- ULONG mnDragFullOptions;
- ULONG mnAnimationOptions;
- ULONG mnSelectionOptions;
- ULONG mnLogoDisplayTime;
- ULONG mnDisplayOptions;
- ULONG mnToolbarIconSize;
- ULONG mnUseFlatMenues;
- ULONG mnOptions;
- USHORT mnScreenZoom;
- USHORT mnScreenFontZoom;
- USHORT mnRadioButtonStyle;
- USHORT mnCheckBoxStyle;
- USHORT mnPushButtonStyle;
- USHORT mnTabControlStyle;
- USHORT mnHighContrast;
- USHORT mnUseSystemUIFonts;
- USHORT mnAutoMnemonic;
- USHORT mnUseImagesInMenus;
- ULONG mnUseFlatBorders;
+ sal_uIntPtr mnCursorBlinkTime;
+ sal_uIntPtr mnDragFullOptions;
+ sal_uIntPtr mnAnimationOptions;
+ sal_uIntPtr mnSelectionOptions;
+ sal_uIntPtr mnLogoDisplayTime;
+ sal_uIntPtr mnDisplayOptions;
+ sal_uIntPtr mnToolbarIconSize;
+ sal_uIntPtr mnUseFlatMenues;
+ sal_uIntPtr mnOptions;
+ sal_uInt16 mnScreenZoom;
+ sal_uInt16 mnScreenFontZoom;
+ sal_uInt16 mnRadioButtonStyle;
+ sal_uInt16 mnCheckBoxStyle;
+ sal_uInt16 mnPushButtonStyle;
+ sal_uInt16 mnTabControlStyle;
+ sal_uInt16 mnHighContrast;
+ sal_uInt16 mnUseSystemUIFonts;
+ sal_uInt16 mnAutoMnemonic;
+ sal_uInt16 mnUseImagesInMenus;
+ sal_uIntPtr mnUseFlatBorders;
long mnMinThumbSize;
- ULONG mnSymbolsStyle;
- ULONG mnPreferredSymbolsStyle;
- USHORT mnSkipDisabledInMenus;
+ sal_uIntPtr mnSymbolsStyle;
+ sal_uIntPtr mnPreferredSymbolsStyle;
+ sal_uInt16 mnSkipDisabledInMenus;
Wallpaper maWorkspaceGradient;
const void* mpFontOptions;
};
@@ -447,85 +447,85 @@ private:
// - StyleSettings -
// -----------------
-#define STYLE_OPTION_MONO ((ULONG)0x00000001)
-#define STYLE_OPTION_COLOR ((ULONG)0x00000002)
-#define STYLE_OPTION_FLAT ((ULONG)0x00000004)
-#define STYLE_OPTION_GREAT ((ULONG)0x00000008)
-#define STYLE_OPTION_HIGHLIGHT ((ULONG)0x00000010)
-#define STYLE_OPTION_ADVANCEDUSER ((ULONG)0x00000020)
-#define STYLE_OPTION_SCROLLARROW ((ULONG)0x00000040)
-#define STYLE_OPTION_SPINARROW ((ULONG)0x00000080)
-#define STYLE_OPTION_SPINUPDOWN ((ULONG)0x00000100)
-#define STYLE_OPTION_NOMNEMONICS ((ULONG)0x00000200)
-#define STYLE_OPTION_WINSTYLE ((ULONG)0x00010000)
-#define STYLE_OPTION_OS2STYLE ((ULONG)0x00020000)
-#define STYLE_OPTION_MACSTYLE ((ULONG)0x00040000)
-#define STYLE_OPTION_UNIXSTYLE ((ULONG)0x00080000)
-#define STYLE_OPTION_SYSTEMSTYLE ((ULONG)0x000F0000)
-#define STYLE_OPTION_HIDEDISABLED ((ULONG)0x00100000)
-
-#define DRAGFULL_OPTION_WINDOWMOVE ((ULONG)0x00000001)
-#define DRAGFULL_OPTION_WINDOWSIZE ((ULONG)0x00000002)
-#define DRAGFULL_OPTION_OBJECTMOVE ((ULONG)0x00000004)
-#define DRAGFULL_OPTION_OBJECTSIZE ((ULONG)0x00000008)
-#define DRAGFULL_OPTION_DOCKING ((ULONG)0x00000010)
-#define DRAGFULL_OPTION_SPLIT ((ULONG)0x00000020)
-#define DRAGFULL_OPTION_SCROLL ((ULONG)0x00000040)
-
-#define LOGO_DISPLAYTIME_NOLOGO ((ULONG)0)
-#define LOGO_DISPLAYTIME_STARTTIME ((ULONG)0xFFFFFFFF)
-
-#define ANIMATION_OPTION_MINIMIZE ((ULONG)0x00000001)
-#define ANIMATION_OPTION_POPUP ((ULONG)0x00000002)
-#define ANIMATION_OPTION_DIALOG ((ULONG)0x00000004)
-#define ANIMATION_OPTION_TREE ((ULONG)0x00000008)
-#define ANIMATION_OPTION_SCROLL ((ULONG)0x00000010)
-
-#define SELECTION_OPTION_WORD ((ULONG)0x00000001)
-#define SELECTION_OPTION_FOCUS ((ULONG)0x00000002)
-#define SELECTION_OPTION_INVERT ((ULONG)0x00000004)
-#define SELECTION_OPTION_SHOWFIRST ((ULONG)0x00000008)
-
-#define DISPLAY_OPTION_AA_DISABLE ((ULONG)0x00000001)
-
-#define STYLE_RADIOBUTTON_WIN ((USHORT)0x0001)
-#define STYLE_RADIOBUTTON_OS2 ((USHORT)0x0002)
-#define STYLE_RADIOBUTTON_MAC ((USHORT)0x0003)
-#define STYLE_RADIOBUTTON_UNIX ((USHORT)0x0004)
-#define STYLE_RADIOBUTTON_MONO ((USHORT)0x0005)
-#define STYLE_RADIOBUTTON_STYLE ((USHORT)0x000F)
-
-#define STYLE_CHECKBOX_WIN ((USHORT)0x0001)
-#define STYLE_CHECKBOX_OS2 ((USHORT)0x0002)
-#define STYLE_CHECKBOX_MAC ((USHORT)0x0003)
-#define STYLE_CHECKBOX_UNIX ((USHORT)0x0004)
-#define STYLE_CHECKBOX_MONO ((USHORT)0x0005)
-#define STYLE_CHECKBOX_STYLE ((USHORT)0x000F)
-
-#define STYLE_PUSHBUTTON_WIN ((USHORT)0x0001)
-#define STYLE_PUSHBUTTON_OS2 ((USHORT)0x0002)
-#define STYLE_PUSHBUTTON_MAC ((USHORT)0x0003)
-#define STYLE_PUSHBUTTON_UNIX ((USHORT)0x0004)
-#define STYLE_PUSHBUTTON_STYLE ((USHORT)0x000F)
-
-#define STYLE_TABCONTROL_SINGLELINE ((USHORT)0x0001)
-#define STYLE_TABCONTROL_COLOR ((USHORT)0x0002)
-
-#define STYLE_TOOLBAR_ICONSIZE_UNKNOWN ((ULONG)0)
-#define STYLE_TOOLBAR_ICONSIZE_SMALL ((ULONG)1)
-#define STYLE_TOOLBAR_ICONSIZE_LARGE ((ULONG)2)
-
-#define STYLE_SYMBOLS_AUTO ((ULONG)0)
-#define STYLE_SYMBOLS_DEFAULT ((ULONG)1)
-#define STYLE_SYMBOLS_HICONTRAST ((ULONG)2)
-#define STYLE_SYMBOLS_INDUSTRIAL ((ULONG)3)
-#define STYLE_SYMBOLS_CRYSTAL ((ULONG)4)
-#define STYLE_SYMBOLS_TANGO ((ULONG)5)
-#define STYLE_SYMBOLS_OXYGEN ((ULONG)6)
-#define STYLE_SYMBOLS_CLASSIC ((ULONG)7)
-#define STYLE_SYMBOLS_THEMES_MAX ((ULONG)8)
-
-#define STYLE_CURSOR_NOBLINKTIME ((ULONG)0xFFFFFFFF)
+#define STYLE_OPTION_MONO ((sal_uIntPtr)0x00000001)
+#define STYLE_OPTION_COLOR ((sal_uIntPtr)0x00000002)
+#define STYLE_OPTION_FLAT ((sal_uIntPtr)0x00000004)
+#define STYLE_OPTION_GREAT ((sal_uIntPtr)0x00000008)
+#define STYLE_OPTION_HIGHLIGHT ((sal_uIntPtr)0x00000010)
+#define STYLE_OPTION_ADVANCEDUSER ((sal_uIntPtr)0x00000020)
+#define STYLE_OPTION_SCROLLARROW ((sal_uIntPtr)0x00000040)
+#define STYLE_OPTION_SPINARROW ((sal_uIntPtr)0x00000080)
+#define STYLE_OPTION_SPINUPDOWN ((sal_uIntPtr)0x00000100)
+#define STYLE_OPTION_NOMNEMONICS ((sal_uIntPtr)0x00000200)
+#define STYLE_OPTION_WINSTYLE ((sal_uIntPtr)0x00010000)
+#define STYLE_OPTION_OS2STYLE ((sal_uIntPtr)0x00020000)
+#define STYLE_OPTION_MACSTYLE ((sal_uIntPtr)0x00040000)
+#define STYLE_OPTION_UNIXSTYLE ((sal_uIntPtr)0x00080000)
+#define STYLE_OPTION_SYSTEMSTYLE ((sal_uIntPtr)0x000F0000)
+#define STYLE_OPTION_HIDEDISABLED ((sal_uIntPtr)0x00100000)
+
+#define DRAGFULL_OPTION_WINDOWMOVE ((sal_uIntPtr)0x00000001)
+#define DRAGFULL_OPTION_WINDOWSIZE ((sal_uIntPtr)0x00000002)
+#define DRAGFULL_OPTION_OBJECTMOVE ((sal_uIntPtr)0x00000004)
+#define DRAGFULL_OPTION_OBJECTSIZE ((sal_uIntPtr)0x00000008)
+#define DRAGFULL_OPTION_DOCKING ((sal_uIntPtr)0x00000010)
+#define DRAGFULL_OPTION_SPLIT ((sal_uIntPtr)0x00000020)
+#define DRAGFULL_OPTION_SCROLL ((sal_uIntPtr)0x00000040)
+
+#define LOGO_DISPLAYTIME_NOLOGO ((sal_uIntPtr)0)
+#define LOGO_DISPLAYTIME_STARTTIME ((sal_uIntPtr)0xFFFFFFFF)
+
+#define ANIMATION_OPTION_MINIMIZE ((sal_uIntPtr)0x00000001)
+#define ANIMATION_OPTION_POPUP ((sal_uIntPtr)0x00000002)
+#define ANIMATION_OPTION_DIALOG ((sal_uIntPtr)0x00000004)
+#define ANIMATION_OPTION_TREE ((sal_uIntPtr)0x00000008)
+#define ANIMATION_OPTION_SCROLL ((sal_uIntPtr)0x00000010)
+
+#define SELECTION_OPTION_WORD ((sal_uIntPtr)0x00000001)
+#define SELECTION_OPTION_FOCUS ((sal_uIntPtr)0x00000002)
+#define SELECTION_OPTION_INVERT ((sal_uIntPtr)0x00000004)
+#define SELECTION_OPTION_SHOWFIRST ((sal_uIntPtr)0x00000008)
+
+#define DISPLAY_OPTION_AA_DISABLE ((sal_uIntPtr)0x00000001)
+
+#define STYLE_RADIOBUTTON_WIN ((sal_uInt16)0x0001)
+#define STYLE_RADIOBUTTON_OS2 ((sal_uInt16)0x0002)
+#define STYLE_RADIOBUTTON_MAC ((sal_uInt16)0x0003)
+#define STYLE_RADIOBUTTON_UNIX ((sal_uInt16)0x0004)
+#define STYLE_RADIOBUTTON_MONO ((sal_uInt16)0x0005)
+#define STYLE_RADIOBUTTON_STYLE ((sal_uInt16)0x000F)
+
+#define STYLE_CHECKBOX_WIN ((sal_uInt16)0x0001)
+#define STYLE_CHECKBOX_OS2 ((sal_uInt16)0x0002)
+#define STYLE_CHECKBOX_MAC ((sal_uInt16)0x0003)
+#define STYLE_CHECKBOX_UNIX ((sal_uInt16)0x0004)
+#define STYLE_CHECKBOX_MONO ((sal_uInt16)0x0005)
+#define STYLE_CHECKBOX_STYLE ((sal_uInt16)0x000F)
+
+#define STYLE_PUSHBUTTON_WIN ((sal_uInt16)0x0001)
+#define STYLE_PUSHBUTTON_OS2 ((sal_uInt16)0x0002)
+#define STYLE_PUSHBUTTON_MAC ((sal_uInt16)0x0003)
+#define STYLE_PUSHBUTTON_UNIX ((sal_uInt16)0x0004)
+#define STYLE_PUSHBUTTON_STYLE ((sal_uInt16)0x000F)
+
+#define STYLE_TABCONTROL_SINGLELINE ((sal_uInt16)0x0001)
+#define STYLE_TABCONTROL_COLOR ((sal_uInt16)0x0002)
+
+#define STYLE_TOOLBAR_ICONSIZE_UNKNOWN ((sal_uIntPtr)0)
+#define STYLE_TOOLBAR_ICONSIZE_SMALL ((sal_uIntPtr)1)
+#define STYLE_TOOLBAR_ICONSIZE_LARGE ((sal_uIntPtr)2)
+
+#define STYLE_SYMBOLS_AUTO ((sal_uIntPtr)0)
+#define STYLE_SYMBOLS_DEFAULT ((sal_uIntPtr)1)
+#define STYLE_SYMBOLS_HICONTRAST ((sal_uIntPtr)2)
+#define STYLE_SYMBOLS_INDUSTRIAL ((sal_uIntPtr)3)
+#define STYLE_SYMBOLS_CRYSTAL ((sal_uIntPtr)4)
+#define STYLE_SYMBOLS_TANGO ((sal_uIntPtr)5)
+#define STYLE_SYMBOLS_OXYGEN ((sal_uIntPtr)6)
+#define STYLE_SYMBOLS_CLASSIC ((sal_uIntPtr)7)
+#define STYLE_SYMBOLS_THEMES_MAX ((sal_uIntPtr)8)
+
+#define STYLE_CURSOR_NOBLINKTIME ((sal_uIntPtr)0xFFFFFFFF)
class VCL_DLLPUBLIC StyleSettings
{
@@ -729,31 +729,31 @@ public:
const Color& GetInactiveTabColor() const
{ return mpData->maInactiveTabColor; }
- void SetHighContrastMode( BOOL bHighContrast )
+ void SetHighContrastMode( sal_Bool bHighContrast )
{ CopyData(); mpData->mnHighContrast = bHighContrast; }
- BOOL GetHighContrastMode() const
- { return (BOOL) mpData->mnHighContrast; }
- BOOL IsHighContrastBlackAndWhite() const;
- void SetUseSystemUIFonts( BOOL bUseSystemUIFonts )
+ sal_Bool GetHighContrastMode() const
+ { return (sal_Bool) mpData->mnHighContrast; }
+ sal_Bool IsHighContrastBlackAndWhite() const;
+ void SetUseSystemUIFonts( sal_Bool bUseSystemUIFonts )
{ CopyData(); mpData->mnUseSystemUIFonts = bUseSystemUIFonts; }
- BOOL GetUseSystemUIFonts() const
- { return (BOOL) mpData->mnUseSystemUIFonts; }
- void SetUseFlatBorders( BOOL bUseFlatBorders )
+ sal_Bool GetUseSystemUIFonts() const
+ { return (sal_Bool) mpData->mnUseSystemUIFonts; }
+ void SetUseFlatBorders( sal_Bool bUseFlatBorders )
{ CopyData(); mpData->mnUseFlatBorders = bUseFlatBorders; }
- BOOL GetUseFlatBorders() const
- { return (BOOL) mpData->mnUseFlatBorders; }
- void SetUseFlatMenues( BOOL bUseFlatMenues )
+ sal_Bool GetUseFlatBorders() const
+ { return (sal_Bool) mpData->mnUseFlatBorders; }
+ void SetUseFlatMenues( sal_Bool bUseFlatMenues )
{ CopyData(); mpData->mnUseFlatMenues = bUseFlatMenues; }
- BOOL GetUseFlatMenues() const
- { return (BOOL) mpData->mnUseFlatMenues; }
- void SetUseImagesInMenus( BOOL bUseImagesInMenus )
+ sal_Bool GetUseFlatMenues() const
+ { return (sal_Bool) mpData->mnUseFlatMenues; }
+ void SetUseImagesInMenus( sal_Bool bUseImagesInMenus )
{ CopyData(); mpData->mnUseImagesInMenus = bUseImagesInMenus; }
- BOOL GetUseImagesInMenus() const
- { return (BOOL) mpData->mnUseImagesInMenus; }
- void SetSkipDisabledInMenus( BOOL bSkipDisabledInMenus )
+ sal_Bool GetUseImagesInMenus() const
+ { return (sal_Bool) mpData->mnUseImagesInMenus; }
+ void SetSkipDisabledInMenus( sal_Bool bSkipDisabledInMenus )
{ CopyData(); mpData->mnSkipDisabledInMenus = bSkipDisabledInMenus; }
- BOOL GetSkipDisabledInMenus() const
- { return (BOOL) mpData->mnSkipDisabledInMenus; }
+ sal_Bool GetSkipDisabledInMenus() const
+ { return (sal_Bool) mpData->mnSkipDisabledInMenus; }
void SetCairoFontOptions( const void *pOptions )
{ CopyData(); mpData->mpFontOptions = pOptions; }
@@ -813,21 +813,21 @@ public:
const Font& GetIconFont() const
{ return mpData->maIconFont; }
- void SetRadioButtonStyle( USHORT nStyle )
+ void SetRadioButtonStyle( sal_uInt16 nStyle )
{ CopyData(); mpData->mnRadioButtonStyle = nStyle; }
- USHORT GetRadioButtonStyle() const
+ sal_uInt16 GetRadioButtonStyle() const
{ return mpData->mnRadioButtonStyle; }
- void SetCheckBoxStyle( USHORT nStyle )
+ void SetCheckBoxStyle( sal_uInt16 nStyle )
{ CopyData(); mpData->mnCheckBoxStyle = nStyle; }
- USHORT GetCheckBoxStyle() const
+ sal_uInt16 GetCheckBoxStyle() const
{ return mpData->mnCheckBoxStyle; }
- void SetPushButtonStyle( USHORT nStyle )
+ void SetPushButtonStyle( sal_uInt16 nStyle )
{ CopyData(); mpData->mnPushButtonStyle = nStyle; }
- USHORT GetPushButtonStyle() const
+ sal_uInt16 GetPushButtonStyle() const
{ return mpData->mnPushButtonStyle; }
- void SetTabControlStyle( USHORT nStyle )
+ void SetTabControlStyle( sal_uInt16 nStyle )
{ CopyData(); mpData->mnTabControlStyle = nStyle; }
- USHORT GetTabControlStyle() const
+ sal_uInt16 GetTabControlStyle() const
{ return mpData->mnTabControlStyle; }
void SetBorderSize( long nSize )
@@ -885,78 +885,78 @@ public:
long GetCursorBlinkTime() const
{ return mpData->mnCursorBlinkTime; }
- void SetScreenZoom( USHORT nPercent )
+ void SetScreenZoom( sal_uInt16 nPercent )
{ CopyData(); mpData->mnScreenZoom = nPercent; }
- USHORT GetScreenZoom() const
+ sal_uInt16 GetScreenZoom() const
{ return mpData->mnScreenZoom; }
- void SetScreenFontZoom( USHORT nPercent )
+ void SetScreenFontZoom( sal_uInt16 nPercent )
{ CopyData(); mpData->mnScreenFontZoom = nPercent; }
- USHORT GetScreenFontZoom() const
+ sal_uInt16 GetScreenFontZoom() const
{ return mpData->mnScreenFontZoom; }
- void SetLogoDisplayTime( ULONG nDisplayTime )
+ void SetLogoDisplayTime( sal_uIntPtr nDisplayTime )
{ CopyData(); mpData->mnLogoDisplayTime = nDisplayTime; }
- ULONG GetLogoDisplayTime() const
+ sal_uIntPtr GetLogoDisplayTime() const
{ return mpData->mnLogoDisplayTime; }
- void SetDragFullOptions( ULONG nOptions )
+ void SetDragFullOptions( sal_uIntPtr nOptions )
{ CopyData(); mpData->mnDragFullOptions = nOptions; }
- ULONG GetDragFullOptions() const
+ sal_uIntPtr GetDragFullOptions() const
{ return mpData->mnDragFullOptions; }
- void SetAnimationOptions( ULONG nOptions )
+ void SetAnimationOptions( sal_uIntPtr nOptions )
{ CopyData(); mpData->mnAnimationOptions = nOptions; }
- ULONG GetAnimationOptions() const
+ sal_uIntPtr GetAnimationOptions() const
{ return mpData->mnAnimationOptions; }
- void SetSelectionOptions( ULONG nOptions )
+ void SetSelectionOptions( sal_uIntPtr nOptions )
{ CopyData(); mpData->mnSelectionOptions = nOptions; }
- ULONG GetSelectionOptions() const
+ sal_uIntPtr GetSelectionOptions() const
{ return mpData->mnSelectionOptions; }
- void SetDisplayOptions( ULONG nOptions )
+ void SetDisplayOptions( sal_uIntPtr nOptions )
{ CopyData(); mpData->mnDisplayOptions = nOptions; }
- ULONG GetDisplayOptions() const
+ sal_uIntPtr GetDisplayOptions() const
{ return mpData->mnDisplayOptions; }
void SetAntialiasingMinPixelHeight( long nMinPixel )
{ CopyData(); mpData->mnAntialiasedMin = nMinPixel; }
- ULONG GetAntialiasingMinPixelHeight() const
+ sal_uIntPtr GetAntialiasingMinPixelHeight() const
{ return mpData->mnAntialiasedMin; }
- void SetOptions( ULONG nOptions )
+ void SetOptions( sal_uIntPtr nOptions )
{ CopyData(); mpData->mnOptions = nOptions; }
- ULONG GetOptions() const
+ sal_uIntPtr GetOptions() const
{ return mpData->mnOptions; }
- void SetAutoMnemonic( BOOL bAutoMnemonic )
- { CopyData(); mpData->mnAutoMnemonic = (USHORT)bAutoMnemonic; }
- BOOL GetAutoMnemonic() const
- { return mpData->mnAutoMnemonic ? TRUE : FALSE; }
+ void SetAutoMnemonic( sal_Bool bAutoMnemonic )
+ { CopyData(); mpData->mnAutoMnemonic = (sal_uInt16)bAutoMnemonic; }
+ sal_Bool GetAutoMnemonic() const
+ { return mpData->mnAutoMnemonic ? sal_True : sal_False; }
void SetFontColor( const Color& rColor )
{ CopyData(); mpData->maFontColor = rColor; }
const Color& GetFontColor() const
{ return mpData->maFontColor; }
- void SetToolbarIconSize( ULONG nSize )
+ void SetToolbarIconSize( sal_uIntPtr nSize )
{ CopyData(); mpData->mnToolbarIconSize = nSize; }
- ULONG GetToolbarIconSize() const
+ sal_uIntPtr GetToolbarIconSize() const
{ return mpData->mnToolbarIconSize; }
- void SetSymbolsStyle( ULONG nStyle )
+ void SetSymbolsStyle( sal_uIntPtr nStyle )
{ CopyData(); mpData->mnSymbolsStyle = nStyle; }
- ULONG GetSymbolsStyle() const
+ sal_uIntPtr GetSymbolsStyle() const
{ return mpData->mnSymbolsStyle; }
- void SetPreferredSymbolsStyle( ULONG nStyle )
+ void SetPreferredSymbolsStyle( sal_uIntPtr nStyle )
{ CopyData(); mpData->mnPreferredSymbolsStyle = nStyle; }
void SetPreferredSymbolsStyleName( const ::rtl::OUString &rName );
- ULONG GetPreferredSymbolsStyle() const
+ sal_uIntPtr GetPreferredSymbolsStyle() const
{ return mpData->mnPreferredSymbolsStyle; }
// check whether the symbols style is supported (icons are installed)
- bool CheckSymbolStyle( ULONG nStyle ) const;
- ULONG GetAutoSymbolsStyle() const;
+ bool CheckSymbolStyle( sal_uIntPtr nStyle ) const;
+ sal_uIntPtr GetAutoSymbolsStyle() const;
- ULONG GetCurrentSymbolsStyle() const;
+ sal_uIntPtr GetCurrentSymbolsStyle() const;
void SetSymbolsStyleName( const ::rtl::OUString &rName )
{ return SetSymbolsStyle( ImplNameToSymbolsStyle( rName ) ); }
@@ -978,13 +978,13 @@ public:
const StyleSettings& operator =( const StyleSettings& rSet );
- BOOL operator ==( const StyleSettings& rSet ) const;
- BOOL operator !=( const StyleSettings& rSet ) const
+ sal_Bool operator ==( const StyleSettings& rSet ) const;
+ sal_Bool operator !=( const StyleSettings& rSet ) const
{ return !(*this == rSet); }
protected:
- ::rtl::OUString ImplSymbolsStyleToName( ULONG nStyle ) const;
- ULONG ImplNameToSymbolsStyle( const ::rtl::OUString &rName ) const;
+ ::rtl::OUString ImplSymbolsStyleToName( sal_uIntPtr nStyle ) const;
+ sal_uIntPtr ImplNameToSymbolsStyle( const ::rtl::OUString &rName ) const;
};
// ----------------
@@ -999,10 +999,10 @@ class ImplMiscData
ImplMiscData( const ImplMiscData& rData );
private:
- ULONG mnRefCount;
- USHORT mnEnableATT;
- BOOL mbEnableLocalizedDecimalSep;
- USHORT mnDisablePrinting;
+ sal_uIntPtr mnRefCount;
+ sal_uInt16 mnEnableATT;
+ sal_Bool mbEnableLocalizedDecimalSep;
+ sal_uInt16 mnDisablePrinting;
};
// ----------------
@@ -1021,16 +1021,16 @@ public:
MiscSettings( const MiscSettings& rSet );
~MiscSettings();
- void SetEnableATToolSupport( BOOL bEnable );
- BOOL GetEnableATToolSupport() const;
- void SetDisablePrinting( BOOL bEnable );
- BOOL GetDisablePrinting() const;
- void SetEnableLocalizedDecimalSep( BOOL bEnable );
- BOOL GetEnableLocalizedDecimalSep() const;
+ void SetEnableATToolSupport( sal_Bool bEnable );
+ sal_Bool GetEnableATToolSupport() const;
+ void SetDisablePrinting( sal_Bool bEnable );
+ sal_Bool GetDisablePrinting() const;
+ void SetEnableLocalizedDecimalSep( sal_Bool bEnable );
+ sal_Bool GetEnableLocalizedDecimalSep() const;
const MiscSettings& operator =( const MiscSettings& rSet );
- BOOL operator ==( const MiscSettings& rSet ) const;
- BOOL operator !=( const MiscSettings& rSet ) const
+ sal_Bool operator ==( const MiscSettings& rSet ) const;
+ sal_Bool operator !=( const MiscSettings& rSet ) const
{ return !(*this == rSet); }
};
@@ -1046,8 +1046,8 @@ class ImplNotificationData
ImplNotificationData( const ImplNotificationData& rData );
private:
- ULONG mnRefCount;
- ULONG mnOptions;
+ sal_uIntPtr mnRefCount;
+ sal_uIntPtr mnOptions;
};
// ------------------------
@@ -1066,15 +1066,15 @@ public:
NotificationSettings( const NotificationSettings& rSet );
~NotificationSettings();
- void SetOptions( ULONG nOptions )
+ void SetOptions( sal_uIntPtr nOptions )
{ CopyData(); mpData->mnOptions = nOptions; }
- ULONG GetOptions() const
+ sal_uIntPtr GetOptions() const
{ return mpData->mnOptions; }
const NotificationSettings& operator =( const NotificationSettings& rSet );
- BOOL operator ==( const NotificationSettings& rSet ) const;
- BOOL operator !=( const NotificationSettings& rSet ) const
+ sal_Bool operator ==( const NotificationSettings& rSet ) const;
+ sal_Bool operator !=( const NotificationSettings& rSet ) const
{ return !(*this == rSet); }
};
@@ -1090,19 +1090,19 @@ class ImplHelpData
ImplHelpData( const ImplHelpData& rData );
private:
- ULONG mnRefCount;
- ULONG mnOptions;
- ULONG mnTipDelay;
- ULONG mnTipTimeout;
- ULONG mnBalloonDelay;
+ sal_uIntPtr mnRefCount;
+ sal_uIntPtr mnOptions;
+ sal_uIntPtr mnTipDelay;
+ sal_uIntPtr mnTipTimeout;
+ sal_uIntPtr mnBalloonDelay;
};
// ----------------
// - HelpSettings -
// ----------------
-#define HELP_OPTION_QUICK ((ULONG)0x00000001)
-#define HELP_OPTION_ACTIVE ((ULONG)0x00000002)
+#define HELP_OPTION_QUICK ((sal_uIntPtr)0x00000001)
+#define HELP_OPTION_ACTIVE ((sal_uIntPtr)0x00000002)
class VCL_DLLPUBLIC HelpSettings
{
@@ -1116,27 +1116,27 @@ public:
HelpSettings( const HelpSettings& rSet );
~HelpSettings();
- void SetOptions( ULONG nOptions )
+ void SetOptions( sal_uIntPtr nOptions )
{ CopyData(); mpData->mnOptions = nOptions; }
- ULONG GetOptions() const
+ sal_uIntPtr GetOptions() const
{ return mpData->mnOptions; }
- void SetTipDelay( ULONG nTipDelay )
+ void SetTipDelay( sal_uIntPtr nTipDelay )
{ CopyData(); mpData->mnTipDelay = nTipDelay; }
- ULONG GetTipDelay() const
+ sal_uIntPtr GetTipDelay() const
{ return mpData->mnTipDelay; }
- void SetTipTimeout( ULONG nTipTimeout )
+ void SetTipTimeout( sal_uIntPtr nTipTimeout )
{ CopyData(); mpData->mnTipTimeout = nTipTimeout; }
- ULONG GetTipTimeout() const
+ sal_uIntPtr GetTipTimeout() const
{ return mpData->mnTipTimeout; }
- void SetBalloonDelay( ULONG nBalloonDelay )
+ void SetBalloonDelay( sal_uIntPtr nBalloonDelay )
{ CopyData(); mpData->mnBalloonDelay = nBalloonDelay; }
- ULONG GetBalloonDelay() const
+ sal_uIntPtr GetBalloonDelay() const
{ return mpData->mnBalloonDelay; }
const HelpSettings& operator =( const HelpSettings& rSet );
- BOOL operator ==( const HelpSettings& rSet ) const;
- BOOL operator !=( const HelpSettings& rSet ) const
+ sal_Bool operator ==( const HelpSettings& rSet ) const;
+ sal_Bool operator !=( const HelpSettings& rSet ) const
{ return !(*this == rSet); }
};
@@ -1153,7 +1153,7 @@ class ImplAllSettingsData
~ImplAllSettingsData();
private:
- ULONG mnRefCount;
+ sal_uIntPtr mnRefCount;
MachineSettings maMachineSettings;
MouseSettings maMouseSettings;
KeyboardSettings maKeyboardSettings;
@@ -1162,8 +1162,8 @@ private:
NotificationSettings maNotificationSettings;
HelpSettings maHelpSettings;
::com::sun::star::lang::Locale maLocale;
- ULONG mnSystemUpdate;
- ULONG mnWindowUpdate;
+ sal_uIntPtr mnSystemUpdate;
+ sal_uIntPtr mnWindowUpdate;
::com::sun::star::lang::Locale maUILocale;
LanguageType meLanguage;
LanguageType meUILanguage;
@@ -1181,24 +1181,24 @@ private:
// - AllSettings -
// ---------------
-#define SETTINGS_MACHINE ((ULONG)0x00000001)
-#define SETTINGS_MOUSE ((ULONG)0x00000002)
-#define SETTINGS_KEYBOARD ((ULONG)0x00000004)
-#define SETTINGS_STYLE ((ULONG)0x00000008)
-#define SETTINGS_MISC ((ULONG)0x00000010)
-#define SETTINGS_SOUND ((ULONG)0x00000020)
-#define SETTINGS_NOTIFICATION ((ULONG)0x00000040)
-#define SETTINGS_HELP ((ULONG)0x00000080)
-#define SETTINGS_INTERNATIONAL ((ULONG)0x00000100) /* was for class International, has no effect anymore */
-#define SETTINGS_LOCALE ((ULONG)0x00000200)
-#define SETTINGS_UILOCALE ((ULONG)0x00000400)
+#define SETTINGS_MACHINE ((sal_uIntPtr)0x00000001)
+#define SETTINGS_MOUSE ((sal_uIntPtr)0x00000002)
+#define SETTINGS_KEYBOARD ((sal_uIntPtr)0x00000004)
+#define SETTINGS_STYLE ((sal_uIntPtr)0x00000008)
+#define SETTINGS_MISC ((sal_uIntPtr)0x00000010)
+#define SETTINGS_SOUND ((sal_uIntPtr)0x00000020)
+#define SETTINGS_NOTIFICATION ((sal_uIntPtr)0x00000040)
+#define SETTINGS_HELP ((sal_uIntPtr)0x00000080)
+#define SETTINGS_INTERNATIONAL ((sal_uIntPtr)0x00000100) /* was for class International, has no effect anymore */
+#define SETTINGS_LOCALE ((sal_uIntPtr)0x00000200)
+#define SETTINGS_UILOCALE ((sal_uIntPtr)0x00000400)
#define SETTINGS_ALLSETTINGS (SETTINGS_MACHINE |\
SETTINGS_MOUSE | SETTINGS_KEYBOARD |\
SETTINGS_STYLE | SETTINGS_MISC |\
SETTINGS_SOUND | SETTINGS_NOTIFICATION |\
SETTINGS_HELP |\
SETTINGS_LOCALE | SETTINGS_UILOCALE )
-#define SETTINGS_IN_UPDATE_SETTINGS ((ULONG)0x00000800) // this flag indicates that the data changed event was created
+#define SETTINGS_IN_UPDATE_SETTINGS ((sal_uIntPtr)0x00000800) // this flag indicates that the data changed event was created
// in Windows::UpdateSettings probably because of a global
// settings changed
@@ -1257,7 +1257,7 @@ public:
LanguageType GetLanguage() const;
void SetUILanguage( LanguageType eLang );
LanguageType GetUILanguage() const;
- BOOL GetLayoutRTL() const; // returns TRUE if UI language requires right-to-left UI
+ sal_Bool GetLayoutRTL() const; // returns sal_True if UI language requires right-to-left UI
const LocaleDataWrapper& GetLocaleDataWrapper() const;
const LocaleDataWrapper& GetUILocaleDataWrapper() const;
const vcl::I18nHelper& GetLocaleI18nHelper() const;
@@ -1274,22 +1274,22 @@ public:
const String& rStr2, xub_StrLen nPos2, xub_StrLen nCount2 ) const;
*/
- void SetSystemUpdate( ULONG nUpdate )
+ void SetSystemUpdate( sal_uIntPtr nUpdate )
{ CopyData(); mpData->mnSystemUpdate = nUpdate; }
- ULONG GetSystemUpdate() const
+ sal_uIntPtr GetSystemUpdate() const
{ return mpData->mnSystemUpdate; }
- void SetWindowUpdate( ULONG nUpdate )
+ void SetWindowUpdate( sal_uIntPtr nUpdate )
{ CopyData(); mpData->mnWindowUpdate = nUpdate; }
- ULONG GetWindowUpdate() const
+ sal_uIntPtr GetWindowUpdate() const
{ return mpData->mnWindowUpdate; }
- ULONG Update( ULONG nFlags, const AllSettings& rSettings );
- ULONG GetChangeFlags( const AllSettings& rSettings ) const;
+ sal_uIntPtr Update( sal_uIntPtr nFlags, const AllSettings& rSettings );
+ sal_uIntPtr GetChangeFlags( const AllSettings& rSettings ) const;
const AllSettings& operator =( const AllSettings& rSet );
- BOOL operator ==( const AllSettings& rSet ) const;
- BOOL operator !=( const AllSettings& rSet ) const
+ sal_Bool operator ==( const AllSettings& rSet ) const;
+ sal_Bool operator !=( const AllSettings& rSet ) const
{ return !(*this == rSet); }
static void LocaleSettingsChanged( sal_uInt32 nHint );
SvtSysLocale& GetSysLocale() { return mpData->maSysLocale; }
diff --git a/vcl/inc/vcl/slider.hxx b/vcl/inc/vcl/slider.hxx
index 52af7a8bf343..8473170bc114 100644
--- a/vcl/inc/vcl/slider.hxx
+++ b/vcl/inc/vcl/slider.hxx
@@ -59,11 +59,11 @@ private:
long mnLineSize;
long mnPageSize;
long mnDelta;
- USHORT mnDragDraw;
- USHORT mnStateFlags;
+ sal_uInt16 mnDragDraw;
+ sal_uInt16 mnStateFlags;
ScrollType meScrollType;
- BOOL mbCalcSize;
- BOOL mbFullDrag;
+ sal_Bool mbCalcSize;
+ sal_Bool mbFullDrag;
Link maSlideHdl;
Link maEndSlideHdl;
@@ -72,16 +72,16 @@ private:
SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle );
SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
SAL_DLLPRIVATE void ImplInitSettings();
- SAL_DLLPRIVATE void ImplUpdateRects( BOOL bUpdate = TRUE );
+ SAL_DLLPRIVATE void ImplUpdateRects( sal_Bool bUpdate = sal_True );
SAL_DLLPRIVATE long ImplCalcThumbPos( long nPixPos );
SAL_DLLPRIVATE long ImplCalcThumbPosPix( long nPos );
- SAL_DLLPRIVATE void ImplCalc( BOOL bUpdate = TRUE );
- SAL_DLLPRIVATE void ImplDraw( USHORT nDrawFlags );
- SAL_DLLPRIVATE BOOL ImplIsPageUp( const Point& rPos );
- SAL_DLLPRIVATE BOOL ImplIsPageDown( const Point& rPos );
- SAL_DLLPRIVATE long ImplSlide( long nNewPos, BOOL bCallEndSlide );
- SAL_DLLPRIVATE long ImplDoAction( BOOL bCallEndSlide );
- SAL_DLLPRIVATE void ImplDoMouseAction( const Point& rPos, BOOL bCallAction = TRUE );
+ SAL_DLLPRIVATE void ImplCalc( sal_Bool bUpdate = sal_True );
+ SAL_DLLPRIVATE void ImplDraw( sal_uInt16 nDrawFlags );
+ SAL_DLLPRIVATE sal_Bool ImplIsPageUp( const Point& rPos );
+ SAL_DLLPRIVATE sal_Bool ImplIsPageDown( const Point& rPos );
+ SAL_DLLPRIVATE long ImplSlide( long nNewPos, sal_Bool bCallEndSlide );
+ SAL_DLLPRIVATE long ImplDoAction( sal_Bool bCallEndSlide );
+ SAL_DLLPRIVATE void ImplDoMouseAction( const Point& rPos, sal_Bool bCallAction = sal_True );
SAL_DLLPRIVATE long ImplDoSlide( long nNewPos );
SAL_DLLPRIVATE long ImplDoSlideAction( ScrollType eScrollType );
@@ -102,9 +102,9 @@ public:
virtual void Slide();
virtual void EndSlide();
- void EnableDrag( BOOL bEnable = TRUE )
+ void EnableDrag( sal_Bool bEnable = sal_True )
{ mbFullDrag = bEnable; }
- BOOL IsDragEnabled() const { return mbFullDrag; }
+ sal_Bool IsDragEnabled() const { return mbFullDrag; }
void SetRangeMin( long nNewRange );
long GetRangeMin() const { return mnMinRange; }
diff --git a/vcl/inc/vcl/smartid.hxx b/vcl/inc/vcl/smartid.hxx
index 2cc5f347b2cb..99a219b8cc57 100755
--- a/vcl/inc/vcl/smartid.hxx
+++ b/vcl/inc/vcl/smartid.hxx
@@ -53,8 +53,8 @@ private:
public:
explicit SmartId( const String& rId );
- explicit SmartId( ULONG nId );
- SmartId( const String& rId, ULONG nId );
+ explicit SmartId( sal_uIntPtr nId );
+ SmartId( const String& rId, sal_uIntPtr nId );
SmartId();
@@ -65,23 +65,23 @@ public:
void UpdateId( const SmartId& rId, SmartIdUpdateMode aMode = SMART_SET_SMART );
- BOOL HasNumeric() const;
- BOOL HasString() const;
- BOOL HasAny() const;
- ULONG GetNum() const;
+ sal_Bool HasNumeric() const;
+ sal_Bool HasString() const;
+ sal_Bool HasAny() const;
+ sal_uIntPtr GetNum() const;
String GetStr() const;
String GetText() const; /// return String for UI usage
- BOOL Matches( const String &rId )const;
- BOOL Matches( const ULONG nId ) const;
+ sal_Bool Matches( const String &rId )const;
+ sal_Bool Matches( const sal_uIntPtr nId ) const;
/// In case both Ids have both values set only the StringId is used for Matching
- BOOL Matches( const SmartId &rId ) const;
+ sal_Bool Matches( const SmartId &rId ) const;
- BOOL Equals( const SmartId &rId ) const;
+ sal_Bool Equals( const SmartId &rId ) const;
- BOOL operator == ( const SmartId& rRight ) const;
- BOOL operator < ( const SmartId& rRight ) const;
+ sal_Bool operator == ( const SmartId& rRight ) const;
+ sal_Bool operator < ( const SmartId& rRight ) const;
};
#endif
diff --git a/vcl/inc/vcl/sndstyle.hxx b/vcl/inc/vcl/sndstyle.hxx
index 6e1401986b36..01882cde56bc 100644
--- a/vcl/inc/vcl/sndstyle.hxx
+++ b/vcl/inc/vcl/sndstyle.hxx
@@ -34,7 +34,7 @@
// - Sound-Types -
// ---------------
-typedef USHORT SoundType;
+typedef sal_uInt16 SoundType;
#define SOUND_DEFAULT ((SoundType)0)
#define SOUND_INFO ((SoundType)1)
#define SOUND_WARNING ((SoundType)2)
diff --git a/vcl/inc/vcl/spin.h b/vcl/inc/vcl/spin.h
index b600c18f0f9f..d81b9bf1cbc0 100644
--- a/vcl/inc/vcl/spin.h
+++ b/vcl/inc/vcl/spin.h
@@ -43,9 +43,9 @@ class OutputDevice;
void ImplDrawSpinButton( OutputDevice* pOutDev,
const Rectangle& rUpperRect,
const Rectangle& rLowerRect,
- BOOL bUpperIn, BOOL bLowerIn,
- BOOL bUpperEnabled = TRUE,
- BOOL bLowerEnabled = TRUE,
- BOOL bHorz = FALSE, BOOL bMirrorHorz = FALSE );
+ sal_Bool bUpperIn, sal_Bool bLowerIn,
+ sal_Bool bUpperEnabled = sal_True,
+ sal_Bool bLowerEnabled = sal_True,
+ sal_Bool bHorz = sal_False, sal_Bool bMirrorHorz = sal_False );
#endif // _SV_SPIN_H
diff --git a/vcl/inc/vcl/spin.hxx b/vcl/inc/vcl/spin.hxx
index 2ca4709de4c5..ac8396bab3c3 100644
--- a/vcl/inc/vcl/spin.hxx
+++ b/vcl/inc/vcl/spin.hxx
@@ -44,13 +44,13 @@ private:
Rectangle maUpperRect;
Rectangle maLowerRect;
Rectangle maFocusRect;
- BOOL mbRepeat : 1;
- BOOL mbUpperIn : 1;
- BOOL mbLowerIn : 1;
- BOOL mbInitialUp : 1;
- BOOL mbInitialDown : 1;
- BOOL mbHorz : 1;
- BOOL mbUpperIsFocused : 1;
+ sal_Bool mbRepeat : 1;
+ sal_Bool mbUpperIn : 1;
+ sal_Bool mbLowerIn : 1;
+ sal_Bool mbInitialUp : 1;
+ sal_Bool mbInitialDown : 1;
+ sal_Bool mbHorz : 1;
+ sal_Bool mbUpperIsFocused : 1;
Link maUpHdlLink;
Link maDownHdlLink;
long mnMinRange;
@@ -73,7 +73,7 @@ public:
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_uIntPtr nFlags );
virtual void MouseButtonDown( const MouseEvent& rMEvt );
virtual void MouseButtonUp( const MouseEvent& rMEvt );
virtual void MouseMove( const MouseEvent& rMEvt );
@@ -100,15 +100,15 @@ public:
const Link& GetDownHdl() const { return maDownHdlLink; }
private:
- // moves the focus to the upper or lower rect. Return TRUE if the focus rect actually changed.
- SAL_DLLPRIVATE BOOL ImplMoveFocus( BOOL _bUpper );
- SAL_DLLPRIVATE void ImplCalcFocusRect( BOOL _bUpper );
+ // moves the focus to the upper or lower rect. Return sal_True if the focus rect actually changed.
+ SAL_DLLPRIVATE sal_Bool ImplMoveFocus( sal_Bool _bUpper );
+ SAL_DLLPRIVATE void ImplCalcFocusRect( sal_Bool _bUpper );
- SAL_DLLPRIVATE inline BOOL ImplIsUpperEnabled( ) const
+ SAL_DLLPRIVATE inline sal_Bool ImplIsUpperEnabled( ) const
{
return mnValue + mnValueStep <= mnMaxRange;
}
- SAL_DLLPRIVATE inline BOOL ImplIsLowerEnabled( ) const
+ SAL_DLLPRIVATE inline sal_Bool ImplIsLowerEnabled( ) const
{
return mnValue >= mnMinRange + mnValueStep;
}
diff --git a/vcl/inc/vcl/spinfld.hxx b/vcl/inc/vcl/spinfld.hxx
index 7df0b6d95bfc..8b3e1e484465 100644
--- a/vcl/inc/vcl/spinfld.hxx
+++ b/vcl/inc/vcl/spinfld.hxx
@@ -49,7 +49,7 @@ protected:
Link maDownHdlLink;
Link maFirstHdlLink;
Link maLastHdlLink;
- BOOL mbRepeat:1,
+ sal_Bool mbRepeat:1,
mbSpin:1,
mbInitialUp:1,
mbInitialDown:1,
@@ -81,7 +81,7 @@ public:
SpinField( Window* pParent, const ResId& rResId );
~SpinField();
- virtual BOOL ShowDropDown( BOOL bShow );
+ virtual sal_Bool ShowDropDown( sal_Bool bShow );
virtual void Up();
virtual void Down();
@@ -92,7 +92,7 @@ public:
virtual void MouseButtonUp( const MouseEvent& rMEvt );
virtual void MouseMove( const MouseEvent& rMEvt );
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_uIntPtr nFlags );
virtual void Resize();
virtual void StateChanged( StateChangedType nType );
virtual void DataChanged( const DataChangedEvent& rDCEvt );
@@ -109,7 +109,7 @@ public:
virtual Size CalcMinimumSize() const;
virtual Size GetOptimalSize(WindowSizeType eType) const;
- virtual Size CalcSize( USHORT nChars ) const;
+ virtual Size CalcSize( sal_uInt16 nChars ) const;
};
#endif // _SV_SPINFLD_HXX
diff --git a/vcl/inc/vcl/split.hxx b/vcl/inc/vcl/split.hxx
index 890ef5365fbc..306d90acfbb1 100644
--- a/vcl/inc/vcl/split.hxx
+++ b/vcl/inc/vcl/split.hxx
@@ -47,9 +47,9 @@ private:
long mnStartSplitPos;
Point maDragPos;
Rectangle maDragRect;
- BOOL mbHorzSplit;
- BOOL mbDragFull;
- BOOL mbKbdSplitting;
+ sal_Bool mbHorzSplit;
+ sal_Bool mbDragFull;
+ sal_Bool mbKbdSplitting;
long mbInKeyEvent;
long mnKeyboardStepSize;
Link maStartSplitHdl;
@@ -61,7 +61,7 @@ private:
SAL_DLLPRIVATE void ImplSplitMousePos( Point& rPos );
SAL_DLLPRIVATE void ImplStartKbdSplitting();
SAL_DLLPRIVATE void ImplKbdTracking( KeyCode aKeyCode );
- SAL_DLLPRIVATE BOOL ImplSplitterActive();
+ SAL_DLLPRIVATE sal_Bool ImplSplitterActive();
SAL_DLLPRIVATE Splitter* ImplFindSibling();
SAL_DLLPRIVATE void ImplRestoreSplitter();
@@ -108,7 +108,7 @@ public:
void SetLastSplitPosPixel( long nNewPos );
long GetLastSplitPosPixel() const { return mnLastSplitPos; }
- BOOL IsHorizontal() const { return mbHorzSplit; }
+ sal_Bool IsHorizontal() const { return mbHorzSplit; }
// set the stepsize of the splitter for cursor movement
// the default is 10% of the reference window's width/height
diff --git a/vcl/inc/vcl/splitwin.hxx b/vcl/inc/vcl/splitwin.hxx
index 4aa1ca16785c..bc659f2b5841 100644
--- a/vcl/inc/vcl/splitwin.hxx
+++ b/vcl/inc/vcl/splitwin.hxx
@@ -39,7 +39,7 @@ struct ImplSplitSet;
// - SplitWindowItemBits -
// -----------------------
-typedef USHORT SplitWindowItemBits;
+typedef sal_uInt16 SplitWindowItemBits;
// -------------------------------
// - Bits fuer SplitWindow-Items -
@@ -55,8 +55,8 @@ typedef USHORT SplitWindowItemBits;
// - SplitWindow-Types -
// ---------------------
-#define SPLITWINDOW_APPEND ((USHORT)0xFFFF)
-#define SPLITWINDOW_ITEM_NOTFOUND ((USHORT)0xFFFF)
+#define SPLITWINDOW_APPEND ((sal_uInt16)0xFFFF)
+#define SPLITWINDOW_ITEM_NOTFOUND ((sal_uInt16)0xFFFF)
// ---------------
// - SplitWindow -
@@ -82,10 +82,10 @@ private:
long mnMSplitPos;
WinBits mnWinStyle;
WindowAlign meAlign;
- USHORT mnSplitTest;
- USHORT mnSplitPos;
- USHORT mnMouseModifier;
- BOOL mbDragFull:1,
+ sal_uInt16 mnSplitTest;
+ sal_uInt16 mnSplitPos;
+ sal_uInt16 mnMouseModifier;
+ sal_Bool mbDragFull:1,
mbHorz:1,
mbBottomRight:1,
mbCalc:1,
@@ -120,31 +120,31 @@ private:
SAL_DLLPRIVATE void ImplUpdateSet( ImplSplitSet* pSet );
SAL_DLLPRIVATE void ImplSetWindowSize( long nDelta );
SAL_DLLPRIVATE void ImplSplitMousePos( Point& rMousePos );
- SAL_DLLPRIVATE void ImplGetButtonRect( Rectangle& rRect, long nEx, BOOL bTest ) const;
- SAL_DLLPRIVATE void ImplGetAutoHideRect( Rectangle& rRect, BOOL bTest = FALSE ) const;
- SAL_DLLPRIVATE void ImplGetFadeInRect( Rectangle& rRect, BOOL bTest = FALSE ) const;
- SAL_DLLPRIVATE void ImplGetFadeOutRect( Rectangle& rRect, BOOL bTest = FALSE ) const;
+ SAL_DLLPRIVATE void ImplGetButtonRect( Rectangle& rRect, long nEx, sal_Bool bTest ) const;
+ SAL_DLLPRIVATE void ImplGetAutoHideRect( Rectangle& rRect, sal_Bool bTest = sal_False ) const;
+ SAL_DLLPRIVATE void ImplGetFadeInRect( Rectangle& rRect, sal_Bool bTest = sal_False ) const;
+ SAL_DLLPRIVATE void ImplGetFadeOutRect( Rectangle& rRect, sal_Bool bTest = sal_False ) const;
SAL_DLLPRIVATE void ImplDrawButtonRect( const Rectangle& rRect, long nSize );
- SAL_DLLPRIVATE void ImplDrawAutoHide( BOOL bInPaint );
- SAL_DLLPRIVATE void ImplDrawFadeIn( BOOL bInPaint );
- SAL_DLLPRIVATE void ImplDrawFadeOut( BOOL bInPaint );
+ SAL_DLLPRIVATE void ImplDrawAutoHide( sal_Bool bInPaint );
+ SAL_DLLPRIVATE void ImplDrawFadeIn( sal_Bool bInPaint );
+ SAL_DLLPRIVATE void ImplDrawFadeOut( sal_Bool bInPaint );
SAL_DLLPRIVATE void ImplNewAlign();
- SAL_DLLPRIVATE void ImplDrawGrip( const Rectangle& rRect, BOOL bHorz, BOOL bLeft );
- SAL_DLLPRIVATE void ImplDrawFadeArrow( const Point& rPt, BOOL bHorz, BOOL bLeft );
+ SAL_DLLPRIVATE void ImplDrawGrip( const Rectangle& rRect, sal_Bool bHorz, sal_Bool bLeft );
+ SAL_DLLPRIVATE void ImplDrawFadeArrow( const Point& rPt, sal_Bool bHorz, sal_Bool bLeft );
SAL_DLLPRIVATE void ImplStartSplit( const MouseEvent& rMEvt );
static SAL_DLLPRIVATE void ImplDrawBorder( SplitWindow* pWin );
static SAL_DLLPRIVATE void ImplDrawBorderLine( SplitWindow* pWin );
- static SAL_DLLPRIVATE void ImplCalcSet2( SplitWindow* pWindow, ImplSplitSet* pSet, BOOL bHide,
- BOOL bRows, BOOL bDown = TRUE );
+ static SAL_DLLPRIVATE void ImplCalcSet2( SplitWindow* pWindow, ImplSplitSet* pSet, sal_Bool bHide,
+ sal_Bool bRows, sal_Bool bDown = sal_True );
static SAL_DLLPRIVATE void ImplDrawBack( SplitWindow* pWindow, ImplSplitSet* pSet );
static SAL_DLLPRIVATE void ImplDrawBack( SplitWindow* pWindow, const Rectangle& rRect,
const Wallpaper* pWall, const Bitmap* pBitmap );
- static SAL_DLLPRIVATE USHORT ImplTestSplit( ImplSplitSet* pSet, const Point& rPos,
- long& rMouseOff, ImplSplitSet** ppFoundSet, USHORT& rFoundPos,
- BOOL bRows, BOOL bDown = TRUE );
- static SAL_DLLPRIVATE USHORT ImplTestSplit( SplitWindow* pWindow, const Point& rPos,
- long& rMouseOff, ImplSplitSet** ppFoundSet, USHORT& rFoundPos );
+ static SAL_DLLPRIVATE sal_uInt16 ImplTestSplit( ImplSplitSet* pSet, const Point& rPos,
+ long& rMouseOff, ImplSplitSet** ppFoundSet, sal_uInt16& rFoundPos,
+ sal_Bool bRows, sal_Bool bDown = sal_True );
+ static SAL_DLLPRIVATE sal_uInt16 ImplTestSplit( SplitWindow* pWindow, const Point& rPos,
+ long& rMouseOff, ImplSplitSet** ppFoundSet, sal_uInt16& rFoundPos );
static SAL_DLLPRIVATE void ImplDrawSplitTracking( SplitWindow* pThis, const Point& rPos );
// Copy assignment is forbidden and not implemented.
@@ -173,54 +173,54 @@ public:
virtual void DataChanged( const DataChangedEvent& rDCEvt );
virtual long PreNotify( NotifyEvent& rNEvt );
- void InsertItem( USHORT nId, Window* pWindow, long nSize,
- USHORT nPos = SPLITWINDOW_APPEND, USHORT nSetId = 0,
+ void InsertItem( sal_uInt16 nId, Window* pWindow, long nSize,
+ sal_uInt16 nPos = SPLITWINDOW_APPEND, sal_uInt16 nSetId = 0,
SplitWindowItemBits nBits = 0 );
- void InsertItem( USHORT nId, long nSize,
- USHORT nPos = SPLITWINDOW_APPEND, USHORT nSetId = 0,
+ void InsertItem( sal_uInt16 nId, long nSize,
+ sal_uInt16 nPos = SPLITWINDOW_APPEND, sal_uInt16 nSetId = 0,
SplitWindowItemBits nBits = 0 );
- void MoveItem( USHORT nId, USHORT nNewPos, USHORT nNewSetId = 0 );
- void RemoveItem( USHORT nId, BOOL bHide = TRUE );
+ void MoveItem( sal_uInt16 nId, sal_uInt16 nNewPos, sal_uInt16 nNewSetId = 0 );
+ void RemoveItem( sal_uInt16 nId, sal_Bool bHide = sal_True );
void Clear();
- void SetBaseSet( USHORT nSetId = 0 );
- USHORT GetBaseSet() const;
+ void SetBaseSet( sal_uInt16 nSetId = 0 );
+ sal_uInt16 GetBaseSet() const;
- void SetSplitSize( USHORT nSetId, long nSplitSize,
- BOOL bWithChilds = FALSE );
- long GetSplitSize( USHORT nSetId ) const;
- void SetItemBackground( USHORT nSetId );
- void SetItemBackground( USHORT nSetId, const Wallpaper& rWallpaper );
- Wallpaper GetItemBackground( USHORT nSetId ) const;
- BOOL IsItemBackground( USHORT nSetId ) const;
- void SetItemBitmap( USHORT nSetId, const Bitmap& rBitmap );
- Bitmap GetItemBitmap( USHORT nSetId ) const;
+ void SetSplitSize( sal_uInt16 nSetId, long nSplitSize,
+ sal_Bool bWithChilds = sal_False );
+ long GetSplitSize( sal_uInt16 nSetId ) const;
+ void SetItemBackground( sal_uInt16 nSetId );
+ void SetItemBackground( sal_uInt16 nSetId, const Wallpaper& rWallpaper );
+ Wallpaper GetItemBackground( sal_uInt16 nSetId ) const;
+ sal_Bool IsItemBackground( sal_uInt16 nSetId ) const;
+ void SetItemBitmap( sal_uInt16 nSetId, const Bitmap& rBitmap );
+ Bitmap GetItemBitmap( sal_uInt16 nSetId ) const;
- void SplitItem( USHORT nId, long nNewSize,
- BOOL bPropSmall = FALSE,
- BOOL bPropGreat = FALSE );
- void SetItemSize( USHORT nId, long nNewSize );
- long GetItemSize( USHORT nId ) const;
- long GetItemSize( USHORT nId, SplitWindowItemBits nBits ) const;
- void SetItemBits( USHORT nId, SplitWindowItemBits nNewBits );
- SplitWindowItemBits GetItemBits( USHORT nId ) const;
- Window* GetItemWindow( USHORT nId ) const;
- USHORT GetSet( USHORT nId ) const;
- BOOL GetSet( USHORT nId, USHORT& rSetId, USHORT& rPos ) const;
- USHORT GetItemId( Window* pWindow ) const;
- USHORT GetItemId( const Point& rPos ) const;
- USHORT GetItemPos( USHORT nId, USHORT nSetId = 0 ) const;
- USHORT GetItemId( USHORT nPos, USHORT nSetId = 0 ) const;
- USHORT GetItemCount( USHORT nSetId = 0 ) const;
- BOOL IsItemValid( USHORT nId ) const;
+ void SplitItem( sal_uInt16 nId, long nNewSize,
+ sal_Bool bPropSmall = sal_False,
+ sal_Bool bPropGreat = sal_False );
+ void SetItemSize( sal_uInt16 nId, long nNewSize );
+ long GetItemSize( sal_uInt16 nId ) const;
+ long GetItemSize( sal_uInt16 nId, SplitWindowItemBits nBits ) const;
+ void SetItemBits( sal_uInt16 nId, SplitWindowItemBits nNewBits );
+ SplitWindowItemBits GetItemBits( sal_uInt16 nId ) const;
+ Window* GetItemWindow( sal_uInt16 nId ) const;
+ sal_uInt16 GetSet( sal_uInt16 nId ) const;
+ sal_Bool GetSet( sal_uInt16 nId, sal_uInt16& rSetId, sal_uInt16& rPos ) const;
+ sal_uInt16 GetItemId( Window* pWindow ) const;
+ sal_uInt16 GetItemId( const Point& rPos ) const;
+ sal_uInt16 GetItemPos( sal_uInt16 nId, sal_uInt16 nSetId = 0 ) const;
+ sal_uInt16 GetItemId( sal_uInt16 nPos, sal_uInt16 nSetId = 0 ) const;
+ sal_uInt16 GetItemCount( sal_uInt16 nSetId = 0 ) const;
+ sal_Bool IsItemValid( sal_uInt16 nId ) const;
- void SetNoAlign( BOOL bNoAlign );
- BOOL IsNoAlign() const { return mbNoAlign; }
+ void SetNoAlign( sal_Bool bNoAlign );
+ sal_Bool IsNoAlign() const { return mbNoAlign; }
void SetAlign( WindowAlign eNewAlign = WINDOWALIGN_TOP );
WindowAlign GetAlign() const { return meAlign; }
- BOOL IsHorizontal() const { return mbHorz; }
+ sal_Bool IsHorizontal() const { return mbHorz; }
- BOOL IsSplitting() const { return IsTracking(); }
+ sal_Bool IsSplitting() const { return IsTracking(); }
void SetMaxSizePixel( long nNewMaxSize ) { mnMaxSize = nNewMaxSize; }
long GetMaxSizePixel() const { return mnMaxSize; }
@@ -228,24 +228,24 @@ public:
static Size CalcWindowSizePixel( const Size& rSize,
WindowAlign eAlign,
WinBits nWinStyle,
- BOOL bExtra = FALSE );
+ sal_Bool bExtra = sal_False );
Size CalcWindowSizePixel( const Size& rSize )
{ return CalcWindowSizePixel( rSize, meAlign, mnWinStyle, (mbAutoHide || mbFadeOut) ); }
Size CalcLayoutSizePixel( const Size& aNewSize );
- void ShowAutoHideButton( BOOL bShow = TRUE );
- BOOL IsAutoHideButtonVisible() const { return mbAutoHide; }
- void ShowFadeInHideButton( BOOL bShow = TRUE );
- void ShowFadeInButton( BOOL bShow = TRUE ) { ShowFadeInHideButton( bShow ); }
- BOOL IsFadeInButtonVisible() const { return mbFadeIn; }
- void ShowFadeOutButton( BOOL bShow = TRUE );
- BOOL IsFadeOutButtonVisible() const { return mbFadeOut; }
+ void ShowAutoHideButton( sal_Bool bShow = sal_True );
+ sal_Bool IsAutoHideButtonVisible() const { return mbAutoHide; }
+ void ShowFadeInHideButton( sal_Bool bShow = sal_True );
+ void ShowFadeInButton( sal_Bool bShow = sal_True ) { ShowFadeInHideButton( bShow ); }
+ sal_Bool IsFadeInButtonVisible() const { return mbFadeIn; }
+ void ShowFadeOutButton( sal_Bool bShow = sal_True );
+ sal_Bool IsFadeOutButtonVisible() const { return mbFadeOut; }
long GetFadeInSize() const;
- BOOL IsFadeNoButtonMode() const { return mbFadeNoButtonMode; }
+ sal_Bool IsFadeNoButtonMode() const { return mbFadeNoButtonMode; }
- void SetAutoHideState( BOOL bAutoHide );
- BOOL GetAutoHideState() const { return mbAutoHideIn; }
+ void SetAutoHideState( sal_Bool bAutoHide );
+ sal_Bool GetAutoHideState() const { return mbAutoHideIn; }
Rectangle GetAutoHideRect() const;
Rectangle GetFadeInRect() const;
diff --git a/vcl/inc/vcl/status.hxx b/vcl/inc/vcl/status.hxx
index 810ecf230960..906259de4d3d 100644
--- a/vcl/inc/vcl/status.hxx
+++ b/vcl/inc/vcl/status.hxx
@@ -40,7 +40,7 @@ class ImplStatusItemList;
void VCL_DLLPUBLIC DrawProgress( Window* pWindow, const Point& rPos,
long nOffset, long nPrgsWidth, long nPrgsHeight,
- USHORT nPercent1, USHORT nPercent2, USHORT nPercentCount,
+ sal_uInt16 nPercent1, sal_uInt16 nPercent2, sal_uInt16 nPercentCount,
const Rectangle& rFramePosSize
);
@@ -48,7 +48,7 @@ void VCL_DLLPUBLIC DrawProgress( Window* pWindow, const Point& rPos,
// - StatusBarItemBits -
// ---------------------
-typedef USHORT StatusBarItemBits;
+typedef sal_uInt16 StatusBarItemBits;
// ----------------------------
// - Bits fuer StatusBarItems -
@@ -67,8 +67,8 @@ typedef USHORT StatusBarItemBits;
// - StatusBar-Types -
// -------------------
-#define STATUSBAR_APPEND ((USHORT)0xFFFF)
-#define STATUSBAR_ITEM_NOTFOUND ((USHORT)0xFFFF)
+#define STATUSBAR_APPEND ((sal_uInt16)0xFFFF)
+#define STATUSBAR_ITEM_NOTFOUND ((sal_uInt16)0xFFFF)
#define STATUSBAR_OFFSET ((long)5)
// -------------
@@ -91,32 +91,32 @@ private:
long mnCalcHeight;
long mnTextY;
long mnItemY;
- USHORT mnCurItemId;
- USHORT mnPercent;
- USHORT mnPercentCount;
- BOOL mbVisibleItems;
- BOOL mbFormat;
- BOOL mbProgressMode;
- BOOL mbInUserDraw;
- BOOL mbBottomBorder;
+ sal_uInt16 mnCurItemId;
+ sal_uInt16 mnPercent;
+ sal_uInt16 mnPercentCount;
+ sal_Bool mbVisibleItems;
+ sal_Bool mbFormat;
+ sal_Bool mbProgressMode;
+ sal_Bool mbInUserDraw;
+ sal_Bool mbBottomBorder;
Link maClickHdl;
Link maDoubleClickHdl;
using Window::ImplInit;
SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle );
- SAL_DLLPRIVATE void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground );
+ SAL_DLLPRIVATE void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground );
SAL_DLLPRIVATE void ImplFormat();
- SAL_DLLPRIVATE BOOL ImplIsItemUpdate();
+ SAL_DLLPRIVATE sal_Bool ImplIsItemUpdate();
// #if 0 // _SOLAR__PRIVATE
using OutputDevice::ImplDrawText;
// #endif
- SAL_DLLPRIVATE void ImplDrawText( BOOL bOffScreen, long nOldTextWidth );
- SAL_DLLPRIVATE void ImplDrawItem( BOOL bOffScreen, USHORT nPos, BOOL bDrawText, BOOL bDrawFrame );
- SAL_DLLPRIVATE void ImplDrawProgress( BOOL bPaint,
- USHORT nOldPerc, USHORT nNewPerc );
+ SAL_DLLPRIVATE void ImplDrawText( sal_Bool bOffScreen, long nOldTextWidth );
+ SAL_DLLPRIVATE void ImplDrawItem( sal_Bool bOffScreen, sal_uInt16 nPos, sal_Bool bDrawText, sal_Bool bDrawFrame );
+ SAL_DLLPRIVATE void ImplDrawProgress( sal_Bool bPaint,
+ sal_uInt16 nOldPerc, sal_uInt16 nNewPerc );
SAL_DLLPRIVATE void ImplCalcProgressRect();
- SAL_DLLPRIVATE Rectangle ImplGetItemRectPos( USHORT nPos ) const;
- SAL_DLLPRIVATE USHORT ImplGetFirstVisiblePos() const;
+ SAL_DLLPRIVATE Rectangle ImplGetItemRectPos( sal_uInt16 nPos ) const;
+ SAL_DLLPRIVATE sal_uInt16 ImplGetFirstVisiblePos() const;
SAL_DLLPRIVATE void ImplCalcBorder();
public:
@@ -137,65 +137,65 @@ public:
virtual void DoubleClick();
virtual void UserDraw( const UserDrawEvent& rUDEvt );
- void InsertItem( USHORT nItemId, ULONG nWidth,
+ void InsertItem( sal_uInt16 nItemId, sal_uIntPtr nWidth,
StatusBarItemBits nBits = SIB_CENTER | SIB_IN,
long nOffset = STATUSBAR_OFFSET,
- USHORT nPos = STATUSBAR_APPEND );
- void RemoveItem( USHORT nItemId );
+ sal_uInt16 nPos = STATUSBAR_APPEND );
+ void RemoveItem( sal_uInt16 nItemId );
- void ShowItem( USHORT nItemId );
- void HideItem( USHORT nItemId );
- BOOL IsItemVisible( USHORT nItemId ) const;
+ void ShowItem( sal_uInt16 nItemId );
+ void HideItem( sal_uInt16 nItemId );
+ sal_Bool IsItemVisible( sal_uInt16 nItemId ) const;
void ShowItems();
void HideItems();
- BOOL AreItemsVisible() const { return mbVisibleItems; }
+ sal_Bool AreItemsVisible() const { return mbVisibleItems; }
void CopyItems( const StatusBar& rStatusBar );
void Clear();
- USHORT GetItemCount() const;
- USHORT GetItemId( USHORT nPos ) const;
- USHORT GetItemId( const Point& rPos ) const;
- USHORT GetItemPos( USHORT nItemId ) const;
- Rectangle GetItemRect( USHORT nItemId ) const;
- Point GetItemTextPos( USHORT nItemId ) const;
- USHORT GetCurItemId() const { return mnCurItemId; }
+ sal_uInt16 GetItemCount() const;
+ sal_uInt16 GetItemId( sal_uInt16 nPos ) const;
+ sal_uInt16 GetItemId( const Point& rPos ) const;
+ sal_uInt16 GetItemPos( sal_uInt16 nItemId ) const;
+ Rectangle GetItemRect( sal_uInt16 nItemId ) const;
+ Point GetItemTextPos( sal_uInt16 nItemId ) const;
+ sal_uInt16 GetCurItemId() const { return mnCurItemId; }
- ULONG GetItemWidth( USHORT nItemId ) const;
- StatusBarItemBits GetItemBits( USHORT nItemId ) const;
- long GetItemOffset( USHORT nItemId ) const;
+ sal_uIntPtr GetItemWidth( sal_uInt16 nItemId ) const;
+ StatusBarItemBits GetItemBits( sal_uInt16 nItemId ) const;
+ long GetItemOffset( sal_uInt16 nItemId ) const;
- void SetItemText( USHORT nItemId, const XubString& rText );
- const XubString& GetItemText( USHORT nItemId ) const;
+ void SetItemText( sal_uInt16 nItemId, const XubString& rText );
+ const XubString& GetItemText( sal_uInt16 nItemId ) const;
- void SetItemData( USHORT nItemId, void* pNewData );
- void* GetItemData( USHORT nItemId ) const;
+ void SetItemData( sal_uInt16 nItemId, void* pNewData );
+ void* GetItemData( sal_uInt16 nItemId ) const;
- void SetItemCommand( USHORT nItemId, const XubString& rCommand );
- const XubString& GetItemCommand( USHORT nItemId );
+ void SetItemCommand( sal_uInt16 nItemId, const XubString& rCommand );
+ const XubString& GetItemCommand( sal_uInt16 nItemId );
- void SetHelpText( USHORT nItemId, const XubString& rText );
- const XubString& GetHelpText( USHORT nItemId ) const;
+ void SetHelpText( sal_uInt16 nItemId, const XubString& rText );
+ const XubString& GetHelpText( sal_uInt16 nItemId ) const;
using Window::SetQuickHelpText;
- void SetQuickHelpText( USHORT nItemId, const XubString& rText );
+ void SetQuickHelpText( sal_uInt16 nItemId, const XubString& rText );
using Window::GetQuickHelpText;
- const XubString& GetQuickHelpText( USHORT nItemId ) const;
+ const XubString& GetQuickHelpText( sal_uInt16 nItemId ) const;
- void SetHelpId( USHORT nItemId, ULONG nHelpId );
- ULONG GetHelpId( USHORT nItemId ) const;
+ void SetHelpId( sal_uInt16 nItemId, sal_uIntPtr nHelpId );
+ sal_uIntPtr GetHelpId( sal_uInt16 nItemId ) const;
- void SetBottomBorder( BOOL bBottomBorder = TRUE );
- BOOL IsBottomBorder() const { return mbBottomBorder; }
+ void SetBottomBorder( sal_Bool bBottomBorder = sal_True );
+ sal_Bool IsBottomBorder() const { return mbBottomBorder; }
- void SetTopBorder( BOOL bTopBorder = TRUE );
- BOOL IsTopBorder() const;
+ void SetTopBorder( sal_Bool bTopBorder = sal_True );
+ sal_Bool IsTopBorder() const;
void StartProgressMode( const XubString& rText );
- void SetProgressValue( USHORT nPercent );
+ void SetProgressValue( sal_uInt16 nPercent );
void EndProgressMode();
- BOOL IsProgressMode() const { return mbProgressMode; }
+ sal_Bool IsProgressMode() const { return mbProgressMode; }
void ResetProgressMode();
void SetText( const XubString& rText );
@@ -205,9 +205,9 @@ public:
const XubString& GetHelpText() const
{ return Window::GetHelpText(); }
- void SetHelpId( ULONG nId )
+ void SetHelpId( sal_uIntPtr nId )
{ Window::SetHelpId( nId ); }
- ULONG GetHelpId() const
+ sal_uIntPtr GetHelpId() const
{ return Window::GetHelpId(); }
Size CalcWindowSizePixel() const;
@@ -218,9 +218,9 @@ public:
const Link& GetDoubleClickHdl() const { return maDoubleClickHdl; }
using Window::SetAccessibleName;
- void SetAccessibleName( USHORT nItemId, const XubString& rName );
+ void SetAccessibleName( sal_uInt16 nItemId, const XubString& rName );
using Window::GetAccessibleName;
- const XubString& GetAccessibleName( USHORT nItemId ) const;
+ const XubString& GetAccessibleName( sal_uInt16 nItemId ) const;
};
#endif // _SV_STATUS_HXX
diff --git a/vcl/inc/vcl/stdtext.hxx b/vcl/inc/vcl/stdtext.hxx
index 111e58aca5bf..120246bd92f2 100644
--- a/vcl/inc/vcl/stdtext.hxx
+++ b/vcl/inc/vcl/stdtext.hxx
@@ -39,15 +39,15 @@ class Window;
// ------------------
#define STANDARD_TEXT_FIRST STANDARD_TEXT_SERVICE_NOT_AVAILABLE
-#define STANDARD_TEXT_SERVICE_NOT_AVAILABLE ((USHORT)0)
+#define STANDARD_TEXT_SERVICE_NOT_AVAILABLE ((sal_uInt16)0)
#define STANDARD_TEXT_LAST STANDARD_TEXT_SERVICE_NOT_AVAILABLE
-XubString VCL_DLLPUBLIC GetStandardText( USHORT nStdText );
+XubString VCL_DLLPUBLIC GetStandardText( sal_uInt16 nStdText );
// -------------------------------------
// - Hilfsmethoden fuer Standard-Texte -
// -------------------------------------
-void VCL_DLLPUBLIC ShowServiceNotAvailableError( Window* pParent, const XubString& rServiceName, BOOL bError );
+void VCL_DLLPUBLIC ShowServiceNotAvailableError( Window* pParent, const XubString& rServiceName, sal_Bool bError );
#endif // _VCL_STDTEXT_HXX
diff --git a/vcl/inc/vcl/strhelper.hxx b/vcl/inc/vcl/strhelper.hxx
index 8df83d6f33f4..a0837c2e7c93 100644
--- a/vcl/inc/vcl/strhelper.hxx
+++ b/vcl/inc/vcl/strhelper.hxx
@@ -46,10 +46,10 @@ int VCL_DLLPUBLIC GetCommandLineTokenCount( const String& );
int VCL_DLLPUBLIC GetCommandLineTokenCount( const ByteString& );
// returns number of tokens (zero if empty or whitespace only)
-String VCL_DLLPUBLIC WhitespaceToSpace( const String&, BOOL bProtect = TRUE );
-ByteString VCL_DLLPUBLIC WhitespaceToSpace( const ByteString&, BOOL bProtect = TRUE );
+String VCL_DLLPUBLIC WhitespaceToSpace( const String&, sal_Bool bProtect = sal_True );
+ByteString VCL_DLLPUBLIC WhitespaceToSpace( const ByteString&, sal_Bool bProtect = sal_True );
// returns a string with multiple adjacent occurences of whitespace
-// converted to a single space. if bProtect is TRUE (nonzero), then
+// converted to a single space. if bProtect is sal_True (nonzero), then
// doublequote, singlequote and singleleftquote protect their respective
// contents
diff --git a/vcl/inc/vcl/svapp.hxx b/vcl/inc/vcl/svapp.hxx
index f90326ce50eb..555f4868ab2f 100644
--- a/vcl/inc/vcl/svapp.hxx
+++ b/vcl/inc/vcl/svapp.hxx
@@ -80,8 +80,8 @@ VCL_DLLPUBLIC sal_UCS4 GetMirroredChar( sal_UCS4 );
// - SystemWindowMode -
// --------------------
-#define SYSTEMWINDOW_MODE_NOAUTOMODE ((USHORT)0x0001)
-#define SYSTEMWINDOW_MODE_DIALOG ((USHORT)0x0002)
+#define SYSTEMWINDOW_MODE_NOAUTOMODE ((sal_uInt16)0x0001)
+#define SYSTEMWINDOW_MODE_DIALOG ((sal_uInt16)0x0002)
// -------------
// - EventHook -
@@ -121,7 +121,7 @@ public:
const UniString& GetDomain() const { return aDomainName; }
int GetPID() const { return nPID; }
- BOOL IsConnectToSame( const ApplicationAddress& rAdr ) const;
+ sal_Bool IsConnectToSame( const ApplicationAddress& rAdr ) const;
};
inline ApplicationAddress::ApplicationAddress()
@@ -151,12 +151,12 @@ inline ApplicationAddress::ApplicationAddress( const UniString& rHost, int nPIDP
nPID = nPIDPar;
}
-inline BOOL ApplicationAddress::IsConnectToSame( const ApplicationAddress& rAdr ) const
+inline sal_Bool ApplicationAddress::IsConnectToSame( const ApplicationAddress& rAdr ) const
{
if ( nPID && ((nPID == rAdr.nPID) && (aHostName.Equals( rAdr.aHostName))) )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
#define APPEVENT_PARAM_DELIMITER '\n'
@@ -186,12 +186,12 @@ public:
const UniString& GetData() const { return aData; }
const ApplicationAddress& GetAppAddress() const { return aAppAddr; }
- BOOL IsOpenEvent() const;
- BOOL IsPrintEvent() const;
- BOOL IsDiskInsertEvent() const;
+ sal_Bool IsOpenEvent() const;
+ sal_Bool IsPrintEvent() const;
+ sal_Bool IsDiskInsertEvent() const;
- USHORT GetParamCount() const { return aData.GetTokenCount( APPEVENT_PARAM_DELIMITER ); }
- UniString GetParam( USHORT nParam ) const { return aData.GetToken( nParam, APPEVENT_PARAM_DELIMITER ); }
+ sal_uInt16 GetParamCount() const { return aData.GetTokenCount( APPEVENT_PARAM_DELIMITER ); }
+ UniString GetParam( sal_uInt16 nParam ) const { return aData.GetToken( nParam, APPEVENT_PARAM_DELIMITER ); }
};
inline ApplicationEvent::ApplicationEvent( const UniString& rSenderAppName,
@@ -205,28 +205,28 @@ inline ApplicationEvent::ApplicationEvent( const UniString& rSenderAppName,
{
}
-inline BOOL ApplicationEvent::IsOpenEvent() const
+inline sal_Bool ApplicationEvent::IsOpenEvent() const
{
if ( aEvent.Equals( APPEVENT_OPEN_STRING ))
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
-inline BOOL ApplicationEvent::IsPrintEvent() const
+inline sal_Bool ApplicationEvent::IsPrintEvent() const
{
if ( aEvent.Equals( APPEVENT_PRINT_STRING ))
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
-inline BOOL ApplicationEvent::IsDiskInsertEvent() const
+inline sal_Bool ApplicationEvent::IsDiskInsertEvent() const
{
if ( aEvent.Equals( APPEVENT_DISKINSERT_STRING ))
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
class VCL_DLLPUBLIC PropertyHandler
@@ -247,9 +247,9 @@ public:
virtual void Main() = 0;
- virtual BOOL QueryExit();
+ virtual sal_Bool QueryExit();
- virtual void UserEvent( ULONG nEvent, void* pEventData );
+ virtual void UserEvent( sal_uIntPtr nEvent, void* pEventData );
virtual void ActivateExtHelp();
virtual void DeactivateExtHelp();
@@ -268,11 +268,11 @@ public:
static void InitAppRes( const ResId& rResId );
- static USHORT GetCommandLineParamCount();
- static XubString GetCommandLineParam( USHORT nParam );
+ static sal_uInt16 GetCommandLineParamCount();
+ static XubString GetCommandLineParam( sal_uInt16 nParam );
static const XubString& GetAppFileName();
- virtual USHORT Exception( USHORT nError );
+ virtual sal_uInt16 Exception( sal_uInt16 nError );
static void Abort( const XubString& rErrorText );
static void Execute();
@@ -282,23 +282,23 @@ public:
static void EndYield();
static vos::IMutex& GetSolarMutex();
static vos::OThread::TThreadIdentifier GetMainThreadIdentifier();
- static ULONG ReleaseSolarMutex();
- static void AcquireSolarMutex( ULONG nCount );
+ static sal_uIntPtr ReleaseSolarMutex();
+ static void AcquireSolarMutex( sal_uIntPtr nCount );
static void EnableNoYieldMode( bool i_bNoYield );
static void AddPostYieldListener( const Link& i_rListener );
static void RemovePostYieldListener( const Link& i_rListener );
- static BOOL IsInMain();
- static BOOL IsInExecute();
- static BOOL IsShutDown();
- static BOOL IsInModalMode();
- static USHORT GetModalModeCount();
+ static sal_Bool IsInMain();
+ static sal_Bool IsInExecute();
+ static sal_Bool IsShutDown();
+ static sal_Bool IsInModalMode();
+ static sal_uInt16 GetModalModeCount();
- static USHORT GetDispatchLevel();
- static BOOL AnyInput( USHORT nType = INPUT_ANY );
- static ULONG GetLastInputInterval();
- static BOOL IsUICaptured();
- static BOOL IsUserActive( USHORT nTest = USERACTIVE_ALL );
+ static sal_uInt16 GetDispatchLevel();
+ static sal_Bool AnyInput( sal_uInt16 nType = INPUT_ANY );
+ static sal_uIntPtr GetLastInputInterval();
+ static sal_Bool IsUICaptured();
+ static sal_Bool IsUserActive( sal_uInt16 nTest = USERACTIVE_ALL );
virtual void SystemSettingsChanging( AllSettings& rSettings,
Window* pFrame );
@@ -312,8 +312,8 @@ public:
of the application's UI.
@returns
- <TRUE/> if the system font is suitable for our UI
- <FALSE/> if the test string could not be displayed with the system font
+ <sal_True/> if the system font is suitable for our UI
+ <sal_False/> if the test string could not be displayed with the system font
*/
static bool ValidateSystemFont();
@@ -325,22 +325,22 @@ public:
static void RemoveEventListener( const Link& rEventListener );
static void AddKeyListener( const Link& rKeyListener );
static void RemoveKeyListener( const Link& rKeyListener );
- static void ImplCallEventListeners( ULONG nEvent, Window* pWin, void* pData );
+ static void ImplCallEventListeners( sal_uIntPtr nEvent, Window* pWin, void* pData );
static void ImplCallEventListeners( VclSimpleEvent* pEvent );
- static BOOL HandleKey( ULONG nEvent, Window *pWin, KeyEvent* pKeyEvent );
+ static sal_Bool HandleKey( sal_uIntPtr nEvent, Window *pWin, KeyEvent* pKeyEvent );
- static ULONG PostKeyEvent( ULONG nEvent, Window *pWin, KeyEvent* pKeyEvent );
- static ULONG PostMouseEvent( ULONG nEvent, Window *pWin, MouseEvent* pMouseEvent );
+ static sal_uIntPtr PostKeyEvent( sal_uIntPtr nEvent, Window *pWin, KeyEvent* pKeyEvent );
+ static sal_uIntPtr PostMouseEvent( sal_uIntPtr nEvent, Window *pWin, MouseEvent* pMouseEvent );
static void RemoveMouseAndKeyEvents( Window *pWin );
- static BOOL IsProcessedMouseOrKeyEvent( ULONG nEventId );
+ static sal_Bool IsProcessedMouseOrKeyEvent( sal_uIntPtr nEventId );
- static ULONG PostUserEvent( ULONG nEvent, void* pEventData = NULL );
- static ULONG PostUserEvent( const Link& rLink, void* pCaller = NULL );
- static BOOL PostUserEvent( ULONG& rEventId, ULONG nEvent, void* pEventData = NULL );
- static BOOL PostUserEvent( ULONG& rEventId, const Link& rLink, void* pCaller = NULL );
- static void RemoveUserEvent( ULONG nUserEvent );
+ static sal_uIntPtr PostUserEvent( sal_uIntPtr nEvent, void* pEventData = NULL );
+ static sal_uIntPtr PostUserEvent( const Link& rLink, void* pCaller = NULL );
+ static sal_Bool PostUserEvent( sal_uIntPtr& rEventId, sal_uIntPtr nEvent, void* pEventData = NULL );
+ static sal_Bool PostUserEvent( sal_uIntPtr& rEventId, const Link& rLink, void* pCaller = NULL );
+ static void RemoveUserEvent( sal_uIntPtr nUserEvent );
- static BOOL InsertIdleHdl( const Link& rLink, USHORT nPriority );
+ static sal_Bool InsertIdleHdl( const Link& rLink, sal_uInt16 nPriority );
static void RemoveIdleHdl( const Link& rLink );
virtual void AppEvent( const ApplicationEvent& rAppEvent );
@@ -388,15 +388,15 @@ public:
static const LocaleDataWrapper& GetAppLocaleDataWrapper();
- static BOOL InsertAccel( Accelerator* pAccel );
+ static sal_Bool InsertAccel( Accelerator* pAccel );
static void RemoveAccel( Accelerator* pAccel );
static void FlushAccel();
- static BOOL CallAccel( const KeyCode& rKeyCode, USHORT nRepeat = 0 );
+ static sal_Bool CallAccel( const KeyCode& rKeyCode, sal_uInt16 nRepeat = 0 );
- static ULONG AddHotKey( const KeyCode& rKeyCode, const Link& rLink, void* pData = NULL );
- static void RemoveHotKey( ULONG nId );
- static ULONG AddEventHook( VCLEventHookProc pProc, void* pData = NULL );
- static void RemoveEventHook( ULONG nId );
+ static sal_uIntPtr AddHotKey( const KeyCode& rKeyCode, const Link& rLink, void* pData = NULL );
+ static void RemoveHotKey( sal_uIntPtr nId );
+ static sal_uIntPtr AddEventHook( VCLEventHookProc pProc, void* pData = NULL );
+ static void RemoveEventHook( sal_uIntPtr nId );
static long CallEventHooks( NotifyEvent& rEvt );
static long CallPreNotify( NotifyEvent& rEvt );
static long CallEvent( NotifyEvent& rEvt );
@@ -404,24 +404,24 @@ public:
static void SetHelp( Help* pHelp = NULL );
static Help* GetHelp();
- static void EnableAutoHelpId( BOOL bEnabled = TRUE );
- static BOOL IsAutoHelpIdEnabled();
+ static void EnableAutoHelpId( sal_Bool bEnabled = sal_True );
+ static sal_Bool IsAutoHelpIdEnabled();
- static void EnableAutoMnemonic( BOOL bEnabled = TRUE );
- static BOOL IsAutoMnemonicEnabled();
+ static void EnableAutoMnemonic( sal_Bool bEnabled = sal_True );
+ static sal_Bool IsAutoMnemonicEnabled();
- static ULONG GetReservedKeyCodeCount();
- static const KeyCode* GetReservedKeyCode( ULONG i );
- static String GetReservedKeyCodeDescription( ULONG i );
+ static sal_uIntPtr GetReservedKeyCodeCount();
+ static const KeyCode* GetReservedKeyCode( sal_uIntPtr i );
+ static String GetReservedKeyCodeDescription( sal_uIntPtr i );
static void SetDefDialogParent( Window* pWindow );
static Window* GetDefDialogParent();
- static void EnableDialogCancel( BOOL bDialogCancel = TRUE );
- static BOOL IsDialogCancelEnabled();
+ static void EnableDialogCancel( sal_Bool bDialogCancel = sal_True );
+ static sal_Bool IsDialogCancelEnabled();
- static void SetSystemWindowMode( USHORT nMode );
- static USHORT GetSystemWindowMode();
+ static void SetSystemWindowMode( sal_uInt16 nMode );
+ static sal_uInt16 GetSystemWindowMode();
static void SetDialogScaleX( short nScale );
static short GetDialogScaleX();
@@ -435,16 +435,16 @@ public:
// The global service manager has to be created before!
static ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit > GetVCLToolkit();
- static UnoWrapperBase* GetUnoWrapper( BOOL bCreateIfNotExists = TRUE );
+ static UnoWrapperBase* GetUnoWrapper( sal_Bool bCreateIfNotExists = sal_True );
static void SetUnoWrapper( UnoWrapperBase* pWrapper );
static void SetFilterHdl( const Link& rLink );
static const Link& GetFilterHdl();
- static BOOL IsAccessibilityEnabled();
+ static sal_Bool IsAccessibilityEnabled();
- static void EnableHeadlessMode( BOOL bEnable = TRUE );
- static BOOL IsHeadlessModeEnabled();
+ static void EnableHeadlessMode( sal_Bool bEnable = sal_True );
+ static sal_Bool IsHeadlessModeEnabled();
static void ShowNativeErrorBox(const String& sTitle ,
const String& sMessage);
@@ -500,10 +500,10 @@ private:
VCL_DLLPUBLIC Application* GetpApp();
-VCL_DLLPUBLIC BOOL InitVCL( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & );
+VCL_DLLPUBLIC sal_Bool InitVCL( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & );
VCL_DLLPUBLIC void DeInitVCL();
-VCL_DLLPUBLIC BOOL InitAccessBridge( BOOL bAllowCancel, BOOL &rCancelled );
+VCL_DLLPUBLIC sal_Bool InitAccessBridge( sal_Bool bAllowCancel, sal_Bool &rCancelled );
// only allowed to call, if no thread is running. You must call JoinMainLoopThread to free all memory.
VCL_DLLPUBLIC void CreateMainLoopThread( oslWorkerFunction pWorker, void * pThreadData );
diff --git a/vcl/inc/vcl/svcompat.hxx b/vcl/inc/vcl/svcompat.hxx
index 9e461da4e54b..39d325321f3d 100644
--- a/vcl/inc/vcl/svcompat.hxx
+++ b/vcl/inc/vcl/svcompat.hxx
@@ -35,10 +35,10 @@
// -----------
#define COMPAT_FORMAT( char1, char2, char3, char4 ) \
- ((ULONG)((((ULONG)(char)(char1)))| \
- (((ULONG)(char)(char2))<<8UL)| \
- (((ULONG)(char)(char3))<<16UL)| \
- ((ULONG)(char)(char4))<<24UL))
+ ((sal_uIntPtr)((((sal_uIntPtr)(char)(char1)))| \
+ (((sal_uIntPtr)(char)(char2))<<8UL)| \
+ (((sal_uIntPtr)(char)(char3))<<16UL)| \
+ ((sal_uIntPtr)(char)(char4))<<24UL))
class SvStream;
@@ -50,21 +50,21 @@ class SvStream;
class ImplCompat
{
SvStream* mpRWStm;
- UINT32 mnCompatPos;
- UINT32 mnTotalSize;
- UINT16 mnStmMode;
- UINT16 mnVersion;
+ sal_uInt32 mnCompatPos;
+ sal_uInt32 mnTotalSize;
+ sal_uInt16 mnStmMode;
+ sal_uInt16 mnVersion;
ImplCompat() {}
ImplCompat( const ImplCompat& rCompat ) {}
ImplCompat& operator=( const ImplCompat& rCompat ) { return *this; }
- BOOL operator==( const ImplCompat& rCompat ) { return FALSE; }
+ sal_Bool operator==( const ImplCompat& rCompat ) { return sal_False; }
public:
- ImplCompat( SvStream& rStm, USHORT nStreamMode, UINT16 nVersion = 1 );
+ ImplCompat( SvStream& rStm, sal_uInt16 nStreamMode, sal_uInt16 nVersion = 1 );
~ImplCompat();
- UINT16 GetVersion() const { return mnVersion; }
+ sal_uInt16 GetVersion() const { return mnVersion; }
};
#endif // _SV_SVCOMPAT_HXX
diff --git a/vcl/inc/vcl/svdata.hxx b/vcl/inc/vcl/svdata.hxx
index 5cc8f32d7ac9..01eba2b35675 100644
--- a/vcl/inc/vcl/svdata.hxx
+++ b/vcl/inc/vcl/svdata.hxx
@@ -153,20 +153,20 @@ struct ImplSVAppData
ImplHotKey* mpFirstHotKey; // HotKey-Verwaltung
ImplEventHook* mpFirstEventHook; // Event-Hooks
VclEventListeners2* mpPostYieldListeners; // post yield listeners
- ULONG mnLastInputTime; // GetLastInputTime()
- USHORT mnDispatchLevel; // DispatchLevel
- USHORT mnModalMode; // ModalMode Count
- USHORT mnModalDialog; // ModalDialog Count
- USHORT mnAccessCount; // AccessHdl Count
- USHORT mnSysWinMode; // Modus, wann SystemWindows erzeugt werden sollen
- USHORT mnLayout; // --- RTL-Flags --- currently not used, only for testing
+ sal_uIntPtr mnLastInputTime; // GetLastInputTime()
+ sal_uInt16 mnDispatchLevel; // DispatchLevel
+ sal_uInt16 mnModalMode; // ModalMode Count
+ sal_uInt16 mnModalDialog; // ModalDialog Count
+ sal_uInt16 mnAccessCount; // AccessHdl Count
+ sal_uInt16 mnSysWinMode; // Modus, wann SystemWindows erzeugt werden sollen
+ sal_uInt16 mnLayout; // --- RTL-Flags --- currently not used, only for testing
short mnDialogScaleX; // Scale X-Positions and sizes in Dialogs
- BOOL mbInAppMain; // is Application::Main() on stack
- BOOL mbInAppExecute; // is Application::Execute() on stack
- BOOL mbAppQuit; // is Application::Quit() called
- BOOL mbSettingsInit; // TRUE: Settings are initialized
- BOOL mbDialogCancel; // TRUE: Alle Dialog::Execute()-Aufrufe werden mit return FALSE sofort beendet
- BOOL mbNoYield; // Application::Yield will not wait for events if the queue is empty
+ sal_Bool mbInAppMain; // is Application::Main() on stack
+ sal_Bool mbInAppExecute; // is Application::Execute() on stack
+ sal_Bool mbAppQuit; // is Application::Quit() called
+ sal_Bool mbSettingsInit; // sal_True: Settings are initialized
+ sal_Bool mbDialogCancel; // sal_True: Alle Dialog::Execute()-Aufrufe werden mit return sal_False sofort beendet
+ sal_Bool mbNoYield; // Application::Yield will not wait for events if the queue is empty
// essentially that makes it the same as Application::Reschedule
/** Controls whether showing any IME status window is toggled on or off.
@@ -205,7 +205,7 @@ struct ImplSVGDIData
long mnRealAppFontX; // AppFont X-Numenator for 40/tel Width
long mnAppFontX; // AppFont X-Numenator for 40/tel Width + DialogScaleX
long mnAppFontY; // AppFont Y-Numenator for 80/tel Height
- BOOL mbFontSubChanged; // TRUE: FontSubstitution wurde zwischen Begin/End geaendert
+ sal_Bool mbFontSubChanged; // sal_True: FontSubstitution wurde zwischen Begin/End geaendert
utl::DefaultFontConfiguration* mpDefaultFontConfiguration;
utl::FontSubstConfiguration* mpFontSubstConfiguration;
bool mbPrinterPullModel; // true: use pull model instead of normal push model when printing
@@ -236,11 +236,11 @@ struct ImplSVWinData
ImageList* mpMsgBoxImgList; // ImageList for MessageBox
ImageList* mpMsgBoxHCImgList; // ImageList for MessageBox (high contrast mode)
Window* mpAutoScrollWin; // window, that is in AutoScrollMode mode
- USHORT mnTrackFlags; // tracking flags
- USHORT mnAutoScrollFlags; // auto scroll flags
- BOOL mbNoDeactivate; // TRUE: keine Deactivate durchfuehren
- BOOL mbNoSaveFocus; // TRUE: menues must not save/restore focus
- BOOL mbNoSaveBackground; // TRUE: save background is unnecessary or even less performant
+ sal_uInt16 mnTrackFlags; // tracking flags
+ sal_uInt16 mnAutoScrollFlags; // auto scroll flags
+ sal_Bool mbNoDeactivate; // sal_True: keine Deactivate durchfuehren
+ sal_Bool mbNoSaveFocus; // sal_True: menues must not save/restore focus
+ sal_Bool mbNoSaveBackground; // sal_True: save background is unnecessary or even less performant
};
@@ -262,15 +262,15 @@ struct ImplSVCtrlData
Image* mpDisclosureMinus;
Image* mpDisclosureMinusHC;
ImplTBDragMgr* mpTBDragMgr; // DragMgr for ToolBox
- USHORT mnCheckStyle; // CheckBox-Style for ImageList-Update
- USHORT mnRadioStyle; // Radio-Style for ImageList-Update
- ULONG mnLastCheckFColor; // Letzte FaceColor fuer CheckImage
- ULONG mnLastCheckWColor; // Letzte WindowColor fuer CheckImage
- ULONG mnLastCheckWTextColor; // Letzte WindowTextColor fuer CheckImage
- ULONG mnLastCheckLColor; // Letzte LightColor fuer CheckImage
- ULONG mnLastRadioFColor; // Letzte FaceColor fuer RadioImage
- ULONG mnLastRadioWColor; // Letzte WindowColor fuer RadioImage
- ULONG mnLastRadioLColor; // Letzte LightColor fuer RadioImage
+ sal_uInt16 mnCheckStyle; // CheckBox-Style for ImageList-Update
+ sal_uInt16 mnRadioStyle; // Radio-Style for ImageList-Update
+ sal_uIntPtr mnLastCheckFColor; // Letzte FaceColor fuer CheckImage
+ sal_uIntPtr mnLastCheckWColor; // Letzte WindowColor fuer CheckImage
+ sal_uIntPtr mnLastCheckWTextColor; // Letzte WindowTextColor fuer CheckImage
+ sal_uIntPtr mnLastCheckLColor; // Letzte LightColor fuer CheckImage
+ sal_uIntPtr mnLastRadioFColor; // Letzte FaceColor fuer RadioImage
+ sal_uIntPtr mnLastRadioWColor; // Letzte WindowColor fuer RadioImage
+ sal_uIntPtr mnLastRadioLColor; // Letzte LightColor fuer RadioImage
};
@@ -280,18 +280,18 @@ struct ImplSVCtrlData
struct ImplSVHelpData
{
- BOOL mbContextHelp : 1; // is ContextHelp enabled
- BOOL mbExtHelp : 1; // is ExtendedHelp enabled
- BOOL mbExtHelpMode : 1; // is in ExtendedHelp Mode
- BOOL mbOldBalloonMode : 1; // BallonMode, befor ExtHelpMode started
- BOOL mbBalloonHelp : 1; // is BalloonHelp enabled
- BOOL mbQuickHelp : 1; // is QuickHelp enabled
- BOOL mbSetKeyboardHelp : 1; // tiphelp was activated by keyboard
- BOOL mbKeyboardHelp : 1; // tiphelp was activated by keyboard
- BOOL mbAutoHelpId : 1; // generate HelpIds
- BOOL mbRequestingHelp : 1; // In Window::RequestHelp
+ sal_Bool mbContextHelp : 1; // is ContextHelp enabled
+ sal_Bool mbExtHelp : 1; // is ExtendedHelp enabled
+ sal_Bool mbExtHelpMode : 1; // is in ExtendedHelp Mode
+ sal_Bool mbOldBalloonMode : 1; // BallonMode, befor ExtHelpMode started
+ sal_Bool mbBalloonHelp : 1; // is BalloonHelp enabled
+ sal_Bool mbQuickHelp : 1; // is QuickHelp enabled
+ sal_Bool mbSetKeyboardHelp : 1; // tiphelp was activated by keyboard
+ sal_Bool mbKeyboardHelp : 1; // tiphelp was activated by keyboard
+ sal_Bool mbAutoHelpId : 1; // generate HelpIds
+ sal_Bool mbRequestingHelp : 1; // In Window::RequestHelp
HelpTextWindow* mpHelpWin; // HelpWindow
- ULONG mnLastHelpHideTime; // ticks of last show
+ sal_uIntPtr mnLastHelpHideTime; // ticks of last show
};
struct ImplSVNWFData
@@ -331,18 +331,18 @@ struct ImplSVData
SalInstance* mpDefInst; // Default SalInstance
Application* mpApp; // pApp
WorkWindow* mpDefaultWin; // Default-Window
- BOOL mbDeInit; // Is VCL deinitializing
- ULONG mnThreadCount; // is VCL MultiThread enabled
+ sal_Bool mbDeInit; // Is VCL deinitializing
+ sal_uIntPtr mnThreadCount; // is VCL MultiThread enabled
ImplConfigData* mpFirstConfigData; // Zeiger auf ersten Config-Block
ImplTimerData* mpFirstTimerData; // list of all running timers
SalTimer* mpSalTimer; // interface to sal event loop/timers
SalI18NImeStatus* mpImeStatus; // interface to ime status window
SalSystem* mpSalSystem; // SalSystem interface
ResMgr* mpResMgr; // SV-Resource-Manager
- ULONG mnTimerPeriod; // current timer period
- ULONG mnTimerUpdate; // TimerCallbackProcs on stack
- BOOL mbNotAllTimerCalled;// TRUE: Es muessen noch Timer abgearbeitet werden
- BOOL mbNoCallTimer; // TRUE: No Timeout calls
+ sal_uIntPtr mnTimerPeriod; // current timer period
+ sal_uIntPtr mnTimerUpdate; // TimerCallbackProcs on stack
+ sal_Bool mbNotAllTimerCalled;// sal_True: Es muessen noch Timer abgearbeitet werden
+ sal_Bool mbNoCallTimer; // sal_True: No Timeout calls
ImplSVAppData maAppData; // indepen data for class Application
ImplSVGDIData maGDIData; // indepen data for Output classes
ImplSVWinData maWinData; // indepen data for Windows classes
@@ -352,7 +352,7 @@ struct ImplSVData
UnoWrapperBase* mpUnoWrapper;
Window* mpIntroWindow; // the splash screen
DockingManager* mpDockingManager;
- BOOL mbIsTestTool;
+ sal_Bool mbIsTestTool;
vos::OThread::TThreadIdentifier mnMainThreadId;
::com::sun::star::uno::Reference<
@@ -377,7 +377,7 @@ void ImplUpdateSystemProcessWindow();
Window* ImplFindWindow( const SalFrame* pFrame, Point& rSalFramePos );
// SVAPP.CXX
-BOOL ImplCallHotKey( const KeyCode& rKeyCode );
+sal_Bool ImplCallHotKey( const KeyCode& rKeyCode );
void ImplFreeHotKeyData();
void ImplFreeEventHookData();
@@ -389,7 +389,7 @@ extern VCL_DLLPUBLIC ImplSVData* pImplSVData;
inline VCL_DLLPUBLIC ImplSVData* ImplGetSVData() { return pImplSVData; }
inline ImplSVData* ImplGetAppSVData() { return ImplGetSVData(); }
-bool ImplInitAccessBridge( BOOL bAllowCancel, BOOL &rCancelled );
+bool ImplInitAccessBridge( sal_Bool bAllowCancel, sal_Bool &rCancelled );
// -----------------------------------------------------------------------
@@ -417,20 +417,20 @@ struct ImplDelData
{
ImplDelData* mpNext;
const Window* mpWindow;
- BOOL mbDel;
+ sal_Bool mbDel;
ImplDelData( const Window* pWindow = NULL )
- : mpNext( NULL ), mpWindow( NULL ), mbDel( FALSE )
+ : mpNext( NULL ), mpWindow( NULL ), mbDel( sal_False )
{ if( pWindow ) AttachToWindow( pWindow ); }
virtual ~ImplDelData();
bool IsDead() const
{
- DBG_ASSERT( mbDel == FALSE, "object deleted while in use !" );
- return (mbDel!=FALSE);
+ DBG_ASSERT( mbDel == sal_False, "object deleted while in use !" );
+ return (mbDel!=sal_False);
}
- BOOL /*deprecated */IsDelete() const { return (BOOL)IsDead(); }
+ sal_Bool /*deprecated */IsDelete() const { return (sal_Bool)IsDead(); }
private:
void AttachToWindow( const Window* );
@@ -442,12 +442,12 @@ private:
struct ImplSVEvent
{
- ULONG mnEvent;
+ sal_uIntPtr mnEvent;
void* mpData;
Link* mpLink;
Window* mpWindow;
ImplDelData maDelData;
- BOOL mbCall;
+ sal_Bool mbCall;
};
#endif // _SV_SVDATA_HXX
diff --git a/vcl/inc/vcl/symbol.hxx b/vcl/inc/vcl/symbol.hxx
index c7a745516856..b189ab8a9ca8 100644
--- a/vcl/inc/vcl/symbol.hxx
+++ b/vcl/inc/vcl/symbol.hxx
@@ -35,7 +35,7 @@
// ----------------
// By changes you must also change: rsc/vclrsc.hxx
-typedef USHORT SymbolType;
+typedef sal_uInt16 SymbolType;
#define SYMBOL_DONTKNOW ((SymbolType)0)
#define SYMBOL_IMAGE ((SymbolType)1)
#define SYMBOL_ARROW_UP ((SymbolType)2)
diff --git a/vcl/inc/vcl/syschild.hxx b/vcl/inc/vcl/syschild.hxx
index da4ffcd51a22..612d4af919c3 100644
--- a/vcl/inc/vcl/syschild.hxx
+++ b/vcl/inc/vcl/syschild.hxx
@@ -43,7 +43,7 @@ class VCL_DLLPUBLIC SystemChildWindow : public Window
{
private:
using Window::ImplInit;
- SAL_DLLPRIVATE void ImplInitSysChild( Window* pParent, WinBits nStyle, SystemWindowData *pData, BOOL bShow = FALSE );
+ SAL_DLLPRIVATE void ImplInitSysChild( Window* pParent, WinBits nStyle, SystemWindowData *pData, sal_Bool bShow = sal_False );
// Copy assignment is forbidden and not implemented.
SAL_DLLPRIVATE SystemChildWindow (const SystemChildWindow &);
@@ -52,7 +52,7 @@ private:
public:
SystemChildWindow( Window* pParent, WinBits nStyle = 0 );
// create a SystemChildWindow using the given SystemWindowData
- SystemChildWindow( Window* pParent, WinBits nStyle, SystemWindowData *pData, BOOL bShow = TRUE );
+ SystemChildWindow( Window* pParent, WinBits nStyle, SystemWindowData *pData, sal_Bool bShow = sal_True );
SystemChildWindow( Window* pParent, const ResId& rResId );
~SystemChildWindow();
@@ -60,8 +60,8 @@ public:
// per default systemchildwindows erase their background for better plugin support
// however, this might not always be required
- void EnableEraseBackground( BOOL bEnable = TRUE );
- BOOL IsEraseBackgroundEnabled();
+ void EnableEraseBackground( sal_Bool bEnable = sal_True );
+ sal_Bool IsEraseBackgroundEnabled();
};
#endif // _SV_SYSCHILD_HXX
diff --git a/vcl/inc/vcl/syswin.hxx b/vcl/inc/vcl/syswin.hxx
index b3a7d9b8775e..0d78c7579a16 100644
--- a/vcl/inc/vcl/syswin.hxx
+++ b/vcl/inc/vcl/syswin.hxx
@@ -65,25 +65,25 @@ class TaskPaneList;
// - WindowStateData -
// -------------------
-#define WINDOWSTATE_MASK_X ((ULONG)0x00000001)
-#define WINDOWSTATE_MASK_Y ((ULONG)0x00000002)
-#define WINDOWSTATE_MASK_WIDTH ((ULONG)0x00000004)
-#define WINDOWSTATE_MASK_HEIGHT ((ULONG)0x00000008)
-#define WINDOWSTATE_MASK_STATE ((ULONG)0x00000010)
-#define WINDOWSTATE_MASK_MINIMIZED ((ULONG)0x00000020)
-#define WINDOWSTATE_MASK_MAXIMIZED_X ((ULONG)0x00000100)
-#define WINDOWSTATE_MASK_MAXIMIZED_Y ((ULONG)0x00000200)
-#define WINDOWSTATE_MASK_MAXIMIZED_WIDTH ((ULONG)0x00000400)
-#define WINDOWSTATE_MASK_MAXIMIZED_HEIGHT ((ULONG)0x00000800)
+#define WINDOWSTATE_MASK_X ((sal_uIntPtr)0x00000001)
+#define WINDOWSTATE_MASK_Y ((sal_uIntPtr)0x00000002)
+#define WINDOWSTATE_MASK_WIDTH ((sal_uIntPtr)0x00000004)
+#define WINDOWSTATE_MASK_HEIGHT ((sal_uIntPtr)0x00000008)
+#define WINDOWSTATE_MASK_STATE ((sal_uIntPtr)0x00000010)
+#define WINDOWSTATE_MASK_MINIMIZED ((sal_uIntPtr)0x00000020)
+#define WINDOWSTATE_MASK_MAXIMIZED_X ((sal_uIntPtr)0x00000100)
+#define WINDOWSTATE_MASK_MAXIMIZED_Y ((sal_uIntPtr)0x00000200)
+#define WINDOWSTATE_MASK_MAXIMIZED_WIDTH ((sal_uIntPtr)0x00000400)
+#define WINDOWSTATE_MASK_MAXIMIZED_HEIGHT ((sal_uIntPtr)0x00000800)
#define WINDOWSTATE_MASK_POS (WINDOWSTATE_MASK_X | WINDOWSTATE_MASK_Y)
#define WINDOWSTATE_MASK_ALL (WINDOWSTATE_MASK_X | WINDOWSTATE_MASK_Y | WINDOWSTATE_MASK_WIDTH | WINDOWSTATE_MASK_HEIGHT | WINDOWSTATE_MASK_MAXIMIZED_X | WINDOWSTATE_MASK_MAXIMIZED_Y | WINDOWSTATE_MASK_MAXIMIZED_WIDTH | WINDOWSTATE_MASK_MAXIMIZED_HEIGHT | WINDOWSTATE_MASK_STATE | WINDOWSTATE_MASK_MINIMIZED)
-#define WINDOWSTATE_STATE_NORMAL ((ULONG)0x00000001)
-#define WINDOWSTATE_STATE_MINIMIZED ((ULONG)0x00000002)
-#define WINDOWSTATE_STATE_MAXIMIZED ((ULONG)0x00000004)
-#define WINDOWSTATE_STATE_ROLLUP ((ULONG)0x00000008)
-#define WINDOWSTATE_STATE_MAXIMIZED_HORZ ((ULONG)0x00000010)
-#define WINDOWSTATE_STATE_MAXIMIZED_VERT ((ULONG)0x00000020)
+#define WINDOWSTATE_STATE_NORMAL ((sal_uIntPtr)0x00000001)
+#define WINDOWSTATE_STATE_MINIMIZED ((sal_uIntPtr)0x00000002)
+#define WINDOWSTATE_STATE_MAXIMIZED ((sal_uIntPtr)0x00000004)
+#define WINDOWSTATE_STATE_ROLLUP ((sal_uIntPtr)0x00000008)
+#define WINDOWSTATE_STATE_MAXIMIZED_HORZ ((sal_uIntPtr)0x00000010)
+#define WINDOWSTATE_STATE_MAXIMIZED_VERT ((sal_uIntPtr)0x00000020)
class VCL_DLLPUBLIC WindowStateData
{
@@ -106,7 +106,7 @@ public:
mnMaximizedX = mnMaximizedY = mnMaximizedWidth = mnMaximizedHeight = 0;
}
- void SetMask( ULONG nValidMask ) { mnValidMask = nValidMask; }
+ void SetMask( sal_uIntPtr nValidMask ) { mnValidMask = nValidMask; }
sal_uInt32 GetMask() const { return mnValidMask; }
void SetX( int nX ) { mnX = nX; }
@@ -133,12 +133,12 @@ public:
// - SystemWindow-Types -
// ----------------------
-#define MENUBAR_MODE_NORMAL ((USHORT)0)
-#define MENUBAR_MODE_HIDE ((USHORT)1)
+#define MENUBAR_MODE_NORMAL ((sal_uInt16)0)
+#define MENUBAR_MODE_HIDE ((sal_uInt16)1)
-#define TITLE_BUTTON_DOCKING ((USHORT)1)
-#define TITLE_BUTTON_HIDE ((USHORT)2)
-#define TITLE_BUTTON_MENU ((USHORT)4)
+#define TITLE_BUTTON_DOCKING ((sal_uInt16)1)
+#define TITLE_BUTTON_HIDE ((sal_uInt16)2)
+#define TITLE_BUTTON_MENU ((sal_uInt16)4)
// ----------------
// - SystemWindow -
@@ -155,20 +155,20 @@ private:
Size maOrgSize;
Size maRollUpOutSize;
Size maMinOutSize;
- BOOL mbPined;
- BOOL mbRollUp;
- BOOL mbRollFunc;
- BOOL mbDockBtn;
- BOOL mbHideBtn;
- BOOL mbSysChild;
- USHORT mnMenuBarMode;
- USHORT mnIcon;
+ sal_Bool mbPined;
+ sal_Bool mbRollUp;
+ sal_Bool mbRollFunc;
+ sal_Bool mbDockBtn;
+ sal_Bool mbHideBtn;
+ sal_Bool mbSysChild;
+ sal_uInt16 mnMenuBarMode;
+ sal_uInt16 mnIcon;
ImplData* mpImplData;
#if _SOLAR__PRIVATE
public:
using Window::ImplIsInTaskPaneList;
- SAL_DLLPRIVATE BOOL ImplIsInTaskPaneList( Window* pWin );
+ SAL_DLLPRIVATE sal_Bool ImplIsInTaskPaneList( Window* pWin );
#endif
private:
@@ -192,34 +192,34 @@ public:
virtual long Notify( NotifyEvent& rNEvt );
virtual long PreNotify( NotifyEvent& rNEvt );
- virtual BOOL Close();
- virtual void TitleButtonClick( USHORT nButton );
+ virtual sal_Bool Close();
+ virtual void TitleButtonClick( sal_uInt16 nButton );
virtual void Pin();
virtual void Roll();
virtual void Resizing( Size& rSize );
- void SetIcon( USHORT nIcon );
- USHORT GetIcon() const { return mnIcon; }
+ void SetIcon( sal_uInt16 nIcon );
+ sal_uInt16 GetIcon() const { return mnIcon; }
// for systems like MacOSX which can display the URL a document is loaded from
// separately from the window title
void SetRepresentedURL( const rtl::OUString& );
const rtl::OUString& GetRepresentedURL() const;
- void SetZLevel( BYTE nLevel );
- BYTE GetZLevel() const;
+ void SetZLevel( sal_uInt8 nLevel );
+ sal_uInt8 GetZLevel() const;
- void EnableSaveBackground( BOOL bSave = TRUE );
- BOOL IsSaveBackgroundEnabled() const;
+ void EnableSaveBackground( sal_Bool bSave = sal_True );
+ sal_Bool IsSaveBackgroundEnabled() const;
- void ShowTitleButton( USHORT nButton, BOOL bVisible = TRUE );
- BOOL IsTitleButtonVisible( USHORT nButton ) const;
+ void ShowTitleButton( sal_uInt16 nButton, sal_Bool bVisible = sal_True );
+ sal_Bool IsTitleButtonVisible( sal_uInt16 nButton ) const;
- void SetPin( BOOL bPin );
- BOOL IsPined() const { return mbPined; }
+ void SetPin( sal_Bool bPin );
+ sal_Bool IsPined() const { return mbPined; }
void RollUp();
void RollDown();
- BOOL IsRollUp() const { return mbRollUp; }
+ sal_Bool IsRollUp() const { return mbRollUp; }
void SetRollUpOutputSizePixel( const Size& rSize ) { maRollUpOutSize = rSize; }
Size GetRollUpOutputSizePixel() const { return maRollUpOutSize; }
@@ -231,12 +231,12 @@ public:
Size GetResizeOutputSizePixel() const;
void SetWindowState( const ByteString& rStr );
- ByteString GetWindowState( ULONG nMask = WINDOWSTATE_MASK_ALL ) const;
+ ByteString GetWindowState( sal_uIntPtr nMask = WINDOWSTATE_MASK_ALL ) const;
void SetMenuBar( MenuBar* pMenuBar );
MenuBar* GetMenuBar() const { return mpMenuBar; }
- void SetMenuBarMode( USHORT nMode );
- USHORT GetMenuBarMode() const { return mnMenuBarMode; }
+ void SetMenuBarMode( sal_uInt16 nMode );
+ sal_uInt16 GetMenuBarMode() const { return mnMenuBarMode; }
TaskPaneList* GetTaskPaneList();
void GetWindowStateData( WindowStateData& rData ) const;
diff --git a/vcl/inc/vcl/tabctrl.hxx b/vcl/inc/vcl/tabctrl.hxx
index 4c63b12f15fe..b1a5cd03c507 100644
--- a/vcl/inc/vcl/tabctrl.hxx
+++ b/vcl/inc/vcl/tabctrl.hxx
@@ -44,8 +44,8 @@ class ListBox;
// --------------------
#ifndef TAB_APPEND
-#define TAB_APPEND ((USHORT)0xFFFF)
-#define TAB_PAGE_NOTFOUND ((USHORT)0xFFFF)
+#define TAB_APPEND ((sal_uInt16)0xFFFF)
+#define TAB_PAGE_NOTFOUND ((sal_uInt16)0xFFFF)
#endif /* !TAB_APPEND */
// --------------
@@ -61,33 +61,33 @@ private:
long mnLastHeight;
long mnBtnSize;
long mnMaxPageWidth;
- USHORT mnActPageId;
- USHORT mnCurPageId;
- USHORT mnFirstPagePos;
- USHORT mnLastFirstPagePos;
- BOOL mbFormat;
- BOOL mbRestoreHelpId;
- BOOL mbRestoreUnqId;
- BOOL mbSingleLine;
- BOOL mbScroll;
- BOOL mbRestoreSmartId;
- BOOL mbSmallInvalidate;
- BOOL mbExtraSpace;
+ sal_uInt16 mnActPageId;
+ sal_uInt16 mnCurPageId;
+ sal_uInt16 mnFirstPagePos;
+ sal_uInt16 mnLastFirstPagePos;
+ sal_Bool mbFormat;
+ sal_Bool mbRestoreHelpId;
+ sal_Bool mbRestoreUnqId;
+ sal_Bool mbSingleLine;
+ sal_Bool mbScroll;
+ sal_Bool mbRestoreSmartId;
+ sal_Bool mbSmallInvalidate;
+ sal_Bool mbExtraSpace;
Link maActivateHdl;
Link maDeactivateHdl;
using Control::ImplInitSettings;
- SAL_DLLPRIVATE void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground );
- SAL_DLLPRIVATE ImplTabItem* ImplGetItem( USHORT nId ) const;
+ SAL_DLLPRIVATE void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground );
+ SAL_DLLPRIVATE ImplTabItem* ImplGetItem( sal_uInt16 nId ) const;
SAL_DLLPRIVATE void ImplScrollBtnsColor();
SAL_DLLPRIVATE void ImplSetScrollBtnsState();
SAL_DLLPRIVATE void ImplPosScrollBtns();
SAL_DLLPRIVATE Size ImplGetItemSize( ImplTabItem* pItem, long nMaxWidth );
- SAL_DLLPRIVATE Rectangle ImplGetTabRect( USHORT nPos, long nWidth = -1, long nHeight = -1 );
- SAL_DLLPRIVATE void ImplChangeTabPage( USHORT nId, USHORT nOldId );
- SAL_DLLPRIVATE BOOL ImplPosCurTabPage();
- SAL_DLLPRIVATE void ImplActivateTabPage( BOOL bNext );
- SAL_DLLPRIVATE void ImplSetFirstPagePos( USHORT nPagePos );
+ SAL_DLLPRIVATE Rectangle ImplGetTabRect( sal_uInt16 nPos, long nWidth = -1, long nHeight = -1 );
+ SAL_DLLPRIVATE void ImplChangeTabPage( sal_uInt16 nId, sal_uInt16 nOldId );
+ SAL_DLLPRIVATE sal_Bool ImplPosCurTabPage();
+ SAL_DLLPRIVATE void ImplActivateTabPage( sal_Bool bNext );
+ SAL_DLLPRIVATE void ImplSetFirstPagePos( sal_uInt16 nPagePos );
SAL_DLLPRIVATE void ImplShowFocus();
SAL_DLLPRIVATE void ImplDrawItem( ImplTabItem* pItem, const Rectangle& rCurRect, bool bLayout = false, bool bFirstInGroup = false, bool bLastInGroup = false, bool bIsCurrentItem = false );
SAL_DLLPRIVATE void ImplPaint( const Rectangle& rRect, bool bLayout = false );
@@ -142,55 +142,55 @@ public:
Point GetItemsOffset() const;
void InsertPage( const ResId& rResId,
- USHORT nPos = TAB_APPEND );
- void InsertPage( USHORT nPageId, const XubString& rText,
- USHORT nPos = TAB_APPEND );
- void RemovePage( USHORT nPageId );
+ sal_uInt16 nPos = TAB_APPEND );
+ void InsertPage( sal_uInt16 nPageId, const XubString& rText,
+ sal_uInt16 nPos = TAB_APPEND );
+ void RemovePage( sal_uInt16 nPageId );
void Clear();
- void EnablePage( USHORT nPageId, bool bEnable = true );
+ void EnablePage( sal_uInt16 nPageId, bool bEnable = true );
- USHORT GetPageCount() const;
- USHORT GetPageId( USHORT nPos ) const;
- USHORT GetPagePos( USHORT nPageId ) const;
- USHORT GetPageId( const Point& rPos ) 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;
- void SetCurPageId( USHORT nPageId );
- USHORT GetCurPageId() const;
+ void SetCurPageId( sal_uInt16 nPageId );
+ sal_uInt16 GetCurPageId() const;
- void SetFirstPageId( USHORT nPageId );
- USHORT GetFirstPageId() const { return GetPageId( mnFirstPagePos ); }
+ void SetFirstPageId( sal_uInt16 nPageId );
+ sal_uInt16 GetFirstPageId() const { return GetPageId( mnFirstPagePos ); }
- void SelectTabPage( USHORT nPageId );
+ void SelectTabPage( sal_uInt16 nPageId );
void SetMaxPageWidth( long nMaxWidth ) { mnMaxPageWidth = nMaxWidth; }
long GetMaxPageWidth() const { return mnMaxPageWidth; }
void ResetMaxPageWidth() { SetMaxPageWidth( 0 ); }
- BOOL IsMaxPageWidth() const { return mnMaxPageWidth != 0; }
+ sal_Bool IsMaxPageWidth() const { return mnMaxPageWidth != 0; }
- void SetTabPage( USHORT nPageId, TabPage* pPage );
- TabPage* GetTabPage( USHORT nPageId ) const;
- USHORT GetTabPageResId( USHORT nPageId ) const;
+ void SetTabPage( sal_uInt16 nPageId, TabPage* pPage );
+ TabPage* GetTabPage( sal_uInt16 nPageId ) const;
+ sal_uInt16 GetTabPageResId( sal_uInt16 nPageId ) const;
- void SetPageText( USHORT nPageId, const XubString& rText );
- XubString GetPageText( USHORT nPageId ) const;
+ void SetPageText( sal_uInt16 nPageId, const XubString& rText );
+ XubString GetPageText( sal_uInt16 nPageId ) const;
- void SetHelpText( USHORT nPageId, const XubString& rText );
- const XubString& GetHelpText( USHORT nPageId ) const;
+ void SetHelpText( sal_uInt16 nPageId, const XubString& rText );
+ const XubString& GetHelpText( sal_uInt16 nPageId ) const;
- void SetHelpId( USHORT nPageId, ULONG nHelpId );
- ULONG GetHelpId( USHORT nPageId ) const;
+ void SetHelpId( sal_uInt16 nPageId, sal_uIntPtr nHelpId );
+ sal_uIntPtr GetHelpId( sal_uInt16 nPageId ) const;
- void SetPageImage( USHORT nPageId, const Image& rImage );
- const Image* GetPageImage( USHORT nPageId ) const;
+ void SetPageImage( sal_uInt16 nPageId, const Image& rImage );
+ const Image* GetPageImage( sal_uInt16 nPageId ) const;
void SetHelpText( const XubString& rText )
{ Control::SetHelpText( rText ); }
const XubString& GetHelpText() const
{ return Control::GetHelpText(); }
- void SetHelpId( ULONG nId )
+ void SetHelpId( sal_uIntPtr nId )
{ Control::SetHelpId( nId ); }
- ULONG GetHelpId() const
+ sal_uIntPtr GetHelpId() const
{ return Control::GetHelpId(); }
void SetActivatePageHdl( const Link& rLink ) { maActivateHdl = rLink; }
@@ -201,19 +201,19 @@ public:
// returns (control relative) bounding rectangle for the
// character at index nIndex relative to the text of page nPageId
using Control::GetCharacterBounds;
- Rectangle GetCharacterBounds( USHORT nPageId, long nIndex ) const;
+ Rectangle GetCharacterBounds( sal_uInt16 nPageId, long nIndex ) const;
// returns the index relative to the text of page nPageId (also returned)
// at position rPoint (control relative)
using Control::GetIndexForPoint;
- long GetIndexForPoint( const Point& rPoint, USHORT& rPageId ) const;
+ long GetIndexForPoint( const Point& rPoint, sal_uInt16& rPageId ) const;
// returns the bounding rectangle of the union of tab page area and the
// corresponding tab
- Rectangle GetTabPageBounds( USHORT nPageId ) const;
+ Rectangle GetTabPageBounds( sal_uInt16 nPageId ) const;
// returns the rectangle of the tab for page nPageId
- Rectangle GetTabBounds( USHORT nPageId ) const;
+ Rectangle GetTabBounds( sal_uInt16 nPageId ) const;
};
#endif // _SV_TABCTRL_HXX
diff --git a/vcl/inc/vcl/tabdlg.hxx b/vcl/inc/vcl/tabdlg.hxx
index 35543bb6aac0..23eb6fc142dc 100644
--- a/vcl/inc/vcl/tabdlg.hxx
+++ b/vcl/inc/vcl/tabdlg.hxx
@@ -45,7 +45,7 @@ private:
FixedLine* mpFixedLine;
Window* mpViewWindow;
WindowAlign meViewAlign;
- BOOL mbPosControls;
+ sal_Bool mbPosControls;
SAL_DLLPRIVATE void ImplInitTabDialogData();
SAL_DLLPRIVATE void ImplPosControls();
diff --git a/vcl/inc/vcl/tabpage.hxx b/vcl/inc/vcl/tabpage.hxx
index c653ccca5a30..fb5779b3741f 100644
--- a/vcl/inc/vcl/tabpage.hxx
+++ b/vcl/inc/vcl/tabpage.hxx
@@ -48,7 +48,7 @@ public:
TabPage( Window* pParent, const ResId& rResId );
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_uIntPtr nFlags );
virtual void StateChanged( StateChangedType nStateChange );
virtual void DataChanged( const DataChangedEvent& rDCEvt );
diff --git a/vcl/inc/vcl/taskpanelist.hxx b/vcl/inc/vcl/taskpanelist.hxx
index 33d75d7e31bd..ec1f4a016e8b 100644
--- a/vcl/inc/vcl/taskpanelist.hxx
+++ b/vcl/inc/vcl/taskpanelist.hxx
@@ -36,13 +36,13 @@
class VCL_DLLPUBLIC TaskPaneList
{
::std::vector<Window *> mTaskPanes;
- Window *FindNextPane( Window *pWindow, BOOL bForward = TRUE );
- Window *FindNextFloat( Window *pWindow, BOOL bForward = TRUE );
- Window *FindNextSplitter( Window *pWindow, BOOL bForward = TRUE );
+ Window *FindNextPane( Window *pWindow, sal_Bool bForward = sal_True );
+ Window *FindNextFloat( Window *pWindow, sal_Bool bForward = sal_True );
+ Window *FindNextSplitter( Window *pWindow, sal_Bool bForward = sal_True );
//#if 0 // _SOLAR__PRIVATE
public:
- BOOL IsInList( Window *pWindow );
+ sal_Bool IsInList( Window *pWindow );
//#endif
public:
@@ -51,7 +51,7 @@ public:
void AddWindow( Window *pWindow );
void RemoveWindow( Window *pWindow );
- BOOL HandleKeyEvent( KeyEvent aKeyEvent );
+ sal_Bool HandleKeyEvent( KeyEvent aKeyEvent );
};
#endif
diff --git a/vcl/inc/vcl/textlayout.hxx b/vcl/inc/vcl/textlayout.hxx
index 418e1aa8bf64..183cb5ac9b0f 100644..100755
--- a/vcl/inc/vcl/textlayout.hxx
+++ b/vcl/inc/vcl/textlayout.hxx
@@ -117,7 +117,7 @@ namespace vcl
virtual ~ControlTextRenderer();
Rectangle DrawText( const Rectangle& _rRect,
- const XubString& _rText, USHORT _nStyle = 0,
+ const XubString& _rText, sal_uInt16 _nStyle = 0,
MetricVector* _pVector = NULL, String* _pDisplayText = NULL );
private:
diff --git a/vcl/inc/vcl/timer.hxx b/vcl/inc/vcl/timer.hxx
index bb325c118844..b0c7a72f3aa1 100644
--- a/vcl/inc/vcl/timer.hxx
+++ b/vcl/inc/vcl/timer.hxx
@@ -43,9 +43,9 @@ class VCL_DLLPUBLIC Timer
{
protected:
ImplTimerData* mpTimerData;
- ULONG mnTimeout;
- BOOL mbActive;
- BOOL mbAuto;
+ sal_uIntPtr mnTimeout;
+ sal_Bool mbActive;
+ sal_Bool mbAuto;
Link maTimeoutHdl;
public:
@@ -58,9 +58,9 @@ public:
void Start();
void Stop();
- void SetTimeout( ULONG nTimeout );
- ULONG GetTimeout() const { return mnTimeout; }
- BOOL IsActive() const { return mbActive; }
+ void SetTimeout( sal_uIntPtr nTimeout );
+ sal_uIntPtr GetTimeout() const { return mnTimeout; }
+ sal_Bool IsActive() const { return mbActive; }
void SetTimeoutHdl( const Link& rLink ) { maTimeoutHdl = rLink; }
const Link& GetTimeoutHdl() const { return maTimeoutHdl; }
diff --git a/vcl/inc/vcl/toolbox.h b/vcl/inc/vcl/toolbox.h
index 33e4e8d2e013..20def9419304 100644
--- a/vcl/inc/vcl/toolbox.h
+++ b/vcl/inc/vcl/toolbox.h
@@ -68,7 +68,7 @@ struct ImplToolItem
XubString maQuickHelpText;
XubString maHelpText;
String maCommandStr;
- ULONG mnHelpId;
+ sal_uIntPtr mnHelpId;
Rectangle maRect;
Rectangle maCalcRect;
// the overall horizontal item size, including one or more of [image size + textlength + dropdown arrow]
@@ -78,8 +78,8 @@ struct ImplToolItem
ToolBoxItemType meType;
ToolBoxItemBits mnBits;
TriState meState;
- USHORT mnId;
- BOOL mbEnabled:1,
+ sal_uInt16 mnId;
+ sal_Bool mbEnabled:1,
mbVisible:1,
mbEmptyBtn:1,
mbShowWindow:1,
@@ -87,11 +87,11 @@ struct ImplToolItem
mbVisibleText:1; // indicates if text will definitely be drawn, influences dropdown pos
ImplToolItem();
- ImplToolItem( USHORT nItemId, const Image& rImage,
+ ImplToolItem( sal_uInt16 nItemId, const Image& rImage,
ToolBoxItemBits nItemBits );
- ImplToolItem( USHORT nItemId, const XubString& rTxt,
+ ImplToolItem( sal_uInt16 nItemId, const XubString& rTxt,
ToolBoxItemBits nItemBits );
- ImplToolItem( USHORT nItemId, const Image& rImage,
+ ImplToolItem( sal_uInt16 nItemId, const Image& rImage,
const XubString& rTxt,
ToolBoxItemBits nItemBits );
~ImplToolItem();
@@ -103,18 +103,18 @@ struct ImplToolItem
// the default size is the precomputed size for standard items
// ie those that are just ordinary buttons (no windows or text etc.)
// bCheckMaxWidth indicates that item windows must not exceed maxWidth in which case they will be painted as buttons
- Size GetSize( BOOL bHorz, BOOL bCheckMaxWidth, long maxWidth, const Size& rDefaultSize );
+ Size GetSize( sal_Bool bHorz, sal_Bool bCheckMaxWidth, long maxWidth, const Size& rDefaultSize );
// only useful for buttons: returns if the text or image part or both can be drawn according to current button drawing style
- void DetermineButtonDrawStyle( ButtonType eButtonType, BOOL& rbImage, BOOL& rbText ) const;
+ void DetermineButtonDrawStyle( ButtonType eButtonType, sal_Bool& rbImage, sal_Bool& rbText ) const;
// returns the rectangle which contains the drop down arrow
// or an empty rect if there is none
// bHorz denotes the toolbox alignment
- Rectangle GetDropDownRect( BOOL bHorz ) const;
+ Rectangle GetDropDownRect( sal_Bool bHorz ) const;
- // returns TRUE if the toolbar item is currently clipped, which can happen for docked toolbars
- BOOL IsClipped() const;
+ // returns sal_True if the toolbar item is currently clipped, which can happen for docked toolbars
+ sal_Bool IsClipped() const;
};
namespace vcl
@@ -122,8 +122,8 @@ namespace vcl
struct ToolBoxLayoutData : public ControlLayoutData
{
- std::vector< USHORT > m_aLineItemIds;
- std::vector< USHORT > m_aLineItemPositions;
+ std::vector< sal_uInt16 > m_aLineItemIds;
+ std::vector< sal_uInt16 > m_aLineItemPositions;
};
@@ -149,8 +149,8 @@ struct ImplToolBoxPrivateData
// the optional custom menu
PopupMenu* mpMenu;
- USHORT maMenuType;
- ULONG mnEventId;
+ sal_uInt16 maMenuType;
+ sal_uIntPtr mnEventId;
// called when menu button is clicked and before the popup menu is executed
Link maMenuButtonHdl;
@@ -165,7 +165,7 @@ struct ImplToolBoxPrivateData
vcl::IImageListProvider* mpImageListProvider;
vcl::ImageListType meImageListType;
- BOOL mbIsLocked:1, // keeps last lock state from ImplDockingWindowWrapper
+ sal_Bool mbIsLocked:1, // keeps last lock state from ImplDockingWindowWrapper
mbAssumeDocked:1, // only used during calculations to override current floating/popup mode
mbAssumeFloating:1,
mbAssumePopupMode:1,
diff --git a/vcl/inc/vcl/toolbox.hxx b/vcl/inc/vcl/toolbox.hxx
index 5cc102842dc3..95254b0dcb6c 100644
--- a/vcl/inc/vcl/toolbox.hxx
+++ b/vcl/inc/vcl/toolbox.hxx
@@ -53,27 +53,27 @@ namespace vcl
// - ToolBoxCustomizeEvent -
// -------------------------
-#define TOOLBOX_CUSTOMIZE_RESIZE ((USHORT)0xFFFE)
+#define TOOLBOX_CUSTOMIZE_RESIZE ((sal_uInt16)0xFFFE)
class VCL_DLLPUBLIC ToolBoxCustomizeEvent
{
private:
ToolBox* mpTargetBox;
void* mpData;
- USHORT mnIdFrom;
- USHORT mnPosTo;
+ sal_uInt16 mnIdFrom;
+ sal_uInt16 mnPosTo;
public:
ToolBoxCustomizeEvent();
ToolBoxCustomizeEvent( ToolBox* pDropBox,
- USHORT nId, USHORT nPos = 0,
+ sal_uInt16 nId, sal_uInt16 nPos = 0,
void* pUserData = NULL );
ToolBox* GetTargetBox() const { return mpTargetBox; }
- USHORT GetTargetPos() const { return mnPosTo; }
- USHORT GetSourceId() const { return mnIdFrom; }
+ sal_uInt16 GetTargetPos() const { return mnPosTo; }
+ sal_uInt16 GetSourceId() const { return mnIdFrom; }
void* GetData() const { return mpData; }
- BOOL IsResized() const;
+ sal_Bool IsResized() const;
};
inline ToolBoxCustomizeEvent::ToolBoxCustomizeEvent()
@@ -85,7 +85,7 @@ inline ToolBoxCustomizeEvent::ToolBoxCustomizeEvent()
}
inline ToolBoxCustomizeEvent::ToolBoxCustomizeEvent( ToolBox* pDropBox,
- USHORT nId, USHORT nPos,
+ sal_uInt16 nId, sal_uInt16 nPos,
void* pUserData )
{
mpTargetBox = pDropBox;
@@ -94,19 +94,19 @@ inline ToolBoxCustomizeEvent::ToolBoxCustomizeEvent( ToolBox* pDropBox,
mpData = pUserData;
}
-inline BOOL ToolBoxCustomizeEvent::IsResized() const
+inline sal_Bool ToolBoxCustomizeEvent::IsResized() const
{
if ( mnPosTo == TOOLBOX_CUSTOMIZE_RESIZE )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
// -------------------
// - ToolBoxItemBits -
// -------------------
-typedef USHORT ToolBoxItemBits;
+typedef sal_uInt16 ToolBoxItemBits;
// --------------------------
// - Bits fuer ToolBoxItems -
@@ -129,20 +129,20 @@ typedef USHORT ToolBoxItemBits;
// - ToolBox-Types -
// -----------------
-#define TOOLBOX_STYLE_OUTBUTTON ((USHORT)0x0001)
-#define TOOLBOX_STYLE_HANDPOINTER ((USHORT)0x0002)
-#define TOOLBOX_STYLE_FLAT ((USHORT)0x0004)
+#define TOOLBOX_STYLE_OUTBUTTON ((sal_uInt16)0x0001)
+#define TOOLBOX_STYLE_HANDPOINTER ((sal_uInt16)0x0002)
+#define TOOLBOX_STYLE_FLAT ((sal_uInt16)0x0004)
-#define TOOLBOX_APPEND ((USHORT)0xFFFF)
-#define TOOLBOX_ITEM_NOTFOUND ((USHORT)0xFFFF)
+#define TOOLBOX_APPEND ((sal_uInt16)0xFFFF)
+#define TOOLBOX_ITEM_NOTFOUND ((sal_uInt16)0xFFFF)
// item ids in the custom menu may not exceed this constant
-#define TOOLBOX_MENUITEM_START ((USHORT)0xE000)
+#define TOOLBOX_MENUITEM_START ((sal_uInt16)0xE000)
// defines for the menubutton
-#define TOOLBOX_MENUTYPE_NONE ((USHORT)0x0000) // no menu at all, scrolling by spin buttons
-#define TOOLBOX_MENUTYPE_CLIPPEDITEMS ((USHORT)0x0001) // menu will contain "more" indicator
-#define TOOLBOX_MENUTYPE_CUSTOMIZE ((USHORT)0x0002) // menu will contain "customization" and "more" indicator
+#define TOOLBOX_MENUTYPE_NONE ((sal_uInt16)0x0000) // no menu at all, scrolling by spin buttons
+#define TOOLBOX_MENUTYPE_CLIPPEDITEMS ((sal_uInt16)0x0001) // menu will contain "more" indicator
+#define TOOLBOX_MENUTYPE_CUSTOMIZE ((sal_uInt16)0x0002) // menu will contain "customization" and "more" indicator
// By changes you must also change: rsc/vclrsc.hxx
enum ButtonType { BUTTON_SYMBOL, BUTTON_TEXT, BUTTON_SYMBOLTEXT };
@@ -183,7 +183,7 @@ private:
Rectangle maInDockRect;
Rectangle maPaintRect;
FloatingWindow* mpFloatWin;
- USHORT mnKeyModifier;
+ sal_uInt16 mnKeyModifier;
long mnDX;
long mnDY;
long mnMaxItemWidth; // max item width
@@ -197,22 +197,22 @@ private:
long mnBottomBorder;
long mnLastResizeDY;
long mnActivateCount;
- USHORT mnLastFocusItemId;
- USHORT mnFocusPos;
- USHORT mnOutStyle;
- USHORT mnHighItemId;
- USHORT mnCurItemId;
- USHORT mnDownItemId;
- USHORT mnCurPos;
- USHORT mnLines; // total number of toolbox lines
- USHORT mnCurLine; // the currently visible line
- USHORT mnCurLines; // number of lines due to line breaking
- USHORT mnVisLines; // number of visible lines (for scrolling)
- USHORT mnFloatLines; // number of lines during floating mode
- USHORT mnDockLines;
- USHORT mnConfigItem;
- USHORT mnMouseClicks;
- USHORT mnMouseModifier;
+ sal_uInt16 mnLastFocusItemId;
+ sal_uInt16 mnFocusPos;
+ sal_uInt16 mnOutStyle;
+ sal_uInt16 mnHighItemId;
+ sal_uInt16 mnCurItemId;
+ sal_uInt16 mnDownItemId;
+ sal_uInt16 mnCurPos;
+ sal_uInt16 mnLines; // total number of toolbox lines
+ sal_uInt16 mnCurLine; // the currently visible line
+ sal_uInt16 mnCurLines; // number of lines due to line breaking
+ sal_uInt16 mnVisLines; // number of visible lines (for scrolling)
+ sal_uInt16 mnFloatLines; // number of lines during floating mode
+ sal_uInt16 mnDockLines;
+ sal_uInt16 mnConfigItem;
+ sal_uInt16 mnMouseClicks;
+ sal_uInt16 mnMouseModifier;
unsigned int mbDrag:1,
mbSelection:1,
mbCommandDrag:1,
@@ -254,43 +254,43 @@ private:
// #if 0 // _SOLAR__PRIVATE
using DockingWindow::ImplInitSettings;
// #endif
- SAL_DLLPRIVATE void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground );
+ SAL_DLLPRIVATE void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground );
SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
- SAL_DLLPRIVATE ImplToolItem* ImplGetItem( USHORT nId ) const;
- SAL_DLLPRIVATE BOOL ImplCalcItem();
- SAL_DLLPRIVATE USHORT ImplCalcBreaks( long nWidth, long* pMaxLineWidth, BOOL bCalcHorz );
- SAL_DLLPRIVATE void ImplFormat( BOOL bResize = FALSE );
- SAL_DLLPRIVATE void ImplDrawSpin( BOOL bUpperIn, BOOL bLowerIn );
- SAL_DLLPRIVATE void ImplDrawNext( BOOL bIn );
- SAL_DLLPRIVATE void ImplDrawItem( USHORT nPos, BOOL bHighlight = FALSE, BOOL bPaint = FALSE, BOOL bLayout = FALSE );
+ SAL_DLLPRIVATE ImplToolItem* ImplGetItem( sal_uInt16 nId ) const;
+ SAL_DLLPRIVATE sal_Bool ImplCalcItem();
+ SAL_DLLPRIVATE sal_uInt16 ImplCalcBreaks( long nWidth, long* pMaxLineWidth, sal_Bool bCalcHorz );
+ SAL_DLLPRIVATE void ImplFormat( sal_Bool bResize = sal_False );
+ SAL_DLLPRIVATE void ImplDrawSpin( sal_Bool bUpperIn, sal_Bool bLowerIn );
+ SAL_DLLPRIVATE void ImplDrawNext( sal_Bool bIn );
+ SAL_DLLPRIVATE void ImplDrawItem( sal_uInt16 nPos, sal_Bool bHighlight = sal_False, sal_Bool bPaint = sal_False, sal_Bool bLayout = sal_False );
using Window::ImplInvalidate;
- SAL_DLLPRIVATE void ImplInvalidate( BOOL bNewCalc = FALSE, BOOL bFullPaint = FALSE );
- SAL_DLLPRIVATE void ImplUpdateItem( USHORT nIndex = 0xFFFF );
+ SAL_DLLPRIVATE void ImplInvalidate( sal_Bool bNewCalc = sal_False, sal_Bool bFullPaint = sal_False );
+ SAL_DLLPRIVATE void ImplUpdateItem( sal_uInt16 nIndex = 0xFFFF );
SAL_DLLPRIVATE void ImplStartCustomizeMode();
SAL_DLLPRIVATE void ImplEndCustomizeMode();
SAL_DLLPRIVATE const XubString& ImplConvertMenuString( const XubString& rStr );
- SAL_DLLPRIVATE BOOL ImplHandleMouseMove( const MouseEvent& rMEvt, BOOL bRepeat = FALSE );
- SAL_DLLPRIVATE BOOL ImplHandleMouseButtonUp( const MouseEvent& rMEvt, BOOL bCancel = FALSE );
- SAL_DLLPRIVATE void ImplChangeHighlight( ImplToolItem* pItem, BOOL bNoGrabFocus = FALSE );
- SAL_DLLPRIVATE BOOL ImplChangeHighlightUpDn( BOOL bUp, BOOL bNoCycle = FALSE );
- SAL_DLLPRIVATE USHORT ImplGetItemLine( ImplToolItem* pCurrentItem );
- SAL_DLLPRIVATE ImplToolItem* ImplGetFirstValidItem( USHORT nLine );
- SAL_DLLPRIVATE ImplToolItem* ImplGetLastValidItem( USHORT nLine );
- SAL_DLLPRIVATE BOOL ImplOpenItem( KeyCode aKeyCode );
- SAL_DLLPRIVATE BOOL ImplActivateItem( KeyCode aKeyCode );
+ SAL_DLLPRIVATE sal_Bool ImplHandleMouseMove( const MouseEvent& rMEvt, sal_Bool bRepeat = sal_False );
+ SAL_DLLPRIVATE sal_Bool ImplHandleMouseButtonUp( const MouseEvent& rMEvt, sal_Bool bCancel = sal_False );
+ SAL_DLLPRIVATE void ImplChangeHighlight( ImplToolItem* pItem, sal_Bool bNoGrabFocus = sal_False );
+ SAL_DLLPRIVATE sal_Bool ImplChangeHighlightUpDn( sal_Bool bUp, sal_Bool bNoCycle = sal_False );
+ SAL_DLLPRIVATE sal_uInt16 ImplGetItemLine( ImplToolItem* pCurrentItem );
+ SAL_DLLPRIVATE ImplToolItem* ImplGetFirstValidItem( sal_uInt16 nLine );
+ SAL_DLLPRIVATE ImplToolItem* ImplGetLastValidItem( sal_uInt16 nLine );
+ SAL_DLLPRIVATE sal_Bool ImplOpenItem( KeyCode aKeyCode );
+ SAL_DLLPRIVATE sal_Bool ImplActivateItem( KeyCode aKeyCode );
SAL_DLLPRIVATE void ImplShowFocus();
SAL_DLLPRIVATE void ImplHideFocus();
SAL_DLLPRIVATE void ImplUpdateInputEnable();
SAL_DLLPRIVATE void ImplFillLayoutData() const;
SAL_DLLPRIVATE void ImplUpdateCustomMenu();
- SAL_DLLPRIVATE BOOL ImplHasClippedItems();
+ SAL_DLLPRIVATE sal_Bool ImplHasClippedItems();
SAL_DLLPRIVATE Point ImplGetPopupPosition( const Rectangle& rRect, const Size& rSize ) const;
SAL_DLLPRIVATE void ImplExecuteCustomMenu();
- SAL_DLLPRIVATE BOOL ImplIsFloatingMode() const;
- SAL_DLLPRIVATE BOOL ImplIsInPopupMode() const;
- SAL_DLLPRIVATE const XubString& ImplGetHelpText( USHORT nItemId ) const;
+ SAL_DLLPRIVATE sal_Bool ImplIsFloatingMode() const;
+ SAL_DLLPRIVATE sal_Bool ImplIsInPopupMode() const;
+ SAL_DLLPRIVATE const XubString& ImplGetHelpText( sal_uInt16 nItemId ) const;
SAL_DLLPRIVATE Size ImplGetOptimalFloatingSize( FloatingSizeMode eMode );
- SAL_DLLPRIVATE BOOL ImplHasExternalMenubutton();
+ SAL_DLLPRIVATE sal_Bool ImplHasExternalMenubutton();
SAL_DLLPRIVATE void ImplDrawFloatwinBorder( ImplToolItem* pItem );
DECL_DLLPRIVATE_LINK( ImplCallExecuteCustomMenu, void* );
@@ -306,7 +306,7 @@ private:
SAL_DLLPRIVATE void ImplUpdateImageList(); // called if StateChanged
public:
- SAL_DLLPRIVATE void ImplFloatControl( BOOL bStart, FloatingWindow* pWindow = NULL );
+ SAL_DLLPRIVATE void ImplFloatControl( sal_Bool bStart, FloatingWindow* pWindow = NULL );
SAL_DLLPRIVATE void ImplDisableFlatButtons();
static SAL_DLLPRIVATE int ImplGetDragWidth( ToolBox* pThis );
@@ -315,36 +315,36 @@ public:
long& rRight, long& rBottom, const ToolBox *pThis );
static SAL_DLLPRIVATE void ImplDrawGrip( ToolBox* pThis );
static SAL_DLLPRIVATE void ImplDrawGradientBackground( ToolBox* pThis, ImplDockingWindowWrapper *pWrapper );
- static SAL_DLLPRIVATE BOOL ImplDrawNativeBackground( ToolBox* pThis, const Region &rRegion );
+ static SAL_DLLPRIVATE sal_Bool ImplDrawNativeBackground( ToolBox* pThis, const Region &rRegion );
static SAL_DLLPRIVATE void ImplDrawTransparentBackground( ToolBox* pThis, const Region &rRegion );
- static SAL_DLLPRIVATE void ImplDrawConstantBackground( ToolBox* pThis, const Region &rRegion, BOOL bIsInPopupMode );
+ static SAL_DLLPRIVATE void ImplDrawConstantBackground( ToolBox* pThis, const Region &rRegion, sal_Bool bIsInPopupMode );
static SAL_DLLPRIVATE void ImplDrawBackground( ToolBox* pThis, const Rectangle &rRect );
- static SAL_DLLPRIVATE void ImplErase( ToolBox* pThis, const Rectangle &rRect, BOOL bHighlight = FALSE, BOOL bHasOpenPopup = FALSE );
+ static SAL_DLLPRIVATE void ImplErase( ToolBox* pThis, const Rectangle &rRect, sal_Bool bHighlight = sal_False, sal_Bool bHasOpenPopup = sal_False );
static SAL_DLLPRIVATE void ImplDrawBorder( ToolBox* pWin );
static SAL_DLLPRIVATE const ImplToolItem *ImplGetFirstClippedItem( const ToolBox* pThis );
- static SAL_DLLPRIVATE Size ImplCalcSize( const ToolBox* pThis, USHORT nCalcLines, USHORT nCalcMode = 0 );
+ static SAL_DLLPRIVATE Size ImplCalcSize( const ToolBox* pThis, sal_uInt16 nCalcLines, sal_uInt16 nCalcMode = 0 );
static SAL_DLLPRIVATE void ImplCalcFloatSizes( ToolBox* pThis );
- static SAL_DLLPRIVATE Size ImplCalcFloatSize( ToolBox* pThis, USHORT& rLines );
+ static SAL_DLLPRIVATE Size ImplCalcFloatSize( ToolBox* pThis, sal_uInt16& rLines );
static SAL_DLLPRIVATE void ImplCalcMinMaxFloatSize( ToolBox* pThis, Size& rMinSize, Size& rMaxSize );
static SAL_DLLPRIVATE void ImplSetMinMaxFloatSize( ToolBox *pThis );
- static SAL_DLLPRIVATE USHORT ImplCalcLines( ToolBox* pThis, long nToolSize );
- static SAL_DLLPRIVATE USHORT ImplTestLineSize( ToolBox* pThis, const Point& rPos );
- static SAL_DLLPRIVATE void ImplLineSizing( ToolBox* pThis, const Point& rPos, Rectangle& rRect, USHORT nLineMode );
- static SAL_DLLPRIVATE USHORT ImplFindItemPos( ToolBox* pBox, const Point& rPos );
- static SAL_DLLPRIVATE USHORT ImplFindItemPos( const ImplToolItem* pItem, const std::vector< ImplToolItem >& rList );
- static SAL_DLLPRIVATE void ImplDrawToolArrow( ToolBox* pBox, long nX, long nY, BOOL bBlack, BOOL bColTransform,
- BOOL bLeft = FALSE, BOOL bTop = FALSE,
+ static SAL_DLLPRIVATE sal_uInt16 ImplCalcLines( ToolBox* pThis, long nToolSize );
+ static SAL_DLLPRIVATE sal_uInt16 ImplTestLineSize( ToolBox* pThis, const Point& rPos );
+ static SAL_DLLPRIVATE void ImplLineSizing( ToolBox* pThis, const Point& rPos, Rectangle& rRect, sal_uInt16 nLineMode );
+ static SAL_DLLPRIVATE sal_uInt16 ImplFindItemPos( ToolBox* pBox, const Point& rPos );
+ static SAL_DLLPRIVATE sal_uInt16 ImplFindItemPos( const ImplToolItem* pItem, const std::vector< ImplToolItem >& rList );
+ static SAL_DLLPRIVATE void ImplDrawToolArrow( ToolBox* pBox, long nX, long nY, sal_Bool bBlack, sal_Bool bColTransform,
+ sal_Bool bLeft = sal_False, sal_Bool bTop = sal_False,
long nSize = 6 );
static SAL_DLLPRIVATE void SetToolArrowClipregion( ToolBox* pBox, long nX, long nY,
- BOOL bLeft = FALSE, BOOL bTop = FALSE,
+ sal_Bool bLeft = sal_False, sal_Bool bTop = sal_False,
long nSize = 6 );
- static SAL_DLLPRIVATE void ImplDrawMenubutton( ToolBox *pThis, BOOL bHighlight );
- static SAL_DLLPRIVATE USHORT ImplCountLineBreaks( const ToolBox *pThis );
+ static SAL_DLLPRIVATE void ImplDrawMenubutton( ToolBox *pThis, sal_Bool bHighlight );
+ static SAL_DLLPRIVATE sal_uInt16 ImplCountLineBreaks( const ToolBox *pThis );
SAL_DLLPRIVATE ImplToolBoxPrivateData* ImplGetToolBoxPrivateData() const { return mpData; }
//#endif
protected:
- void SetCurItemId(USHORT nSet) { mnCurItemId = nSet; }
+ void SetCurItemId(sal_uInt16 nSet) { mnCurItemId = nSet; }
public:
ToolBox( Window* pParent, WinBits nStyle = 0 );
@@ -378,36 +378,36 @@ public:
virtual void LoseFocus();
virtual void KeyInput( const KeyEvent& rKEvt );
- virtual BOOL PrepareToggleFloatingMode();
+ virtual sal_Bool PrepareToggleFloatingMode();
virtual void ToggleFloatingMode();
virtual void StartDocking();
- virtual BOOL Docking( const Point& rPos, Rectangle& rRect );
- virtual void EndDocking( const Rectangle& rRect, BOOL bFloatMode );
+ virtual sal_Bool Docking( const Point& rPos, Rectangle& rRect );
+ virtual void EndDocking( const Rectangle& rRect, sal_Bool bFloatMode );
virtual void Resizing( Size& rSize );
void InsertItem( const ResId& rResId,
- USHORT nPos = TOOLBOX_APPEND );
- void InsertItem( USHORT nItemId, const Image& rImage,
+ sal_uInt16 nPos = TOOLBOX_APPEND );
+ void InsertItem( sal_uInt16 nItemId, const Image& rImage,
ToolBoxItemBits nBits = 0,
- USHORT nPos = TOOLBOX_APPEND );
- void InsertItem( USHORT nItemId, const Image& rImage,
+ sal_uInt16 nPos = TOOLBOX_APPEND );
+ void InsertItem( sal_uInt16 nItemId, const Image& rImage,
const XubString& rText,
ToolBoxItemBits nBits = 0,
- USHORT nPos = TOOLBOX_APPEND );
- void InsertItem( USHORT nItemId, const XubString& rText,
+ sal_uInt16 nPos = TOOLBOX_APPEND );
+ void InsertItem( sal_uInt16 nItemId, const XubString& rText,
ToolBoxItemBits nBits = 0,
- USHORT nPos = TOOLBOX_APPEND );
- void InsertWindow( USHORT nItemId, Window* pWindow,
+ sal_uInt16 nPos = TOOLBOX_APPEND );
+ void InsertWindow( sal_uInt16 nItemId, Window* pWindow,
ToolBoxItemBits nBits = 0,
- USHORT nPos = TOOLBOX_APPEND );
- void InsertSpace( USHORT nPos = TOOLBOX_APPEND );
- void InsertSeparator( USHORT nPos = TOOLBOX_APPEND,
- USHORT nPixSize = 0 );
- void InsertBreak( USHORT nPos = TOOLBOX_APPEND );
- void RemoveItem( USHORT nPos );
- void MoveItem( USHORT nItemId, USHORT nNewPos = TOOLBOX_APPEND );
- void CopyItem( const ToolBox& rToolBox, USHORT nItemId,
- USHORT nNewPos = TOOLBOX_APPEND );
+ sal_uInt16 nPos = TOOLBOX_APPEND );
+ void InsertSpace( sal_uInt16 nPos = TOOLBOX_APPEND );
+ void InsertSeparator( sal_uInt16 nPos = TOOLBOX_APPEND,
+ sal_uInt16 nPixSize = 0 );
+ void InsertBreak( sal_uInt16 nPos = TOOLBOX_APPEND );
+ void RemoveItem( sal_uInt16 nPos );
+ void MoveItem( sal_uInt16 nItemId, sal_uInt16 nNewPos = TOOLBOX_APPEND );
+ void CopyItem( const ToolBox& rToolBox, sal_uInt16 nItemId,
+ sal_uInt16 nNewPos = TOOLBOX_APPEND );
void CopyItems( const ToolBox& rToolBox );
void Clear();
void RecalcItems();
@@ -424,106 +424,106 @@ public:
void SetAlign( WindowAlign eNewAlign = WINDOWALIGN_TOP );
WindowAlign GetAlign() const { return meAlign; }
- BOOL IsHorizontal() const { return mbHorz; }
+ sal_Bool IsHorizontal() const { return mbHorz; }
- void SetLineCount( USHORT nNewLines );
- USHORT GetLineCount() const { return mnLines; }
- USHORT GetCurLine() const { return mnCurLine; }
- void ShowLine( BOOL bNext );
+ void SetLineCount( sal_uInt16 nNewLines );
+ sal_uInt16 GetLineCount() const { return mnLines; }
+ sal_uInt16 GetCurLine() const { return mnCurLine; }
+ void ShowLine( sal_Bool bNext );
// Used to enable/disable scrolling one page at a time for toolbar
- void SetPageScroll( BOOL b );
- BOOL GetPageScroll();
+ void SetPageScroll( sal_Bool b );
+ sal_Bool GetPageScroll();
void SetNextToolBox( const XubString& rStr );
const XubString& GetNextToolBox() const { return maNextToolBoxStr; }
- USHORT GetItemCount() const;
- ToolBoxItemType GetItemType( USHORT nPos ) const;
- USHORT GetItemPos( USHORT nItemId ) const;
- USHORT GetItemPos( const Point& rPos ) const;
- USHORT GetItemId( USHORT nPos ) const;
- USHORT GetItemId( const Point& rPos ) const;
- Rectangle GetItemRect( USHORT nItemId ) const;
- Rectangle GetItemPosRect( USHORT nPos ) const;
- Rectangle GetItemDropDownRect( USHORT nItemId ) const;
- Rectangle GetItemPosDropDownRect( USHORT nPos ) const;
+ sal_uInt16 GetItemCount() const;
+ ToolBoxItemType GetItemType( sal_uInt16 nPos ) const;
+ sal_uInt16 GetItemPos( sal_uInt16 nItemId ) const;
+ sal_uInt16 GetItemPos( const Point& rPos ) const;
+ sal_uInt16 GetItemId( sal_uInt16 nPos ) const;
+ sal_uInt16 GetItemId( const Point& rPos ) const;
+ Rectangle GetItemRect( sal_uInt16 nItemId ) const;
+ Rectangle GetItemPosRect( sal_uInt16 nPos ) const;
+ Rectangle GetItemDropDownRect( sal_uInt16 nItemId ) const;
+ Rectangle GetItemPosDropDownRect( sal_uInt16 nPos ) const;
// retrieves the optimal position to place a popup window for this item (subtoolbar or dropdown)
- Point GetItemPopupPosition( USHORT nItemId, const Size& rSize ) const;
+ Point GetItemPopupPosition( sal_uInt16 nItemId, const Size& rSize ) const;
Rectangle GetScrollRect() const;
Rectangle GetMenubuttonRect() const;
- USHORT GetCurItemId() const { return mnCurItemId; }
- USHORT GetDownItemId() const { return mnDownItemId; }
- USHORT GetClicks() const { return mnMouseClicks; }
- USHORT GetModifier() const { return mnMouseModifier; }
- USHORT GetKeyModifier() const { return mnKeyModifier; }
-
- void SetItemBits( USHORT nItemId, ToolBoxItemBits nBits );
- ToolBoxItemBits 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 SetItemImageAngle( USHORT nItemId, long nAngle10 );
- long GetItemImageAngle( USHORT nItemId ) const;
- void SetItemImageMirrorMode( USHORT nItemId, BOOL bMirror );
- BOOL GetItemImageMirrorMode( USHORT ) const;
- void SetItemHighImage( USHORT nItemId, const Image& rImage );
- Image GetItemHighImage( USHORT nItemId ) const;
- void SetItemText( USHORT nItemId, const XubString& rText );
- const XubString& GetItemText( USHORT nItemId ) const;
- void SetItemWindow( USHORT nItemId, Window* pNewWindow );
- Window* GetItemWindow( USHORT nItemId ) const;
- USHORT GetHighlightItemId() const { return mnHighItemId; }
+ sal_uInt16 GetCurItemId() const { return mnCurItemId; }
+ sal_uInt16 GetDownItemId() const { return mnDownItemId; }
+ sal_uInt16 GetClicks() const { return mnMouseClicks; }
+ sal_uInt16 GetModifier() const { return mnMouseModifier; }
+ sal_uInt16 GetKeyModifier() const { return mnKeyModifier; }
+
+ void SetItemBits( sal_uInt16 nItemId, ToolBoxItemBits nBits );
+ ToolBoxItemBits 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 SetItemImageAngle( sal_uInt16 nItemId, long nAngle10 );
+ long GetItemImageAngle( sal_uInt16 nItemId ) const;
+ void SetItemImageMirrorMode( sal_uInt16 nItemId, sal_Bool bMirror );
+ sal_Bool GetItemImageMirrorMode( sal_uInt16 ) const;
+ void SetItemHighImage( sal_uInt16 nItemId, const Image& rImage );
+ Image GetItemHighImage( sal_uInt16 nItemId ) const;
+ void SetItemText( sal_uInt16 nItemId, const XubString& rText );
+ const XubString& GetItemText( sal_uInt16 nItemId ) const;
+ void SetItemWindow( sal_uInt16 nItemId, Window* pNewWindow );
+ Window* GetItemWindow( sal_uInt16 nItemId ) const;
+ sal_uInt16 GetHighlightItemId() const { return mnHighItemId; }
void StartSelection();
void EndSelection();
- void SetItemDown( USHORT nItemId, BOOL bDown, BOOL bRelease = TRUE );
- BOOL IsItemDown( USHORT nItemId ) const;
+ void SetItemDown( sal_uInt16 nItemId, sal_Bool bDown, sal_Bool bRelease = sal_True );
+ sal_Bool IsItemDown( sal_uInt16 nItemId ) const;
- void SetItemState( USHORT nItemId, TriState eState );
- TriState GetItemState( USHORT nItemId ) const;
+ void SetItemState( sal_uInt16 nItemId, TriState eState );
+ TriState GetItemState( sal_uInt16 nItemId ) const;
- void CheckItem( USHORT nItemId, BOOL bCheck = TRUE );
- BOOL IsItemChecked( USHORT nItemId ) const;
+ void CheckItem( sal_uInt16 nItemId, sal_Bool bCheck = sal_True );
+ sal_Bool IsItemChecked( sal_uInt16 nItemId ) const;
- void EnableItem( USHORT nItemId, BOOL bEnable = TRUE );
- BOOL IsItemEnabled( USHORT nItemId ) const;
+ void EnableItem( sal_uInt16 nItemId, sal_Bool bEnable = sal_True );
+ sal_Bool IsItemEnabled( sal_uInt16 nItemId ) const;
- void TriggerItem( USHORT nItemId, BOOL bShift = FALSE, BOOL bCtrl = FALSE );
- void ShowItem( USHORT nItemId, BOOL bVisible = TRUE );
- void HideItem( USHORT nItemId ) { ShowItem( nItemId, FALSE ); }
- BOOL IsItemVisible( USHORT nItemId ) const;
- BOOL IsItemReallyVisible( USHORT nItemId ) const;
+ void TriggerItem( sal_uInt16 nItemId, sal_Bool bShift = sal_False, sal_Bool bCtrl = sal_False );
+ void ShowItem( sal_uInt16 nItemId, sal_Bool bVisible = sal_True );
+ void HideItem( sal_uInt16 nItemId ) { ShowItem( nItemId, sal_False ); }
+ sal_Bool IsItemVisible( sal_uInt16 nItemId ) const;
+ sal_Bool IsItemReallyVisible( sal_uInt16 nItemId ) const;
- void SetItemCommand( USHORT nItemId, const XubString& rCommand );
- const XubString& GetItemCommand( USHORT nItemId ) const;
+ void SetItemCommand( sal_uInt16 nItemId, const XubString& rCommand );
+ const XubString& GetItemCommand( sal_uInt16 nItemId ) const;
using Window::SetQuickHelpText;
- void SetQuickHelpText( USHORT nItemId, const XubString& rText );
+ void SetQuickHelpText( sal_uInt16 nItemId, const XubString& rText );
using Window::GetQuickHelpText;
- const XubString& GetQuickHelpText( USHORT nItemId ) const;
+ const XubString& GetQuickHelpText( sal_uInt16 nItemId ) const;
- void SetHelpText( USHORT nItemId, const XubString& rText );
- const XubString& GetHelpText( USHORT nItemId ) const;
+ void SetHelpText( sal_uInt16 nItemId, const XubString& rText );
+ const XubString& GetHelpText( sal_uInt16 nItemId ) const;
- void SetHelpId( USHORT nItemId, ULONG nHelpId );
- ULONG GetHelpId( USHORT nItemId ) const;
+ void SetHelpId( sal_uInt16 nItemId, sal_uIntPtr nHelpId );
+ sal_uIntPtr GetHelpId( sal_uInt16 nItemId ) const;
// window size according to current alignment, floating state and number of lines
Size CalcWindowSizePixel() const;
// window size according to current alignment, floating state and a given number of lines
- Size CalcWindowSizePixel( USHORT nCalcLines ) const;
+ Size CalcWindowSizePixel( sal_uInt16 nCalcLines ) const;
// window size according to current floating state and a given number of lines and a given alignment
- Size CalcWindowSizePixel( USHORT nCalcLines, WindowAlign eAlign ) const;
+ Size CalcWindowSizePixel( sal_uInt16 nCalcLines, WindowAlign eAlign ) const;
// floating window size according to number of lines (uses the number of line breaks)
Size CalcFloatingWindowSizePixel() const;
// floating window size with a given number of lines
- Size CalcFloatingWindowSizePixel( USHORT nCalcLines ) const;
+ Size CalcFloatingWindowSizePixel( sal_uInt16 nCalcLines ) const;
// automatic window size for popoup mode
Size CalcPopupWindowSizePixel() const;
@@ -532,8 +532,8 @@ public:
void SetDockingRects( const Rectangle& rOutRect,
const Rectangle& rInRect );
- void SetFloatingLines( USHORT nFloatLines );
- USHORT GetFloatingLines() const;
+ void SetFloatingLines( sal_uInt16 nFloatLines );
+ sal_uInt16 GetFloatingLines() const;
void SetBorder( long nX, long nY );
long GetBorderX() const { return mnBorderX; }
@@ -543,35 +543,35 @@ public:
WinBits GetStyle() const { return mnWinStyle; }
// enable/disable undocking
- void Lock( BOOL bLock = TRUE );
+ void Lock( sal_Bool bLock = sal_True );
// read configuration to determine locking behaviour
- static BOOL AlwaysLocked();
+ static sal_Bool AlwaysLocked();
- void EnableMenuStrings( BOOL bEnable = TRUE ) { mbMenuStrings = (bEnable != 0); }
- BOOL IsMenuStringsEnabled() const { return mbMenuStrings; }
+ void EnableMenuStrings( sal_Bool bEnable = sal_True ) { mbMenuStrings = (bEnable != 0); }
+ sal_Bool IsMenuStringsEnabled() const { return mbMenuStrings; }
- void SetOutStyle( USHORT nNewStyle );
- USHORT GetOutStyle() const { return mnOutStyle; }
+ void SetOutStyle( sal_uInt16 nNewStyle );
+ sal_uInt16 GetOutStyle() const { return mnOutStyle; }
- void EnableCustomize( BOOL bEnable = TRUE );
- BOOL IsCustomize() { return mbCustomize; }
+ void EnableCustomize( sal_Bool bEnable = sal_True );
+ sal_Bool IsCustomize() { return mbCustomize; }
void StartCustomize( const Rectangle& rRect, void* pData = NULL );
- void SetCustomizeMode( BOOL );
- BOOL IsInCustomizeMode() const { return mbCustomizeMode; }
+ void SetCustomizeMode( sal_Bool );
+ sal_Bool IsInCustomizeMode() const { return mbCustomizeMode; }
static void StartCustomizeMode();
static void EndCustomizeMode();
- static BOOL IsCustomizeMode();
+ static sal_Bool IsCustomizeMode();
void SetHelpText( const XubString& rText )
{ DockingWindow::SetHelpText( rText ); }
const XubString& GetHelpText() const
{ return DockingWindow::GetHelpText(); }
- void SetHelpId( ULONG nId )
+ void SetHelpId( sal_uIntPtr nId )
{ DockingWindow::SetHelpId( nId ); }
- ULONG GetHelpId() const
+ sal_uIntPtr GetHelpId() const
{ return DockingWindow::GetHelpId(); }
void SetClickHdl( const Link& rLink ) { maClickHdl = rLink; }
@@ -598,9 +598,9 @@ public:
// the private toolbox items will only use item ids starting from TOOLBOX_MENUITEM_START
// to allow for customization of the menu the coresponding handler is called
// when the menu button was clicked and before the menu is executed
- void SetMenuType( USHORT aType = TOOLBOX_MENUTYPE_CUSTOMIZE );
- USHORT GetMenuType() const;
- BOOL IsMenuEnabled() const;
+ void SetMenuType( sal_uInt16 aType = TOOLBOX_MENUTYPE_CUSTOMIZE );
+ sal_uInt16 GetMenuType() const;
+ sal_Bool IsMenuEnabled() const;
PopupMenu* GetMenu() const;
void SetMenuButtonHdl( const Link& rLink );
const Link& GetMenuButtonHdl() const;
@@ -609,13 +609,13 @@ public:
void ExecuteCustomMenu();
// allow Click Handler to detect special key
- BOOL IsShift() const { return mbIsShift; }
+ sal_Bool IsShift() const { return mbIsShift; }
// allow Click Handler to distinguish between mouse and key input
- BOOL IsKeyEvent() const { return mbIsKeyEvent; }
+ sal_Bool IsKeyEvent() const { return mbIsKeyEvent; }
// allows framework to set/query the planned popupmode
- BOOL WillUsePopupMode() const;
- void WillUsePopupMode( BOOL b);
+ sal_Bool WillUsePopupMode() const;
+ void WillUsePopupMode( sal_Bool b);
// accessibility helpers
@@ -624,30 +624,30 @@ public:
// returns the bounding box for the character at index nIndex
// where nIndex is relative to the starting index of the item
// with id nItemId (in coordinates of the displaying window)
- Rectangle GetCharacterBounds( USHORT nItemId, long nIndex ) const;
+ Rectangle GetCharacterBounds( sal_uInt16 nItemId, long nIndex ) const;
// -1 is returned if no character is at that point
// if an index is found the corresponding item id is filled in (else 0)
- long GetIndexForPoint( const Point& rPoint, USHORT& rItemID ) const;
+ long GetIndexForPoint( const Point& rPoint, sal_uInt16& rItemID ) const;
// returns the number of portions in the result of GetDisplayText()
long GetTextCount() const;
// returns the interval [start,end] of text portion nText
// returns [-1,-1] for an invalid text number
Pair GetTextStartEnd( long nText ) const;
// returns the item id for text portion nText or 0 if nText is invalid
- USHORT GetDisplayItemId( long nText ) const;
+ sal_uInt16 GetDisplayItemId( long nText ) const;
const Size& GetDefaultImageSize() const;
- void ChangeHighlight( USHORT nPos );
+ void ChangeHighlight( sal_uInt16 nPos );
void SetImageListProvider(vcl::IImageListProvider* _pProvider);
};
-inline void ToolBox::CheckItem( USHORT nItemId, BOOL bCheck )
+inline void ToolBox::CheckItem( sal_uInt16 nItemId, sal_Bool bCheck )
{
SetItemState( nItemId, (bCheck) ? STATE_CHECK : STATE_NOCHECK );
}
-inline BOOL ToolBox::IsItemChecked( USHORT nItemId ) const
+inline sal_Bool ToolBox::IsItemChecked( sal_uInt16 nItemId ) const
{
return (GetItemState( nItemId ) == STATE_CHECK);
}
@@ -669,12 +669,12 @@ inline void ToolBox::SetDockingRects( const Rectangle& rOutRect,
maInDockRect = rInRect;
}
-inline void ToolBox::SetFloatingLines( USHORT nNewLines )
+inline void ToolBox::SetFloatingLines( sal_uInt16 nNewLines )
{
mnFloatLines = nNewLines;
}
-inline USHORT ToolBox::GetFloatingLines() const
+inline sal_uInt16 ToolBox::GetFloatingLines() const
{
return mnFloatLines;
}
diff --git a/vcl/inc/vcl/vclenum.hxx b/vcl/inc/vcl/vclenum.hxx
index a34c633479e7..dff91a111948 100644
--- a/vcl/inc/vcl/vclenum.hxx
+++ b/vcl/inc/vcl/vclenum.hxx
@@ -239,7 +239,7 @@ enum FontStrikeout { STRIKEOUT_NONE, STRIKEOUT_SINGLE, STRIKEOUT_DOUBLE,
#ifndef ENUM_FONTEMPHASISMARK_DECLARED
#define ENUM_FONTEMPHASISMARK_DECLARED
-typedef USHORT FontEmphasisMark;
+typedef sal_uInt16 FontEmphasisMark;
#define EMPHASISMARK_NONE ((FontEmphasisMark)0x0000)
#define EMPHASISMARK_DOT ((FontEmphasisMark)0x0001)
#define EMPHASISMARK_CIRCLE ((FontEmphasisMark)0x0002)
diff --git a/vcl/inc/vcl/vclevent.hxx b/vcl/inc/vcl/vclevent.hxx
index 8ccb880fce34..2e06e448d628 100644
--- a/vcl/inc/vcl/vclevent.hxx
+++ b/vcl/inc/vcl/vclevent.hxx
@@ -186,7 +186,7 @@ namespace com { namespace sun { namespace star {
#define VCLEVENT_WINDOW_STARTDOCKING 1217 // pData = DockingData
#define VCLEVENT_WINDOW_DOCKING 1218
#define VCLEVENT_WINDOW_ENDDOCKING 1219 // pData = EndDockingData
-#define VCLEVENT_WINDOW_PREPARETOGGLEFLOATING 1220 // pData = BOOL
+#define VCLEVENT_WINDOW_PREPARETOGGLEFLOATING 1220 // pData = sal_Bool
#define VCLEVENT_WINDOW_TOGGLEFLOATING 1221
#define VCLEVENT_WINDOW_ENDPOPUPMODE 1222 // pData = EndPopupModeData
@@ -197,13 +197,13 @@ namespace com { namespace sun { namespace star {
class VCL_DLLPUBLIC VclSimpleEvent
{
private:
- ULONG nId;
+ sal_uIntPtr nId;
public:
- VclSimpleEvent( ULONG n ) { nId = n; }
+ VclSimpleEvent( sal_uIntPtr n ) { nId = n; }
TYPEINFO();
- ULONG GetId() const { return nId; }
+ sal_uIntPtr GetId() const { return nId; }
};
class VCL_DLLPUBLIC VclWindowEvent : public VclSimpleEvent
@@ -213,7 +213,7 @@ private:
void* pData;
public:
- VclWindowEvent( Window* pWin, ULONG n, void* pDat = NULL ) : VclSimpleEvent(n) { pWindow = pWin; pData = pDat; }
+ VclWindowEvent( Window* pWin, sal_uIntPtr n, void* pDat = NULL ) : VclSimpleEvent(n) { pWindow = pWin; pData = pDat; }
TYPEINFO();
Window* GetWindow() const { return pWindow; }
@@ -227,7 +227,7 @@ private:
MouseEvent aEvent;
public:
- VclMouseEvent( Window* pWin, ULONG n, const MouseEvent& rEvent ) : VclWindowEvent( pWin, n ), aEvent(rEvent) { ; }
+ VclMouseEvent( Window* pWin, sal_uIntPtr n, const MouseEvent& rEvent ) : VclWindowEvent( pWin, n ), aEvent(rEvent) { ; }
TYPEINFO();
const MouseEvent& GetEvent() const { return aEvent; }
@@ -238,20 +238,20 @@ class VCL_DLLPUBLIC VclMenuEvent : public VclSimpleEvent
{
private:
Menu* pMenu;
- USHORT mnPos;
+ sal_uInt16 mnPos;
public:
- VclMenuEvent( Menu* pM, ULONG n, USHORT nPos ) : VclSimpleEvent(n) { pMenu = pM; mnPos = nPos; }
+ VclMenuEvent( Menu* pM, sal_uIntPtr n, sal_uInt16 nPos ) : VclSimpleEvent(n) { pMenu = pM; mnPos = nPos; }
TYPEINFO();
Menu* GetMenu() const { return pMenu; }
- USHORT GetItemPos() const { return mnPos; }
+ sal_uInt16 GetItemPos() const { return mnPos; }
};
class VCL_DLLPUBLIC VclAccessibleEvent: public VclSimpleEvent
{
public:
- VclAccessibleEvent( ULONG n, const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rxAccessible );
+ VclAccessibleEvent( sal_uIntPtr n, const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rxAccessible );
virtual ~VclAccessibleEvent();
::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > GetAccessible() const;
@@ -265,9 +265,9 @@ public:
void Call( VclSimpleEvent* pEvent ) const;
// stops notifying when any handler has processed the event
- // and returns TRUE in that case
- // a handler must return TRUE to signal that it has processed the event
- BOOL Process( VclSimpleEvent* pEvent ) const;
+ // and returns sal_True in that case
+ // a handler must return sal_True to signal that it has processed the event
+ sal_Bool Process( VclSimpleEvent* pEvent ) const;
};
class VCL_DLLPUBLIC VclEventListeners2 : public vcl::DeletionNotifier
diff --git a/vcl/inc/vcl/virdev.hxx b/vcl/inc/vcl/virdev.hxx
index 26270ec7703f..c1cee4f58c95 100644
--- a/vcl/inc/vcl/virdev.hxx
+++ b/vcl/inc/vcl/virdev.hxx
@@ -49,13 +49,13 @@ private:
SalVirtualDevice* mpVirDev;
VirtualDevice* mpPrev;
VirtualDevice* mpNext;
- USHORT mnBitCount;
- BOOL mbScreenComp;
+ sal_uInt16 mnBitCount;
+ sal_Bool mbScreenComp;
sal_Int8 mnAlphaDepth;
- BYTE meRefDevMode;
+ sal_uInt8 meRefDevMode;
- SAL_DLLPRIVATE void ImplInitVirDev( const OutputDevice* pOutDev, long nDX, long nDY, USHORT nBitCount, const SystemGraphicsData *pData = NULL );
- SAL_DLLPRIVATE BOOL ImplSetOutputSizePixel( const Size& rNewSize, BOOL bErase );
+ SAL_DLLPRIVATE void ImplInitVirDev( const OutputDevice* pOutDev, long nDX, long nDY, sal_uInt16 nBitCount, const SystemGraphicsData *pData = NULL );
+ SAL_DLLPRIVATE sal_Bool ImplSetOutputSizePixel( const Size& rNewSize, sal_Bool bErase );
// Copy assignment is forbidden and not implemented.
VirtualDevice (const VirtualDevice &);
@@ -72,9 +72,9 @@ private:
SAL_DLLPRIVATE bool ForceZeroExtleadBug() const
{ return ((meRefDevMode & REFDEV_FORCE_ZERO_EXTLEAD) != 0); }
public:
- VirtualDevice( USHORT nBitCount = 0 );
+ VirtualDevice( sal_uInt16 nBitCount = 0 );
VirtualDevice( const OutputDevice& rCompDev,
- USHORT nBitCount = 0 );
+ sal_uInt16 nBitCount = 0 );
/** Create a virtual device with alpha channel
@param rCompDev
@@ -92,18 +92,18 @@ public:
are allowed here, with 1 denoting binary mask.
*/
VirtualDevice( const OutputDevice& rCompDev,
- USHORT nBitCount, USHORT nAlphaBitCount );
+ sal_uInt16 nBitCount, sal_uInt16 nAlphaBitCount );
/** Create a virtual device using an existing system dependent device or graphics context
Any rendering will happen directly on the context and not on any intermediate bitmap.
Note: This might not be suported on all platforms !
*/
- VirtualDevice( const SystemGraphicsData *pData, USHORT nBitCount );
+ VirtualDevice( const SystemGraphicsData *pData, sal_uInt16 nBitCount );
virtual ~VirtualDevice();
- BOOL SetOutputSizePixel( const Size& rNewSize, BOOL bErase = TRUE );
- BOOL SetOutputSize( const Size& rNewSize, BOOL bErase = TRUE )
+ sal_Bool SetOutputSizePixel( const Size& rNewSize, sal_Bool bErase = sal_True );
+ sal_Bool SetOutputSize( const Size& rNewSize, sal_Bool bErase = sal_True )
{ return SetOutputSizePixel( LogicToPixel( rNewSize ), bErase ); }
// reference device modes for different compatibility levels
diff --git a/vcl/inc/vcl/wall.hxx b/vcl/inc/vcl/wall.hxx
index 07611aaf5edc..133aa39525a8 100644
--- a/vcl/inc/vcl/wall.hxx
+++ b/vcl/inc/vcl/wall.hxx
@@ -89,7 +89,7 @@ class VCL_DLLPUBLIC Wallpaper
private:
ImplWallpaper* mpImplWallpaper;
- SAL_DLLPRIVATE void ImplMakeUnique( BOOL bReleaseCache = TRUE );
+ SAL_DLLPRIVATE void ImplMakeUnique( sal_Bool bReleaseCache = sal_True );
SAL_DLLPRIVATE Gradient ImplGetApplicationGradient() const;
//#if 0 // _SOLAR__PRIVATE
@@ -114,26 +114,26 @@ public:
void SetBitmap( const BitmapEx& rBitmap );
void SetBitmap();
BitmapEx GetBitmap() const;
- BOOL IsBitmap() const;
+ sal_Bool IsBitmap() const;
void SetGradient( const Gradient& rGradient );
void SetGradient();
Gradient GetGradient() const;
- BOOL IsGradient() const;
+ sal_Bool IsGradient() const;
void SetRect( const Rectangle& rRect );
void SetRect();
Rectangle GetRect() const;
- BOOL IsRect() const;
+ sal_Bool IsRect() const;
- BOOL IsFixed() const;
- BOOL IsScrollable() const;
+ sal_Bool IsFixed() const;
+ sal_Bool IsScrollable() const;
Wallpaper& operator=( const Wallpaper& rWallpaper );
- BOOL operator==( const Wallpaper& rWallpaper ) const;
- BOOL operator!=( const Wallpaper& rWallpaper ) const
+ sal_Bool operator==( const Wallpaper& rWallpaper ) const;
+ sal_Bool operator!=( const Wallpaper& rWallpaper ) const
{ return !(Wallpaper::operator==( rWallpaper )); }
- BOOL IsSameInstance( const Wallpaper& rWallpaper ) const
+ sal_Bool IsSameInstance( const Wallpaper& rWallpaper ) const
{ return (mpImplWallpaper == rWallpaper.mpImplWallpaper); }
friend VCL_DLLPUBLIC SvStream& operator>>( SvStream& rIStm, Wallpaper& rWallpaper );
diff --git a/vcl/inc/vcl/wall2.hxx b/vcl/inc/vcl/wall2.hxx
index e93a8370ee7d..7e91f4c78df4 100644
--- a/vcl/inc/vcl/wall2.hxx
+++ b/vcl/inc/vcl/wall2.hxx
@@ -40,7 +40,7 @@ private:
Gradient* mpGradient;
Rectangle* mpRect;
WallpaperStyle meStyle;
- ULONG mnRefCount;
+ sal_uIntPtr mnRefCount;
BitmapEx* mpCache;
friend SvStream& operator>>( SvStream& rIStm, ImplWallpaper& rImplWallpaper );
diff --git a/vcl/inc/vcl/windata.hxx b/vcl/inc/vcl/windata.hxx
index 9436352e4927..e6795cc500a9 100644
--- a/vcl/inc/vcl/windata.hxx
+++ b/vcl/inc/vcl/windata.hxx
@@ -37,13 +37,13 @@ class Window;
// - Prototypes -
// --------------
-long ImplWindowFrameProc( Window* pInst, SalFrame* pFrame, USHORT nEvent, const void* pEvent );
+long ImplWindowFrameProc( Window* pInst, SalFrame* pFrame, sal_uInt16 nEvent, const void* pEvent );
// -----------
// - HitTest -
// -----------
-#define WINDOW_HITTEST_INSIDE ((USHORT)0x0001)
-#define WINDOW_HITTEST_TRANSPARENT ((USHORT)0x0002)
+#define WINDOW_HITTEST_INSIDE ((sal_uInt16)0x0001)
+#define WINDOW_HITTEST_TRANSPARENT ((sal_uInt16)0x0002)
#endif // _SV_WINDATA_HXX
diff --git a/vcl/inc/vcl/window.h b/vcl/inc/vcl/window.h
index 691c3ed18421..53b0cb0b6ec4 100644
--- a/vcl/inc/vcl/window.h
+++ b/vcl/inc/vcl/window.h
@@ -111,15 +111,15 @@ namespace vcl { struct ControlLayoutData; }
struct ImplWinData
{
UniString* mpExtOldText;
- USHORT* mpExtOldAttrAry;
+ sal_uInt16* mpExtOldAttrAry;
Rectangle* mpCursorRect;
long mnCursorExtWidth;
Rectangle* mpFocusRect;
Rectangle* mpTrackRect;
- USHORT mnTrackFlags;
- USHORT mnIsTopWindow;
- BOOL mbMouseOver; // tracks mouse over for native widget paint effect
- BOOL mbEnableNativeWidget; // toggle native widget rendering
+ sal_uInt16 mnTrackFlags;
+ sal_uInt16 mnIsTopWindow;
+ sal_Bool mbMouseOver; // tracks mouse over for native widget paint effect
+ sal_Bool mbEnableNativeWidget; // toggle native widget rendering
SmartId* mpSmartHelpId;
SmartId* mpSmartUniqueId;
::std::list< Window* >
@@ -135,9 +135,9 @@ struct ImplOverlapData
VirtualDevice* mpSaveBackDev; // Gesicherte Hintergrund-Bitmap
Region* mpSaveBackRgn; // Gesicherte Region, was invalidiert werden muss
Window* mpNextBackWin; // Naechstes Fenster mit Hintergrund-Sicherung
- ULONG mnSaveBackSize; // Groesse Bitmap fuer Hintergrund-Sicherung
- BOOL mbSaveBack; // TRUE: Background sichern
- BYTE mnTopLevel; // Level for Overlap-Window
+ sal_uIntPtr mnSaveBackSize; // Groesse Bitmap fuer Hintergrund-Sicherung
+ sal_Bool mbSaveBack; // sal_True: Background sichern
+ sal_uInt8 mnTopLevel; // Level for Overlap-Window
};
// -----------------
@@ -161,9 +161,9 @@ struct ImplFrameData
sal_Int32 mnDPIX; // Original Screen Resolution
sal_Int32 mnDPIY; // Original Screen Resolution
ImplMapRes maMapUnitRes; // for LogicUnitToPixel
- ULONG mnAllSaveBackSize; // Groesse aller Bitmaps fuer Hintergrund-Sicherung
- ULONG mnFocusId; // FocusId for PostUserLink
- ULONG mnMouseMoveId; // MoveId for PostUserLink
+ sal_uIntPtr mnAllSaveBackSize; // Groesse aller Bitmaps fuer Hintergrund-Sicherung
+ sal_uIntPtr mnFocusId; // FocusId for PostUserLink
+ sal_uIntPtr mnMouseMoveId; // MoveId for PostUserLink
long mnLastMouseX; // last x mouse position
long mnLastMouseY; // last y mouse position
long mnBeforeLastMouseX; // last but one x mouse position
@@ -172,23 +172,23 @@ struct ImplFrameData
long mnFirstMouseY; // first y mouse position by mousebuttondown
long mnLastMouseWinX; // last x mouse position, rel. to pMouseMoveWin
long mnLastMouseWinY; // last y mouse position, rel. to pMouseMoveWin
- USHORT mnModalMode; // frame based modal count (app based makes no sense anymore)
- ULONG mnMouseDownTime; // mouse button down time for double click
- USHORT mnClickCount; // mouse click count
- USHORT mnFirstMouseCode; // mouse code by mousebuttondown
- USHORT mnMouseCode; // mouse code
- USHORT mnMouseMode; // mouse mode
+ sal_uInt16 mnModalMode; // frame based modal count (app based makes no sense anymore)
+ sal_uIntPtr mnMouseDownTime; // mouse button down time for double click
+ sal_uInt16 mnClickCount; // mouse click count
+ sal_uInt16 mnFirstMouseCode; // mouse code by mousebuttondown
+ sal_uInt16 mnMouseCode; // mouse code
+ sal_uInt16 mnMouseMode; // mouse mode
MapUnit meMapUnit; // last MapUnit for LogicUnitToPixel
- BOOL mbHasFocus; // focus
- BOOL mbInMouseMove; // is MouseMove on stack
- BOOL mbMouseIn; // is Mouse inside the frame
- BOOL mbStartDragCalled; // is command startdrag called
- BOOL mbNeedSysWindow; // set, when FrameSize <= IMPL_MIN_NEEDSYSWIN
- BOOL mbMinimized; // set, when FrameSize <= 0
- BOOL mbStartFocusState; // FocusState, beim abschicken des Events
- BOOL mbInSysObjFocusHdl; // Innerhalb vom GetFocus-Handler eines SysChilds
- BOOL mbInSysObjToTopHdl; // Innerhalb vom ToTop-Handler eines SysChilds
- BOOL mbSysObjFocus; // Hat ein SysChild den Focus
+ sal_Bool mbHasFocus; // focus
+ sal_Bool mbInMouseMove; // is MouseMove on stack
+ sal_Bool mbMouseIn; // is Mouse inside the frame
+ sal_Bool mbStartDragCalled; // is command startdrag called
+ sal_Bool mbNeedSysWindow; // set, when FrameSize <= IMPL_MIN_NEEDSYSWIN
+ sal_Bool mbMinimized; // set, when FrameSize <= 0
+ sal_Bool mbStartFocusState; // FocusState, beim abschicken des Events
+ sal_Bool mbInSysObjFocusHdl; // Innerhalb vom GetFocus-Handler eines SysChilds
+ sal_Bool mbInSysObjToTopHdl; // Innerhalb vom ToTop-Handler eines SysChilds
+ sal_Bool mbSysObjFocus; // Hat ein SysChild den Focus
::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragSource > mxDragSource;
::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTarget > mxDropTarget;
@@ -196,7 +196,7 @@ struct ImplFrameData
::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard > mxClipboard;
::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard > mxSelection;
- BOOL mbInternalDragGestureRecognizer;
+ sal_Bool mbInternalDragGestureRecognizer;
};
// ---------------
@@ -254,8 +254,8 @@ public:
long mnY;
long mnAbsScreenX;
Point maPos;
- ULONG mnHelpId;
- ULONG mnUniqId;
+ sal_uIntPtr mnHelpId;
+ sal_uIntPtr mnUniqId;
XubString maHelpText;
XubString maQuickHelpText;
InputContext maInputContext;
@@ -274,15 +274,15 @@ public:
WinBits mnPrevExtendedStyle;
WindowType mnType;
ControlPart mnNativeBackground;
- USHORT mnWaitCount;
- USHORT mnPaintFlags;
- USHORT mnGetFocusFlags;
- USHORT mnParentClipMode;
- USHORT mnActivateMode;
- USHORT mnDlgCtrlFlags;
- USHORT mnLockCount;
+ sal_uInt16 mnWaitCount;
+ sal_uInt16 mnPaintFlags;
+ sal_uInt16 mnGetFocusFlags;
+ sal_uInt16 mnParentClipMode;
+ sal_uInt16 mnActivateMode;
+ sal_uInt16 mnDlgCtrlFlags;
+ sal_uInt16 mnLockCount;
AlwaysInputMode meAlwaysInputMode;
- BOOL mbFrame:1,
+ sal_Bool mbFrame:1,
mbBorderWin:1,
mbOverlapWin:1,
mbSysWin:1,
@@ -364,9 +364,9 @@ public:
// - Hilfsmethoden -
// -----------------
-long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave,
- long nX, long nY, ULONG nMsgTime,
- USHORT nCode, USHORT nMode );
+long ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouseLeave,
+ long nX, long nY, sal_uIntPtr nMsgTime,
+ sal_uInt16 nCode, sal_uInt16 nMode );
void ImplHandleResize( Window* pWindow, long nNewWidth, long nNewHeight );
#endif // _SV_WINDOW_H
diff --git a/vcl/inc/vcl/window.hxx b/vcl/inc/vcl/window.hxx
index 8264767e59ad..2a2db0237dc5 100644
--- a/vcl/inc/vcl/window.hxx
+++ b/vcl/inc/vcl/window.hxx
@@ -131,115 +131,115 @@ namespace svt { class PopupWindowControllerImpl; }
// ---------------
// Type fuer GetWindow()
-#define WINDOW_PARENT ((USHORT)0)
-#define WINDOW_FIRSTCHILD ((USHORT)1)
-#define WINDOW_LASTCHILD ((USHORT)2)
-#define WINDOW_PREV ((USHORT)3)
-#define WINDOW_NEXT ((USHORT)4)
-#define WINDOW_FIRSTOVERLAP ((USHORT)5)
-#define WINDOW_LASTOVERLAP ((USHORT)6)
-#define WINDOW_OVERLAP ((USHORT)7)
-#define WINDOW_PARENTOVERLAP ((USHORT)8)
-#define WINDOW_CLIENT ((USHORT)9)
-#define WINDOW_REALPARENT ((USHORT)10)
-#define WINDOW_FRAME ((USHORT)11)
-#define WINDOW_BORDER ((USHORT)12)
-#define WINDOW_FIRSTTOPWINDOWCHILD ((USHORT)13)
-#define WINDOW_LASTTOPWINDOWCHILD ((USHORT)14)
-#define WINDOW_PREVTOPWINDOWSIBLING ((USHORT)15)
-#define WINDOW_NEXTTOPWINDOWSIBLING ((USHORT)16)
+#define WINDOW_PARENT ((sal_uInt16)0)
+#define WINDOW_FIRSTCHILD ((sal_uInt16)1)
+#define WINDOW_LASTCHILD ((sal_uInt16)2)
+#define WINDOW_PREV ((sal_uInt16)3)
+#define WINDOW_NEXT ((sal_uInt16)4)
+#define WINDOW_FIRSTOVERLAP ((sal_uInt16)5)
+#define WINDOW_LASTOVERLAP ((sal_uInt16)6)
+#define WINDOW_OVERLAP ((sal_uInt16)7)
+#define WINDOW_PARENTOVERLAP ((sal_uInt16)8)
+#define WINDOW_CLIENT ((sal_uInt16)9)
+#define WINDOW_REALPARENT ((sal_uInt16)10)
+#define WINDOW_FRAME ((sal_uInt16)11)
+#define WINDOW_BORDER ((sal_uInt16)12)
+#define WINDOW_FIRSTTOPWINDOWCHILD ((sal_uInt16)13)
+#define WINDOW_LASTTOPWINDOWCHILD ((sal_uInt16)14)
+#define WINDOW_PREVTOPWINDOWSIBLING ((sal_uInt16)15)
+#define WINDOW_NEXTTOPWINDOWSIBLING ((sal_uInt16)16)
// Flags for SetPosSizePixel()
-#define WINDOW_POSSIZE_X ((USHORT)0x0001)
-#define WINDOW_POSSIZE_Y ((USHORT)0x0002)
-#define WINDOW_POSSIZE_WIDTH ((USHORT)0x0004)
-#define WINDOW_POSSIZE_HEIGHT ((USHORT)0x0008)
+#define WINDOW_POSSIZE_X ((sal_uInt16)0x0001)
+#define WINDOW_POSSIZE_Y ((sal_uInt16)0x0002)
+#define WINDOW_POSSIZE_WIDTH ((sal_uInt16)0x0004)
+#define WINDOW_POSSIZE_HEIGHT ((sal_uInt16)0x0008)
#define WINDOW_POSSIZE_POS (WINDOW_POSSIZE_X | WINDOW_POSSIZE_Y)
#define WINDOW_POSSIZE_SIZE (WINDOW_POSSIZE_WIDTH | WINDOW_POSSIZE_HEIGHT)
#define WINDOW_POSSIZE_POSSIZE (WINDOW_POSSIZE_POS | WINDOW_POSSIZE_SIZE)
#define WINDOW_POSSIZE_ALL (WINDOW_POSSIZE_POSSIZE)
-#define WINDOW_POSSIZE_DROPDOWN ((USHORT)0x0010)
+#define WINDOW_POSSIZE_DROPDOWN ((sal_uInt16)0x0010)
// Flags for Show()
-#define SHOW_NOPARENTUPDATE ((USHORT)0x0001)
-#define SHOW_NOFOCUSCHANGE ((USHORT)0x0002)
-#define SHOW_NOACTIVATE ((USHORT)0x0004)
-#define SHOW_FOREGROUNDTASK ((USHORT)0x0008)
+#define SHOW_NOPARENTUPDATE ((sal_uInt16)0x0001)
+#define SHOW_NOFOCUSCHANGE ((sal_uInt16)0x0002)
+#define SHOW_NOACTIVATE ((sal_uInt16)0x0004)
+#define SHOW_FOREGROUNDTASK ((sal_uInt16)0x0008)
// Flags for SetZOrder()
-#define WINDOW_ZORDER_BEFOR ((USHORT)0x0001)
-#define WINDOW_ZORDER_BEHIND ((USHORT)0x0002)
-#define WINDOW_ZORDER_FIRST ((USHORT)0x0004)
-#define WINDOW_ZORDER_LAST ((USHORT)0x0008)
+#define WINDOW_ZORDER_BEFOR ((sal_uInt16)0x0001)
+#define WINDOW_ZORDER_BEHIND ((sal_uInt16)0x0002)
+#define WINDOW_ZORDER_FIRST ((sal_uInt16)0x0004)
+#define WINDOW_ZORDER_LAST ((sal_uInt16)0x0008)
// Activate-Flags
-#define ACTIVATE_MODE_GRABFOCUS ((USHORT)0x0001)
+#define ACTIVATE_MODE_GRABFOCUS ((sal_uInt16)0x0001)
// ToTop-Flags
-#define TOTOP_RESTOREWHENMIN ((USHORT)0x0001)
-#define TOTOP_FOREGROUNDTASK ((USHORT)0x0002)
-#define TOTOP_NOGRABFOCUS ((USHORT)0x0004)
+#define TOTOP_RESTOREWHENMIN ((sal_uInt16)0x0001)
+#define TOTOP_FOREGROUNDTASK ((sal_uInt16)0x0002)
+#define TOTOP_NOGRABFOCUS ((sal_uInt16)0x0004)
//#if 0 // _SOLAR__PRIVATE // vcl internal only
-#define TOTOP_GRABFOCUSONLY ((USHORT)0x0008)
+#define TOTOP_GRABFOCUSONLY ((sal_uInt16)0x0008)
//#endif
// Flags for Invalidate
-#define INVALIDATE_CHILDREN ((USHORT)0x0001)
-#define INVALIDATE_NOCHILDREN ((USHORT)0x0002)
-#define INVALIDATE_NOERASE ((USHORT)0x0004)
-#define INVALIDATE_UPDATE ((USHORT)0x0008)
-#define INVALIDATE_TRANSPARENT ((USHORT)0x0010)
-#define INVALIDATE_NOTRANSPARENT ((USHORT)0x0020)
-#define INVALIDATE_NOCLIPCHILDREN ((USHORT)0x4000)
+#define INVALIDATE_CHILDREN ((sal_uInt16)0x0001)
+#define INVALIDATE_NOCHILDREN ((sal_uInt16)0x0002)
+#define INVALIDATE_NOERASE ((sal_uInt16)0x0004)
+#define INVALIDATE_UPDATE ((sal_uInt16)0x0008)
+#define INVALIDATE_TRANSPARENT ((sal_uInt16)0x0010)
+#define INVALIDATE_NOTRANSPARENT ((sal_uInt16)0x0020)
+#define INVALIDATE_NOCLIPCHILDREN ((sal_uInt16)0x4000)
// Temporaer fuer Kompatibilitaet
#define INVALIDATE_BACKGROUND INVALIDATE_TRANSPARENT
// Flags for Validate
-#define VALIDATE_CHILDREN ((USHORT)0x0001)
-#define VALIDATE_NOCHILDREN ((USHORT)0x0002)
+#define VALIDATE_CHILDREN ((sal_uInt16)0x0001)
+#define VALIDATE_NOCHILDREN ((sal_uInt16)0x0002)
// Flags for Scroll
-#define SCROLL_CLIP ((USHORT)0x0001)
-#define SCROLL_CHILDREN ((USHORT)0x0002)
-#define SCROLL_NOCHILDREN ((USHORT)0x0004)
-#define SCROLL_NOERASE ((USHORT)0x0008)
-#define SCROLL_NOINVALIDATE ((USHORT)0x0010)
-#define SCROLL_NOWINDOWINVALIDATE ((USHORT)0x0020)
-#define SCROLL_USECLIPREGION ((USHORT)0x0040)
-#define SCROLL_UPDATE ((USHORT)0x0080)
+#define SCROLL_CLIP ((sal_uInt16)0x0001)
+#define SCROLL_CHILDREN ((sal_uInt16)0x0002)
+#define SCROLL_NOCHILDREN ((sal_uInt16)0x0004)
+#define SCROLL_NOERASE ((sal_uInt16)0x0008)
+#define SCROLL_NOINVALIDATE ((sal_uInt16)0x0010)
+#define SCROLL_NOWINDOWINVALIDATE ((sal_uInt16)0x0020)
+#define SCROLL_USECLIPREGION ((sal_uInt16)0x0040)
+#define SCROLL_UPDATE ((sal_uInt16)0x0080)
// Flags for ParentClipMode
-#define PARENTCLIPMODE_CLIP ((USHORT)0x0001)
-#define PARENTCLIPMODE_NOCLIP ((USHORT)0x0002)
+#define PARENTCLIPMODE_CLIP ((sal_uInt16)0x0001)
+#define PARENTCLIPMODE_NOCLIP ((sal_uInt16)0x0002)
// Flags for Invert()
-#define INVERT_HIGHLIGHT ((USHORT)0x0001)
-#define INVERT_50 ((USHORT)0x0002)
+#define INVERT_HIGHLIGHT ((sal_uInt16)0x0001)
+#define INVERT_50 ((sal_uInt16)0x0002)
// Flags for ShowTracking()
-#define SHOWTRACK_SMALL ((USHORT)0x0001)
-#define SHOWTRACK_BIG ((USHORT)0x0002)
-#define SHOWTRACK_SPLIT ((USHORT)0x0003)
-#define SHOWTRACK_OBJECT ((USHORT)0x0004)
-#define SHOWTRACK_WINDOW ((USHORT)0x1000)
-#define SHOWTRACK_CLIP ((USHORT)0x2000)
-#define SHOWTRACK_STYLE ((USHORT)0x000F)
+#define SHOWTRACK_SMALL ((sal_uInt16)0x0001)
+#define SHOWTRACK_BIG ((sal_uInt16)0x0002)
+#define SHOWTRACK_SPLIT ((sal_uInt16)0x0003)
+#define SHOWTRACK_OBJECT ((sal_uInt16)0x0004)
+#define SHOWTRACK_WINDOW ((sal_uInt16)0x1000)
+#define SHOWTRACK_CLIP ((sal_uInt16)0x2000)
+#define SHOWTRACK_STYLE ((sal_uInt16)0x000F)
// Flags for StartTracking()
-#define STARTTRACK_KEYINPUT ((USHORT)0x0001)
-#define STARTTRACK_KEYMOD ((USHORT)0x0002)
-#define STARTTRACK_NOKEYCANCEL ((USHORT)0x0004)
-#define STARTTRACK_SCROLLREPEAT ((USHORT)0x0008)
-#define STARTTRACK_BUTTONREPEAT ((USHORT)0x0010)
-#define STARTTRACK_MOUSEBUTTONDOWN ((USHORT)0x0020)
-#define STARTTRACK_FOCUSCANCEL ((USHORT)0x0040)
+#define STARTTRACK_KEYINPUT ((sal_uInt16)0x0001)
+#define STARTTRACK_KEYMOD ((sal_uInt16)0x0002)
+#define STARTTRACK_NOKEYCANCEL ((sal_uInt16)0x0004)
+#define STARTTRACK_SCROLLREPEAT ((sal_uInt16)0x0008)
+#define STARTTRACK_BUTTONREPEAT ((sal_uInt16)0x0010)
+#define STARTTRACK_MOUSEBUTTONDOWN ((sal_uInt16)0x0020)
+#define STARTTRACK_FOCUSCANCEL ((sal_uInt16)0x0040)
// Flags for StartAutoScroll()
-#define AUTOSCROLL_VERT ((USHORT)0x0001)
-#define AUTOSCROLL_HORZ ((USHORT)0x0002)
+#define AUTOSCROLL_VERT ((sal_uInt16)0x0001)
+#define AUTOSCROLL_HORZ ((sal_uInt16)0x0002)
// Flags for StateChanged()
-typedef USHORT StateChangedType;
+typedef sal_uInt16 StateChangedType;
#define STATE_CHANGE_INITSHOW ((StateChangedType)1)
#define STATE_CHANGE_VISIBLE ((StateChangedType)2)
#define STATE_CHANGE_UPDATEMODE ((StateChangedType)3)
@@ -262,49 +262,49 @@ typedef USHORT StateChangedType;
#define STATE_CHANGE_USER ((StateChangedType)10000)
// GetFocusFlags
-#define GETFOCUS_TAB ((USHORT)0x0001)
-#define GETFOCUS_CURSOR ((USHORT)0x0002)
-#define GETFOCUS_MNEMONIC ((USHORT)0x0004)
-#define GETFOCUS_FORWARD ((USHORT)0x0010)
-#define GETFOCUS_BACKWARD ((USHORT)0x0020)
-#define GETFOCUS_AROUND ((USHORT)0x0040)
-#define GETFOCUS_UNIQUEMNEMONIC ((USHORT)0x0100)
-#define GETFOCUS_INIT ((USHORT)0x0200)
-#define GETFOCUS_FLOATWIN_POPUPMODEEND_CANCEL ((USHORT)0x0400)
+#define GETFOCUS_TAB ((sal_uInt16)0x0001)
+#define GETFOCUS_CURSOR ((sal_uInt16)0x0002)
+#define GETFOCUS_MNEMONIC ((sal_uInt16)0x0004)
+#define GETFOCUS_FORWARD ((sal_uInt16)0x0010)
+#define GETFOCUS_BACKWARD ((sal_uInt16)0x0020)
+#define GETFOCUS_AROUND ((sal_uInt16)0x0040)
+#define GETFOCUS_UNIQUEMNEMONIC ((sal_uInt16)0x0100)
+#define GETFOCUS_INIT ((sal_uInt16)0x0200)
+#define GETFOCUS_FLOATWIN_POPUPMODEEND_CANCEL ((sal_uInt16)0x0400)
// Draw-Flags fuer Draw()
-#define WINDOW_DRAW_MONO ((ULONG)0x00000001)
-#define WINDOW_DRAW_NOBORDER ((ULONG)0x00000002)
-#define WINDOW_DRAW_NOCONTROLS ((ULONG)0x00000004)
-#define WINDOW_DRAW_NODISABLE ((ULONG)0x00000008)
-#define WINDOW_DRAW_NOMNEMONIC ((ULONG)0x00000010)
-#define WINDOW_DRAW_NOSELECTION ((ULONG)0x00000020)
-#define WINDOW_DRAW_NOFOCUS ((ULONG)0x00000040)
-#define WINDOW_DRAW_NOBACKGROUND ((ULONG)0x00000080)
-#define WINDOW_DRAW_ROLLOVER ((ULONG)0x00000100)
+#define WINDOW_DRAW_MONO ((sal_uIntPtr)0x00000001)
+#define WINDOW_DRAW_NOBORDER ((sal_uIntPtr)0x00000002)
+#define WINDOW_DRAW_NOCONTROLS ((sal_uIntPtr)0x00000004)
+#define WINDOW_DRAW_NODISABLE ((sal_uIntPtr)0x00000008)
+#define WINDOW_DRAW_NOMNEMONIC ((sal_uIntPtr)0x00000010)
+#define WINDOW_DRAW_NOSELECTION ((sal_uIntPtr)0x00000020)
+#define WINDOW_DRAW_NOFOCUS ((sal_uIntPtr)0x00000040)
+#define WINDOW_DRAW_NOBACKGROUND ((sal_uIntPtr)0x00000080)
+#define WINDOW_DRAW_ROLLOVER ((sal_uIntPtr)0x00000100)
// Border-Styles fuer SetBorder()
-#define WINDOW_BORDER_NORMAL ((USHORT)0x0001)
-#define WINDOW_BORDER_MONO ((USHORT)0x0002)
-#define WINDOW_BORDER_ACTIVE ((USHORT)0x0004)
-#define WINDOW_BORDER_DOUBLEOUT ((USHORT)0x0008)
-#define WINDOW_BORDER_MENU ((USHORT)0x0010)
-#define WINDOW_BORDER_NOBORDER ((USHORT)0x1000)
-#define WINDOW_BORDER_REMOVEBORDER ((USHORT)0x2000)
+#define WINDOW_BORDER_NORMAL ((sal_uInt16)0x0001)
+#define WINDOW_BORDER_MONO ((sal_uInt16)0x0002)
+#define WINDOW_BORDER_ACTIVE ((sal_uInt16)0x0004)
+#define WINDOW_BORDER_DOUBLEOUT ((sal_uInt16)0x0008)
+#define WINDOW_BORDER_MENU ((sal_uInt16)0x0010)
+#define WINDOW_BORDER_NOBORDER ((sal_uInt16)0x1000)
+#define WINDOW_BORDER_REMOVEBORDER ((sal_uInt16)0x2000)
// DialogControl-Flags
-#define WINDOW_DLGCTRL_RETURN ((USHORT)0x0001)
-#define WINDOW_DLGCTRL_WANTFOCUS ((USHORT)0x0002)
-#define WINDOW_DLGCTRL_MOD1TAB ((USHORT)0x0004)
-#define WINDOW_DLGCTRL_FLOATWIN_POPUPMODEEND_CANCEL ((USHORT)0x0008)
+#define WINDOW_DLGCTRL_RETURN ((sal_uInt16)0x0001)
+#define WINDOW_DLGCTRL_WANTFOCUS ((sal_uInt16)0x0002)
+#define WINDOW_DLGCTRL_MOD1TAB ((sal_uInt16)0x0004)
+#define WINDOW_DLGCTRL_FLOATWIN_POPUPMODEEND_CANCEL ((sal_uInt16)0x0008)
// GetWindowClipRegionPixel-Flags
-#define WINDOW_GETCLIPREGION_NULL ((USHORT)0x0001)
-#define WINDOW_GETCLIPREGION_NOCHILDREN ((USHORT)0x0002)
+#define WINDOW_GETCLIPREGION_NULL ((sal_uInt16)0x0001)
+#define WINDOW_GETCLIPREGION_NOCHILDREN ((sal_uInt16)0x0002)
// EndExtTextInput-Flags
-#define EXTTEXTINPUT_END_COMPLETE ((USHORT)0x0001)
-#define EXTTEXTINPUT_END_CANCEL ((USHORT)0x0002)
+#define EXTTEXTINPUT_END_COMPLETE ((sal_uInt16)0x0001)
+#define EXTTEXTINPUT_END_CANCEL ((sal_uInt16)0x0002)
//#if 0 // _SOLAR__PRIVATE
#define IMPL_MINSIZE_BUTTON_WIDTH 70
@@ -391,7 +391,7 @@ public:
SAL_DLLPRIVATE void ImplWindowRes( const ResId& rResId );
SAL_DLLPRIVATE void ImplSetFrameParent( const Window* pParent );
SAL_DLLPRIVATE void ImplInsertWindow( Window* pParent );
- SAL_DLLPRIVATE void ImplRemoveWindow( BOOL bRemoveFrameData );
+ SAL_DLLPRIVATE void ImplRemoveWindow( sal_Bool bRemoveFrameData );
SAL_DLLPRIVATE Window* ImplGetWindow();
SAL_DLLPRIVATE ImplFrameData* ImplGetFrameData();
SAL_DLLPRIVATE SalFrame* ImplGetFrame() const;
@@ -399,26 +399,26 @@ public:
SAL_DLLPRIVATE SalGraphics* ImplGetFrameGraphics() const;
SAL_DLLPRIVATE void ImplCallFocusChangeActivate( Window* pNewOverlapWindow, Window* pOldOverlapWindow );
SAL_DLLPRIVATE Window* ImplFindWindow( const Point& rFramePos );
- SAL_DLLPRIVATE USHORT ImplHitTest( const Point& rFramePos );
+ SAL_DLLPRIVATE sal_uInt16 ImplHitTest( const Point& rFramePos );
SAL_DLLPRIVATE Window* ImplGetParent() const;
SAL_DLLPRIVATE Window* ImplGetClientWindow() const;
SAL_DLLPRIVATE Window* ImplGetBorderWindow() const;
SAL_DLLPRIVATE Window* ImplGetFirstOverlapWindow();
SAL_DLLPRIVATE const Window* ImplGetFirstOverlapWindow() const;
SAL_DLLPRIVATE Window* ImplGetFrameWindow() const;
- SAL_DLLPRIVATE BOOL ImplIsRealParentPath( const Window* pWindow ) const;
- SAL_DLLPRIVATE BOOL ImplIsChild( const Window* pWindow, BOOL bSystemWindow = FALSE ) const;
- SAL_DLLPRIVATE BOOL ImplIsWindowOrChild( const Window* pWindow, BOOL bSystemWindow = FALSE ) const;
+ SAL_DLLPRIVATE sal_Bool ImplIsRealParentPath( const Window* pWindow ) const;
+ SAL_DLLPRIVATE sal_Bool ImplIsChild( const Window* pWindow, sal_Bool bSystemWindow = sal_False ) const;
+ SAL_DLLPRIVATE sal_Bool ImplIsWindowOrChild( const Window* pWindow, sal_Bool bSystemWindow = sal_False ) const;
SAL_DLLPRIVATE Window* ImplGetSameParent( const Window* pWindow ) const;
- SAL_DLLPRIVATE BOOL ImplIsDockingWindow() const;
- SAL_DLLPRIVATE BOOL ImplIsFloatingWindow() const;
- SAL_DLLPRIVATE BOOL ImplIsToolbox() const;
- SAL_DLLPRIVATE BOOL ImplIsSplitter() const;
- SAL_DLLPRIVATE BOOL ImplIsPushButton() const;
- SAL_DLLPRIVATE BOOL ImplIsOverlapWindow() const;
- SAL_DLLPRIVATE void ImplSetActive( BOOL bActive );
- SAL_DLLPRIVATE BOOL ImplIsMouseTransparent() const;
- SAL_DLLPRIVATE void ImplSetMouseTransparent( BOOL bTransparent );
+ SAL_DLLPRIVATE sal_Bool ImplIsDockingWindow() const;
+ SAL_DLLPRIVATE sal_Bool ImplIsFloatingWindow() const;
+ SAL_DLLPRIVATE sal_Bool ImplIsToolbox() const;
+ SAL_DLLPRIVATE sal_Bool ImplIsSplitter() const;
+ SAL_DLLPRIVATE sal_Bool ImplIsPushButton() const;
+ SAL_DLLPRIVATE sal_Bool ImplIsOverlapWindow() const;
+ SAL_DLLPRIVATE void ImplSetActive( sal_Bool bActive );
+ SAL_DLLPRIVATE sal_Bool ImplIsMouseTransparent() const;
+ SAL_DLLPRIVATE void ImplSetMouseTransparent( sal_Bool bTransparent );
SAL_DLLPRIVATE int ImplTestMousePointerSet();
SAL_DLLPRIVATE PointerStyle ImplGetMousePointer() const;
SAL_DLLPRIVATE void ImplResetReallyVisible();
@@ -433,20 +433,20 @@ public:
SAL_DLLPRIVATE Point ImplFrameToOutput( const Point& rPos );
SAL_DLLPRIVATE void ImplOutputToFrame( Rectangle& rRect );
SAL_DLLPRIVATE void ImplFrameToOutput( Rectangle& rRect );
- SAL_DLLPRIVATE BOOL ImplSysObjClip( const Region* pOldRegion );
+ SAL_DLLPRIVATE sal_Bool ImplSysObjClip( const Region* pOldRegion );
SAL_DLLPRIVATE void ImplUpdateSysObjChildsClip();
SAL_DLLPRIVATE void ImplUpdateSysObjOverlapsClip();
SAL_DLLPRIVATE void ImplUpdateSysObjClip();
- SAL_DLLPRIVATE BOOL ImplSetClipFlagChilds( BOOL bSysObjOnlySmaller = FALSE );
- SAL_DLLPRIVATE BOOL ImplSetClipFlagOverlapWindows( BOOL bSysObjOnlySmaller = FALSE );
- SAL_DLLPRIVATE BOOL ImplSetClipFlag( BOOL bSysObjOnlySmaller = FALSE );
+ SAL_DLLPRIVATE sal_Bool ImplSetClipFlagChilds( sal_Bool bSysObjOnlySmaller = sal_False );
+ SAL_DLLPRIVATE sal_Bool ImplSetClipFlagOverlapWindows( sal_Bool bSysObjOnlySmaller = sal_False );
+ SAL_DLLPRIVATE sal_Bool ImplSetClipFlag( sal_Bool bSysObjOnlySmaller = sal_False );
SAL_DLLPRIVATE void ImplIntersectWindowClipRegion( Region& rRegion );
SAL_DLLPRIVATE void ImplIntersectWindowRegion( Region& rRegion );
SAL_DLLPRIVATE void ImplExcludeWindowRegion( Region& rRegion );
SAL_DLLPRIVATE void ImplExcludeOverlapWindows( Region& rRegion );
SAL_DLLPRIVATE void ImplExcludeOverlapWindows2( Region& rRegion );
- SAL_DLLPRIVATE void ImplClipBoundaries( Region& rRegion, BOOL bThis, BOOL bOverlaps );
- SAL_DLLPRIVATE BOOL ImplClipChilds( Region& rRegion );
+ SAL_DLLPRIVATE void ImplClipBoundaries( Region& rRegion, sal_Bool bThis, sal_Bool bOverlaps );
+ SAL_DLLPRIVATE sal_Bool ImplClipChilds( Region& rRegion );
SAL_DLLPRIVATE void ImplClipAllChilds( Region& rRegion );
SAL_DLLPRIVATE void ImplClipSiblings( Region& rRegion );
SAL_DLLPRIVATE void ImplInitWinClipRegion();
@@ -456,24 +456,24 @@ public:
SAL_DLLPRIVATE void ImplIntersectAndUnionOverlapWindows2( const Region& rInterRegion, Region& rRegion );
SAL_DLLPRIVATE void ImplCalcOverlapRegionOverlaps( const Region& rInterRegion, Region& rRegion );
SAL_DLLPRIVATE void ImplCalcOverlapRegion( const Rectangle& rSourceRect, Region& rRegion,
- BOOL bChilds, BOOL bParent, BOOL bSiblings );
- SAL_DLLPRIVATE void ImplCallPaint( const Region* pRegion, USHORT nPaintFlags );
+ sal_Bool bChilds, sal_Bool bParent, sal_Bool bSiblings );
+ SAL_DLLPRIVATE void ImplCallPaint( const Region* pRegion, sal_uInt16 nPaintFlags );
SAL_DLLPRIVATE void ImplCallOverlapPaint();
SAL_DLLPRIVATE void ImplPostPaint();
- SAL_DLLPRIVATE void ImplInvalidateFrameRegion( const Region* pRegion, USHORT nFlags );
+ SAL_DLLPRIVATE void ImplInvalidateFrameRegion( const Region* pRegion, sal_uInt16 nFlags );
SAL_DLLPRIVATE void ImplInvalidateOverlapFrameRegion( const Region& rRegion );
SAL_DLLPRIVATE void ImplInvalidateParentFrameRegion( Region& rRegion );
- SAL_DLLPRIVATE void ImplInvalidate( const Region* rRegion, USHORT nFlags );
- SAL_DLLPRIVATE void ImplValidateFrameRegion( const Region* rRegion, USHORT nFlags );
- SAL_DLLPRIVATE void ImplValidate( const Region* rRegion, USHORT nFlags );
- SAL_DLLPRIVATE void ImplMoveInvalidateRegion( const Rectangle& rRect, long nHorzScroll, long nVertScroll, BOOL bChilds );
- SAL_DLLPRIVATE void ImplMoveAllInvalidateRegions( const Rectangle& rRect, long nHorzScroll, long nVertScroll, BOOL bChilds );
- SAL_DLLPRIVATE void ImplScroll( const Rectangle& rRect, long nHorzScroll, long nVertScroll, USHORT nFlags );
- SAL_DLLPRIVATE void ImplUpdateAll( BOOL bOverlapWindows = TRUE );
+ SAL_DLLPRIVATE void ImplInvalidate( const Region* rRegion, sal_uInt16 nFlags );
+ SAL_DLLPRIVATE void ImplValidateFrameRegion( const Region* rRegion, sal_uInt16 nFlags );
+ SAL_DLLPRIVATE void ImplValidate( const Region* rRegion, sal_uInt16 nFlags );
+ SAL_DLLPRIVATE void ImplMoveInvalidateRegion( const Rectangle& rRect, long nHorzScroll, long nVertScroll, sal_Bool bChilds );
+ SAL_DLLPRIVATE void ImplMoveAllInvalidateRegions( const Rectangle& rRect, long nHorzScroll, long nVertScroll, sal_Bool bChilds );
+ SAL_DLLPRIVATE void ImplScroll( const Rectangle& rRect, long nHorzScroll, long nVertScroll, sal_uInt16 nFlags );
+ SAL_DLLPRIVATE void ImplUpdateAll( sal_Bool bOverlapWindows = sal_True );
SAL_DLLPRIVATE void ImplUpdateWindowPtr( Window* pWindow );
SAL_DLLPRIVATE void ImplUpdateWindowPtr();
- SAL_DLLPRIVATE void ImplUpdateOverlapWindowPtr( BOOL bNewFrame );
- SAL_DLLPRIVATE BOOL ImplUpdatePos();
+ SAL_DLLPRIVATE void ImplUpdateOverlapWindowPtr( sal_Bool bNewFrame );
+ SAL_DLLPRIVATE sal_Bool ImplUpdatePos();
SAL_DLLPRIVATE void ImplUpdateSysObjPos();
SAL_DLLPRIVATE WindowImpl* ImplGetWindowImpl() const { return mpWindowImpl; }
/** check whether a font is suitable for UI
@@ -486,38 +486,38 @@ public:
the font to be tested
@returns
- <TRUE/> if the font can be used as UI font
- <FALSE/> if the font is unsuitable as UI font
+ <sal_True/> if the font can be used as UI font
+ <sal_False/> if the font is unsuitable as UI font
*/
SAL_DLLPRIVATE bool ImplCheckUIFont( const Font& rFont );
- SAL_DLLPRIVATE void ImplUpdateGlobalSettings( AllSettings& rSettings, BOOL bCallHdl = TRUE );
+ SAL_DLLPRIVATE void ImplUpdateGlobalSettings( AllSettings& rSettings, sal_Bool bCallHdl = sal_True );
SAL_DLLPRIVATE void ImplAlignChilds();
- SAL_DLLPRIVATE void ImplPosSizeWindow( long nX, long nY, long nWidth, long nHeight, USHORT nFlags );
+ SAL_DLLPRIVATE void ImplPosSizeWindow( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags );
SAL_DLLPRIVATE void ImplToBottomChild();
SAL_DLLPRIVATE void ImplCalcToTop( ImplCalcToTopData* pPrevData );
SAL_DLLPRIVATE void ImplCalcChildOverlapToTop( ImplCalcToTopData* pPrevData );
- SAL_DLLPRIVATE void ImplToTop( USHORT nFlags );
- SAL_DLLPRIVATE void ImplStartToTop( USHORT nFlags );
- SAL_DLLPRIVATE void ImplFocusToTop( USHORT nFlags, BOOL bReallyVisible );
+ SAL_DLLPRIVATE void ImplToTop( sal_uInt16 nFlags );
+ SAL_DLLPRIVATE void ImplStartToTop( sal_uInt16 nFlags );
+ SAL_DLLPRIVATE void ImplFocusToTop( sal_uInt16 nFlags, sal_Bool bReallyVisible );
SAL_DLLPRIVATE void ImplShowAllOverlaps();
SAL_DLLPRIVATE void ImplHideAllOverlaps();
SAL_DLLPRIVATE void ImplNotifyKeyMouseCommandEventListeners( NotifyEvent& rNEvt );
- SAL_DLLPRIVATE void ImplCallMouseMove( USHORT nMouseCode, BOOL bModChanged = FALSE );
+ SAL_DLLPRIVATE void ImplCallMouseMove( sal_uInt16 nMouseCode, sal_Bool bModChanged = sal_False );
SAL_DLLPRIVATE void ImplGenerateMouseMove();
- SAL_DLLPRIVATE void ImplGrabFocus( USHORT nFlags );
+ SAL_DLLPRIVATE void ImplGrabFocus( sal_uInt16 nFlags );
SAL_DLLPRIVATE void ImplInvertFocus( const Rectangle& rRect );
- SAL_DLLPRIVATE void ImplControlFocus( USHORT nFlags = 0 );
- SAL_DLLPRIVATE Window* ImplGetDlgWindow( USHORT n, USHORT nType, USHORT nStart = 0, USHORT nEnd = 0xFFFF, USHORT* pIndex = NULL );
- SAL_DLLPRIVATE BOOL ImplDlgCtrl( const KeyEvent& rKEvt, BOOL bKeyInput );
- SAL_DLLPRIVATE BOOL ImplHasDlgCtrl();
+ SAL_DLLPRIVATE void ImplControlFocus( sal_uInt16 nFlags = 0 );
+ SAL_DLLPRIVATE Window* ImplGetDlgWindow( sal_uInt16 n, sal_uInt16 nType, sal_uInt16 nStart = 0, sal_uInt16 nEnd = 0xFFFF, sal_uInt16* pIndex = NULL );
+ SAL_DLLPRIVATE sal_Bool ImplDlgCtrl( const KeyEvent& rKEvt, sal_Bool bKeyInput );
+ SAL_DLLPRIVATE sal_Bool ImplHasDlgCtrl();
SAL_DLLPRIVATE void ImplDlgCtrlNextWindow();
- SAL_DLLPRIVATE void ImplDlgCtrlFocusChanged( Window* pWindow, BOOL bGetFocus );
+ SAL_DLLPRIVATE void ImplDlgCtrlFocusChanged( Window* pWindow, sal_Bool bGetFocus );
SAL_DLLPRIVATE Window* ImplFindDlgCtrlWindow( Window* pWindow );
SAL_DLLPRIVATE long ImplLogicUnitToPixelX( long nX, MapUnit eUnit );
SAL_DLLPRIVATE long ImplLogicUnitToPixelY( long nY, MapUnit eUnit );
- SAL_DLLPRIVATE BOOL ImplIsWindowInFront( const Window* pTestWindow ) const;
+ SAL_DLLPRIVATE sal_Bool ImplIsWindowInFront( const Window* pTestWindow ) const;
SAL_DLLPRIVATE void ImplSaveOverlapBackground();
- SAL_DLLPRIVATE BOOL ImplRestoreOverlapBackground( Region& rInvRegion );
+ SAL_DLLPRIVATE sal_Bool ImplRestoreOverlapBackground( Region& rInvRegion );
SAL_DLLPRIVATE void ImplDeleteOverlapBackground();
SAL_DLLPRIVATE void ImplInvalidateAllOverlapBackgrounds();
SAL_DLLPRIVATE static void ImplNewInputContext();
@@ -533,12 +533,12 @@ public:
SAL_DLLPRIVATE static void ImplCalcSymbolRect( Rectangle& rRect );
SAL_DLLPRIVATE void ImplHandleScroll( ScrollBar* pHScrl, long nX, ScrollBar* pVScrl, long nY );
- SAL_DLLPRIVATE BOOL ImplGetCurrentBackgroundColor( Color& rCol );
- SAL_DLLPRIVATE BOOL ImplIsAccessibleCandidate() const;
- SAL_DLLPRIVATE BOOL ImplIsAccessibleNativeFrame() const;
- SAL_DLLPRIVATE USHORT ImplGetAccessibleCandidateChildWindowCount( USHORT nFirstWindowType ) const;
- SAL_DLLPRIVATE Window* ImplGetAccessibleCandidateChild( USHORT nChild, USHORT& rChildCount, USHORT nFirstWindowType, BOOL bTopLevel = TRUE ) const;
- SAL_DLLPRIVATE BOOL ImplRegisterAccessibleNativeFrame();
+ SAL_DLLPRIVATE sal_Bool ImplGetCurrentBackgroundColor( Color& rCol );
+ SAL_DLLPRIVATE sal_Bool ImplIsAccessibleCandidate() const;
+ SAL_DLLPRIVATE sal_Bool ImplIsAccessibleNativeFrame() const;
+ SAL_DLLPRIVATE sal_uInt16 ImplGetAccessibleCandidateChildWindowCount( sal_uInt16 nFirstWindowType ) const;
+ SAL_DLLPRIVATE Window* ImplGetAccessibleCandidateChild( sal_uInt16 nChild, sal_uInt16& rChildCount, sal_uInt16 nFirstWindowType, sal_Bool bTopLevel = sal_True ) const;
+ SAL_DLLPRIVATE sal_Bool ImplRegisterAccessibleNativeFrame();
SAL_DLLPRIVATE void ImplRevokeAccessibleNativeFrame();
SAL_DLLPRIVATE void ImplCallResize();
SAL_DLLPRIVATE void ImplCallMove();
@@ -552,16 +552,16 @@ public:
SAL_DLLPRIVATE ::std::vector<Window *>& ImplGetOwnerDrawList();
SAL_DLLPRIVATE Window* ImplGetTopmostFrameWindow();
- SAL_DLLPRIVATE Rectangle ImplGetWindowExtentsRelative( Window *pRelativeWindow, BOOL bClientOnly ) const;
- SAL_DLLPRIVATE void ImplNotifyIconifiedState( BOOL bIconified );
+ SAL_DLLPRIVATE Rectangle ImplGetWindowExtentsRelative( Window *pRelativeWindow, sal_Bool bClientOnly ) const;
+ SAL_DLLPRIVATE void ImplNotifyIconifiedState( sal_Bool bIconified );
SAL_DLLPRIVATE bool ImplStopDnd();
SAL_DLLPRIVATE void ImplStartDnd();
SAL_DLLPRIVATE static void ImplInitAppFontData( Window* pWindow );
SAL_DLLPRIVATE void ImplPaintToDevice( OutputDevice* pTargetOutDev, const Point& rPos );
- SAL_DLLPRIVATE BOOL ImplIsInTaskPaneList();
- SAL_DLLPRIVATE void ImplIsInTaskPaneList( BOOL mbIsInTaskList );
+ SAL_DLLPRIVATE sal_Bool ImplIsInTaskPaneList();
+ SAL_DLLPRIVATE void ImplIsInTaskPaneList( sal_Bool mbIsInTaskList );
SAL_DLLPRIVATE ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCanvas >
ImplGetCanvas( const Size& rFullscreenSize, bool bFullscreen, bool bSpriteCanvas ) const;
@@ -577,10 +577,10 @@ protected:
// Single argument ctors shall be explicit.
explicit Window( WindowType nType );
- void SetCompoundControl( BOOL bCompound );
+ void SetCompoundControl( sal_Bool bCompound );
- void ImplCallEventListeners( ULONG nEvent, void* pData = NULL );
- void CallEventListeners( ULONG nEvent, void* pData = NULL );
+ void ImplCallEventListeners( sal_uIntPtr nEvent, void* pData = NULL );
+ void CallEventListeners( sal_uIntPtr nEvent, void* pData = NULL );
void FireVclEvent( VclSimpleEvent* pEvent );
// FIXME: this is a hack to workaround missing layout functionality
@@ -599,7 +599,7 @@ public:
virtual void KeyUp( const KeyEvent& rKEvt );
virtual void PrePaint();
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_uIntPtr nFlags );
virtual void Move();
virtual void Resize();
virtual void Activate();
@@ -609,7 +609,7 @@ public:
virtual void RequestHelp( const HelpEvent& rHEvt );
virtual void Command( const CommandEvent& rCEvt );
virtual void Tracking( const TrackingEvent& rTEvt );
- virtual void UserEvent( ULONG nEvent, void* pEventData );
+ virtual void UserEvent( sal_uIntPtr nEvent, void* pEventData );
virtual void StateChanged( StateChangedType nStateChange );
virtual void DataChanged( const DataChangedEvent& rDCEvt );
virtual long PreNotify( NotifyEvent& rNEvt );
@@ -621,16 +621,16 @@ public:
/*virtual*/ void AddChildEventListener( const Link& rEventListener );
/*virtual*/ void RemoveChildEventListener( const Link& rEventListener );
- ULONG PostUserEvent( ULONG nEvent, void* pEventData = NULL );
- ULONG PostUserEvent( const Link& rLink, void* pCaller = NULL );
- BOOL PostUserEvent( ULONG& rEventId, ULONG nEvent, void* pEventData = NULL );
- BOOL PostUserEvent( ULONG& rEventId, const Link& rLink, void* pCaller = NULL );
- void RemoveUserEvent( ULONG nUserEvent );
+ sal_uIntPtr PostUserEvent( sal_uIntPtr nEvent, void* pEventData = NULL );
+ sal_uIntPtr PostUserEvent( const Link& rLink, void* pCaller = NULL );
+ sal_Bool PostUserEvent( sal_uIntPtr& rEventId, sal_uIntPtr nEvent, void* pEventData = NULL );
+ sal_Bool PostUserEvent( sal_uIntPtr& rEventId, const Link& rLink, void* pCaller = NULL );
+ void RemoveUserEvent( sal_uIntPtr nUserEvent );
void PostStateChanged( StateChangedType nState );
void IncrementLockCount();
void DecrementLockCount();
- BOOL IsLocked( BOOL bChilds = FALSE ) const;
+ sal_Bool IsLocked( sal_Bool bChilds = sal_False ) const;
// returns the input language used for the last key stroke
// may be LANGUAGE_DONTKNOW if not supported by the OS
@@ -644,64 +644,64 @@ public:
WinBits GetPrevExtendedStyle() const;
void SetType( WindowType nType );
WindowType GetType() const;
- BOOL IsSystemWindow() const;
- BOOL IsDialog() const;
- BOOL IsMenuFloatingWindow() const;
- BOOL IsToolbarFloatingWindow() const;
- BOOL IsTopWindow() const;
+ sal_Bool IsSystemWindow() const;
+ sal_Bool IsDialog() const;
+ sal_Bool IsMenuFloatingWindow() const;
+ sal_Bool IsToolbarFloatingWindow() const;
+ sal_Bool IsTopWindow() const;
SystemWindow* GetSystemWindow() const;
- void EnableAllResize( BOOL bEnable = TRUE );
- BOOL IsAllResizeEnabled() const;
+ void EnableAllResize( sal_Bool bEnable = sal_True );
+ sal_Bool IsAllResizeEnabled() const;
- void SetBorderStyle( USHORT nBorderStyle );
- USHORT GetBorderStyle() const;
+ void SetBorderStyle( sal_uInt16 nBorderStyle );
+ sal_uInt16 GetBorderStyle() const;
void GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder,
sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const;
Size CalcWindowSize( const Size& rOutSz ) const;
Size CalcOutputSize( const Size& rWinSz ) const;
long CalcTitleWidth() const;
- void EnableClipSiblings( BOOL bClipSiblings = TRUE );
- BOOL IsClipSiblingsEnabled() const;
+ void EnableClipSiblings( sal_Bool bClipSiblings = sal_True );
+ sal_Bool IsClipSiblingsEnabled() const;
- void EnableChildTransparentMode( BOOL bEnable = TRUE );
- BOOL IsChildTransparentModeEnabled() const;
+ void EnableChildTransparentMode( sal_Bool bEnable = sal_True );
+ sal_Bool IsChildTransparentModeEnabled() const;
- void SetMouseTransparent( BOOL bTransparent );
- BOOL IsMouseTransparent() const;
- void SetPaintTransparent( BOOL bTransparent );
- BOOL IsPaintTransparent() const;
- void SetDialogControlStart( BOOL bStart );
- BOOL IsDialogControlStart() const;
- void SetDialogControlFlags( USHORT nFlags );
- USHORT GetDialogControlFlags() const;
+ void SetMouseTransparent( sal_Bool bTransparent );
+ sal_Bool IsMouseTransparent() const;
+ void SetPaintTransparent( sal_Bool bTransparent );
+ sal_Bool IsPaintTransparent() const;
+ void SetDialogControlStart( sal_Bool bStart );
+ sal_Bool IsDialogControlStart() const;
+ void SetDialogControlFlags( sal_uInt16 nFlags );
+ sal_uInt16 GetDialogControlFlags() const;
struct PointerState
{
- ULONG mnState; // the button state
+ sal_uIntPtr mnState; // the button state
Point maPos; // mouse position in output coordinates
};
PointerState GetPointerState();
- BOOL IsMouseOver();
+ sal_Bool IsMouseOver();
- ULONG GetCurrentModButtons();
+ sal_uIntPtr GetCurrentModButtons();
void SetInputContext( const InputContext& rInputContext );
const InputContext& GetInputContext() const;
- void EndExtTextInput( USHORT nFlags );
- BOOL IsExtTextInput() const;
+ void EndExtTextInput( sal_uInt16 nFlags );
+ sal_Bool IsExtTextInput() const;
void SetCursorRect( const Rectangle* pRect = NULL, long nExtTextInputWidth = 0 );
const Rectangle* GetCursorRect() const;
long GetCursorExtTextInputWidth() const;
- void EnableChildNotify( BOOL bEnable );
- BOOL IsChildNotify() const;
+ void EnableChildNotify( sal_Bool bEnable );
+ sal_Bool IsChildNotify() const;
using OutputDevice::SetSettings;
virtual void SetSettings( const AllSettings& rSettings );
- virtual void SetSettings( const AllSettings& rSettings, BOOL bChild );
- void UpdateSettings( const AllSettings& rSettings, BOOL bChild = FALSE );
+ virtual void SetSettings( const AllSettings& rSettings, sal_Bool bChild );
+ void UpdateSettings( const AllSettings& rSettings, sal_Bool bChild = sal_False );
void NotifyAllChilds( DataChangedEvent& rDCEvt );
void SetPointFont( const Font& rFont );
@@ -714,26 +714,26 @@ public:
void SetControlFont();
void SetControlFont( const Font& rFont );
Font GetControlFont() const;
- BOOL IsControlFont() const;
+ sal_Bool IsControlFont() const;
void SetControlForeground();
void SetControlForeground( const Color& rColor );
Color GetControlForeground() const;
- BOOL IsControlForeground() const;
+ sal_Bool IsControlForeground() const;
void SetControlBackground();
void SetControlBackground( const Color& rColor );
Color GetControlBackground() const;
- BOOL IsControlBackground() const;
+ sal_Bool IsControlBackground() const;
- void SetParentClipMode( USHORT nMode = 0 );
- USHORT GetParentClipMode() const;
+ void SetParentClipMode( sal_uInt16 nMode = 0 );
+ sal_uInt16 GetParentClipMode() const;
void SetWindowRegionPixel();
void SetWindowRegionPixel( const Region& rRegion );
const Region& GetWindowRegionPixel() const;
- BOOL IsWindowRegionPixel() const;
- Region GetWindowClipRegionPixel( USHORT nFlags = 0 ) const;
+ sal_Bool IsWindowRegionPixel() const;
+ Region GetWindowClipRegionPixel( sal_uInt16 nFlags = 0 ) const;
Region GetPaintRegion() const;
- BOOL IsInPaint() const;
+ sal_Bool IsInPaint() const;
// while IsInPaint returns true ExpandPaintClipRegion adds the
// submitted region to the paint clip region so you can
// paint additional parts of your window if necessary
@@ -742,23 +742,23 @@ public:
void SetParent( Window* pNewParent );
Window* GetParent() const;
- void Show( BOOL bVisible = TRUE, USHORT nFlags = 0 );
- void Hide( USHORT nFlags = 0 ) { Show( FALSE, nFlags ); }
- BOOL IsVisible() const;
- BOOL IsReallyVisible() const;
+ void Show( sal_Bool bVisible = sal_True, sal_uInt16 nFlags = 0 );
+ void Hide( sal_uInt16 nFlags = 0 ) { Show( sal_False, nFlags ); }
+ sal_Bool IsVisible() const;
+ sal_Bool IsReallyVisible() const;
// Do not use this function, use IsReallyVisible()
- BOOL IsParentPathVisible() const;
- BOOL IsReallyShown() const;
- BOOL IsInInitShow() const;
+ sal_Bool IsParentPathVisible() const;
+ sal_Bool IsReallyShown() const;
+ sal_Bool IsInInitShow() const;
void Enable( bool bEnable = true, bool bChild = true );
void Disable( bool bChild = true ) { Enable( false, bChild ); }
- BOOL IsEnabled() const;
+ sal_Bool IsEnabled() const;
- void EnableInput( BOOL bEnable = TRUE, BOOL bChild = TRUE );
- void EnableInput( BOOL bEnable, BOOL bChild, BOOL bSysWin,
+ void EnableInput( sal_Bool bEnable = sal_True, sal_Bool bChild = sal_True );
+ void EnableInput( sal_Bool bEnable, sal_Bool bChild, sal_Bool bSysWin,
const Window* pExcludeWindow = NULL );
- BOOL IsInputEnabled() const;
+ sal_Bool IsInputEnabled() const;
/** Override <code>EnableInput</code>. This can be necessary due to other people
using EnableInput for whole window hierarchies.
@@ -772,12 +772,12 @@ public:
@param bChild
if true children are recursively set to AlwaysEnableInput
*/
- void AlwaysEnableInput( BOOL bAlways, BOOL bChild = TRUE );
+ void AlwaysEnableInput( sal_Bool bAlways, sal_Bool bChild = sal_True );
/** returns the current AlwaysEnableInput state
@return
true if window is in AlwaysEnableInput state
*/
- BOOL IsAlwaysEnableInput() const;
+ sal_Bool IsAlwaysEnableInput() const;
/** Override <code>EnableInput</code>, counterpart to AlwaysEnableInput.
Windows with AlwaysDisableInput will not get key events even if enabled
and input enabled.This can be necessary due to other people using EnableInput
@@ -792,12 +792,12 @@ public:
@param bChild
if true children are recursively set to AlwaysDisableInput
*/
- void AlwaysDisableInput( BOOL bAlways, BOOL bChild = TRUE );
+ void AlwaysDisableInput( sal_Bool bAlways, sal_Bool bChild = sal_True );
/** returns the current AlwaysDisableInput state
@return
true if window is in AlwaysEnableInput state
*/
- BOOL IsAlwaysDisableInput() const;
+ sal_Bool IsAlwaysDisableInput() const;
/** usually event handlers (see AddEventListener and AddChildEventListener)
are not called on disabled, modal or input disabled windows. There are however rare cases
in which one wants a Window or rather one of its Control subclasses to
@@ -823,21 +823,21 @@ public:
/** A window is in modal mode if one of its children or subchildren
is a running modal window (a modal dialog)
- @returns TRUE if a child or subchild is a running modal window
+ @returns sal_True if a child or subchild is a running modal window
*/
- BOOL IsInModalMode() const;
+ sal_Bool IsInModalMode() const;
- void SetActivateMode( USHORT nMode );
- USHORT GetActivateMode() const;
+ void SetActivateMode( sal_uInt16 nMode );
+ sal_uInt16 GetActivateMode() const;
- void ToTop( USHORT nFlags = 0 );
- void SetZOrder( Window* pRefWindow, USHORT nFlags );
- void EnableAlwaysOnTop( BOOL bEnable = TRUE );
- BOOL IsAlwaysOnTopEnabled() const;
+ void ToTop( sal_uInt16 nFlags = 0 );
+ void SetZOrder( Window* pRefWindow, sal_uInt16 nFlags );
+ void EnableAlwaysOnTop( sal_Bool bEnable = sal_True );
+ sal_Bool IsAlwaysOnTopEnabled() const;
virtual void SetPosSizePixel( long nX, long nY,
long nWidth, long nHeight,
- USHORT nFlags = WINDOW_POSSIZE_ALL );
+ sal_uInt16 nFlags = WINDOW_POSSIZE_ALL );
virtual void SetPosPixel( const Point& rNewPos );
virtual Point GetPosPixel() const;
virtual void SetSizePixel( const Size& rNewSize );
@@ -845,8 +845,8 @@ public:
virtual void SetPosSizePixel( const Point& rNewPos,
const Size& rNewSize );
virtual void SetOutputSizePixel( const Size& rNewSize );
- BOOL IsDefaultPos() const;
- BOOL IsDefaultSize() const;
+ sal_Bool IsDefaultPos() const;
+ sal_Bool IsDefaultSize() const;
// those conversion routines might deliver different results during UI mirroring
Point OutputToScreenPixel( const Point& rPos ) const;
@@ -862,40 +862,40 @@ public:
// window extents of the client window, coordinates to be used in SetPosPixel
Rectangle GetClientWindowExtentsRelative( Window *pRelativeWindow ) const;
- virtual BOOL IsScrollable() const;
+ virtual sal_Bool IsScrollable() const;
virtual void Scroll( long nHorzScroll, long nVertScroll,
- USHORT nFlags = 0 );
+ sal_uInt16 nFlags = 0 );
virtual void Scroll( long nHorzScroll, long nVertScroll,
- const Rectangle& rRect, USHORT nFlags = 0 );
- virtual void Invalidate( USHORT nFlags = 0 );
- virtual void Invalidate( const Rectangle& rRect, USHORT nFlags = 0 );
- virtual void Invalidate( const Region& rRegion, USHORT nFlags = 0 );
- void Validate( USHORT nFlags = 0 );
- void Validate( const Rectangle& rRect, USHORT nFlags = 0 );
- void Validate( const Region& rRegion, USHORT nFlags = 0 );
- BOOL HasPaintEvent() const;
+ const Rectangle& rRect, sal_uInt16 nFlags = 0 );
+ virtual void Invalidate( sal_uInt16 nFlags = 0 );
+ virtual void Invalidate( const Rectangle& rRect, sal_uInt16 nFlags = 0 );
+ virtual void Invalidate( const Region& rRegion, sal_uInt16 nFlags = 0 );
+ void Validate( sal_uInt16 nFlags = 0 );
+ void Validate( const Rectangle& rRect, sal_uInt16 nFlags = 0 );
+ void Validate( const Region& rRegion, sal_uInt16 nFlags = 0 );
+ sal_Bool HasPaintEvent() const;
void Update();
void Flush();
void Sync();
// toggles new docking support, enabled via toolkit
- void EnableDocking( BOOL bEnable = TRUE );
+ void EnableDocking( sal_Bool bEnable = sal_True );
// retrieves the single dockingmanager instance
static DockingManager* GetDockingManager();
- void EnablePaint( BOOL bEnable );
- BOOL IsPaintEnabled() const;
- void SetUpdateMode( BOOL bUpdate );
- BOOL IsUpdateMode() const;
- void SetParentUpdateMode( BOOL bUpdate );
- BOOL IsParentUpdateMode() const;
+ void EnablePaint( sal_Bool bEnable );
+ sal_Bool IsPaintEnabled() const;
+ void SetUpdateMode( sal_Bool bUpdate );
+ sal_Bool IsUpdateMode() const;
+ void SetParentUpdateMode( sal_Bool bUpdate );
+ sal_Bool IsParentUpdateMode() const;
void GrabFocus();
- BOOL HasFocus() const;
- BOOL HasChildPathFocus( BOOL bSystemWindow = FALSE ) const;
- BOOL IsActive() const;
- BOOL HasActiveChildFrame();
- USHORT GetGetFocusFlags() const;
+ sal_Bool HasFocus() const;
+ sal_Bool HasChildPathFocus( sal_Bool bSystemWindow = sal_False ) const;
+ sal_Bool IsActive() const;
+ sal_Bool HasActiveChildFrame();
+ sal_uInt16 GetGetFocusFlags() const;
void GrabFocusToDocument();
/**
@@ -905,35 +905,35 @@ public:
*/
void SetFakeFocus( bool bFocus );
- BOOL IsCompoundControl() const;
- BOOL HasCompoundControlFocus() const;
+ sal_Bool IsCompoundControl() const;
+ sal_Bool HasCompoundControlFocus() const;
static sal_uIntPtr SaveFocus();
- static BOOL EndSaveFocus( sal_uIntPtr nSaveId, BOOL bRestore = TRUE );
+ static sal_Bool EndSaveFocus( sal_uIntPtr nSaveId, sal_Bool bRestore = sal_True );
void CaptureMouse();
void ReleaseMouse();
- BOOL IsMouseCaptured() const;
+ sal_Bool IsMouseCaptured() const;
void SetPointer( const Pointer& rPointer );
const Pointer& GetPointer() const;
- void EnableChildPointerOverwrite( BOOL bOverwrite = TRUE );
- BOOL IsChildPointerOverwrite() const;
+ void EnableChildPointerOverwrite( sal_Bool bOverwrite = sal_True );
+ sal_Bool IsChildPointerOverwrite() const;
void SetPointerPosPixel( const Point& rPos );
Point GetPointerPosPixel();
Point GetLastPointerPosPixel();
- void ShowPointer( BOOL bVisible );
- BOOL IsPointerVisible() const;
+ void ShowPointer( sal_Bool bVisible );
+ sal_Bool IsPointerVisible() const;
void EnterWait();
void LeaveWait();
- BOOL IsWait() const;
+ sal_Bool IsWait() const;
void SetCursor( Cursor* pCursor );
Cursor* GetCursor() const;
void SetZoom( const Fraction& rZoom );
const Fraction& GetZoom() const;
- BOOL IsZoom() const;
+ sal_Bool IsZoom() const;
long CalcZoom( long n ) const;
virtual void SetText( const XubString& rStr );
@@ -953,61 +953,61 @@ public:
void SetQuickHelpText( const XubString& rHelpText );
const XubString& GetQuickHelpText() const;
- void SetHelpId( ULONG nHelpId ); /// deprecated
- ULONG GetHelpId() const; /// deprecated
+ void SetHelpId( sal_uIntPtr nHelpId ); /// deprecated
+ sal_uIntPtr GetHelpId() const; /// deprecated
void SetSmartHelpId( const SmartId& aId, SmartIdUpdateMode aMode = SMART_SET_SMART );
SmartId GetSmartHelpId() const;
- void SetUniqueId( ULONG nUniqueId ); /// deprecated
- ULONG GetUniqueId() const; /// deprecated
+ void SetUniqueId( sal_uIntPtr nUniqueId ); /// deprecated
+ sal_uIntPtr GetUniqueId() const; /// deprecated
void SetSmartUniqueId( const SmartId& aId, SmartIdUpdateMode aMode = SMART_SET_SMART );
SmartId GetSmartUniqueId() const;
SmartId GetSmartUniqueOrHelpId() const;
Window* FindWindow( const Point& rPos ) const;
- USHORT GetChildCount() const;
- Window* GetChild( USHORT nChild ) const;
- Window* GetWindow( USHORT nType ) const;
- BOOL IsChild( const Window* pWindow, BOOL bSystemWindow = FALSE ) const;
- BOOL IsWindowOrChild( const Window* pWindow, BOOL bSystemWindow = FALSE ) const;
+ sal_uInt16 GetChildCount() const;
+ Window* GetChild( sal_uInt16 nChild ) const;
+ Window* GetWindow( sal_uInt16 nType ) const;
+ sal_Bool IsChild( const Window* pWindow, sal_Bool bSystemWindow = sal_False ) const;
+ sal_Bool IsWindowOrChild( const Window* pWindow, sal_Bool bSystemWindow = sal_False ) const;
void SetData( void* pNewData );
void* GetData() const;
// Should be merged in the next top level build !!!
- Bitmap SnapShot( BOOL bBorder ) const;
+ Bitmap SnapShot( sal_Bool bBorder ) const;
Bitmap SnapShot() const;
void ShowFocus( const Rectangle& rRect );
void HideFocus();
- void Invert( const Rectangle& rRect, USHORT nFlags = 0 );
- void Invert( const Polygon& rPoly, USHORT nFlags = 0 );
+ void Invert( const Rectangle& rRect, sal_uInt16 nFlags = 0 );
+ void Invert( const Polygon& rPoly, sal_uInt16 nFlags = 0 );
// transparent background for selected or checked items in toolboxes etc.
- void DrawSelectionBackground( const Rectangle& rRect, USHORT highlight, BOOL bChecked, BOOL bDrawBorder, BOOL bDrawExtBorderOnly );
+ void DrawSelectionBackground( const Rectangle& rRect, sal_uInt16 highlight, sal_Bool bChecked, sal_Bool bDrawBorder, sal_Bool bDrawExtBorderOnly );
// the same, but fills a passed Color with a text color complementing the selection background
- void DrawSelectionBackground( const Rectangle& rRect, USHORT highlight, BOOL bChecked, BOOL bDrawBorder, BOOL bDrawExtBorderOnly, Color* pSelectionTextColor );
+ void DrawSelectionBackground( const Rectangle& rRect, sal_uInt16 highlight, sal_Bool bChecked, sal_Bool bDrawBorder, sal_Bool bDrawExtBorderOnly, Color* pSelectionTextColor );
// support rounded edges in the selection rect
- void DrawSelectionBackground( const Rectangle& rRect, USHORT highlight, BOOL bChecked, BOOL bDrawBorder, BOOL bDrawExtBorderOnly, long nCornerRadius, Color* pSelectionTextColor, Color* pPaintColor );
+ void DrawSelectionBackground( const Rectangle& rRect, sal_uInt16 highlight, sal_Bool bChecked, sal_Bool bDrawBorder, sal_Bool bDrawExtBorderOnly, long nCornerRadius, Color* pSelectionTextColor, Color* pPaintColor );
void ShowTracking( const Rectangle& rRect,
- USHORT nFlags = SHOWTRACK_SMALL );
+ sal_uInt16 nFlags = SHOWTRACK_SMALL );
void HideTracking();
void InvertTracking( const Rectangle& rRect,
- USHORT nFlags = SHOWTRACK_SMALL );
- void InvertTracking( const Polygon& rPoly, USHORT nFlags = 0 );
+ sal_uInt16 nFlags = SHOWTRACK_SMALL );
+ void InvertTracking( const Polygon& rPoly, sal_uInt16 nFlags = 0 );
- void StartTracking( USHORT nFlags = 0 );
- void EndTracking( USHORT nFlags = 0 );
- BOOL IsTracking() const;
+ void StartTracking( sal_uInt16 nFlags = 0 );
+ void EndTracking( sal_uInt16 nFlags = 0 );
+ sal_Bool IsTracking() const;
- void StartAutoScroll( USHORT nFlags );
+ void StartAutoScroll( sal_uInt16 nFlags );
void EndAutoScroll();
- BOOL IsAutoScroll() const;
+ sal_Bool IsAutoScroll() const;
- BOOL HandleScrollCommand( const CommandEvent& rCmd,
+ sal_Bool HandleScrollCommand( const CommandEvent& rCmd,
ScrollBar* pHScrl = NULL,
ScrollBar* pVScrl = NULL );
@@ -1018,20 +1018,20 @@ public:
::com::sun::star::uno::Any GetSystemDataAny() const;
// API zum Setzen/Abfragen des Komponenteninterfaces
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > GetComponentInterface( BOOL bCreate = TRUE );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > GetComponentInterface( sal_Bool bCreate = sal_True );
virtual void SetComponentInterface( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > xIFace );
// Accessibility
- ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > GetAccessible( BOOL bCreate = TRUE );
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > GetAccessible( sal_Bool bCreate = sal_True );
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
void SetAccessible( ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > );
Window* GetAccessibleParentWindow() const;
- USHORT GetAccessibleChildWindowCount();
- Window* GetAccessibleChildWindow( USHORT n );
+ sal_uInt16 GetAccessibleChildWindowCount();
+ Window* GetAccessibleChildWindow( sal_uInt16 n );
- void SetAccessibleRole( USHORT nRole );
- USHORT GetAccessibleRole() const;
+ void SetAccessibleRole( sal_uInt16 nRole );
+ sal_uInt16 GetAccessibleRole() const;
void SetAccessibleName( const String& rName );
String GetAccessibleName() const;
@@ -1041,7 +1041,7 @@ public:
// to avoid sending accessibility events in cases like closing dialogs
// by default checks complete parent path
- BOOL IsAccessibilityEventsSuppressed( BOOL bTraverseParentPath = TRUE );
+ sal_Bool IsAccessibilityEventsSuppressed( sal_Bool bTraverseParentPath = sal_True );
/// request XCanvas render interface for this window
::com::sun::star::uno::Reference<
@@ -1063,8 +1063,8 @@ public:
void SetWindowPeer( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > xPeer, VCLXWindow* pVCLXWindow );
// Merken, ob vom Toolkit erzeugt
- BOOL IsCreatedWithToolkit() const;
- void SetCreatedWithToolkit( BOOL b );
+ sal_Bool IsCreatedWithToolkit() const;
+ void SetCreatedWithToolkit( sal_Bool b );
Window* GetLabelFor() const;
Window* GetLabeledBy() const;
@@ -1091,8 +1091,8 @@ public:
//-------------------------------------
// form controls must never use native widgets, this can be toggled here
- void EnableNativeWidget( BOOL bEnable = TRUE );
- BOOL IsNativeWidgetEnabled() const;
+ void EnableNativeWidget( sal_Bool bEnable = sal_True );
+ sal_Bool IsNativeWidgetEnabled() const;
// a helper method for a Control's Draw method
void PaintToDevice( OutputDevice* pDevice, const Point& rPos, const Size& rSize );
diff --git a/vcl/inc/vcl/wrkwin.hxx b/vcl/inc/vcl/wrkwin.hxx
index c710434c79a4..f41dab25ea58 100644
--- a/vcl/inc/vcl/wrkwin.hxx
+++ b/vcl/inc/vcl/wrkwin.hxx
@@ -40,9 +40,9 @@ struct SystemParentData;
// ----------------------
// Presentation Flags
-#define PRESENTATION_HIDEALLAPPS ((USHORT)0x0001)
-#define PRESENTATION_NOFULLSCREEN ((USHORT)0x0002)
-#define PRESENTATION_NOAUTOSHOW ((USHORT)0x0004)
+#define PRESENTATION_HIDEALLAPPS ((sal_uInt16)0x0001)
+#define PRESENTATION_NOFULLSCREEN ((sal_uInt16)0x0002)
+#define PRESENTATION_NOAUTOSHOW ((sal_uInt16)0x0004)
// --------------
// - WorkWindow -
@@ -51,8 +51,8 @@ struct SystemParentData;
class VCL_DLLPUBLIC WorkWindow : public SystemWindow
{
private:
- USHORT mnPresentationFlags;
- BOOL mbPresentationMode:1,
+ sal_uInt16 mnPresentationFlags;
+ sal_Bool mbPresentationMode:1,
mbPresentationVisible:1,
mbPresentationFull:1,
mbFullScreenMode:1;
@@ -68,7 +68,7 @@ protected:
WorkWindow( WindowType nType );
SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSystemParentData = NULL );
SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
- SAL_DLLPRIVATE void ImplSetFrameState( ULONG aFrameState );
+ SAL_DLLPRIVATE void ImplSetFrameState( sal_uIntPtr aFrameState );
public:
WorkWindow( Window* pParent, const ResId& rResId );
@@ -77,7 +77,7 @@ public:
WorkWindow( SystemParentData* pParent ); // Not in the REMOTE-Version
~WorkWindow();
- virtual BOOL Close();
+ virtual sal_Bool Close();
/** The default value of nDisplay = -1 means "don't care" and
allows to backends to use any screen [** or display? terminology!]
@@ -86,23 +86,23 @@ public:
NOTE: The default value cannot be 0, because 0 is a legitimate
screen number.
*/
- void ShowFullScreenMode( BOOL bFullScreenMode = TRUE, sal_Int32 nDisplay = -1 );
- void EndFullScreenMode() { ShowFullScreenMode( FALSE ); }
- BOOL IsFullScreenMode() const { return mbFullScreenMode; }
+ void ShowFullScreenMode( sal_Bool bFullScreenMode = sal_True, sal_Int32 nDisplay = -1 );
+ void EndFullScreenMode() { ShowFullScreenMode( sal_False ); }
+ sal_Bool IsFullScreenMode() const { return mbFullScreenMode; }
- void StartPresentationMode( BOOL bPresentation = TRUE, USHORT nFlags = 0, sal_Int32 nDisplay = 0 );
- void EndPresentationMode() { StartPresentationMode( FALSE ); }
- BOOL IsPresentationMode() const { return mbPresentationMode; }
+ void StartPresentationMode( sal_Bool bPresentation = sal_True, sal_uInt16 nFlags = 0, sal_Int32 nDisplay = 0 );
+ void EndPresentationMode() { StartPresentationMode( sal_False ); }
+ sal_Bool IsPresentationMode() const { return mbPresentationMode; }
- BOOL IsMinimized() const;
+ sal_Bool IsMinimized() const;
- BOOL SetPluginParent( SystemParentData* pParent );
+ sal_Bool SetPluginParent( SystemParentData* pParent );
void Minimize();
void Restore();
- void Maximize( BOOL bMaximize = TRUE );
- BOOL IsMaximized() const;
+ void Maximize( sal_Bool bMaximize = sal_True );
+ sal_Bool IsMaximized() const;
};
#endif // _SV_WRKWIN_HXX
diff --git a/vcl/source/app/dbggui.cxx b/vcl/source/app/dbggui.cxx
index dd9a5b4a15ee..62fcb136765d 100644
--- a/vcl/source/app/dbggui.cxx
+++ b/vcl/source/app/dbggui.cxx
@@ -410,7 +410,7 @@ static const sal_Char* pDbgHelpText[] =
" //...\n",
"}\n",
"\n",
-"char& String::operator [] ( USHORT nIndex )\n",
+"char& String::operator [] ( sal_uInt16 nIndex )\n",
"{\n",
" DBG_CHKTHIS( String, DbgCheckString );\n",
" DBG_ASSERT( nIndex <= pData->nLen, \"String::[] : nIndex > Len\" );\n",
@@ -418,7 +418,7 @@ static const sal_Char* pDbgHelpText[] =
" //...\n",
"}\n",
"\n",
-"USHORT String::Search( const String& rStr, USHORT nIndex ) const\n",
+"sal_uInt16 String::Search( const String& rStr, sal_uInt16 nIndex ) const\n",
"{\n",
" DBG_CHKTHIS( String, DbgCheckString );\n",
" DBG_CHKOBJ( &rStr, String, DbgCheckString );\n",
@@ -450,19 +450,19 @@ namespace
++channel
)
{
- USHORT nEntryPos = rList.InsertEntry( channel->first );
+ sal_uInt16 nEntryPos = rList.InsertEntry( channel->first );
rList.SetEntryData( nEntryPos, reinterpret_cast< void* >( channel->second ) );
}
}
// -------------------------------------------------------------------
- void ImplSelectChannel( ListBox& rList, ULONG nChannelToSelect, USHORT nPositionOffset )
+ void ImplSelectChannel( ListBox& rList, sal_uIntPtr nChannelToSelect, sal_uInt16 nPositionOffset )
{
if ( nChannelToSelect < DBG_OUT_USER_CHANNEL_0 )
- rList.SelectEntryPos( (USHORT)( nChannelToSelect - nPositionOffset ) );
+ rList.SelectEntryPos( (sal_uInt16)( nChannelToSelect - nPositionOffset ) );
else
{
- for ( USHORT pos = 0; pos < rList.GetEntryCount(); ++pos )
+ for ( sal_uInt16 pos = 0; pos < rList.GetEntryCount(); ++pos )
{
DbgChannelId nChannelId = static_cast< DbgChannelId >( reinterpret_cast<sal_IntPtr>(rList.GetEntryData( pos )) );
if ( nChannelId == nChannelToSelect )
@@ -474,9 +474,9 @@ namespace
}
}
// -------------------------------------------------------------------
- DbgChannelId ImplGetChannelId( const ListBox& rList, USHORT nPositionOffset )
+ DbgChannelId ImplGetChannelId( const ListBox& rList, sal_uInt16 nPositionOffset )
{
- USHORT nSelectedChannelPos = rList.GetSelectEntryPos();
+ sal_uInt16 nSelectedChannelPos = rList.GetSelectEntryPos();
DbgChannelId nSelectedChannel = static_cast< DbgChannelId >( reinterpret_cast<sal_IntPtr>(rList.GetEntryData( nSelectedChannelPos )) );
if ( nSelectedChannel == 0)
return (DbgChannelId)( nSelectedChannelPos + nPositionOffset );
@@ -500,14 +500,14 @@ private:
public:
DbgWindow();
- virtual BOOL Close();
+ virtual sal_Bool Close();
virtual void Resize();
virtual long PreNotify( NotifyEvent& rNEvt );
void InsertLine( const XubString& rLine );
void Update() { WorkWindow::Update(); maLstBox.Update(); }
private:
- void GetAssertionEntryRange( USHORT nInbetweenEntry, USHORT& nFirst, USHORT& nLast );
+ void GetAssertionEntryRange( sal_uInt16 nInbetweenEntry, sal_uInt16& nFirst, sal_uInt16& nLast );
};
// -----------------
@@ -519,10 +519,10 @@ class DbgInfoDialog : public ModalDialog
private:
ListBox maListBox;
OKButton maOKButton;
- BOOL mbHelpText;
+ sal_Bool mbHelpText;
public:
- DbgInfoDialog( Window* pParent, BOOL bHelpText = FALSE );
+ DbgInfoDialog( Window* pParent, sal_Bool bHelpText = sal_False );
void SetInfoText( const XubString& rStr );
};
@@ -581,7 +581,7 @@ private:
CancelButton maCancelButton;
PushButton maInfoButton;
HelpButton maHelpButton;
- USHORT mnErrorOff;
+ sal_uInt16 mnErrorOff;
public:
DbgDialog();
@@ -620,7 +620,7 @@ DbgWindow::DbgWindow() :
// -----------------------------------------------------------------------
-BOOL DbgWindow::Close()
+sal_Bool DbgWindow::Close()
{
// remember window position
ByteString aState( GetWindowState() );
@@ -635,7 +635,7 @@ BOOL DbgWindow::Close()
delete this;
ImplGetSVData()->maWinData.mpDbgWin = NULL;
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -647,7 +647,7 @@ void DbgWindow::Resize()
// -----------------------------------------------------------------------
-void DbgWindow::GetAssertionEntryRange( USHORT nInbetweenEntry, USHORT& nFirst, USHORT& nLast )
+void DbgWindow::GetAssertionEntryRange( sal_uInt16 nInbetweenEntry, sal_uInt16& nFirst, sal_uInt16& nLast )
{
nFirst = nInbetweenEntry;
while ( nFirst > 0 )
@@ -656,7 +656,7 @@ void DbgWindow::GetAssertionEntryRange( USHORT nInbetweenEntry, USHORT& nFirst,
break;
--nFirst;
}
- USHORT nEntryCount = maLstBox.GetEntryCount();
+ sal_uInt16 nEntryCount = maLstBox.GetEntryCount();
nLast = nInbetweenEntry + 1;
while ( nLast < nEntryCount )
{
@@ -688,12 +688,12 @@ long DbgWindow::PreNotify( NotifyEvent& rNEvt )
Rectangle aEntryRect( maLstBox.GetBoundingRectangle( maLstBox.GetSelectEntryPos() ) );
aPos = aEntryRect.Center();
}
- USHORT nSelected = aMenu.Execute( rNEvt.GetWindow(), aPos );
+ sal_uInt16 nSelected = aMenu.Execute( rNEvt.GetWindow(), aPos );
if ( nSelected == 1 )
{
// search all entries which belong to this assertion
- USHORT nAssertionFirst = 0;
- USHORT nAssertionLast = 0;
+ sal_uInt16 nAssertionFirst = 0;
+ sal_uInt16 nAssertionLast = 0;
GetAssertionEntryRange( maLstBox.GetSelectEntryPos(), nAssertionFirst, nAssertionLast );
// build the string to copy to the clipboard
@@ -722,23 +722,23 @@ void DbgWindow::InsertLine( const XubString& rLine )
XubString aStr = rLine;
aStr.ConvertLineEnd( LINEEND_LF );
xub_StrLen nPos = aStr.Search( _LF );
- BOOL bFirstEntry = TRUE;
+ sal_Bool bFirstEntry = sal_True;
while ( nPos != STRING_NOTFOUND )
{
if ( maLstBox.GetEntryCount() >= DBGWIN_MAXLINES )
maLstBox.RemoveEntry( 0 );
- USHORT nInsertionPos = maLstBox.InsertEntry( aStr.Copy( 0, nPos ) );
+ sal_uInt16 nInsertionPos = maLstBox.InsertEntry( aStr.Copy( 0, nPos ) );
if ( bFirstEntry )
maLstBox.SetEntryData( nInsertionPos, reinterpret_cast< void* >( 0x00000001 ) );
- bFirstEntry = FALSE;
+ bFirstEntry = sal_False;
aStr.Erase( 0, nPos+1 );
nPos = aStr.Search( _LF );
}
if ( maLstBox.GetEntryCount() >= DBGWIN_MAXLINES )
maLstBox.RemoveEntry( 0 );
- USHORT nInsertionPos = maLstBox.InsertEntry( aStr );
+ sal_uInt16 nInsertionPos = maLstBox.InsertEntry( aStr );
if ( bFirstEntry )
maLstBox.SetEntryData( nInsertionPos, reinterpret_cast< void* >( 0x00000001 ) );
maLstBox.SetTopEntry( DBGWIN_MAXLINES-1 );
@@ -801,7 +801,7 @@ DbgDialog::DbgDialog() :
maXtorThis.Show();
maXtorThis.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "T~his" ) ) );
if ( pData->nTestFlags & DBG_TEST_XTOR_THIS )
- maXtorThis.Check( TRUE );
+ maXtorThis.Check( sal_True );
maXtorThis.SetPosSizePixel( LogicToPixel( Point( 10, 15 ), aAppMap ),
aButtonSize );
}
@@ -810,7 +810,7 @@ DbgDialog::DbgDialog() :
maXtorFunc.Show();
maXtorFunc.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "~Function" ) ) );
if ( pData->nTestFlags & DBG_TEST_XTOR_FUNC )
- maXtorFunc.Check( TRUE );
+ maXtorFunc.Check( sal_True );
maXtorFunc.SetPosSizePixel( LogicToPixel( Point( 75, 15 ), aAppMap ),
aButtonSize );
}
@@ -819,7 +819,7 @@ DbgDialog::DbgDialog() :
maXtorExit.Show();
maXtorExit.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "E~xit" ) ) );
if ( pData->nTestFlags & DBG_TEST_XTOR_EXIT )
- maXtorExit.Check( TRUE );
+ maXtorExit.Check( sal_True );
maXtorExit.SetPosSizePixel( LogicToPixel( Point( 140, 15 ), aAppMap ),
aButtonSize );
}
@@ -828,7 +828,7 @@ DbgDialog::DbgDialog() :
maXtorReport.Show();
maXtorReport.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "~Report" ) ) );
if ( pData->nTestFlags & DBG_TEST_XTOR_REPORT )
- maXtorReport.Check( TRUE );
+ maXtorReport.Check( sal_True );
maXtorReport.SetPosSizePixel( LogicToPixel( Point( 205, 15 ), aAppMap ),
aButtonSize );
}
@@ -837,7 +837,7 @@ DbgDialog::DbgDialog() :
maXtorTrace.Show();
maXtorTrace.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "~Trace" ) ) );
if ( pData->nTestFlags & DBG_TEST_XTOR_TRACE )
- maXtorTrace.Check( TRUE );
+ maXtorTrace.Check( sal_True );
maXtorTrace.SetPosSizePixel( LogicToPixel( Point( 270, 15 ), aAppMap ),
aButtonSize );
}
@@ -853,7 +853,7 @@ DbgDialog::DbgDialog() :
maMemInit.Show();
maMemInit.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "~Initialize" ) ) );
if ( pData->nTestFlags & DBG_TEST_MEM_INIT )
- maMemInit.Check( TRUE );
+ maMemInit.Check( sal_True );
maMemInit.SetPosSizePixel( LogicToPixel( Point( 10, 50 ), aAppMap ),
aButtonSize );
}
@@ -862,7 +862,7 @@ DbgDialog::DbgDialog() :
maMemOverwrite.Show();
maMemOverwrite.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "~Overwrite" )) );
if ( pData->nTestFlags & DBG_TEST_MEM_OVERWRITE )
- maMemOverwrite.Check( TRUE );
+ maMemOverwrite.Check( sal_True );
maMemOverwrite.SetPosSizePixel( LogicToPixel( Point( 75, 50 ), aAppMap ),
aButtonSize );
}
@@ -871,7 +871,7 @@ DbgDialog::DbgDialog() :
maMemOverwriteFree.Show();
maMemOverwriteFree.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "~Free" ) ) );
if ( pData->nTestFlags & DBG_TEST_MEM_OVERWRITEFREE )
- maMemOverwriteFree.Check( TRUE );
+ maMemOverwriteFree.Check( sal_True );
maMemOverwriteFree.SetPosSizePixel( LogicToPixel( Point( 140, 50 ), aAppMap ),
aButtonSize );
}
@@ -880,7 +880,7 @@ DbgDialog::DbgDialog() :
maMemPtr.Show();
maMemPtr.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "~Pointer" ) ) );
if ( pData->nTestFlags & DBG_TEST_MEM_POINTER )
- maMemPtr.Check( TRUE );
+ maMemPtr.Check( sal_True );
maMemPtr.SetPosSizePixel( LogicToPixel( Point( 205, 50 ), aAppMap ),
aButtonSize );
}
@@ -889,7 +889,7 @@ DbgDialog::DbgDialog() :
maMemReport.Show();
maMemReport.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "~Report" ) ) );
if ( pData->nTestFlags & DBG_TEST_MEM_REPORT )
- maMemReport.Check( TRUE );
+ maMemReport.Check( sal_True );
maMemReport.SetPosSizePixel( LogicToPixel( Point( 270, 50 ), aAppMap ),
aButtonSize );
}
@@ -898,7 +898,7 @@ DbgDialog::DbgDialog() :
maMemTrace.Show();
maMemTrace.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "~Trace" ) ) );
if ( pData->nTestFlags & DBG_TEST_MEM_TRACE )
- maMemTrace.Check( TRUE );
+ maMemTrace.Check( sal_True );
maMemTrace.SetPosSizePixel( LogicToPixel( Point( 10, 65 ), aAppMap ),
aButtonSize );
}
@@ -907,7 +907,7 @@ DbgDialog::DbgDialog() :
maMemLeakReport.Show();
maMemLeakReport.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "~Leak-Report" ) ) );
if ( pData->nTestFlags & DBG_TEST_MEM_LEAKREPORT )
- maMemLeakReport.Check( TRUE );
+ maMemLeakReport.Check( sal_True );
maMemLeakReport.SetPosSizePixel( LogicToPixel( Point( 75, 65 ), aAppMap ),
aButtonSize );
}
@@ -916,7 +916,7 @@ DbgDialog::DbgDialog() :
maMemNewDel.Show();
maMemNewDel.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "~New/Delete" ) ) );
if ( pData->nTestFlags & DBG_TEST_MEM_NEWDEL )
- maMemNewDel.Check( TRUE );
+ maMemNewDel.Check( sal_True );
maMemNewDel.SetPosSizePixel( LogicToPixel( Point( 140, 65 ), aAppMap ),
aButtonSize );
}
@@ -925,7 +925,7 @@ DbgDialog::DbgDialog() :
maMemXtor.Show();
maMemXtor.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "Ob~ject Test" ) ) );
if ( pData->nTestFlags & DBG_TEST_MEM_XTOR )
- maMemXtor.Check( TRUE );
+ maMemXtor.Check( sal_True );
maMemXtor.SetPosSizePixel( LogicToPixel( Point( 205, 65 ), aAppMap ),
aButtonSize );
}
@@ -941,7 +941,7 @@ DbgDialog::DbgDialog() :
maProf.Show();
maProf.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "~Profiling" ) ) );
if ( pData->nTestFlags & DBG_TEST_PROFILING )
- maProf.Check( TRUE );
+ maProf.Check( sal_True );
maProf.SetPosSizePixel( LogicToPixel( Point( 10, 95 ), aAppMap ),
aButtonSize );
}
@@ -950,7 +950,7 @@ DbgDialog::DbgDialog() :
maRes.Show();
maRes.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "~Resourcen" ) ) );
if ( pData->nTestFlags & DBG_TEST_RESOURCE )
- maRes.Check( TRUE );
+ maRes.Check( sal_True );
maRes.SetPosSizePixel( LogicToPixel( Point( 75, 95 ), aAppMap ),
aButtonSize );
}
@@ -959,7 +959,7 @@ DbgDialog::DbgDialog() :
maDialog.Show();
maDialog.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "~Dialog" ) ) );
if ( pData->nTestFlags & DBG_TEST_DIALOG )
- maDialog.Check( TRUE );
+ maDialog.Check( sal_True );
maDialog.SetPosSizePixel( LogicToPixel( Point( 140, 95 ), aAppMap ),
aButtonSize );
}
@@ -968,7 +968,7 @@ DbgDialog::DbgDialog() :
maBoldAppFont.Show();
maBoldAppFont.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "~Bold AppFont" ) ) );
if ( pData->nTestFlags & DBG_TEST_BOLDAPPFONT )
- maBoldAppFont.Check( TRUE );
+ maBoldAppFont.Check( sal_True );
maBoldAppFont.SetPosSizePixel( LogicToPixel( Point( 205, 95 ), aAppMap ),
aButtonSize );
maBoldAppFont.SaveValue();
@@ -993,7 +993,7 @@ DbgDialog::DbgDialog() :
maOverwrite.Show();
maOverwrite.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "Overwrite ~File" ) ) );
if ( pData->bOverwrite )
- maOverwrite.Check( TRUE );
+ maOverwrite.Check( sal_True );
maOverwrite.SetPosSizePixel( LogicToPixel( Point( 205, 130 ), aAppMap ),
aButtonSize );
}
@@ -1002,7 +1002,7 @@ DbgDialog::DbgDialog() :
maHookOSLBox.Show();
maHookOSLBox.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "Reroute osl debug ~messages" ) ) );
if ( pData->bHookOSLAssert )
- maHookOSLBox.Check( TRUE );
+ maHookOSLBox.Check( sal_True );
maHookOSLBox.SetPosSizePixel( LogicToPixel( Point( 10, 240 ), aAppMap ),
LogicToPixel( Size( 100, 12 ), aAppMap ) );
}
@@ -1205,8 +1205,8 @@ IMPL_LINK( DbgDialog, ClickHdl, Button*, pButton )
aData.aInclFilter[sizeof( aData.aInclFilter )-1] = '\0';
aData.aExclFilter[sizeof( aData.aExclFilter )-1] = '\0';
- aData.bOverwrite = maOverwrite.IsChecked() ? TRUE : FALSE;
- aData.bHookOSLAssert = maHookOSLBox.IsChecked() ? TRUE : FALSE;
+ aData.bOverwrite = maOverwrite.IsChecked() ? sal_True : sal_False;
+ aData.bHookOSLAssert = maHookOSLBox.IsChecked() ? sal_True : sal_False;
if ( maXtorThis.IsChecked() )
aData.nTestFlags |= DBG_TEST_XTOR_THIS;
@@ -1300,7 +1300,7 @@ IMPL_LINK( DbgDialog, ClickHdl, Button*, pButton )
) ) );
aBox.Execute();
}
- EndDialog( TRUE );
+ EndDialog( sal_True );
}
else if ( pButton == &maInfoButton )
{
@@ -1323,7 +1323,7 @@ void DbgDialog::RequestHelp( const HelpEvent& rHEvt )
{
if ( rHEvt.GetMode() & HELPMODE_CONTEXT )
{
- DbgInfoDialog aInfoDialog( this, TRUE );
+ DbgInfoDialog aInfoDialog( this, sal_True );
XubString aHelpText;
const sal_Char** pHelpStrs = pDbgHelpText;
while ( *pHelpStrs )
@@ -1339,7 +1339,7 @@ void DbgDialog::RequestHelp( const HelpEvent& rHEvt )
// =======================================================================
-DbgInfoDialog::DbgInfoDialog( Window* pParent, BOOL bHelpText ) :
+DbgInfoDialog::DbgInfoDialog( Window* pParent, sal_Bool bHelpText ) :
ModalDialog( pParent, WB_STDMODAL ),
maListBox( this, WB_BORDER | WB_AUTOHSCROLL ),
maOKButton( this, WB_DEFBUTTON )
@@ -1366,12 +1366,12 @@ DbgInfoDialog::DbgInfoDialog( Window* pParent, BOOL bHelpText ) :
void DbgInfoDialog::SetInfoText( const XubString& rStr )
{
- maListBox.SetUpdateMode( FALSE );
+ maListBox.SetUpdateMode( sal_False );
maListBox.Clear();
XubString aStr = rStr;
aStr.ConvertLineEnd( LINEEND_LF );
- USHORT nStrIndex = 0;
- USHORT nFoundIndex;
+ sal_uInt16 nStrIndex = 0;
+ sal_uInt16 nFoundIndex;
do
{
nFoundIndex = aStr.Search( _LF, nStrIndex );
@@ -1379,8 +1379,8 @@ void DbgInfoDialog::SetInfoText( const XubString& rStr )
if ( mbHelpText )
{
long nMaxWidth = maListBox.GetOutputSizePixel().Width()-30;
- USHORT nLastIndex = 0;
- USHORT nIndex = aTextParagraph.Search( ' ' );
+ sal_uInt16 nLastIndex = 0;
+ sal_uInt16 nIndex = aTextParagraph.Search( ' ' );
while ( nIndex != STRING_NOTFOUND )
{
if ( maListBox.GetTextWidth( aTextParagraph, 0, nIndex ) > nMaxWidth )
@@ -1410,15 +1410,15 @@ void DbgInfoDialog::SetInfoText( const XubString& rStr )
nStrIndex = nFoundIndex+1;
}
while ( nFoundIndex != STRING_NOTFOUND );
- maListBox.SetUpdateMode( TRUE );
+ maListBox.SetUpdateMode( sal_True );
}
// =======================================================================
void DbgDialogTest( Window* pWindow )
{
- BOOL aAccelBuf[65536];
- USHORT nChildCount = pWindow->GetChildCount();
+ sal_Bool aAccelBuf[65536];
+ sal_uInt16 nChildCount = pWindow->GetChildCount();
Window* pGetChild = pWindow->GetWindow( WINDOW_FIRSTCHILD );
Window* pChild;
Point aTabPos;
@@ -1432,9 +1432,9 @@ void DbgDialogTest( Window* pWindow )
if ( pWindow->IsDialog() )
{
- BOOL bOKCancelButton = FALSE;
- BOOL bDefPushButton = FALSE;
- BOOL bButton = FALSE;
+ sal_Bool bOKCancelButton = sal_False;
+ sal_Bool bDefPushButton = sal_False;
+ sal_Bool bButton = sal_False;
pGetChild = pWindow->GetWindow( WINDOW_FIRSTCHILD );
while ( pGetChild )
{
@@ -1442,11 +1442,11 @@ void DbgDialogTest( Window* pWindow )
if ( pChild->ImplIsPushButton() )
{
- bButton = TRUE;
+ bButton = sal_True;
if ( (pChild->GetType() == WINDOW_OKBUTTON) || (pChild->GetType() == WINDOW_CANCELBUTTON) )
- bOKCancelButton = TRUE;
+ bOKCancelButton = sal_True;
if ( pChild->GetStyle() & WB_DEFBUTTON )
- bDefPushButton = TRUE;
+ bDefPushButton = sal_True;
}
pGetChild = pGetChild->GetWindow( WINDOW_NEXT );
@@ -1461,7 +1461,7 @@ void DbgDialogTest( Window* pWindow )
}
}
- USHORT i = 0;
+ sal_uInt16 i = 0;
pGetChild = pWindow->GetWindow( WINDOW_FIRSTCHILD );
while ( pGetChild )
{
@@ -1473,7 +1473,7 @@ void DbgDialogTest( Window* pWindow )
{
XubString aText = pChild->GetText();
XubString aErrorText = aText;
- USHORT nAccelPos = STRING_NOTFOUND;
+ sal_uInt16 nAccelPos = STRING_NOTFOUND;
xub_Unicode cAccel = 0;
if ( aErrorText.Len() > 128 )
{
@@ -1494,7 +1494,7 @@ void DbgDialogTest( Window* pWindow )
if ( aAccelBuf[cAccel] )
DbgOutTypef( DBG_OUT_ERROR, "Double mnemonic char: %c", cAccel );
else
- aAccelBuf[cAccel] = TRUE;
+ aAccelBuf[cAccel] = sal_True;
}
}
}
@@ -1647,66 +1647,66 @@ void DbgDialogTest( Window* pWindow )
if ( pChild->IsVisible() )
{
- BOOL bMaxWarning = FALSE;
+ sal_Bool bMaxWarning = sal_False;
if ( pChild->GetType() == WINDOW_NUMERICFIELD )
{
NumericField* pField = (NumericField*)pChild;
if ( pField->GetMax() == LONG_MAX )
- bMaxWarning = TRUE;
+ bMaxWarning = sal_True;
}
else if ( pChild->GetType() == WINDOW_METRICFIELD )
{
MetricField* pField = (MetricField*)pChild;
if ( pField->GetMax() == LONG_MAX )
- bMaxWarning = TRUE;
+ bMaxWarning = sal_True;
}
else if ( pChild->GetType() == WINDOW_CURRENCYFIELD )
{
CurrencyField* pField = (CurrencyField*)pChild;
if ( pField->GetMax() == LONG_MAX )
- bMaxWarning = TRUE;
+ bMaxWarning = sal_True;
}
else if ( pChild->GetType() == WINDOW_TIMEFIELD )
{
TimeField* pField = (TimeField*)pChild;
if ( pField->GetMax() == Time( 23, 59, 59, 99 ) )
- bMaxWarning = TRUE;
+ bMaxWarning = sal_True;
}
else if ( pChild->GetType() == WINDOW_DATEFIELD )
{
DateField* pField = (DateField*)pChild;
if ( pField->GetMax() == Date( 31, 12, 9999 ) )
- bMaxWarning = TRUE;
+ bMaxWarning = sal_True;
}
else if ( pChild->GetType() == WINDOW_NUMERICBOX )
{
NumericBox* pBox = (NumericBox*)pChild;
if ( pBox->GetMax() == LONG_MAX )
- bMaxWarning = TRUE;
+ bMaxWarning = sal_True;
}
else if ( pChild->GetType() == WINDOW_METRICBOX )
{
MetricBox* pBox = (MetricBox*)pChild;
if ( pBox->GetMax() == LONG_MAX )
- bMaxWarning = TRUE;
+ bMaxWarning = sal_True;
}
else if ( pChild->GetType() == WINDOW_CURRENCYBOX )
{
CurrencyBox* pBox = (CurrencyBox*)pChild;
if ( pBox->GetMax() == LONG_MAX )
- bMaxWarning = TRUE;
+ bMaxWarning = sal_True;
}
else if ( pChild->GetType() == WINDOW_TIMEBOX )
{
TimeBox* pBox = (TimeBox*)pChild;
if ( pBox->GetMax() == Time( 23, 59, 59, 99 ) )
- bMaxWarning = TRUE;
+ bMaxWarning = sal_True;
}
else if ( pChild->GetType() == WINDOW_DATEBOX )
{
DateBox* pBox = (DateBox*)pChild;
if ( pBox->GetMax() == Date( 31, 12, 9999 ) )
- bMaxWarning = TRUE;
+ bMaxWarning = sal_True;
}
if ( bMaxWarning )
{
@@ -1760,7 +1760,7 @@ void DbgDialogTest( Window* pWindow )
aTabPos = aNewPos;
}
- for ( USHORT j = 0; j < i; j++ )
+ for ( sal_uInt16 j = 0; j < i; j++ )
{
if ( ((pRectAry[j].Right() != 0) || (pRectAry[j].Bottom() != 0)) &&
aChildRect.IsOver( pRectAry[j] ) )
@@ -1838,8 +1838,8 @@ long SolarMessageBoxExecutor::doIt()
#if ! defined USE_VCL_MSGBOX
#ifdef WNT
- BOOL bOldCallTimer = pSVData->mbNoCallTimer;
- pSVData->mbNoCallTimer = TRUE;
+ sal_Bool bOldCallTimer = pSVData->mbNoCallTimer;
+ pSVData->mbNoCallTimer = sal_True;
MessageBeep( MB_ICONHAND );
nResult = MessageBoxW( 0, (LPWSTR)m_sDebugMessage.GetBuffer(), L"Debug Output",
MB_TASKMODAL | MB_YESNOCANCEL | MB_DEFBUTTON2 | MB_ICONSTOP );
@@ -1858,7 +1858,7 @@ long SolarMessageBoxExecutor::doIt()
}
#endif // WNT
#else
- USHORT nOldMode = Application::GetSystemWindowMode();
+ sal_uInt16 nOldMode = Application::GetSystemWindowMode();
Application::SetSystemWindowMode( nOldMode & ~SYSTEMWINDOW_MODE_NOAUTOMODE );
DbgMessageBox aBox( m_sDebugMessage );
Application::SetSystemWindowMode( nOldMode );
@@ -1944,12 +1944,12 @@ long SolarWindowPrinter::doIt()
void DbgPrintWindow( const char* pLine )
{
- static BOOL bIn = FALSE;
+ static sal_Bool bIn = sal_False;
// keine rekursiven Traces
if ( bIn )
return;
- bIn = TRUE;
+ bIn = sal_True;
SolarWindowPrinter aPrinter( String( pLine, RTL_TEXTENCODING_UTF8 ) );
TimeValue aTimeout; aTimeout.Seconds = 2; aTimeout.Nanosec = 0;
@@ -1958,7 +1958,7 @@ void DbgPrintWindow( const char* pLine )
if ( aPrinter.didTimeout() )
DbgPrintShell( pLine );
- bIn = FALSE;
+ bIn = sal_False;
}
// =======================================================================
@@ -2003,7 +2003,7 @@ void DbgGUIStart()
{
DbgDialog* pDialog = new DbgDialog;
// Fuer den Debug-Dialog schalten wir Dialogtests aus
- ULONG nOldFlags = pData->nTestFlags;
+ sal_uIntPtr nOldFlags = pData->nTestFlags;
pData->nTestFlags &= ~DBG_TEST_DIALOG;
if ( !pDialog->Execute() )
pData->nTestFlags |= (nOldFlags & DBG_TEST_DIALOG);
@@ -2018,7 +2018,7 @@ void DbgGUIStart()
// -----------------------------------------------------------------------
-USHORT DbgRegisterNamedUserChannel( const XubString& _rChannelUIName, DbgPrintLine pProc )
+sal_uInt16 DbgRegisterNamedUserChannel( const XubString& _rChannelUIName, DbgPrintLine pProc )
{
DbgChannelId nChannelId = DbgRegisterUserChannel( pProc );
UserDefinedChannels& rChannels = ImplDbgGetUserDefinedChannels();
diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx
index ac1da931ba06..9164f4afe175 100644
--- a/vcl/source/app/help.cxx
+++ b/vcl/source/app/help.cxx
@@ -62,25 +62,25 @@ Help::~Help()
// -----------------------------------------------------------------------
-BOOL Help::Start( ULONG, const Window* )
+sal_Bool Help::Start( sal_uIntPtr, const Window* )
{
- return FALSE;
+ return sal_False;
}
-void Help::OpenHelpAgent( ULONG )
+void Help::OpenHelpAgent( sal_uIntPtr )
{
}
// -----------------------------------------------------------------------
-BOOL Help::Start( const XubString&, const Window* )
+sal_Bool Help::Start( const XubString&, const Window* )
{
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-XubString Help::GetHelpText( ULONG, const Window* )
+XubString Help::GetHelpText( sal_uIntPtr, const Window* )
{
return ImplGetSVEmptyStr();
}
@@ -96,26 +96,26 @@ XubString Help::GetHelpText( const String&, const Window* )
void Help::EnableContextHelp()
{
- ImplGetSVData()->maHelpData.mbContextHelp = TRUE;
+ ImplGetSVData()->maHelpData.mbContextHelp = sal_True;
}
// -----------------------------------------------------------------------
void Help::DisableContextHelp()
{
- ImplGetSVData()->maHelpData.mbContextHelp = FALSE;
+ ImplGetSVData()->maHelpData.mbContextHelp = sal_False;
}
// -----------------------------------------------------------------------
-BOOL Help::IsContextHelpEnabled()
+sal_Bool Help::IsContextHelpEnabled()
{
return ImplGetSVData()->maHelpData.mbContextHelp;
}
// -----------------------------------------------------------------------
-BOOL Help::StartContextHelp()
+sal_Bool Help::StartContextHelp()
{
ImplSVData* pSVData = ImplGetSVData();
@@ -127,74 +127,74 @@ BOOL Help::StartContextHelp()
Point aMousePos = pWindow->OutputToScreenPixel( pWindow->GetPointerPosPixel() );
HelpEvent aHelpEvent( aMousePos, HELPMODE_CONTEXT );
pWindow->RequestHelp( aHelpEvent );
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
void Help::EnableExtHelp()
{
- ImplGetSVData()->maHelpData.mbExtHelp = TRUE;
+ ImplGetSVData()->maHelpData.mbExtHelp = sal_True;
}
// -----------------------------------------------------------------------
void Help::DisableExtHelp()
{
- ImplGetSVData()->maHelpData.mbExtHelp = FALSE;
+ ImplGetSVData()->maHelpData.mbExtHelp = sal_False;
}
// -----------------------------------------------------------------------
-BOOL Help::IsExtHelpEnabled()
+sal_Bool Help::IsExtHelpEnabled()
{
return ImplGetSVData()->maHelpData.mbExtHelp;
}
// -----------------------------------------------------------------------
-BOOL Help::StartExtHelp()
+sal_Bool Help::StartExtHelp()
{
ImplSVData* pSVData = ImplGetSVData();
if ( pSVData->maHelpData.mbExtHelp && !pSVData->maHelpData.mbExtHelpMode )
{
- pSVData->maHelpData.mbExtHelpMode = TRUE;
+ pSVData->maHelpData.mbExtHelpMode = sal_True;
pSVData->maHelpData.mbOldBalloonMode = pSVData->maHelpData.mbBalloonHelp;
- pSVData->maHelpData.mbBalloonHelp = TRUE;
+ pSVData->maHelpData.mbBalloonHelp = sal_True;
if ( pSVData->maWinData.mpAppWin )
pSVData->maWinData.mpAppWin->ImplGenerateMouseMove();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL Help::EndExtHelp()
+sal_Bool Help::EndExtHelp()
{
ImplSVData* pSVData = ImplGetSVData();
if ( pSVData->maHelpData.mbExtHelp && pSVData->maHelpData.mbExtHelpMode )
{
- pSVData->maHelpData.mbExtHelpMode = FALSE;
+ pSVData->maHelpData.mbExtHelpMode = sal_False;
pSVData->maHelpData.mbBalloonHelp = pSVData->maHelpData.mbOldBalloonMode;
if ( pSVData->maWinData.mpAppWin )
pSVData->maWinData.mpAppWin->ImplGenerateMouseMove();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL Help::IsExtHelpActive()
+sal_Bool Help::IsExtHelpActive()
{
return ImplGetSVData()->maHelpData.mbExtHelpMode;
}
@@ -203,88 +203,88 @@ BOOL Help::IsExtHelpActive()
void Help::EnableBalloonHelp()
{
- ImplGetSVData()->maHelpData.mbBalloonHelp = TRUE;
+ ImplGetSVData()->maHelpData.mbBalloonHelp = sal_True;
}
// -----------------------------------------------------------------------
void Help::DisableBalloonHelp()
{
- ImplGetSVData()->maHelpData.mbBalloonHelp = FALSE;
+ ImplGetSVData()->maHelpData.mbBalloonHelp = sal_False;
}
// -----------------------------------------------------------------------
-BOOL Help::IsBalloonHelpEnabled()
+sal_Bool Help::IsBalloonHelpEnabled()
{
return ImplGetSVData()->maHelpData.mbBalloonHelp;
}
// -----------------------------------------------------------------------
-BOOL Help::ShowBalloon( Window* pParent,
+sal_Bool Help::ShowBalloon( Window* pParent,
const Point& rScreenPos,
const XubString& rHelpText )
{
ImplShowHelpWindow( pParent, HELPWINSTYLE_BALLOON, 0,
rHelpText, ImplGetSVEmptyStr(), rScreenPos );
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-BOOL Help::ShowBalloon( Window* pParent,
+sal_Bool Help::ShowBalloon( Window* pParent,
const Point& rScreenPos, const Rectangle& rRect,
const XubString& rHelpText )
{
ImplShowHelpWindow( pParent, HELPWINSTYLE_BALLOON, 0,
rHelpText, ImplGetSVEmptyStr(), rScreenPos, &rRect );
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
void Help::EnableQuickHelp()
{
- ImplGetSVData()->maHelpData.mbQuickHelp = TRUE;
+ ImplGetSVData()->maHelpData.mbQuickHelp = sal_True;
}
// -----------------------------------------------------------------------
void Help::DisableQuickHelp()
{
- ImplGetSVData()->maHelpData.mbQuickHelp = FALSE;
+ ImplGetSVData()->maHelpData.mbQuickHelp = sal_False;
}
// -----------------------------------------------------------------------
-BOOL Help::IsQuickHelpEnabled()
+sal_Bool Help::IsQuickHelpEnabled()
{
return ImplGetSVData()->maHelpData.mbQuickHelp;
}
// -----------------------------------------------------------------------
-BOOL Help::ShowQuickHelp( Window* pParent,
+sal_Bool Help::ShowQuickHelp( Window* pParent,
const Rectangle& rScreenRect,
const XubString& rHelpText,
const XubString& rLongHelpText,
- USHORT nStyle )
+ sal_uInt16 nStyle )
{
ImplShowHelpWindow( pParent, HELPWINSTYLE_QUICK, nStyle,
rHelpText, rLongHelpText,
pParent->OutputToScreenPixel( pParent->GetPointerPosPixel() ), &rScreenRect );
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-ULONG Help::ShowTip( Window* pParent, const Rectangle& rRect,
- const XubString& rText, USHORT nStyle )
+sal_uIntPtr Help::ShowTip( Window* pParent, const Rectangle& rRect,
+ const XubString& rText, sal_uInt16 nStyle )
{
- USHORT nHelpWinStyle = HELPWINSTYLE_QUICK;
+ sal_uInt16 nHelpWinStyle = HELPWINSTYLE_QUICK;
HelpTextWindow* pHelpWin = new HelpTextWindow( pParent, rText, nHelpWinStyle, nStyle );
Size aSz = pHelpWin->CalcOutSize();
@@ -292,12 +292,12 @@ ULONG Help::ShowTip( Window* pParent, const Rectangle& rRect,
ImplSetHelpWindowPos( pHelpWin, nHelpWinStyle, nStyle,
pParent->OutputToScreenPixel( pParent->GetPointerPosPixel() ), &rRect );
pHelpWin->ShowHelp( HELPDELAY_NONE );
- return (ULONG)pHelpWin;
+ return (sal_uIntPtr)pHelpWin;
}
// -----------------------------------------------------------------------
-void Help::HideTip( ULONG nId )
+void Help::HideTip( sal_uIntPtr nId )
{
HelpTextWindow* pHelpWin = (HelpTextWindow*)nId;
Window* pFrameWindow = pHelpWin->ImplGetFrameWindow();
@@ -311,13 +311,13 @@ void Help::HideTip( ULONG nId )
// =======================================================================
-HelpTextWindow::HelpTextWindow( Window* pParent, const XubString& rText, USHORT nHelpWinStyle, USHORT nStyle ) :
+HelpTextWindow::HelpTextWindow( Window* pParent, const XubString& rText, sal_uInt16 nHelpWinStyle, sal_uInt16 nStyle ) :
//FloatingWindow( pParent->ImplGetFrameWindow(), WB_SYSTEMWINDOW ),
FloatingWindow( pParent, WB_SYSTEMWINDOW|WB_TOOLTIPWIN ), // #105827# if we change the parent, mirroring will not work correctly when positioning this window
maHelpText( rText )
{
SetType( WINDOW_HELPTEXTWINDOW );
- ImplSetMouseTransparent( TRUE );
+ ImplSetMouseTransparent( sal_True );
mnHelpWinStyle = nHelpWinStyle;
mnStyle = nStyle;
// on windows this will raise the application window, because help windows are system windows now
@@ -330,9 +330,9 @@ HelpTextWindow::HelpTextWindow( Window* pParent, const XubString& rText, USHORT
SetTextAlign( ALIGN_TOP );
if ( IsNativeControlSupported( CTRL_TOOLTIP, PART_ENTIRE_CONTROL ) )
{
- EnableChildTransparentMode( TRUE );
+ EnableChildTransparentMode( sal_True );
SetParentClipMode( PARENTCLIPMODE_NOCLIP );
- SetPaintTransparent( TRUE );
+ SetPaintTransparent( sal_True );
SetBackground();
}
else
@@ -345,7 +345,7 @@ HelpTextWindow::HelpTextWindow( Window* pParent, const XubString& rText, USHORT
if( mnStyle & QUICKHELP_BIDI_RTL )
{
- ULONG nLayoutMode = GetLayoutMode();
+ sal_uIntPtr nLayoutMode = GetLayoutMode();
nLayoutMode |= TEXT_LAYOUT_BIDI_RTL | TEXT_LAYOUT_TEXTORIGIN_LEFT;
SetLayoutMode( nLayoutMode );
}
@@ -354,7 +354,7 @@ HelpTextWindow::HelpTextWindow( Window* pParent, const XubString& rText, USHORT
ImplSVData* pSVData = ImplGetSVData();
if ( pSVData->maHelpData.mbSetKeyboardHelp )
- pSVData->maHelpData.mbKeyboardHelp = TRUE;
+ pSVData->maHelpData.mbKeyboardHelp = sal_True;
const HelpSettings& rHelpSettings = pParent->GetSettings().GetHelpSettings();
maShowTimer.SetTimeoutHdl( LINK( this, HelpTextWindow, TimerHdl ) );
@@ -397,13 +397,13 @@ void HelpTextWindow::SetHelpText( const String& rHelpText )
else // HELPWINSTYLE_BALLOON
{
Point aTmpPoint;
- USHORT nCharsInLine = 35 + ((maHelpText.Len()/100)*5);
+ sal_uInt16 nCharsInLine = 35 + ((maHelpText.Len()/100)*5);
XubString aXXX;
aXXX.Fill( nCharsInLine, 'x' ); // Durchschnittliche Breite, damit nicht jedes Fenster anders.
long nWidth = GetTextWidth( aXXX );
Size aTmpSize( nWidth, 0x7FFFFFFF );
Rectangle aTry1( aTmpPoint, aTmpSize );
- USHORT nDrawFlags = TEXT_DRAW_MULTILINE | TEXT_DRAW_WORDBREAK |
+ sal_uInt16 nDrawFlags = TEXT_DRAW_MULTILINE | TEXT_DRAW_WORDBREAK |
TEXT_DRAW_LEFT | TEXT_DRAW_TOP;
if ( mnStyle & QUICKHELP_CTRLTEXT )
nDrawFlags |= TEXT_DRAW_MNEMONIC;
@@ -430,7 +430,7 @@ void HelpTextWindow::ImplShow()
ImplSVData* pSVData = ImplGetSVData();
pSVData->mpApp->ShowHelpStatusText( maStatusText );
}
- Show( TRUE, SHOW_NOACTIVATE );
+ Show( sal_True, SHOW_NOACTIVATE );
if( !aDogTag.IsDelete() )
Update();
}
@@ -460,7 +460,7 @@ void HelpTextWindow::Paint( const Rectangle& )
}
else // HELPWINSTYLE_BALLOON
{
- USHORT nDrawFlags = TEXT_DRAW_MULTILINE|TEXT_DRAW_WORDBREAK|
+ sal_uInt16 nDrawFlags = TEXT_DRAW_MULTILINE|TEXT_DRAW_WORDBREAK|
TEXT_DRAW_LEFT|TEXT_DRAW_TOP;
if ( mnStyle & QUICKHELP_CTRLTEXT )
nDrawFlags |= TEXT_DRAW_MNEMONIC;
@@ -486,9 +486,9 @@ void HelpTextWindow::Paint( const Rectangle& )
// -----------------------------------------------------------------------
-void HelpTextWindow::ShowHelp( USHORT nDelayMode )
+void HelpTextWindow::ShowHelp( sal_uInt16 nDelayMode )
{
- ULONG nTimeout = 0;
+ sal_uIntPtr nTimeout = 0;
if ( nDelayMode != HELPDELAY_NONE )
{
// Im ExtendedHelp-Fall die Hilfe schneller anzeigen
@@ -569,9 +569,9 @@ String HelpTextWindow::GetText() const
// -----------------------------------------------------------------------
-BOOL HelpTextWindow::RegisterAccessibleParent()
+sal_Bool HelpTextWindow::RegisterAccessibleParent()
{
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -582,7 +582,7 @@ void HelpTextWindow::RevokeAccessibleParent()
// =======================================================================
-void ImplShowHelpWindow( Window* pParent, USHORT nHelpWinStyle, USHORT nStyle,
+void ImplShowHelpWindow( Window* pParent, sal_uInt16 nHelpWinStyle, sal_uInt16 nStyle,
const XubString& rHelpText, const XubString& rStatusText,
const Point& rScreenPos, const Rectangle* pHelpArea )
{
@@ -592,7 +592,7 @@ void ImplShowHelpWindow( Window* pParent, USHORT nHelpWinStyle, USHORT nStyle,
return;
HelpTextWindow* pHelpWin = pSVData->maHelpData.mpHelpWin;
- USHORT nDelayMode = HELPDELAY_NORMAL;
+ sal_uInt16 nDelayMode = HELPDELAY_NORMAL;
if ( pHelpWin )
{
DBG_ASSERT( pHelpWin != pParent, "HelpInHelp ?!" );
@@ -631,7 +631,7 @@ void ImplShowHelpWindow( Window* pParent, USHORT nHelpWinStyle, USHORT nStyle,
if ( !pHelpWin && rHelpText.Len() )
{
- ULONG nCurTime = Time::GetSystemTicks();
+ sal_uIntPtr nCurTime = Time::GetSystemTicks();
if( (nCurTime - pSVData->maHelpData.mnLastHelpHideTime) < pParent->GetSettings().GetHelpSettings().GetTipDelay() )
nDelayMode = HELPDELAY_NONE;
@@ -667,7 +667,7 @@ void ImplDestroyHelpWindow( bool bUpdateHideTime )
if( pHelpWin->IsVisible() )
pWindow->Invalidate( aInvRect );
pSVData->maHelpData.mpHelpWin = NULL;
- pSVData->maHelpData.mbKeyboardHelp = FALSE;
+ pSVData->maHelpData.mbKeyboardHelp = sal_False;
pHelpWin->Hide();
delete pHelpWin;
if( bUpdateHideTime )
@@ -677,7 +677,7 @@ void ImplDestroyHelpWindow( bool bUpdateHideTime )
// -----------------------------------------------------------------------
-void ImplSetHelpWindowPos( Window* pHelpWin, USHORT nHelpWinStyle, USHORT nStyle,
+void ImplSetHelpWindowPos( Window* pHelpWin, sal_uInt16 nHelpWinStyle, sal_uInt16 nStyle,
const Point& rPos, const Rectangle* pHelpArea )
{
Point aPos = rPos;
diff --git a/vcl/source/app/i18nhelp.cxx b/vcl/source/app/i18nhelp.cxx
index 17bc760ff5fc..5b2f302adaa7 100644
--- a/vcl/source/app/i18nhelp.cxx
+++ b/vcl/source/app/i18nhelp.cxx
@@ -130,7 +130,7 @@ sal_Int32 vcl::I18nHelper::CompareString( const String& rStr1, const String& rSt
{
// Change mbTransliterateIgnoreCase and destroy the warpper, next call to
// ImplGetTransliterationWrapper() will create a wrapper with the correct bIgnoreCase
- ((vcl::I18nHelper*)this)->mbTransliterateIgnoreCase = FALSE;
+ ((vcl::I18nHelper*)this)->mbTransliterateIgnoreCase = sal_False;
delete ((vcl::I18nHelper*)this)->mpTransliterationWrapper;
((vcl::I18nHelper*)this)->mpTransliterationWrapper = NULL;
}
@@ -149,7 +149,7 @@ sal_Bool vcl::I18nHelper::MatchString( const String& rStr1, const String& rStr2
{
// Change mbTransliterateIgnoreCase and destroy the warpper, next call to
// ImplGetTransliterationWrapper() will create a wrapper with the correct bIgnoreCase
- ((vcl::I18nHelper*)this)->mbTransliterateIgnoreCase = TRUE;
+ ((vcl::I18nHelper*)this)->mbTransliterateIgnoreCase = sal_True;
delete ((vcl::I18nHelper*)this)->mpTransliterationWrapper;
((vcl::I18nHelper*)this)->mpTransliterationWrapper = NULL;
}
@@ -163,8 +163,8 @@ sal_Bool vcl::I18nHelper::MatchMnemonic( const String& rString, sal_Unicode cMne
{
::osl::Guard< ::osl::Mutex > aGuard( ((vcl::I18nHelper*)this)->maMutex );
- BOOL bEqual = FALSE;
- USHORT n = rString.Search( '~' );
+ sal_Bool bEqual = sal_False;
+ sal_uInt16 n = rString.Search( '~' );
if ( n != STRING_NOTFOUND )
{
String aMatchStr( rString, n+1, STRING_LEN ); // not only one char, because of transliteration...
@@ -181,7 +181,7 @@ String vcl::I18nHelper::GetDate( const Date& rDate ) const
return ImplGetLocaleDataWrapper().getDate( rDate );
}
-String vcl::I18nHelper::GetNum( long nNumber, USHORT nDecimals, BOOL bUseThousandSep, BOOL bTrailingZeros ) const
+String vcl::I18nHelper::GetNum( long nNumber, sal_uInt16 nDecimals, sal_Bool bUseThousandSep, sal_Bool bTrailingZeros ) const
{
return ImplGetLocaleDataWrapper().getNum( nNumber, nDecimals, bUseThousandSep, bTrailingZeros );
}
diff --git a/vcl/source/app/idlemgr.cxx b/vcl/source/app/idlemgr.cxx
index 0318bc5d6f2d..59d4aa587b64 100644
--- a/vcl/source/app/idlemgr.cxx
+++ b/vcl/source/app/idlemgr.cxx
@@ -36,8 +36,8 @@
struct ImplIdleData
{
Link maIdleHdl;
- USHORT mnPriority;
- BOOL mbTimeout;
+ sal_uInt16 mnPriority;
+ sal_Bool mbTimeout;
};
DECLARE_LIST( ImplIdleList, ImplIdleData* )
@@ -71,15 +71,15 @@ ImplIdleMgr::~ImplIdleMgr()
// -----------------------------------------------------------------------
-BOOL ImplIdleMgr::InsertIdleHdl( const Link& rLink, USHORT nPriority )
+sal_Bool ImplIdleMgr::InsertIdleHdl( const Link& rLink, sal_uInt16 nPriority )
{
- ULONG nPos = LIST_APPEND;
+ sal_uIntPtr nPos = LIST_APPEND;
ImplIdleData* pIdleData = mpIdleList->First();
while ( pIdleData )
{
- // Wenn Link schon existiert, dann gebe FALSE zurueck
+ // Wenn Link schon existiert, dann gebe sal_False zurueck
if ( pIdleData->maIdleHdl == rLink )
- return FALSE;
+ return sal_False;
// Nach Prioritaet sortieren
if ( nPriority <= pIdleData->mnPriority )
@@ -95,14 +95,14 @@ BOOL ImplIdleMgr::InsertIdleHdl( const Link& rLink, USHORT nPriority )
pIdleData = new ImplIdleData;
pIdleData->maIdleHdl = rLink;
pIdleData->mnPriority = nPriority;
- pIdleData->mbTimeout = FALSE;
+ pIdleData->mbTimeout = sal_False;
mpIdleList->Insert( pIdleData, nPos );
// Wenn Timer noch nicht gestartet ist, dann starten
if ( !maTimer.IsActive() )
maTimer.Start();
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -136,11 +136,11 @@ IMPL_LINK( ImplIdleMgr, TimeoutHdl, Timer*, EMPTYARG )
{
if ( !pIdleData->mbTimeout )
{
- pIdleData->mbTimeout = TRUE;
+ pIdleData->mbTimeout = sal_True;
pIdleData->maIdleHdl.Call( GetpApp() );
// Kann im Handler entfernt worden sein
if ( mpIdleList->GetPos( pIdleData ) != LIST_ENTRY_NOTFOUND )
- pIdleData->mbTimeout = FALSE;
+ pIdleData->mbTimeout = sal_False;
}
pIdleData = mpIdleList->Next();
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 9a2404d36740..b1b89efd6318 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -94,10 +94,10 @@ SalPrinter::~SalPrinter()
{
}
-BOOL SalPrinter::StartJob( const String*, const String&, const String&,
+sal_Bool SalPrinter::StartJob( const String*, const String&, const String&,
ImplJobSetup*, vcl::PrinterController& )
{
- return FALSE;
+ return sal_False;
}
SalInfoPrinter::~SalInfoPrinter()
@@ -116,7 +116,7 @@ SalMenu::~SalMenu()
{
}
-bool SalMenu::ShowNativePopupMenu(FloatingWindow *, const Rectangle&, ULONG )
+bool SalMenu::ShowNativePopupMenu(FloatingWindow *, const Rectangle&, sal_uIntPtr )
{
return false;
}
@@ -126,11 +126,11 @@ bool SalMenu::AddMenuBarButton( const SalMenuButtonItem& )
return false;
}
-void SalMenu::RemoveMenuBarButton( USHORT )
+void SalMenu::RemoveMenuBarButton( sal_uInt16 )
{
}
-Rectangle SalMenu::GetMenuBarButtonRectPixel( USHORT, SalFrame* )
+Rectangle SalMenu::GetMenuBarButtonRectPixel( sal_uInt16, SalFrame* )
{
return Rectangle();
}
diff --git a/vcl/source/app/session.cxx b/vcl/source/app/session.cxx
index c65eb13224e1..986db388df79 100644
--- a/vcl/source/app/session.cxx
+++ b/vcl/source/app/session.cxx
@@ -146,7 +146,7 @@ void VCLSession::callSaveRequested( bool bShutdown, bool bCancelable )
}
}
- ULONG nAcquireCount = Application::ReleaseSolarMutex();
+ sal_uIntPtr nAcquireCount = Application::ReleaseSolarMutex();
for( std::list< Listener >::const_iterator it = aListeners.begin(); it != aListeners.end(); ++it )
it->m_xListener->doSave( bShutdown, bCancelable );
Application::AcquireSolarMutex( nAcquireCount );
@@ -174,7 +174,7 @@ void VCLSession::callInteractionGranted( bool bInteractionGranted )
}
}
- ULONG nAcquireCount = Application::ReleaseSolarMutex();
+ sal_uIntPtr nAcquireCount = Application::ReleaseSolarMutex();
for( std::list< Listener >::const_iterator it = aListeners.begin(); it != aListeners.end(); ++it )
it->m_xListener->approveInteraction( bInteractionGranted );
@@ -192,7 +192,7 @@ void VCLSession::callShutdownCancelled()
m_bInteractionRequested = m_bInteractionDone = m_bInteractionGranted = false;
}
- ULONG nAcquireCount = Application::ReleaseSolarMutex();
+ sal_uIntPtr nAcquireCount = Application::ReleaseSolarMutex();
for( std::list< Listener >::const_iterator it = aListeners.begin(); it != aListeners.end(); ++it )
it->m_xListener->shutdownCanceled();
Application::AcquireSolarMutex( nAcquireCount );
@@ -209,7 +209,7 @@ void VCLSession::callQuit()
m_bInteractionRequested = m_bInteractionDone = m_bInteractionGranted = false;
}
- ULONG nAcquireCount = Application::ReleaseSolarMutex();
+ sal_uIntPtr nAcquireCount = Application::ReleaseSolarMutex();
for( std::list< Listener >::const_iterator it = aListeners.begin(); it != aListeners.end(); ++it )
{
Reference< XSessionManagerListener2 > xListener2( it->m_xListener, UNO_QUERY );
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index 980e0f1c5b58..5e329525b08b 100755
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -149,18 +149,18 @@ void MachineSettings::CopyData()
// -----------------------------------------------------------------------
-BOOL MachineSettings::operator ==( const MachineSettings& rSet ) const
+sal_Bool MachineSettings::operator ==( const MachineSettings& rSet ) const
{
if ( mpData == rSet.mpData )
- return TRUE;
+ return sal_True;
if ( (mpData->mnOptions == rSet.mpData->mnOptions) &&
(mpData->mnScreenOptions == rSet.mpData->mnScreenOptions) &&
(mpData->mnPrintOptions == rSet.mpData->mnPrintOptions) &&
(mpData->mnScreenRasterFontDeviation == rSet.mpData->mnScreenRasterFontDeviation) )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
// =======================================================================
@@ -180,7 +180,7 @@ ImplMouseData::ImplMouseData()
mnDragLinkCode = KEY_SHIFT | KEY_MOD1;
mnContextMenuCode = MOUSE_RIGHT;
mnContextMenuClicks = 1;
- mbContextMenuDown = TRUE;
+ mbContextMenuDown = sal_True;
mnMiddleButtonAction = MOUSE_MIDDLE_AUTOSCROLL;
mnScrollRepeat = 100;
mnButtonStartRepeat = 370;
@@ -282,10 +282,10 @@ void MouseSettings::CopyData()
// -----------------------------------------------------------------------
-BOOL MouseSettings::operator ==( const MouseSettings& rSet ) const
+sal_Bool MouseSettings::operator ==( const MouseSettings& rSet ) const
{
if ( mpData == rSet.mpData )
- return TRUE;
+ return sal_True;
if ( (mpData->mnOptions == rSet.mpData->mnOptions) &&
(mpData->mnDoubleClkTime == rSet.mpData->mnDoubleClkTime) &&
@@ -308,9 +308,9 @@ BOOL MouseSettings::operator ==( const MouseSettings& rSet ) const
(mpData->mnMenuDelay == rSet.mpData->mnMenuDelay) &&
(mpData->mnFollow == rSet.mpData->mnFollow) &&
(mpData->mnWheelBehavior == rSet.mpData->mnWheelBehavior ) )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
// =======================================================================
@@ -392,15 +392,15 @@ void KeyboardSettings::CopyData()
// -----------------------------------------------------------------------
-BOOL KeyboardSettings::operator ==( const KeyboardSettings& rSet ) const
+sal_Bool KeyboardSettings::operator ==( const KeyboardSettings& rSet ) const
{
if ( mpData == rSet.mpData )
- return TRUE;
+ return sal_True;
if ( (mpData->mnOptions == rSet.mpData->mnOptions) )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
// =======================================================================
@@ -629,8 +629,8 @@ void ImplStyleData::SetStandardStyles()
mnUseSystemUIFonts = 1;
mnUseFlatBorders = 0;
mnUseFlatMenues = 0;
- mnUseImagesInMenus = (USHORT)TRUE;
- mnSkipDisabledInMenus = (USHORT)FALSE;
+ mnUseImagesInMenus = (sal_uInt16)sal_True;
+ mnSkipDisabledInMenus = (sal_uInt16)sal_False;
Gradient aGrad( GRADIENT_LINEAR, DEFAULT_WORKSPACE_GRADIENT_START_COLOR, DEFAULT_WORKSPACE_GRADIENT_END_COLOR );
maWorkspaceGradient = Wallpaper( aGrad );
@@ -680,13 +680,13 @@ void StyleSettings::Set3DColors( const Color& rColor )
mpData->maShadowColor = rColor;
mpData->maLightColor.IncreaseLuminance( 64 );
mpData->maShadowColor.DecreaseLuminance( 64 );
- ULONG nRed = mpData->maLightColor.GetRed();
- ULONG nGreen = mpData->maLightColor.GetGreen();
- ULONG nBlue = mpData->maLightColor.GetBlue();
- nRed += (ULONG)(mpData->maShadowColor.GetRed());
- nGreen += (ULONG)(mpData->maShadowColor.GetGreen());
- nBlue += (ULONG)(mpData->maShadowColor.GetBlue());
- mpData->maCheckedColor = Color( (BYTE)(nRed/2), (BYTE)(nGreen/2), (BYTE)(nBlue/2) );
+ sal_uIntPtr nRed = mpData->maLightColor.GetRed();
+ sal_uIntPtr nGreen = mpData->maLightColor.GetGreen();
+ sal_uIntPtr nBlue = mpData->maLightColor.GetBlue();
+ nRed += (sal_uIntPtr)(mpData->maShadowColor.GetRed());
+ nGreen += (sal_uIntPtr)(mpData->maShadowColor.GetGreen());
+ nBlue += (sal_uIntPtr)(mpData->maShadowColor.GetBlue());
+ mpData->maCheckedColor = Color( (sal_uInt8)(nRed/2), (sal_uInt8)(nGreen/2), (sal_uInt8)(nBlue/2) );
}
else
{
@@ -698,7 +698,7 @@ void StyleSettings::Set3DColors( const Color& rColor )
// -----------------------------------------------------------------------
-::rtl::OUString StyleSettings::ImplSymbolsStyleToName( ULONG nStyle ) const
+::rtl::OUString StyleSettings::ImplSymbolsStyleToName( sal_uIntPtr nStyle ) const
{
switch ( nStyle )
{
@@ -716,7 +716,7 @@ void StyleSettings::Set3DColors( const Color& rColor )
// -----------------------------------------------------------------------
-ULONG StyleSettings::ImplNameToSymbolsStyle( const ::rtl::OUString &rName ) const
+sal_uIntPtr StyleSettings::ImplNameToSymbolsStyle( const ::rtl::OUString &rName ) const
{
if ( rName == ::rtl::OUString::createFromAscii( "default" ) )
return STYLE_SYMBOLS_DEFAULT;
@@ -758,22 +758,22 @@ void StyleSettings::SetPreferredSymbolsStyleName( const ::rtl::OUString &rName )
// -----------------------------------------------------------------------
-ULONG StyleSettings::GetCurrentSymbolsStyle() const
+sal_uIntPtr StyleSettings::GetCurrentSymbolsStyle() const
{
// style selected in Tools -> Options... -> OpenOffice.org -> View
- ULONG nStyle = GetSymbolsStyle();
+ sal_uIntPtr nStyle = GetSymbolsStyle();
if ( nStyle == STYLE_SYMBOLS_AUTO || ( !CheckSymbolStyle (nStyle) ) )
{
// the preferred style can be read from the desktop setting by the desktop native widgets modules
- ULONG nPreferredStyle = GetPreferredSymbolsStyle();
+ sal_uIntPtr nPreferredStyle = GetPreferredSymbolsStyle();
if ( nPreferredStyle == STYLE_SYMBOLS_AUTO || ( !CheckSymbolStyle (nPreferredStyle) ) )
{
// use a hardcoded desktop-specific fallback if no preferred style has been detected
static bool sbFallbackDesktopChecked = false;
- static ULONG snFallbackDesktopStyle = STYLE_SYMBOLS_DEFAULT;
+ static sal_uIntPtr snFallbackDesktopStyle = STYLE_SYMBOLS_DEFAULT;
if ( !sbFallbackDesktopChecked )
{
@@ -795,10 +795,10 @@ ULONG StyleSettings::GetCurrentSymbolsStyle() const
// -----------------------------------------------------------------------
-ULONG StyleSettings::GetAutoSymbolsStyle() const
+sal_uIntPtr StyleSettings::GetAutoSymbolsStyle() const
{
const ::rtl::OUString& rDesktopEnvironment = Application::GetDesktopEnvironment();
- ULONG nRet = STYLE_SYMBOLS_DEFAULT;
+ sal_uIntPtr nRet = STYLE_SYMBOLS_DEFAULT;
bool bCont = true;
try
@@ -828,9 +828,9 @@ ULONG StyleSettings::GetAutoSymbolsStyle() const
// falback to any existing style
if ( ! CheckSymbolStyle (nRet) )
{
- for ( ULONG n = 0 ; n <= STYLE_SYMBOLS_THEMES_MAX ; n++ )
+ for ( sal_uIntPtr n = 0 ; n <= STYLE_SYMBOLS_THEMES_MAX ; n++ )
{
- ULONG nStyleToCheck = n;
+ sal_uIntPtr nStyleToCheck = n;
// auto is not a real theme => can't be fallback
if ( nStyleToCheck == STYLE_SYMBOLS_AUTO )
@@ -855,7 +855,7 @@ ULONG StyleSettings::GetAutoSymbolsStyle() const
// -----------------------------------------------------------------------
-bool StyleSettings::CheckSymbolStyle( ULONG nStyle ) const
+bool StyleSettings::CheckSymbolStyle( sal_uIntPtr nStyle ) const
{
static ImplImageTreeSingletonRef aImageTree;
return aImageTree->checkStyle( ImplSymbolsStyleToName( nStyle ) );
@@ -904,7 +904,7 @@ Color StyleSettings::GetFaceGradientColor() const
// compute a brighter face color that can be used in gradients
// for a convex look (eg toolbars)
- USHORT h, s, b;
+ sal_uInt16 h, s, b;
GetFaceColor().RGBtoHSB( h, s, b );
if( s > 1) s=1;
if( b < 98) b=98;
@@ -916,7 +916,7 @@ Color StyleSettings::GetFaceGradientColor() const
Color StyleSettings::GetSeparatorColor() const
{
// compute a brighter shadow color for separators (used in toolbars or between menubar and toolbars on Windows XP)
- USHORT h, s, b;
+ sal_uInt16 h, s, b;
GetShadowColor().RGBtoHSB( h, s, b );
b += b/4;
s -= s/4;
@@ -957,15 +957,15 @@ void StyleSettings::CopyData()
// -----------------------------------------------------------------------
-inline BOOL ImplIsBackOrWhite( const Color& rColor )
+inline sal_Bool ImplIsBackOrWhite( const Color& rColor )
{
- UINT8 nLuminance = rColor.GetLuminance();
+ sal_uInt8 nLuminance = rColor.GetLuminance();
return ( nLuminance < 8 ) || ( nLuminance > 250 );
}
-BOOL StyleSettings::IsHighContrastBlackAndWhite() const
+sal_Bool StyleSettings::IsHighContrastBlackAndWhite() const
{
- BOOL bBWOnly = TRUE;
+ sal_Bool bBWOnly = sal_True;
// Only use B&W if fully B&W, like on GNOME.
// Some colors like CheckedColor and HighlightColor are not B&W in Windows Standard HC Black,
@@ -974,41 +974,41 @@ BOOL StyleSettings::IsHighContrastBlackAndWhite() const
// Unfortunately, GNOME uses a very very dark color (0x000033) instead of BLACK (0x000000)
if ( !ImplIsBackOrWhite( GetFaceColor() ) )
- bBWOnly = FALSE;
+ bBWOnly = sal_False;
else if ( !ImplIsBackOrWhite( GetHighlightTextColor() ) )
- bBWOnly = FALSE;
+ bBWOnly = sal_False;
else if ( !ImplIsBackOrWhite( GetWindowColor() ) )
- bBWOnly = FALSE;
+ bBWOnly = sal_False;
else if ( !ImplIsBackOrWhite( GetWindowTextColor() ) )
- bBWOnly = FALSE;
+ bBWOnly = sal_False;
else if ( !ImplIsBackOrWhite( GetButtonTextColor() ) )
- bBWOnly = FALSE;
+ bBWOnly = sal_False;
else if ( !ImplIsBackOrWhite( GetButtonTextColor() ) )
- bBWOnly = FALSE;
+ bBWOnly = sal_False;
else if ( !ImplIsBackOrWhite( GetGroupTextColor() ) )
- bBWOnly = FALSE;
+ bBWOnly = sal_False;
else if ( !ImplIsBackOrWhite( GetLabelTextColor() ) )
- bBWOnly = FALSE;
+ bBWOnly = sal_False;
else if ( !ImplIsBackOrWhite( GetDialogColor() ) )
- bBWOnly = FALSE;
+ bBWOnly = sal_False;
else if ( !ImplIsBackOrWhite( GetFieldColor() ) )
- bBWOnly = FALSE;
+ bBWOnly = sal_False;
else if ( !ImplIsBackOrWhite( GetMenuColor() ) )
- bBWOnly = FALSE;
+ bBWOnly = sal_False;
else if ( !ImplIsBackOrWhite( GetMenuBarColor() ) )
- bBWOnly = FALSE;
+ bBWOnly = sal_False;
else if ( !ImplIsBackOrWhite( GetMenuHighlightColor() ) )
- bBWOnly = FALSE;
+ bBWOnly = sal_False;
return bBWOnly;
}
// -----------------------------------------------------------------------
-BOOL StyleSettings::operator ==( const StyleSettings& rSet ) const
+sal_Bool StyleSettings::operator ==( const StyleSettings& rSet ) const
{
if ( mpData == rSet.mpData )
- return TRUE;
+ return sal_True;
if ( (mpData->mnOptions == rSet.mpData->mnOptions) &&
(mpData->mnAutoMnemonic == rSet.mpData->mnAutoMnemonic) &&
@@ -1101,9 +1101,9 @@ BOOL StyleSettings::operator ==( const StyleSettings& rSet ) const
(mpData->mnUseImagesInMenus == rSet.mpData->mnUseImagesInMenus) &&
(mpData->mnSkipDisabledInMenus == rSet.mpData->mnSkipDisabledInMenus) &&
(mpData->maFontColor == rSet.mpData->maFontColor ))
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
// =======================================================================
@@ -1111,10 +1111,10 @@ BOOL StyleSettings::operator ==( const StyleSettings& rSet ) const
ImplMiscData::ImplMiscData()
{
mnRefCount = 1;
- mnEnableATT = sal::static_int_cast<USHORT>(~0U);
- mnDisablePrinting = sal::static_int_cast<USHORT>(~0U);
+ mnEnableATT = sal::static_int_cast<sal_uInt16>(~0U);
+ mnDisablePrinting = sal::static_int_cast<sal_uInt16>(~0U);
static const char* pEnv = getenv("SAL_DECIMALSEP_ENABLED" ); // set default without UI
- mbEnableLocalizedDecimalSep = (pEnv != NULL) ? TRUE : FALSE;
+ mbEnableLocalizedDecimalSep = (pEnv != NULL) ? sal_True : sal_False;
}
// -----------------------------------------------------------------------
@@ -1190,24 +1190,24 @@ void MiscSettings::CopyData()
// -----------------------------------------------------------------------
-BOOL MiscSettings::operator ==( const MiscSettings& rSet ) const
+sal_Bool MiscSettings::operator ==( const MiscSettings& rSet ) const
{
if ( mpData == rSet.mpData )
- return TRUE;
+ return sal_True;
if ( (mpData->mnEnableATT == rSet.mpData->mnEnableATT ) &&
(mpData->mnDisablePrinting == rSet.mpData->mnDisablePrinting ) &&
(mpData->mbEnableLocalizedDecimalSep == rSet.mpData->mbEnableLocalizedDecimalSep ) )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL MiscSettings::GetDisablePrinting() const
+sal_Bool MiscSettings::GetDisablePrinting() const
{
- if( mpData->mnDisablePrinting == (USHORT)~0 )
+ if( mpData->mnDisablePrinting == (sal_uInt16)~0 )
{
rtl::OUString aEnable =
vcl::SettingsConfigItem::get()->
@@ -1216,15 +1216,15 @@ BOOL MiscSettings::GetDisablePrinting() const
mpData->mnDisablePrinting = aEnable.equalsIgnoreAsciiCaseAscii( "true" ) ? 1 : 0;
}
- return (BOOL)mpData->mnDisablePrinting;
+ return (sal_Bool)mpData->mnDisablePrinting;
}
// -----------------------------------------------------------------------
-BOOL MiscSettings::GetEnableATToolSupport() const
+sal_Bool MiscSettings::GetEnableATToolSupport() const
{
#ifdef WNT
- if( mpData->mnEnableATT == (USHORT)~0 )
+ if( mpData->mnEnableATT == (sal_uInt16)~0 )
{
// Check in the Windows registry if an AT tool wants Accessibility support to
// be activated ..
@@ -1235,7 +1235,7 @@ BOOL MiscSettings::GetEnableATToolSupport() const
&hkey) )
{
DWORD dwType;
- WIN_BYTE Data[6]; // possible values: "true", "false", "1", "0", DWORD
+ BYTE Data[6]; // possible values: "true", "false", "1", "0", DWORD
DWORD cbData = sizeof(Data);
if( ERROR_SUCCESS == RegQueryValueEx(hkey, "SupportAssistiveTechnology",
@@ -1247,7 +1247,7 @@ BOOL MiscSettings::GetEnableATToolSupport() const
mpData->mnEnableATT = ((0 == stricmp((const char *) Data, "1")) || (0 == stricmp((const char *) Data, "true")));
break;
case REG_DWORD:
- mpData->mnEnableATT = (USHORT) (((DWORD *) Data)[0]);
+ mpData->mnEnableATT = (sal_uInt16) (((DWORD *) Data)[0]);
break;
default:
// Unsupported registry type
@@ -1260,7 +1260,7 @@ BOOL MiscSettings::GetEnableATToolSupport() const
}
#endif
- if( mpData->mnEnableATT == (USHORT)~0 )
+ if( mpData->mnEnableATT == (sal_uInt16)~0 )
{
static const char* pEnv = getenv("SAL_ACCESSIBILITY_ENABLED" );
if( !pEnv || !*pEnv )
@@ -1277,12 +1277,12 @@ BOOL MiscSettings::GetEnableATToolSupport() const
}
}
- return (BOOL)mpData->mnEnableATT;
+ return (sal_Bool)mpData->mnEnableATT;
}
// -----------------------------------------------------------------------
-void MiscSettings::SetDisablePrinting( BOOL bEnable )
+void MiscSettings::SetDisablePrinting( sal_Bool bEnable )
{
if ( bEnable != mpData->mnDisablePrinting )
{
@@ -1296,11 +1296,11 @@ void MiscSettings::SetDisablePrinting( BOOL bEnable )
// -----------------------------------------------------------------------
-void MiscSettings::SetEnableATToolSupport( BOOL bEnable )
+void MiscSettings::SetEnableATToolSupport( sal_Bool bEnable )
{
if ( bEnable != mpData->mnEnableATT )
{
- BOOL bDummy;
+ sal_Bool bDummy;
if( bEnable && !ImplInitAccessBridge(false, bDummy) )
return;
@@ -1313,7 +1313,7 @@ void MiscSettings::SetEnableATToolSupport( BOOL bEnable )
&hkey) )
{
DWORD dwType;
- WIN_BYTE Data[6]; // possible values: "true", "false", 1, 0
+ BYTE Data[6]; // possible values: "true", "false", 1, 0
DWORD cbData = sizeof(Data);
if( ERROR_SUCCESS == RegQueryValueEx(hkey, "SupportAssistiveTechnology",
@@ -1324,7 +1324,7 @@ void MiscSettings::SetEnableATToolSupport( BOOL bEnable )
case REG_SZ:
RegSetValueEx(hkey, "SupportAssistiveTechnology",
NULL, dwType,
- bEnable ? (WIN_BYTE *) "true" : (WIN_BYTE *) "false",
+ bEnable ? (BYTE *) "true" : (BYTE *) "false",
bEnable ? sizeof("true") : sizeof("false"));
break;
case REG_DWORD:
@@ -1350,13 +1350,13 @@ void MiscSettings::SetEnableATToolSupport( BOOL bEnable )
}
}
-void MiscSettings::SetEnableLocalizedDecimalSep( BOOL bEnable )
+void MiscSettings::SetEnableLocalizedDecimalSep( sal_Bool bEnable )
{
CopyData();
mpData->mbEnableLocalizedDecimalSep = bEnable;
}
-BOOL MiscSettings::GetEnableLocalizedDecimalSep() const
+sal_Bool MiscSettings::GetEnableLocalizedDecimalSep() const
{
return mpData->mbEnableLocalizedDecimalSep;
}
@@ -1440,15 +1440,15 @@ void NotificationSettings::CopyData()
// -----------------------------------------------------------------------
-BOOL NotificationSettings::operator ==( const NotificationSettings& rSet ) const
+sal_Bool NotificationSettings::operator ==( const NotificationSettings& rSet ) const
{
if ( mpData == rSet.mpData )
- return TRUE;
+ return sal_True;
if ( (mpData->mnOptions == rSet.mpData->mnOptions) )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
// =======================================================================
@@ -1536,18 +1536,18 @@ void HelpSettings::CopyData()
// -----------------------------------------------------------------------
-BOOL HelpSettings::operator ==( const HelpSettings& rSet ) const
+sal_Bool HelpSettings::operator ==( const HelpSettings& rSet ) const
{
if ( mpData == rSet.mpData )
- return TRUE;
+ return sal_True;
if ( (mpData->mnOptions == rSet.mpData->mnOptions ) &&
(mpData->mnTipDelay == rSet.mpData->mnTipDelay ) &&
(mpData->mnTipTimeout == rSet.mpData->mnTipTimeout ) &&
(mpData->mnBalloonDelay == rSet.mpData->mnBalloonDelay ) )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
// =======================================================================
@@ -1684,12 +1684,12 @@ void AllSettings::CopyData()
// -----------------------------------------------------------------------
-ULONG AllSettings::Update( ULONG nFlags, const AllSettings& rSet )
+sal_uIntPtr AllSettings::Update( sal_uIntPtr nFlags, const AllSettings& rSet )
{
DBG_CHKTHIS( AllSettings, NULL );
DBG_CHKOBJ( &rSet, AllSettings, NULL );
- ULONG nChangeFlags = 0;
+ sal_uIntPtr nChangeFlags = 0;
if ( nFlags & SETTINGS_MACHINE )
{
@@ -1786,12 +1786,12 @@ ULONG AllSettings::Update( ULONG nFlags, const AllSettings& rSet )
// -----------------------------------------------------------------------
-ULONG AllSettings::GetChangeFlags( const AllSettings& rSet ) const
+sal_uIntPtr AllSettings::GetChangeFlags( const AllSettings& rSet ) const
{
DBG_CHKTHIS( AllSettings, NULL );
DBG_CHKOBJ( &rSet, AllSettings, NULL );
- ULONG nChangeFlags = 0;
+ sal_uIntPtr nChangeFlags = 0;
if ( mpData->maMachineSettings != rSet.mpData->maMachineSettings )
nChangeFlags |= SETTINGS_MACHINE;
@@ -1822,13 +1822,13 @@ ULONG AllSettings::GetChangeFlags( const AllSettings& rSet ) const
// -----------------------------------------------------------------------
-BOOL AllSettings::operator ==( const AllSettings& rSet ) const
+sal_Bool AllSettings::operator ==( const AllSettings& rSet ) const
{
DBG_CHKTHIS( AllSettings, NULL );
DBG_CHKOBJ( &rSet, AllSettings, NULL );
if ( mpData == rSet.mpData )
- return TRUE;
+ return sal_True;
if ( (mpData->maMachineSettings == rSet.mpData->maMachineSettings) &&
(mpData->maMouseSettings == rSet.mpData->maMouseSettings) &&
@@ -1841,10 +1841,10 @@ BOOL AllSettings::operator ==( const AllSettings& rSet ) const
(mpData->maLocale == rSet.mpData->maLocale) &&
(mpData->mnWindowUpdate == rSet.mpData->mnWindowUpdate) )
{
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -1910,7 +1910,7 @@ void AllSettings::SetUILanguage( LanguageType )
// -----------------------------------------------------------------------
-BOOL AllSettings::GetLayoutRTL() const
+sal_Bool AllSettings::GetLayoutRTL() const
{
static const char* pEnv = getenv("SAL_RTL_ENABLED" );
static int nUIMirroring = -1; // -1: undef, 0: auto, 1: on 2: off
@@ -1919,7 +1919,7 @@ BOOL AllSettings::GetLayoutRTL() const
if( pEnv )
return true;
- BOOL bRTL = FALSE;
+ sal_Bool bRTL = sal_False;
if( nUIMirroring == -1 )
{
@@ -1929,7 +1929,7 @@ BOOL AllSettings::GetLayoutRTL() const
OUString::createFromAscii( "org.openoffice.Office.Common/I18N/CTL" ) ); // note: case sensisitive !
if ( aNode.isValid() )
{
- BOOL bTmp = BOOL();
+ sal_Bool bTmp = sal_Bool();
::com::sun::star::uno::Any aValue = aNode.getNodeValue( OUString::createFromAscii( "UIMirroring" ) );
if( aValue >>= bTmp )
{
@@ -2065,7 +2065,7 @@ void AllSettings::LocaleSettingsChanged( sal_uInt32 nHint )
if ( nHint & SYSLOCALEOPTIONS_HINT_DECSEP )
{
MiscSettings aMiscSettings = aAllSettings.GetMiscSettings();
- BOOL bIsDecSepAsLocale = aAllSettings.mpData->maSysLocale.GetOptions().IsDecimalSeparatorAsLocale();
+ sal_Bool bIsDecSepAsLocale = aAllSettings.mpData->maSysLocale.GetOptions().IsDecimalSeparatorAsLocale();
if ( aMiscSettings.GetEnableLocalizedDecimalSep() != bIsDecSepAsLocale )
{
aMiscSettings.SetEnableLocalizedDecimalSep( bIsDecSepAsLocale );
diff --git a/vcl/source/app/stdtext.cxx b/vcl/source/app/stdtext.cxx
index 176ec5a1b4c6..7411baaf470e 100644
--- a/vcl/source/app/stdtext.cxx
+++ b/vcl/source/app/stdtext.cxx
@@ -39,7 +39,7 @@
// =======================================================================
-XubString GetStandardText( USHORT nStdText )
+XubString GetStandardText( sal_uInt16 nStdText )
{
ResMgr* pResMgr = ImplGetResMgr();
XubString aText;
@@ -51,7 +51,7 @@ XubString GetStandardText( USHORT nStdText )
// =======================================================================
void ShowServiceNotAvailableError( Window* pParent,
- const XubString& rServiceName, BOOL bError )
+ const XubString& rServiceName, sal_Bool bError )
{
XubString aText( GetStandardText( STANDARD_TEXT_SERVICE_NOT_AVAILABLE ) );
aText.SearchAndReplaceAscii( "%s", rServiceName );
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index e503172eb2c6..2b07c799bf3a 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -82,12 +82,12 @@ using namespace ::com::sun::star::uno;
class ImplReservedKey
{
public:
- ImplReservedKey( KeyCode aKeyCode, USHORT nResId ) :
+ ImplReservedKey( KeyCode aKeyCode, sal_uInt16 nResId ) :
mKeyCode(aKeyCode), mnResId( nResId)
{}
KeyCode mKeyCode;
- USHORT mnResId;
+ sal_uInt16 mnResId;
};
typedef std::pair<ImplReservedKey*, size_t> ReservedKeys;
@@ -184,16 +184,16 @@ struct ImplEventHook
struct ImplPostEventData
{
- ULONG mnEvent;
+ sal_uIntPtr mnEvent;
const Window* mpWin;
- ULONG mnEventId;
+ sal_uIntPtr mnEventId;
KeyEvent maKeyEvent;
MouseEvent maMouseEvent;
- ImplPostEventData( ULONG nEvent, const Window* pWin, const KeyEvent& rKeyEvent ) :
+ ImplPostEventData( sal_uIntPtr nEvent, const Window* pWin, const KeyEvent& rKeyEvent ) :
mnEvent( nEvent ), mpWin( pWin ), mnEventId( 0 ), maKeyEvent( rKeyEvent ) {}
- ImplPostEventData( ULONG nEvent, const Window* pWin, const MouseEvent& rMouseEvent ) :
+ ImplPostEventData( sal_uIntPtr nEvent, const Window* pWin, const MouseEvent& rMouseEvent ) :
mnEvent( nEvent ), mpWin( pWin ), mnEventId( 0 ), maMouseEvent( rMouseEvent ) {}
~ImplPostEventData() {}
@@ -242,7 +242,7 @@ void Application::InitAppRes( const ResId& )
// -----------------------------------------------------------------------
-BOOL Application::QueryExit()
+sal_Bool Application::QueryExit()
{
WorkWindow* pAppWin = ImplGetSVData()->maWinData.mpAppWin;
@@ -250,12 +250,12 @@ BOOL Application::QueryExit()
if ( pAppWin )
return pAppWin->Close();
else
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-void Application::UserEvent( ULONG, void* )
+void Application::UserEvent( sal_uIntPtr, void* )
{
}
@@ -320,15 +320,15 @@ void Application::DeInit()
// -----------------------------------------------------------------------
-USHORT Application::GetCommandLineParamCount()
+sal_uInt16 Application::GetCommandLineParamCount()
{
vos::OStartupInfo aStartInfo;
- return (USHORT)aStartInfo.getCommandArgCount();
+ return (sal_uInt16)aStartInfo.getCommandArgCount();
}
// -----------------------------------------------------------------------
-XubString Application::GetCommandLineParam( USHORT nParam )
+XubString Application::GetCommandLineParam( sal_uInt16 nParam )
{
vos::OStartupInfo aStartInfo;
rtl::OUString aParam;
@@ -368,7 +368,7 @@ const XubString& Application::GetAppFileName()
// -----------------------------------------------------------------------
-USHORT Application::Exception( USHORT nError )
+sal_uInt16 Application::Exception( sal_uInt16 nError )
{
switch ( nError & EXC_MAJORTYPE )
{
@@ -410,12 +410,12 @@ void Application::Abort( const XubString& rErrorText )
// -----------------------------------------------------------------------
-ULONG Application::GetReservedKeyCodeCount()
+sal_uIntPtr Application::GetReservedKeyCodeCount()
{
return ImplReservedKeys::get()->second;
}
-const KeyCode* Application::GetReservedKeyCode( ULONG i )
+const KeyCode* Application::GetReservedKeyCode( sal_uIntPtr i )
{
if( i >= GetReservedKeyCodeCount() )
return NULL;
@@ -423,7 +423,7 @@ const KeyCode* Application::GetReservedKeyCode( ULONG i )
return &ImplReservedKeys::get()->first[i].mKeyCode;
}
-String Application::GetReservedKeyCodeDescription( ULONG i )
+String Application::GetReservedKeyCodeDescription( sal_uIntPtr i )
{
ResMgr* pResMgr = ImplGetResMgr();
if( ! pResMgr )
@@ -442,12 +442,12 @@ void Application::Execute()
DBG_STARTAPPEXECUTE();
ImplSVData* pSVData = ImplGetSVData();
- pSVData->maAppData.mbInAppExecute = TRUE;
+ pSVData->maAppData.mbInAppExecute = sal_True;
while ( !pSVData->maAppData.mbAppQuit )
Application::Yield();
- pSVData->maAppData.mbInAppExecute = FALSE;
+ pSVData->maAppData.mbInAppExecute = sal_False;
DBG_ENDAPPEXECUTE();
}
@@ -509,7 +509,7 @@ void Application::Yield( bool i_bAllEvents )
IMPL_STATIC_LINK_NOINSTANCE( ImplSVAppData, ImplQuitMsg, void*, EMPTYARG )
{
- ImplGetSVData()->maAppData.mbAppQuit = TRUE;
+ ImplGetSVData()->maAppData.mbAppQuit = sal_True;
return 0;
}
@@ -537,7 +537,7 @@ vos::OThread::TThreadIdentifier Application::GetMainThreadIdentifier()
// -----------------------------------------------------------------------
-ULONG Application::ReleaseSolarMutex()
+sal_uIntPtr Application::ReleaseSolarMutex()
{
ImplSVData* pSVData = ImplGetSVData();
return pSVData->mpDefInst->ReleaseYieldMutex();
@@ -545,7 +545,7 @@ ULONG Application::ReleaseSolarMutex()
// -----------------------------------------------------------------------
-void Application::AcquireSolarMutex( ULONG nCount )
+void Application::AcquireSolarMutex( sal_uIntPtr nCount )
{
ImplSVData* pSVData = ImplGetSVData();
pSVData->mpDefInst->AcquireYieldMutex( nCount );
@@ -553,56 +553,56 @@ void Application::AcquireSolarMutex( ULONG nCount )
// -----------------------------------------------------------------------
-BOOL Application::IsInMain()
+sal_Bool Application::IsInMain()
{
return ImplGetSVData()->maAppData.mbInAppMain;
}
// -----------------------------------------------------------------------
-BOOL Application::IsInExecute()
+sal_Bool Application::IsInExecute()
{
return ImplGetSVData()->maAppData.mbInAppExecute;
}
// -----------------------------------------------------------------------
-BOOL Application::IsShutDown()
+sal_Bool Application::IsShutDown()
{
return ImplGetSVData()->maAppData.mbAppQuit;
}
// -----------------------------------------------------------------------
-BOOL Application::IsInModalMode()
+sal_Bool Application::IsInModalMode()
{
return (ImplGetSVData()->maAppData.mnModalMode != 0);
}
// -----------------------------------------------------------------------
-USHORT Application::GetModalModeCount()
+sal_uInt16 Application::GetModalModeCount()
{
return ImplGetSVData()->maAppData.mnModalMode;
}
// -----------------------------------------------------------------------
-USHORT Application::GetDispatchLevel()
+sal_uInt16 Application::GetDispatchLevel()
{
return ImplGetSVData()->maAppData.mnDispatchLevel;
}
// -----------------------------------------------------------------------
-BOOL Application::AnyInput( USHORT nType )
+sal_Bool Application::AnyInput( sal_uInt16 nType )
{
- return (BOOL)ImplGetSVData()->mpDefInst->AnyInput( nType );
+ return (sal_Bool)ImplGetSVData()->mpDefInst->AnyInput( nType );
}
// -----------------------------------------------------------------------
-ULONG Application::GetLastInputInterval()
+sal_uIntPtr Application::GetLastInputInterval()
{
return (Time::GetSystemTicks()-ImplGetSVData()->maAppData.mnLastInputTime);
}
@@ -611,7 +611,7 @@ ULONG Application::GetLastInputInterval()
extern int nImplSysDialog;
-BOOL Application::IsUICaptured()
+sal_Bool Application::IsUICaptured()
{
ImplSVData* pSVData = ImplGetSVData();
// Wenn Mouse gecaptured, oder im TrackingModus oder im Auswahlmodus
@@ -620,37 +620,37 @@ BOOL Application::IsUICaptured()
// D&D aktive !!!
if ( pSVData->maWinData.mpCaptureWin || pSVData->maWinData.mpTrackWin ||
pSVData->maWinData.mpFirstFloat || nImplSysDialog )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL Application::IsUserActive( USHORT nTest )
+sal_Bool Application::IsUserActive( sal_uInt16 nTest )
{
if ( nTest & (USERACTIVE_MOUSEDRAG | USERACTIVE_INPUT) )
{
if ( IsUICaptured() )
- return TRUE;
+ return sal_True;
}
if ( nTest & USERACTIVE_INPUT )
{
if ( GetLastInputInterval() < 500 )
- return TRUE;
+ return sal_True;
if ( AnyInput( INPUT_KEYBOARD ) )
- return TRUE;
+ return sal_True;
}
if ( nTest & USERACTIVE_MODALDIALOG )
{
if ( ImplGetSVData()->maAppData.mnModalDialog )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -674,10 +674,10 @@ void Application::MergeSystemSettings( AllSettings& rSettings )
{
// side effect: ImplUpdateGlobalSettings does an ImplGetFrame()->UpdateSettings
pWindow->ImplUpdateGlobalSettings( *pSVData->maAppData.mpSettings );
- pSVData->maAppData.mbSettingsInit = TRUE;
+ pSVData->maAppData.mbSettingsInit = sal_True;
}
// side effect: ImplUpdateGlobalSettings does an ImplGetFrame()->UpdateSettings
- pWindow->ImplUpdateGlobalSettings( rSettings, FALSE );
+ pWindow->ImplUpdateGlobalSettings( rSettings, sal_False );
}
}
@@ -719,7 +719,7 @@ void Application::SetSettings( const AllSettings& rSettings )
}
ResMgr::SetDefaultLocale( rSettings.GetUILocale() );
*pSVData->maAppData.mpSettings = rSettings;
- ULONG nChangeFlags = aOldSettings.GetChangeFlags( *pSVData->maAppData.mpSettings );
+ sal_uIntPtr nChangeFlags = aOldSettings.GetChangeFlags( *pSVData->maAppData.mpSettings );
if ( nChangeFlags )
{
DataChangedEvent aDCEvt( DATACHANGED_SETTINGS, &aOldSettings, nChangeFlags );
@@ -750,7 +750,7 @@ void Application::SetSettings( const AllSettings& rSettings )
Window* pClientWin = pFrame;
while ( pClientWin->ImplGetClientWindow() )
pClientWin = pClientWin->ImplGetClientWindow();
- pClientWin->UpdateSettings( rSettings, TRUE );
+ pClientWin->UpdateSettings( rSettings, sal_True );
Window* pTempWin = pFrame->mpWindowImpl->mpFrameData->mpFirstOverlap;
while ( pTempWin )
@@ -760,7 +760,7 @@ void Application::SetSettings( const AllSettings& rSettings )
pClientWin = pTempWin;
while ( pClientWin->ImplGetClientWindow() )
pClientWin = pClientWin->ImplGetClientWindow();
- pClientWin->UpdateSettings( rSettings, TRUE );
+ pClientWin->UpdateSettings( rSettings, sal_True );
pTempWin = pTempWin->mpWindowImpl->mpNextOverlap;
}
@@ -839,7 +839,7 @@ void Application::NotifyAllWindows( DataChangedEvent& rDCEvt )
// -----------------------------------------------------------------------
-void Application::ImplCallEventListeners( ULONG nEvent, Window *pWin, void* pData )
+void Application::ImplCallEventListeners( sal_uIntPtr nEvent, Window *pWin, void* pData )
{
ImplSVData* pSVData = ImplGetSVData();
VclWindowEvent aEvent( pWin, nEvent, pData );
@@ -899,13 +899,13 @@ void Application::RemoveKeyListener( const Link& rKeyListener )
// -----------------------------------------------------------------------
-BOOL Application::HandleKey( ULONG nEvent, Window *pWin, KeyEvent* pKeyEvent )
+sal_Bool Application::HandleKey( sal_uIntPtr nEvent, Window *pWin, KeyEvent* pKeyEvent )
{
// let listeners process the key event
VclWindowEvent aEvent( pWin, nEvent, (void *) pKeyEvent );
ImplSVData* pSVData = ImplGetSVData();
- BOOL bProcessed = FALSE;
+ sal_Bool bProcessed = sal_False;
if ( pSVData->maAppData.mpKeyListeners )
if ( !pSVData->maAppData.mpKeyListeners->empty() )
@@ -916,10 +916,10 @@ BOOL Application::HandleKey( ULONG nEvent, Window *pWin, KeyEvent* pKeyEvent )
// -----------------------------------------------------------------------------
-ULONG Application::PostKeyEvent( ULONG nEvent, Window *pWin, KeyEvent* pKeyEvent )
+sal_uIntPtr Application::PostKeyEvent( sal_uIntPtr nEvent, Window *pWin, KeyEvent* pKeyEvent )
{
const ::vos::OGuard aGuard( GetSolarMutex() );
- ULONG nEventId = 0;
+ sal_uIntPtr nEventId = 0;
if( pWin && pKeyEvent )
{
@@ -943,10 +943,10 @@ ULONG Application::PostKeyEvent( ULONG nEvent, Window *pWin, KeyEvent* pKeyEvent
// -----------------------------------------------------------------------------
-ULONG Application::PostMouseEvent( ULONG nEvent, Window *pWin, MouseEvent* pMouseEvent )
+sal_uIntPtr Application::PostMouseEvent( sal_uIntPtr nEvent, Window *pWin, MouseEvent* pMouseEvent )
{
const ::vos::OGuard aGuard( GetSolarMutex() );
- ULONG nEventId = 0;
+ sal_uIntPtr nEventId = 0;
if( pWin && pMouseEvent )
{
@@ -983,8 +983,8 @@ IMPL_STATIC_LINK_NOINSTANCE( Application, PostEventHandler, void*, pCallData )
const ::vos::OGuard aGuard( GetSolarMutex() );
ImplPostEventData* pData = static_cast< ImplPostEventData * >( pCallData );
const void* pEventData;
- ULONG nEvent;
- const ULONG nEventId = pData->mnEventId;
+ sal_uIntPtr nEvent;
+ const sal_uIntPtr nEventId = pData->mnEventId;
switch( pData->mnEvent )
{
@@ -1020,7 +1020,7 @@ IMPL_STATIC_LINK_NOINSTANCE( Application, PostEventHandler, void*, pCallData )
};
if( pData->mpWin && pData->mpWin->mpWindowImpl->mpFrameWindow && pEventData )
- ImplWindowFrameProc( pData->mpWin->mpWindowImpl->mpFrameWindow, NULL, (USHORT) nEvent, pEventData );
+ ImplWindowFrameProc( pData->mpWin->mpWindowImpl->mpFrameWindow, NULL, (sal_uInt16) nEvent, pEventData );
// remove this event from list of posted events, watch for destruction of internal data
::std::list< ImplPostEventPair >::iterator aIter( aPostedEventList.begin() );
@@ -1065,7 +1065,7 @@ void Application::RemoveMouseAndKeyEvents( Window* pWin )
// -----------------------------------------------------------------------
-BOOL Application::IsProcessedMouseOrKeyEvent( ULONG nEventId )
+sal_Bool Application::IsProcessedMouseOrKeyEvent( sal_uIntPtr nEventId )
{
const ::vos::OGuard aGuard( GetSolarMutex() );
@@ -1075,79 +1075,79 @@ BOOL Application::IsProcessedMouseOrKeyEvent( ULONG nEventId )
while( aIter != aPostedEventList.end() )
{
if( (*aIter).second->mnEventId == nEventId )
- return FALSE;
+ return sal_False;
else
++aIter;
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-ULONG Application::PostUserEvent( ULONG nEvent, void* pEventData )
+sal_uIntPtr Application::PostUserEvent( sal_uIntPtr nEvent, void* pEventData )
{
- ULONG nEventId;
+ sal_uIntPtr nEventId;
PostUserEvent( nEventId, nEvent, pEventData );
return nEventId;
}
// -----------------------------------------------------------------------
-ULONG Application::PostUserEvent( const Link& rLink, void* pCaller )
+sal_uIntPtr Application::PostUserEvent( const Link& rLink, void* pCaller )
{
- ULONG nEventId;
+ sal_uIntPtr nEventId;
PostUserEvent( nEventId, rLink, pCaller );
return nEventId;
}
// -----------------------------------------------------------------------
-BOOL Application::PostUserEvent( ULONG& rEventId, ULONG nEvent, void* pEventData )
+sal_Bool Application::PostUserEvent( sal_uIntPtr& rEventId, sal_uIntPtr nEvent, void* pEventData )
{
ImplSVEvent* pSVEvent = new ImplSVEvent;
pSVEvent->mnEvent = nEvent;
pSVEvent->mpData = pEventData;
pSVEvent->mpLink = NULL;
pSVEvent->mpWindow = NULL;
- pSVEvent->mbCall = TRUE;
- rEventId = (ULONG)pSVEvent;
+ pSVEvent->mbCall = sal_True;
+ rEventId = (sal_uIntPtr)pSVEvent;
Window* pDefWindow = ImplGetDefaultWindow();
if ( pDefWindow && pDefWindow->ImplGetFrame()->PostEvent( pSVEvent ) )
- return TRUE;
+ return sal_True;
else
{
rEventId = 0;
delete pSVEvent;
- return FALSE;
+ return sal_False;
}
}
// -----------------------------------------------------------------------
-BOOL Application::PostUserEvent( ULONG& rEventId, const Link& rLink, void* pCaller )
+sal_Bool Application::PostUserEvent( sal_uIntPtr& rEventId, const Link& rLink, void* pCaller )
{
ImplSVEvent* pSVEvent = new ImplSVEvent;
pSVEvent->mnEvent = 0;
pSVEvent->mpData = pCaller;
pSVEvent->mpLink = new Link( rLink );
pSVEvent->mpWindow = NULL;
- pSVEvent->mbCall = TRUE;
- rEventId = (ULONG)pSVEvent;
+ pSVEvent->mbCall = sal_True;
+ rEventId = (sal_uIntPtr)pSVEvent;
Window* pDefWindow = ImplGetDefaultWindow();
if ( pDefWindow && pDefWindow->ImplGetFrame()->PostEvent( pSVEvent ) )
- return TRUE;
+ return sal_True;
else
{
rEventId = 0;
delete pSVEvent;
- return FALSE;
+ return sal_False;
}
}
// -----------------------------------------------------------------------
-void Application::RemoveUserEvent( ULONG nUserEvent )
+void Application::RemoveUserEvent( sal_uIntPtr nUserEvent )
{
if(nUserEvent)
{
@@ -1165,13 +1165,13 @@ void Application::RemoveUserEvent( ULONG nUserEvent )
pSVEvent->mpWindow = NULL;
}
- pSVEvent->mbCall = FALSE;
+ pSVEvent->mbCall = sal_False;
}
}
// -----------------------------------------------------------------------
-BOOL Application::InsertIdleHdl( const Link& rLink, USHORT nPrio )
+sal_Bool Application::InsertIdleHdl( const Link& rLink, sal_uInt16 nPrio )
{
ImplSVData* pSVData = ImplGetSVData();
@@ -1453,7 +1453,7 @@ unsigned int Application::GetBestScreen( const Rectangle& i_rRect )
// -----------------------------------------------------------------------
-BOOL Application::InsertAccel( Accelerator* pAccel )
+sal_Bool Application::InsertAccel( Accelerator* pAccel )
{
ImplSVData* pSVData = ImplGetSVData();
@@ -1484,17 +1484,17 @@ void Application::FlushAccel()
// -----------------------------------------------------------------------
-BOOL Application::CallAccel( const KeyCode& rKeyCode, USHORT nRepeat )
+sal_Bool Application::CallAccel( const KeyCode& rKeyCode, sal_uInt16 nRepeat )
{
ImplSVData* pSVData = ImplGetSVData();
if ( pSVData->maAppData.mpAccelMgr )
{
if ( pSVData->maAppData.mpAccelMgr->IsAccelKey( rKeyCode, nRepeat ) )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -1513,21 +1513,21 @@ Help* Application::GetHelp()
// -----------------------------------------------------------------------
-void Application::EnableAutoHelpId( BOOL bEnabled )
+void Application::EnableAutoHelpId( sal_Bool bEnabled )
{
ImplGetSVData()->maHelpData.mbAutoHelpId = bEnabled;
}
// -----------------------------------------------------------------------
-BOOL Application::IsAutoHelpIdEnabled()
+sal_Bool Application::IsAutoHelpIdEnabled()
{
return ImplGetSVData()->maHelpData.mbAutoHelpId;
}
// -----------------------------------------------------------------------
-void Application::EnableAutoMnemonic( BOOL bEnabled )
+void Application::EnableAutoMnemonic( sal_Bool bEnabled )
{
AllSettings aSettings = GetSettings();
StyleSettings aStyle = aSettings.GetStyleSettings();
@@ -1538,7 +1538,7 @@ void Application::EnableAutoMnemonic( BOOL bEnabled )
// -----------------------------------------------------------------------
-BOOL Application::IsAutoMnemonicEnabled()
+sal_Bool Application::IsAutoMnemonicEnabled()
{
return GetSettings().GetStyleSettings().GetAutoMnemonic();
}
@@ -1576,7 +1576,7 @@ Window* Application::GetDefDialogParent()
// #103442# find some useful dialog parent if there
// was no default set
// NOTE: currently even the default is not used
- if( FALSE && pSVData->maWinData.mpDefDialogParent != NULL )
+ if( sal_False && pSVData->maWinData.mpDefDialogParent != NULL )
return pSVData->maWinData.mpDefDialogParent;
else
{
@@ -1640,28 +1640,28 @@ Window* Application::GetDefDialogParent()
// -----------------------------------------------------------------------
-void Application::EnableDialogCancel( BOOL bDialogCancel )
+void Application::EnableDialogCancel( sal_Bool bDialogCancel )
{
ImplGetSVData()->maAppData.mbDialogCancel = bDialogCancel;
}
// -----------------------------------------------------------------------
-BOOL Application::IsDialogCancelEnabled()
+sal_Bool Application::IsDialogCancelEnabled()
{
return ImplGetSVData()->maAppData.mbDialogCancel;
}
// -----------------------------------------------------------------------
-void Application::SetSystemWindowMode( USHORT nMode )
+void Application::SetSystemWindowMode( sal_uInt16 nMode )
{
ImplGetSVData()->maAppData.mnSysWinMode = nMode;
}
// -----------------------------------------------------------------------
-USHORT Application::GetSystemWindowMode()
+sal_uInt16 Application::GetSystemWindowMode()
{
return ImplGetSVData()->maAppData.mnSysWinMode;
}
@@ -1711,7 +1711,7 @@ UniqueItemId Application::CreateUniqueId()
::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit > Application::GetVCLToolkit()
{
::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit > xT;
- UnoWrapperBase* pWrapper = Application::GetUnoWrapper( TRUE );
+ UnoWrapperBase* pWrapper = Application::GetUnoWrapper( sal_True );
if ( pWrapper )
xT = pWrapper->GetVCLToolkit();
return xT;
@@ -1721,13 +1721,13 @@ UniqueItemId Application::CreateUniqueId()
extern "C" { static void SAL_CALL thisModule() {} }
-UnoWrapperBase* Application::GetUnoWrapper( BOOL bCreateIfNotExist )
+UnoWrapperBase* Application::GetUnoWrapper( sal_Bool bCreateIfNotExist )
{
ImplSVData* pSVData = ImplGetSVData();
- static BOOL bAlreadyTriedToCreate = FALSE;
+ static sal_Bool bAlreadyTriedToCreate = sal_False;
if ( !pSVData->mpUnoWrapper && bCreateIfNotExist && !bAlreadyTriedToCreate )
{
- ::rtl::OUString aLibName = ::vcl::unohelper::CreateLibraryName( "tk", TRUE );
+ ::rtl::OUString aLibName = ::vcl::unohelper::CreateLibraryName( "tk", sal_True );
oslModule hTkLib = osl_loadModuleRelative(
&thisModule, aLibName.pData, SAL_LOADMODULE_DEFAULT );
if ( hTkLib )
@@ -1740,7 +1740,7 @@ UnoWrapperBase* Application::GetUnoWrapper( BOOL bCreateIfNotExist )
}
}
DBG_ASSERT( pSVData->mpUnoWrapper, "UnoWrapper could not be created!" );
- bAlreadyTriedToCreate = TRUE;
+ bAlreadyTriedToCreate = sal_True;
}
return pSVData->mpUnoWrapper;
}
@@ -1782,7 +1782,7 @@ const Link& Application::GetFilterHdl()
// -----------------------------------------------------------------------
-BOOL ImplCallHotKey( const KeyCode& rKeyCode )
+sal_Bool ImplCallHotKey( const KeyCode& rKeyCode )
{
ImplSVData* pSVData = ImplGetSVData();
ImplHotKey* pHotKeyData = pSVData->maAppData.mpFirstHotKey;
@@ -1791,13 +1791,13 @@ BOOL ImplCallHotKey( const KeyCode& rKeyCode )
if ( pHotKeyData->maKeyCode.IsDefinedKeyCodeEqual( rKeyCode ) )
{
pHotKeyData->maLink.Call( pHotKeyData->mpUserData );
- return TRUE;
+ return sal_True;
}
pHotKeyData = pHotKeyData->mpNext;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -1819,7 +1819,7 @@ void ImplFreeHotKeyData()
// -----------------------------------------------------------------------
-ULONG Application::AddHotKey( const KeyCode& rKeyCode, const Link& rLink, void* pData )
+sal_uIntPtr Application::AddHotKey( const KeyCode& rKeyCode, const Link& rLink, void* pData )
{
ImplSVData* pSVData = ImplGetSVData();
ImplHotKey* pHotKeyData = new ImplHotKey;
@@ -1828,12 +1828,12 @@ ULONG Application::AddHotKey( const KeyCode& rKeyCode, const Link& rLink, void*
pHotKeyData->maLink = rLink;
pHotKeyData->mpNext = pSVData->maAppData.mpFirstHotKey;
pSVData->maAppData.mpFirstHotKey = pHotKeyData;
- return (ULONG)pHotKeyData;
+ return (sal_uIntPtr)pHotKeyData;
}
// -----------------------------------------------------------------------
-void Application::RemoveHotKey( ULONG nId )
+void Application::RemoveHotKey( sal_uIntPtr nId )
{
ImplSVData* pSVData = ImplGetSVData();
ImplHotKey* pFindHotKeyData = (ImplHotKey*)nId;
@@ -1877,7 +1877,7 @@ void ImplFreeEventHookData()
// -----------------------------------------------------------------------
-ULONG Application::AddEventHook( VCLEventHookProc pProc, void* pData )
+sal_uIntPtr Application::AddEventHook( VCLEventHookProc pProc, void* pData )
{
ImplSVData* pSVData = ImplGetSVData();
ImplEventHook* pEventHookData = new ImplEventHook;
@@ -1885,12 +1885,12 @@ ULONG Application::AddEventHook( VCLEventHookProc pProc, void* pData )
pEventHookData->mpProc = pProc;
pEventHookData->mpNext = pSVData->maAppData.mpFirstEventHook;
pSVData->maAppData.mpFirstEventHook = pEventHookData;
- return (ULONG)pEventHookData;
+ return (sal_uIntPtr)pEventHookData;
}
// -----------------------------------------------------------------------
-void Application::RemoveEventHook( ULONG nId )
+void Application::RemoveEventHook( sal_uIntPtr nId )
{
ImplSVData* pSVData = ImplGetSVData();
ImplEventHook* pFindEventHookData = (ImplEventHook*)nId;
@@ -1958,14 +1958,14 @@ const LocaleDataWrapper& Application::GetAppLocaleDataWrapper()
// -----------------------------------------------------------------------
-void Application::EnableHeadlessMode( BOOL bEnable )
+void Application::EnableHeadlessMode( sal_Bool bEnable )
{
EnableDialogCancel( bEnable );
}
// -----------------------------------------------------------------------
-BOOL Application::IsHeadlessModeEnabled()
+sal_Bool Application::IsHeadlessModeEnabled()
{
return IsDialogCancelEnabled();
}
@@ -2026,14 +2026,14 @@ void Application::AddToRecentDocumentList(const rtl::OUString& rFileUrl, const r
pSVData->mpDefInst->AddToRecentDocumentList(rFileUrl, rMimeType);
}
-BOOL Application::IsAccessibilityEnabled()
+sal_Bool Application::IsAccessibilityEnabled()
{
- return FALSE;
+ return sal_False;
}
-BOOL InitAccessBridge( BOOL bShowCancel, BOOL &rCancelled )
+sal_Bool InitAccessBridge( sal_Bool bShowCancel, sal_Bool &rCancelled )
{
- BOOL bRet = true;
+ sal_Bool bRet = true;
// Disable Java bridge on UNIX
#if defined UNX
@@ -2047,7 +2047,7 @@ BOOL InitAccessBridge( BOOL bShowCancel, BOOL &rCancelled )
// disable accessibility if the user chooses to continue
AllSettings aSettings = Application::GetSettings();
MiscSettings aMisc = aSettings.GetMiscSettings();
- aMisc.SetEnableATToolSupport( FALSE );
+ aMisc.SetEnableATToolSupport( sal_False );
aSettings.SetMiscSettings( aMisc );
Application::SetSettings( aSettings );
}
diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx
index f8b0d1d3379f..614684891be1 100644
--- a/vcl/source/app/svdata.cxx
+++ b/vcl/source/app/svdata.cxx
@@ -281,16 +281,16 @@ com::sun::star::uno::Any AccessBridgeCurrentContext::getValueByName( const rtl::
}
-bool ImplInitAccessBridge(BOOL bAllowCancel, BOOL &rCancelled)
+bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool &rCancelled)
{
- rCancelled = FALSE;
+ rCancelled = sal_False;
bool bErrorMessage = true;
// Note:
- // if bAllowCancel is TRUE we were called from application startup
+ // if bAllowCancel is sal_True we were called from application startup
// where we will disable any Java errorboxes and show our own accessibility dialog if Java throws an exception
- // if bAllowCancel is FALSE we were called from Tools->Options
+ // if bAllowCancel is sal_False we were called from Tools->Options
// where we will see Java errorboxes, se we do not show our dialogs in addition to Java's
try
@@ -367,7 +367,7 @@ bool ImplInitAccessBridge(BOOL bAllowCancel, BOOL &rCancelled)
// Do not change the setting in case the user chooses to cancel
if( SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL == ret )
- rCancelled = TRUE;
+ rCancelled = sal_True;
}
return false;
@@ -392,7 +392,7 @@ bool ImplInitAccessBridge(BOOL bAllowCancel, BOOL &rCancelled)
// Do not change the setting in case the user chooses to cancel
if( SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL == ret )
- rCancelled = TRUE;
+ rCancelled = sal_True;
}
return false;
@@ -417,7 +417,7 @@ bool ImplInitAccessBridge(BOOL bAllowCancel, BOOL &rCancelled)
// Do not change the setting in case the user chooses to cancel
if( SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL == ret )
- rCancelled = TRUE;
+ rCancelled = sal_True;
}
return false;
@@ -442,7 +442,7 @@ bool ImplInitAccessBridge(BOOL bAllowCancel, BOOL &rCancelled)
// Do not change the setting in case the user chooses to cancel
if( SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL == ret )
- rCancelled = TRUE;
+ rCancelled = sal_True;
}
return false;
@@ -484,7 +484,7 @@ bool ImplInitAccessBridge(BOOL bAllowCancel, BOOL &rCancelled)
// Do not change the setting in case the user chooses to cancel
if( SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL == ret )
- rCancelled = TRUE;
+ rCancelled = sal_True;
}
else
{
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
index 4efa2b659e7c..d68b0c462ddf 100644
--- a/vcl/source/app/svmain.cxx
+++ b/vcl/source/app/svmain.cxx
@@ -107,12 +107,12 @@ public:
::vos::OSignalHandler::TSignalAction SAL_CALL ImplVCLExceptionHandler::signal( ::vos::OSignalHandler::TSignalInfo* pInfo )
{
- static BOOL bIn = FALSE;
+ static sal_Bool bIn = sal_False;
// Wenn wir nocheinmal abstuerzen, verabschieden wir uns gleich
if ( !bIn )
{
- USHORT nVCLException = 0;
+ sal_uInt16 nVCLException = 0;
// UAE
if ( (pInfo->Signal == osl_Signal_AccessViolation) ||
@@ -138,7 +138,7 @@ public:
if ( nVCLException )
{
- bIn = TRUE;
+ bIn = sal_True;
::vos::OGuard aLock(&Application::GetSolarMutex());
@@ -147,12 +147,12 @@ public:
ImplSVData* pSVData = ImplGetSVData();
if ( pSVData->mpApp )
{
- USHORT nOldMode = Application::GetSystemWindowMode();
+ sal_uInt16 nOldMode = Application::GetSystemWindowMode();
Application::SetSystemWindowMode( nOldMode & ~SYSTEMWINDOW_MODE_NOAUTOMODE );
pSVData->mpApp->Exception( nVCLException );
Application::SetSystemWindowMode( nOldMode );
}
- bIn = FALSE;
+ bIn = sal_False;
return vos::OSignalHandler::TAction_CallNextHandler;
}
@@ -162,7 +162,7 @@ public:
}
// =======================================================================
-BOOL ImplSVMain()
+sal_Bool ImplSVMain()
{
// The 'real' SVMain()
RTL_LOGFILE_CONTEXT( aLog, "vcl (ss112471) ::SVMain" );
@@ -174,14 +174,14 @@ BOOL ImplSVMain()
Reference<XMultiServiceFactory> xMS;
- BOOL bInit = InitVCL( xMS );
+ sal_Bool bInit = InitVCL( xMS );
if( bInit )
{
// Application-Main rufen
- pSVData->maAppData.mbInAppMain = TRUE;
+ pSVData->maAppData.mbInAppMain = sal_True;
pSVData->mpApp->Main();
- pSVData->maAppData.mbInAppMain = FALSE;
+ pSVData->maAppData.mbInAppMain = sal_False;
}
if( pSVData->mxDisplayConnection.is() )
@@ -202,7 +202,7 @@ BOOL ImplSVMain()
Reference< XComponent > xComponent(pSVData->mxAccessBridge, UNO_QUERY);
if( xComponent.is() )
{
- ULONG nCount = Application::ReleaseSolarMutex();
+ sal_uIntPtr nCount = Application::ReleaseSolarMutex();
xComponent->dispose();
Application::AcquireSolarMutex(nCount);
pSVData->mxAccessBridge.clear();
@@ -212,12 +212,12 @@ BOOL ImplSVMain()
return bInit;
}
-BOOL SVMain()
+sal_Bool SVMain()
{
// #i47888# allow for alternative initialization as required for e.g. MacOSX
- extern BOOL ImplSVMainHook( BOOL* );
+ extern sal_Bool ImplSVMainHook( sal_Bool* );
- BOOL bInit;
+ sal_Bool bInit;
if( ImplSVMainHook( &bInit ) )
return bInit;
else
@@ -265,12 +265,12 @@ Any SAL_CALL DesktopEnvironmentContext::getValueByName( const rtl::OUString& Nam
return retVal;
}
-BOOL InitVCL( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr )
+sal_Bool InitVCL( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr )
{
RTL_LOGFILE_CONTEXT( aLog, "vcl (ss112471) ::InitVCL" );
if( pExceptionHandler != NULL )
- return FALSE;
+ return sal_False;
if( ! ImplGetSVData() )
ImplInitSVData();
@@ -303,7 +303,7 @@ BOOL InitVCL( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XM
RTL_LOGFILE_CONTEXT_TRACE( aLog, "{ ::CreateSalInstance" );
pSVData->mpDefInst = CreateSalInstance();
if ( !pSVData->mpDefInst )
- return FALSE;
+ return sal_False;
RTL_LOGFILE_CONTEXT_TRACE( aLog, "} ::CreateSalInstance" );
// Desktop Environment context (to be able to get value of "system.desktop-environment" as soon as possible)
@@ -327,7 +327,7 @@ BOOL InitVCL( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XM
// Initialize global data
pSVData->maGDIData.mpScreenFontList = new ImplDevFontList;
- pSVData->maGDIData.mpScreenFontCache = new ImplFontCache( FALSE );
+ pSVData->maGDIData.mpScreenFontCache = new ImplFontCache( sal_False );
pSVData->maGDIData.mpGrfConverter = new GraphicConverter;
// Exception-Handler setzen
@@ -336,13 +336,13 @@ BOOL InitVCL( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XM
// Debug-Daten initialisieren
DBGGUI_INIT();
- return TRUE;
+ return sal_True;
}
void DeInitVCL()
{
ImplSVData* pSVData = ImplGetSVData();
- pSVData->mbDeInit = TRUE;
+ pSVData->mbDeInit = sal_True;
vcl::DeleteOnDeinitBase::ImplDeleteOnDeInit();
diff --git a/vcl/source/app/svmainhook.cxx b/vcl/source/app/svmainhook.cxx
index 413b28b3affb..789af7efbe2b 100644
--- a/vcl/source/app/svmainhook.cxx
+++ b/vcl/source/app/svmainhook.cxx
@@ -31,9 +31,9 @@
#ifndef MACOSX
-BOOL ImplSVMainHook( BOOL * )
+sal_Bool ImplSVMainHook( sal_Bool * )
{
- return FALSE; // indicate that ImplSVMainHook is not implemented
+ return sal_False; // indicate that ImplSVMainHook is not implemented
}
#else
@@ -45,7 +45,7 @@ BOOL ImplSVMainHook( BOOL * )
#include <postmac.h>
#include <unistd.h>
-extern BOOL ImplSVMain();
+extern sal_Bool ImplSVMain();
// ============================================================================
@@ -56,7 +56,7 @@ static void SourceContextCallBack( void *pInfo )
struct ThreadContext
{
- BOOL* pRet;
+ sal_Bool* pRet;
CFRunLoopRef* pRunLoopRef;
};
@@ -75,7 +75,7 @@ static void RunSVMain(void *pData)
_exit( 0 );
}
-BOOL ImplSVMainHook( BOOL *pbInit )
+sal_Bool ImplSVMainHook( sal_Bool *pbInit )
{
// Mac OS X requires that any Cocoa code have a CFRunLoop started in the
// primordial thread. Since all of the AWT classes in Java 1.4 and higher
@@ -109,7 +109,7 @@ BOOL ImplSVMainHook( BOOL *pbInit )
osl_joinWithThread( hThreadID );
osl_destroyThread( hThreadID );
- return TRUE; // indicate that ImplSVMainHook is implemented
+ return sal_True; // indicate that ImplSVMainHook is implemented
}
#endif // MACOSX
diff --git a/vcl/source/app/timer.cxx b/vcl/source/app/timer.cxx
index 356608e7fbfc..26cf1b215ea6 100644
--- a/vcl/source/app/timer.cxx
+++ b/vcl/source/app/timer.cxx
@@ -43,7 +43,7 @@
// =======================================================================
-#define MAX_TIMER_PERIOD ((ULONG)0xFFFFFFFF)
+#define MAX_TIMER_PERIOD ((sal_uIntPtr)0xFFFFFFFF)
// ---------------------
// - TimeManager-Types -
@@ -53,10 +53,10 @@ struct ImplTimerData
{
ImplTimerData* mpNext; // Pointer to the next Instance
Timer* mpSVTimer; // Pointer to SV Timer instance
- ULONG mnUpdateTime; // Last Update Time
- ULONG mnTimerUpdate; // TimerCallbackProcs on stack
- BOOL mbDelete; // Wurde Timer waehren Update() geloescht
- BOOL mbInTimeout; // Befinden wir uns im Timeout-Handler
+ sal_uIntPtr mnUpdateTime; // Last Update Time
+ sal_uIntPtr mnTimerUpdate; // TimerCallbackProcs on stack
+ sal_Bool mbDelete; // Wurde Timer waehren Update() geloescht
+ sal_Bool mbInTimeout; // Befinden wir uns im Timeout-Handler
};
// =======================================================================
@@ -73,7 +73,7 @@ void Timer::ImplDeInitTimer()
ImplTimerData* pTempTimerData = pTimerData;
if ( pTimerData->mpSVTimer )
{
- pTimerData->mpSVTimer->mbActive = FALSE;
+ pTimerData->mpSVTimer->mbActive = sal_False;
pTimerData->mpSVTimer->mpTimerData = NULL;
}
pTimerData = pTimerData->mpNext;
@@ -90,7 +90,7 @@ void Timer::ImplDeInitTimer()
// -----------------------------------------------------------------------
-static void ImplStartTimer( ImplSVData* pSVData, ULONG nMS )
+static void ImplStartTimer( ImplSVData* pSVData, sal_uIntPtr nMS )
{
if ( !nMS )
nMS = 1;
@@ -109,15 +109,15 @@ void Timer::ImplTimerCallbackProc()
ImplSVData* pSVData = ImplGetSVData();
ImplTimerData* pTimerData;
ImplTimerData* pPrevTimerData;
- ULONG nMinPeriod = MAX_TIMER_PERIOD;
- ULONG nDeltaTime;
- ULONG nTime = Time::GetSystemTicks();
+ sal_uIntPtr nMinPeriod = MAX_TIMER_PERIOD;
+ sal_uIntPtr nDeltaTime;
+ sal_uIntPtr nTime = Time::GetSystemTicks();
if ( pSVData->mbNoCallTimer )
return;
pSVData->mnTimerUpdate++;
- pSVData->mbNotAllTimerCalled = TRUE;
+ pSVData->mbNotAllTimerCalled = sal_True;
// Suche Timer raus, wo der Timeout-Handler gerufen werden muss
pTimerData = pSVData->mpFirstTimerData;
@@ -138,14 +138,14 @@ void Timer::ImplTimerCallbackProc()
// kein AutoTimer, dann anhalten
if ( !pTimerData->mpSVTimer->mbAuto )
{
- pTimerData->mpSVTimer->mbActive = FALSE;
- pTimerData->mbDelete = TRUE;
+ pTimerData->mpSVTimer->mbActive = sal_False;
+ pTimerData->mbDelete = sal_True;
}
// call Timeout
- pTimerData->mbInTimeout = TRUE;
+ pTimerData->mbInTimeout = sal_True;
pTimerData->mpSVTimer->Timeout();
- pTimerData->mbInTimeout = FALSE;
+ pTimerData->mbInTimeout = sal_False;
}
}
@@ -153,7 +153,7 @@ void Timer::ImplTimerCallbackProc()
}
// Neue Zeit ermitteln
- ULONG nNewTime = Time::GetSystemTicks();
+ sal_uIntPtr nNewTime = Time::GetSystemTicks();
pPrevTimerData = NULL;
pTimerData = pSVData->mpFirstTimerData;
while ( pTimerData )
@@ -214,7 +214,7 @@ void Timer::ImplTimerCallbackProc()
ImplStartTimer( pSVData, nMinPeriod );
pSVData->mnTimerUpdate--;
- pSVData->mbNotAllTimerCalled = FALSE;
+ pSVData->mbNotAllTimerCalled = sal_False;
}
// =======================================================================
@@ -223,8 +223,8 @@ Timer::Timer()
{
mpTimerData = NULL;
mnTimeout = 1;
- mbAuto = FALSE;
- mbActive = FALSE;
+ mbAuto = sal_False;
+ mbActive = sal_False;
}
// -----------------------------------------------------------------------
@@ -233,8 +233,8 @@ Timer::Timer( const Timer& rTimer )
{
mpTimerData = NULL;
mnTimeout = rTimer.mnTimeout;
- mbAuto = FALSE;
- mbActive = FALSE;
+ mbAuto = sal_False;
+ mbActive = sal_False;
maTimeoutHdl = rTimer.maTimeoutHdl;
if ( rTimer.IsActive() )
@@ -247,7 +247,7 @@ Timer::~Timer()
{
if ( mpTimerData )
{
- mpTimerData->mbDelete = TRUE;
+ mpTimerData->mbDelete = sal_True;
mpTimerData->mpSVTimer = NULL;
}
}
@@ -261,7 +261,7 @@ void Timer::Timeout()
// -----------------------------------------------------------------------
-void Timer::SetTimeout( ULONG nNewTimeout )
+void Timer::SetTimeout( sal_uIntPtr nNewTimeout )
{
mnTimeout = nNewTimeout;
@@ -278,7 +278,7 @@ void Timer::SetTimeout( ULONG nNewTimeout )
void Timer::Start()
{
- mbActive = TRUE;
+ mbActive = sal_True;
ImplSVData* pSVData = ImplGetSVData();
if ( !mpTimerData )
@@ -298,8 +298,8 @@ void Timer::Start()
mpTimerData->mpSVTimer = this;
mpTimerData->mnUpdateTime = Time::GetSystemTicks();
mpTimerData->mnTimerUpdate = pSVData->mnTimerUpdate;
- mpTimerData->mbDelete = FALSE;
- mpTimerData->mbInTimeout = FALSE;
+ mpTimerData->mbDelete = sal_False;
+ mpTimerData->mbInTimeout = sal_False;
// !!!!! Wegen SFX hinten einordnen !!!!!
ImplTimerData* pPrev = NULL;
@@ -326,7 +326,7 @@ void Timer::Start()
{
mpTimerData->mnUpdateTime = Time::GetSystemTicks();
mpTimerData->mnTimerUpdate = pSVData->mnTimerUpdate;
- mpTimerData->mbDelete = FALSE;
+ mpTimerData->mbDelete = sal_False;
}
}
@@ -334,10 +334,10 @@ void Timer::Start()
void Timer::Stop()
{
- mbActive = FALSE;
+ mbActive = sal_False;
if ( mpTimerData )
- mpTimerData->mbDelete = TRUE;
+ mpTimerData->mbDelete = sal_True;
}
// -----------------------------------------------------------------------
@@ -347,7 +347,7 @@ Timer& Timer::operator=( const Timer& rTimer )
if ( IsActive() )
Stop();
- mbActive = FALSE;
+ mbActive = sal_False;
mnTimeout = rTimer.mnTimeout;
maTimeoutHdl = rTimer.maTimeoutHdl;
@@ -361,14 +361,14 @@ Timer& Timer::operator=( const Timer& rTimer )
AutoTimer::AutoTimer()
{
- mbAuto = TRUE;
+ mbAuto = sal_True;
}
// -----------------------------------------------------------------------
AutoTimer::AutoTimer( const AutoTimer& rTimer ) : Timer( rTimer )
{
- mbAuto = TRUE;
+ mbAuto = sal_True;
}
// -----------------------------------------------------------------------
diff --git a/vcl/source/app/unohelp.cxx b/vcl/source/app/unohelp.cxx
index 237156a5f9f7..711f9fb06ae1 100644
--- a/vcl/source/app/unohelp.cxx
+++ b/vcl/source/app/unohelp.cxx
@@ -190,7 +190,7 @@ uno::Reference < i18n::XCollator > vcl::unohelper::CreateCollator()
return xB;
}
-::rtl::OUString vcl::unohelper::CreateLibraryName( const sal_Char* pModName, BOOL bSUPD )
+::rtl::OUString vcl::unohelper::CreateLibraryName( const sal_Char* pModName, sal_Bool bSUPD )
{
// create variable library name suffixes
OUString aDLLSuffix = OUString::createFromAscii( STRING(DLLPOSTFIX) );
diff --git a/vcl/source/app/unohelp2.cxx b/vcl/source/app/unohelp2.cxx
index 5b6d7c73416a..534f08816739 100644
--- a/vcl/source/app/unohelp2.cxx
+++ b/vcl/source/app/unohelp2.cxx
@@ -84,7 +84,7 @@ namespace vcl { namespace unohelper {
{
uno::Any aAny;
- ULONG nT = SotExchange::GetFormat( rFlavor );
+ sal_uIntPtr nT = SotExchange::GetFormat( rFlavor );
if ( nT == SOT_FORMAT_STRING )
{
aAny <<= (::rtl::OUString)GetString();
@@ -105,7 +105,7 @@ namespace vcl { namespace unohelper {
sal_Bool TextDataObject::isDataFlavorSupported( const datatransfer::DataFlavor& rFlavor ) throw(uno::RuntimeException)
{
- ULONG nT = SotExchange::GetFormat( rFlavor );
+ sal_uIntPtr nT = SotExchange::GetFormat( rFlavor );
return ( nT == SOT_FORMAT_STRING );
}
diff --git a/vcl/source/app/vclevent.cxx b/vcl/source/app/vclevent.cxx
index 0c98da48e6d0..85f02e5237f8 100644
--- a/vcl/source/app/vclevent.cxx
+++ b/vcl/source/app/vclevent.cxx
@@ -40,7 +40,7 @@ TYPEINIT0(VclSimpleEvent);
TYPEINIT1(VclWindowEvent, VclSimpleEvent);
TYPEINIT1(VclMenuEvent, VclSimpleEvent);
-VclAccessibleEvent::VclAccessibleEvent( ULONG n, const Reference<XAccessible>& rxAccessible ) :
+VclAccessibleEvent::VclAccessibleEvent( sal_uIntPtr n, const Reference<XAccessible>& rxAccessible ) :
VclSimpleEvent(n),
mxAccessible(rxAccessible)
{
@@ -80,9 +80,9 @@ void VclEventListeners::Call( VclSimpleEvent* pEvent ) const
}
}
-BOOL VclEventListeners::Process( VclSimpleEvent* pEvent ) const
+sal_Bool VclEventListeners::Process( VclSimpleEvent* pEvent ) const
{
- BOOL bProcessed = FALSE;
+ sal_Bool bProcessed = sal_False;
// Copy the list, because this can be destroyed when calling a Link...
std::list<Link> aCopy( *this );
std::list<Link>::iterator aIter( aCopy.begin() );
@@ -90,7 +90,7 @@ BOOL VclEventListeners::Process( VclSimpleEvent* pEvent ) const
{
if( (*aIter).Call( pEvent ) != 0 )
{
- bProcessed = TRUE;
+ bProcessed = sal_True;
break;
}
aIter++;
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 08759f37d7a6..038a77518935 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -83,8 +83,8 @@ class ImplCommonButtonData
{
public:
Rectangle maFocusRect;
- USHORT mnButtonState;
- BOOL mbSmallSymbol;
+ sal_uInt16 mnButtonState;
+ sal_Bool mbSmallSymbol;
Image maImage;
Image maImageHC;
@@ -102,7 +102,7 @@ public:
ImplCommonButtonData::ImplCommonButtonData()
{
mnButtonState = 0;
- mbSmallSymbol = FALSE;
+ mbSmallSymbol = sal_False;
mpBitmapEx = NULL;
mpBitmapExHC = NULL;
@@ -190,12 +190,12 @@ XubString Button::GetStandardText( StandardButtonType eButton )
ResMgr* pResMgr = ImplGetResMgr();
if( pResMgr )
{
- ResId aResId( aResIdAry[(USHORT)eButton].nResId, *pResMgr );
+ ResId aResId( aResIdAry[(sal_uInt16)eButton].nResId, *pResMgr );
aText = String( aResId );
}
else
{
- ByteString aT( aResIdAry[(USHORT)eButton].pDefText );
+ ByteString aT( aResIdAry[(sal_uInt16)eButton].pDefText );
aText = String( aT, RTL_TEXTENCODING_ASCII_US );
}
return aText;
@@ -209,7 +209,7 @@ XubString Button::GetStandardHelpText( StandardButtonType /* eButton */ )
return aHelpText;
}
// -----------------------------------------------------------------------
-BOOL Button::SetModeImage( const Image& rImage, BmpColorMode eMode )
+sal_Bool Button::SetModeImage( const Image& rImage, BmpColorMode eMode )
{
if( eMode == BMP_COLOR_NORMAL )
{
@@ -236,9 +236,9 @@ BOOL Button::SetModeImage( const Image& rImage, BmpColorMode eMode )
}
}
else
- return FALSE;
+ return sal_False;
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -257,7 +257,7 @@ const Image Button::GetModeImage( BmpColorMode eMode ) const
}
// -----------------------------------------------------------------------
-BOOL Button::HasImage() const
+sal_Bool Button::HasImage() const
{
return !!(mpButtonData->maImage);
}
@@ -279,7 +279,7 @@ ImageAlign Button::GetImageAlign() const
}
// -----------------------------------------------------------------------
-BOOL Button::SetModeBitmap( const BitmapEx& rBitmap, BmpColorMode eMode )
+sal_Bool Button::SetModeBitmap( const BitmapEx& rBitmap, BmpColorMode eMode )
{
if ( SetModeImage( rBitmap, eMode ) )
{
@@ -294,11 +294,11 @@ BOOL Button::SetModeBitmap( const BitmapEx& rBitmap, BmpColorMode eMode )
mpButtonData->mpBitmapExHC = new BitmapEx( rBitmap );
}
else
- return FALSE;
+ return sal_False;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -334,11 +334,11 @@ const Rectangle& Button::GetFocusRect() const
// -----------------------------------------------------------------------
-USHORT Button::ImplGetTextStyle( XubString& rText, WinBits nWinStyle,
- ULONG nDrawFlags )
+sal_uInt16 Button::ImplGetTextStyle( XubString& rText, WinBits nWinStyle,
+ sal_uIntPtr nDrawFlags )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- USHORT nTextStyle = FixedText::ImplGetTextStyle( nWinStyle & ~WB_DEFBUTTON );
+ sal_uInt16 nTextStyle = FixedText::ImplGetTextStyle( nWinStyle & ~WB_DEFBUTTON );
if ( nDrawFlags & WINDOW_DRAW_NOMNEMONIC )
{
@@ -365,15 +365,15 @@ USHORT Button::ImplGetTextStyle( XubString& rText, WinBits nWinStyle,
// -----------------------------------------------------------------------
void Button::ImplDrawAlignedImage( OutputDevice* pDev, Point& rPos,
- Size& rSize, BOOL bLayout,
- ULONG nImageSep, ULONG nDrawFlags,
- USHORT nTextStyle, Rectangle *pSymbolRect,
+ Size& rSize, sal_Bool bLayout,
+ sal_uIntPtr nImageSep, sal_uIntPtr nDrawFlags,
+ sal_uInt16 nTextStyle, Rectangle *pSymbolRect,
bool bAddImageSep )
{
XubString aText( GetText() );
- BOOL bDrawImage = HasImage() && ! ( ImplGetButtonState() & BUTTON_DRAW_NOIMAGE );
- BOOL bDrawText = aText.Len() && ! ( ImplGetButtonState() & BUTTON_DRAW_NOTEXT );
- BOOL bHasSymbol = pSymbolRect ? TRUE : FALSE;
+ sal_Bool bDrawImage = HasImage() && ! ( ImplGetButtonState() & BUTTON_DRAW_NOIMAGE );
+ sal_Bool bDrawText = aText.Len() && ! ( ImplGetButtonState() & BUTTON_DRAW_NOTEXT );
+ sal_Bool bHasSymbol = pSymbolRect ? sal_True : sal_False;
// No text and no image => nothing to do => return
if ( !bDrawImage && !bDrawText && !bHasSymbol )
@@ -633,7 +633,7 @@ void Button::ImplDrawAlignedImage( OutputDevice* pDev, Point& rPos,
}
}
- USHORT nStyle = 0;
+ sal_uInt16 nStyle = 0;
if ( ! ( nDrawFlags & WINDOW_DRAW_NODISABLE ) &&
! IsEnabled() )
@@ -693,13 +693,13 @@ const Rectangle& Button::ImplGetFocusRect() const
}
// -----------------------------------------------------------------------
-USHORT& Button::ImplGetButtonState()
+sal_uInt16& Button::ImplGetButtonState()
{
return mpButtonData->mnButtonState;
}
// -----------------------------------------------------------------------
-USHORT Button::ImplGetButtonState() const
+sal_uInt16 Button::ImplGetButtonState() const
{
return mpButtonData->mnButtonState;
}
@@ -720,13 +720,13 @@ SymbolAlign Button::ImplGetSymbolAlign() const
return mpButtonData->meSymbolAlign;
}
// -----------------------------------------------------------------------
-void Button::ImplSetSmallSymbol( BOOL bSmall )
+void Button::ImplSetSmallSymbol( sal_Bool bSmall )
{
mpButtonData->mbSmallSymbol = bSmall;
}
// -----------------------------------------------------------------------
-void Button::EnableImageDisplay( BOOL bEnable )
+void Button::EnableImageDisplay( sal_Bool bEnable )
{
if( bEnable )
mpButtonData->mnButtonState &= ~BUTTON_DRAW_NOIMAGE;
@@ -735,13 +735,13 @@ void Button::EnableImageDisplay( BOOL bEnable )
}
// -----------------------------------------------------------------------
-BOOL Button::IsImageDisplayEnabled()
+sal_Bool Button::IsImageDisplayEnabled()
{
return (mpButtonData->mnButtonState & BUTTON_DRAW_NOIMAGE) == 0;
}
// -----------------------------------------------------------------------
-void Button::EnableTextDisplay( BOOL bEnable )
+void Button::EnableTextDisplay( sal_Bool bEnable )
{
if( bEnable )
mpButtonData->mnButtonState &= ~BUTTON_DRAW_NOTEXT;
@@ -750,7 +750,7 @@ void Button::EnableTextDisplay( BOOL bEnable )
}
// -----------------------------------------------------------------------
-BOOL Button::IsTextDisplayEnabled()
+sal_Bool Button::IsTextDisplayEnabled()
{
return (mpButtonData->mnButtonState & BUTTON_DRAW_NOTEXT) == 0;
}
@@ -770,22 +770,22 @@ void Button::DataChanged( const DataChangedEvent& rDCEvt )
const AllSettings* pOldSettings = rDCEvt.GetOldSettings();
if ( pOldSettings )
{
- BOOL bResetStyleSettings = FALSE;
+ sal_Bool bResetStyleSettings = sal_False;
AllSettings aAllSettings = GetSettings();
StyleSettings aStyleSetting = aAllSettings.GetStyleSettings();
- USHORT nCheckBoxStyle = aStyleSetting.GetCheckBoxStyle();
+ sal_uInt16 nCheckBoxStyle = aStyleSetting.GetCheckBoxStyle();
if ( nCheckBoxStyle != pOldSettings->GetStyleSettings().GetCheckBoxStyle() )
{
aStyleSetting.SetCheckBoxStyle( pOldSettings->GetStyleSettings().GetCheckBoxStyle() );
- bResetStyleSettings = TRUE;
+ bResetStyleSettings = sal_True;
}
- USHORT nRadioButtonStyle = aStyleSetting.GetRadioButtonStyle();
+ sal_uInt16 nRadioButtonStyle = aStyleSetting.GetRadioButtonStyle();
if ( nRadioButtonStyle != pOldSettings->GetStyleSettings().GetRadioButtonStyle() )
{
aStyleSetting.SetRadioButtonStyle( pOldSettings->GetStyleSettings().GetRadioButtonStyle() );
- bResetStyleSettings = TRUE;
+ bResetStyleSettings = sal_True;
}
if ( bResetStyleSettings )
@@ -811,14 +811,14 @@ bool Button::IsSmallSymbol () const
void PushButton::ImplInitPushButtonData()
{
- mpWindowImpl->mbPushButton = TRUE;
+ mpWindowImpl->mbPushButton = sal_True;
meSymbol = SYMBOL_NOSYMBOL;
meState = STATE_NOCHECK;
meSaveValue = STATE_NOCHECK;
mnDDStyle = 0;
- mbPressed = FALSE;
- mbInUserDraw = FALSE;
+ mbPressed = sal_False;
+ mbInUserDraw = sal_False;
}
// -----------------------------------------------------------------------
@@ -831,7 +831,7 @@ void PushButton::ImplInit( Window* pParent, WinBits nStyle )
if ( nStyle & WB_NOLIGHTBORDER )
ImplGetButtonState() |= BUTTON_DRAW_NOLIGHTBORDER;
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
}
// -----------------------------------------------------------------------
@@ -872,8 +872,8 @@ const Color& PushButton::GetCanonicalTextColor( const StyleSettings& _rStyle ) c
// -----------------------------------------------------------------------
-void PushButton::ImplInitSettings( BOOL bFont,
- BOOL bForeground, BOOL bBackground )
+void PushButton::ImplInitSettings( sal_Bool bFont,
+ sal_Bool bForeground, sal_Bool bBackground )
{
Button::ImplInitSettings( bFont, bForeground );
@@ -885,18 +885,18 @@ void PushButton::ImplInitSettings( BOOL bFont,
// for radio and checkbox this is ok as they shoud appear transparent in documents
if ( IsNativeControlSupported( CTRL_PUSHBUTTON, PART_ENTIRE_CONTROL ) )
{
- EnableChildTransparentMode( TRUE );
+ EnableChildTransparentMode( sal_True );
SetParentClipMode( PARENTCLIPMODE_NOCLIP );
- SetPaintTransparent( TRUE );
+ SetPaintTransparent( sal_True );
mpWindowImpl->mbUseNativeFocus = (GetStyle() & WB_FLATBUTTON)
? false
: ImplGetSVData()->maNWFData.mbNoFocusRects;
}
else
{
- EnableChildTransparentMode( FALSE );
+ EnableChildTransparentMode( sal_False );
SetParentClipMode( 0 );
- SetPaintTransparent( FALSE );
+ SetPaintTransparent( sal_False );
}
}
}
@@ -904,7 +904,7 @@ void PushButton::ImplInitSettings( BOOL bFont,
// -----------------------------------------------------------------------
void PushButton::ImplDrawPushButtonFrame( Window* pDev,
- Rectangle& rRect, USHORT nStyle )
+ Rectangle& rRect, sal_uInt16 nStyle )
{
if ( !(pDev->GetStyle() & (WB_RECTSTYLE | WB_SMALLSTYLE)) )
{
@@ -912,7 +912,7 @@ void PushButton::ImplDrawPushButtonFrame( Window* pDev,
if ( pDev->IsControlBackground() )
aStyleSettings.Set3DColors( pDev->GetControlBackground() );
- USHORT nPushButtonSysStyle = aStyleSettings.GetPushButtonStyle() & STYLE_PUSHBUTTON_STYLE;
+ sal_uInt16 nPushButtonSysStyle = aStyleSettings.GetPushButtonStyle() & STYLE_PUSHBUTTON_STYLE;
if ( nPushButtonSysStyle == STYLE_PUSHBUTTON_MAC )
{
pDev->SetLineColor();
@@ -1050,7 +1050,7 @@ void PushButton::ImplDrawPushButtonFrame( Window* pDev,
// -----------------------------------------------------------------------
-BOOL PushButton::ImplHitTestPushButton( Window* pDev,
+sal_Bool PushButton::ImplHitTestPushButton( Window* pDev,
const Point& rPos )
{
Point aTempPoint;
@@ -1060,7 +1060,7 @@ BOOL PushButton::ImplHitTestPushButton( Window* pDev,
{
const StyleSettings& rStyleSettings = pDev->GetSettings().GetStyleSettings();
- USHORT nPushButtonSysStyle = rStyleSettings.GetPushButtonStyle() & STYLE_PUSHBUTTON_STYLE;
+ sal_uInt16 nPushButtonSysStyle = rStyleSettings.GetPushButtonStyle() & STYLE_PUSHBUTTON_STYLE;
if ( nPushButtonSysStyle == STYLE_PUSHBUTTON_MAC )
{
aTestRect.Left() += 2;
@@ -1075,11 +1075,11 @@ BOOL PushButton::ImplHitTestPushButton( Window* pDev,
// -----------------------------------------------------------------------
-USHORT PushButton::ImplGetTextStyle( ULONG nDrawFlags ) const
+sal_uInt16 PushButton::ImplGetTextStyle( sal_uIntPtr nDrawFlags ) const
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- USHORT nTextStyle = TEXT_DRAW_MNEMONIC | TEXT_DRAW_MULTILINE | TEXT_DRAW_ENDELLIPSIS;
+ sal_uInt16 nTextStyle = TEXT_DRAW_MNEMONIC | TEXT_DRAW_MULTILINE | TEXT_DRAW_ENDELLIPSIS;
if ( ( rStyleSettings.GetOptions() & STYLE_OPTION_MONO ) ||
( nDrawFlags & WINDOW_DRAW_MONO ) )
@@ -1114,7 +1114,7 @@ USHORT PushButton::ImplGetTextStyle( ULONG nDrawFlags ) const
static void ImplDrawBtnDropDownArrow( OutputDevice* pDev,
long nX, long nY,
- Color& rColor, BOOL bBlack )
+ Color& rColor, sal_Bool bBlack )
{
Color aOldLineColor = pDev->GetLineColor();
Color aOldFillColor = pDev->GetFillColor();
@@ -1140,7 +1140,7 @@ static void ImplDrawBtnDropDownArrow( OutputDevice* pDev,
// -----------------------------------------------------------------------
-void PushButton::ImplDrawPushButtonContent( OutputDevice* pDev, ULONG nDrawFlags,
+void PushButton::ImplDrawPushButtonContent( OutputDevice* pDev, sal_uIntPtr nDrawFlags,
const Rectangle& rRect,
bool bLayout )
{
@@ -1148,8 +1148,8 @@ void PushButton::ImplDrawPushButtonContent( OutputDevice* pDev, ULONG nDrawFlags
Rectangle aInRect = rRect;
Color aColor;
XubString aText = PushButton::GetText(); // PushButton:: wegen MoreButton
- USHORT nTextStyle = ImplGetTextStyle( nDrawFlags );
- USHORT nStyle;
+ sal_uInt16 nTextStyle = ImplGetTextStyle( nDrawFlags );
+ sal_uInt16 nStyle;
if( aInRect.nRight < aInRect.nLeft || aInRect.nBottom < aInRect.nTop )
aInRect.SetEmpty();
@@ -1201,7 +1201,7 @@ void PushButton::ImplDrawPushButtonContent( OutputDevice* pDev, ULONG nDrawFlags
else
{
Rectangle aSymbolRect;
- ULONG nImageSep = 1 + (pDev->GetTextHeight()-10)/2;
+ sal_uIntPtr nImageSep = 1 + (pDev->GetTextHeight()-10)/2;
if( nImageSep < 1 )
nImageSep = 1;
// FIXME: (GetStyle() & WB_FLATBUTTON) != 0 is preliminary
@@ -1217,7 +1217,7 @@ void PushButton::ImplDrawPushButtonContent( OutputDevice* pDev, ULONG nDrawFlags
if ( mnDDStyle == PUSHBUTTON_DROPDOWN_TOOLBOX && !bLayout )
{
- BOOL bBlack = FALSE;
+ sal_Bool bBlack = sal_False;
Color aArrowColor( COL_BLACK );
if ( !(nDrawFlags & WINDOW_DRAW_MONO) )
@@ -1227,7 +1227,7 @@ void PushButton::ImplDrawPushButtonContent( OutputDevice* pDev, ULONG nDrawFlags
else
{
aArrowColor = Color( COL_LIGHTGREEN );
- bBlack = TRUE;
+ bBlack = sal_True;
}
}
@@ -1255,13 +1255,13 @@ void PushButton::ImplDrawPushButton( bool bLayout )
if( !bLayout )
HideFocus();
- USHORT nButtonStyle = ImplGetButtonState();
+ sal_uInt16 nButtonStyle = ImplGetButtonState();
Point aPoint;
Size aOutSz( GetOutputSizePixel() );
Rectangle aRect( aPoint, aOutSz );
Rectangle aInRect = aRect;
Rectangle aTextRect;
- BOOL bNativeOK = FALSE;
+ sal_Bool bNativeOK = sal_False;
// adjust style if button should be rendered 'pressed'
if ( mbPressed )
@@ -1291,7 +1291,7 @@ void PushButton::ImplDrawPushButton( bool bLayout )
break;
}
- BOOL bDropDown = ( IsSymbol() && (GetSymbol()==SYMBOL_SPIN_DOWN) && !GetText().Len() );
+ sal_Bool bDropDown = ( IsSymbol() && (GetSymbol()==SYMBOL_SPIN_DOWN) && !GetText().Len() );
if( bDropDown && (aCtrlType == CTRL_COMBOBOX || aCtrlType == CTRL_LISTBOX ) )
{
@@ -1302,11 +1302,11 @@ void PushButton::ImplDrawPushButton( bool bLayout )
{
Edit* pEdit = static_cast<Edit*>(GetParent());
if( pEdit->ImplUseNativeBorder( pEdit->GetStyle() ) )
- bNativeOK = TRUE;
+ bNativeOK = sal_True;
}
else if( GetParent()->IsNativeControlSupported( aCtrlType, HAS_BACKGROUND_TEXTURE) )
{
- bNativeOK = TRUE;
+ bNativeOK = sal_True;
}
if( !bNativeOK && GetParent()->IsNativeControlSupported( aCtrlType, PART_BUTTON_DOWN ) )
{
@@ -1336,7 +1336,7 @@ void PushButton::ImplDrawPushButton( bool bLayout )
return;
bool bRollOver = (IsMouseOver() && aInRect.IsInside( GetPointerPosPixel() ));
- if ( (bNativeOK=IsNativeControlSupported(CTRL_PUSHBUTTON, PART_ENTIRE_CONTROL)) == TRUE )
+ if ( (bNativeOK=IsNativeControlSupported(CTRL_PUSHBUTTON, PART_ENTIRE_CONTROL)) == sal_True )
{
PushButtonValue aPBVal;
ImplControlValue aControlValue;
@@ -1394,7 +1394,7 @@ void PushButton::ImplDrawPushButton( bool bLayout )
ShowFocus( ImplGetFocusRect() );
}
- if ( bNativeOK == FALSE )
+ if ( bNativeOK == sal_False )
{
// draw PushButtonFrame, aInRect has content size afterwards
if( (GetStyle() & WB_FLATBUTTON) )
@@ -1425,14 +1425,14 @@ void PushButton::ImplDrawPushButton( bool bLayout )
// -----------------------------------------------------------------------
-void PushButton::ImplSetDefButton( BOOL bSet )
+void PushButton::ImplSetDefButton( sal_Bool bSet )
{
Size aSize( GetSizePixel() );
Point aPos( GetPosPixel() );
int dLeft(0), dRight(0), dTop(0), dBottom(0);
- BOOL bSetPos = FALSE;
+ sal_Bool bSetPos = sal_False;
- if ( (IsNativeControlSupported(CTRL_PUSHBUTTON, PART_ENTIRE_CONTROL)) == TRUE )
+ if ( (IsNativeControlSupported(CTRL_PUSHBUTTON, PART_ENTIRE_CONTROL)) == sal_True )
{
Region aBoundingRgn, aContentRgn;
Rectangle aCtrlRect( 0, 0, 80, 20 ); // use a constant size to avoid accumulating
@@ -1488,7 +1488,7 @@ void PushButton::ImplSetDefButton( BOOL bSet )
// -----------------------------------------------------------------------
-BOOL PushButton::ImplIsDefButton() const
+sal_Bool PushButton::ImplIsDefButton() const
{
return (ImplGetButtonState() & BUTTON_DRAW_DEFAULT) != 0;
}
@@ -1538,7 +1538,7 @@ void PushButton::MouseButtonDown( const MouseEvent& rMEvt )
if ( rMEvt.IsLeft() &&
ImplHitTestPushButton( this, rMEvt.GetPosPixel() ) )
{
- USHORT nTrackFlags = 0;
+ sal_uInt16 nTrackFlags = 0;
if ( ( GetStyle() & WB_REPEAT ) &&
! ( GetStyle() & WB_TOGGLE ) )
@@ -1571,11 +1571,11 @@ void PushButton::Tracking( const TrackingEvent& rTEvt )
{
if ( IsChecked() )
{
- Check( FALSE );
+ Check( sal_False );
ImplGetButtonState() &= ~BUTTON_DRAW_PRESSED;
}
else
- Check( TRUE );
+ Check( sal_True );
}
}
else
@@ -1660,11 +1660,11 @@ void PushButton::KeyUp( const KeyEvent& rKEvt )
{
if ( IsChecked() )
{
- Check( FALSE );
+ Check( sal_False );
ImplGetButtonState() &= ~BUTTON_DRAW_PRESSED;
}
else
- Check( TRUE );
+ Check( sal_True );
Toggle();
}
@@ -1699,7 +1699,7 @@ void PushButton::Paint( const Rectangle& )
// -----------------------------------------------------------------------
void PushButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
- ULONG nFlags )
+ sal_uIntPtr nFlags )
{
Point aPos = pDev->LogicToPixel( rPos );
Size aSize = pDev->LogicToPixel( rSize );
@@ -1731,7 +1731,7 @@ void PushButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
pDev->SetTextFillColor();
DecorationView aDecoView( pDev );
- USHORT nButtonStyle = 0;
+ sal_uInt16 nButtonStyle = 0;
if ( nFlags & WINDOW_DRAW_MONO )
nButtonStyle |= BUTTON_DRAW_MONO;
if ( IsChecked() )
@@ -1803,17 +1803,17 @@ void PushButton::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();
}
}
@@ -1829,7 +1829,7 @@ void PushButton::DataChanged( const DataChangedEvent& rDCEvt )
((rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE)) )
{
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
Invalidate();
}
}
@@ -1871,7 +1871,7 @@ long PushButton::PreNotify( NotifyEvent& rNEvt )
break;
}
- BOOL bDropDown = ( IsSymbol() && (GetSymbol()==SYMBOL_SPIN_DOWN) && !GetText().Len() );
+ sal_Bool bDropDown = ( IsSymbol() && (GetSymbol()==SYMBOL_SPIN_DOWN) && !GetText().Len() );
if( bDropDown && GetParent()->IsNativeControlSupported( aCtrlType, PART_ENTIRE_CONTROL) &&
!GetParent()->IsNativeControlSupported( aCtrlType, PART_BUTTON_DOWN) )
@@ -1934,7 +1934,7 @@ SymbolAlign PushButton::GetSymbolAlign() const
// -----------------------------------------------------------------------
-void PushButton::SetDropDown( USHORT nStyle )
+void PushButton::SetDropDown( sal_uInt16 nStyle )
{
if ( mnDDStyle != nStyle )
{
@@ -1970,7 +1970,7 @@ void PushButton::SetState( TriState eState )
// -----------------------------------------------------------------------
-void PushButton::SetPressed( BOOL bPressed )
+void PushButton::SetPressed( sal_Bool bPressed )
{
if ( mbPressed != bPressed )
{
@@ -2009,7 +2009,7 @@ Size PushButton::CalcMinimumSize( long nMaxWidth ) const
aSize = GetModeImage().GetSizePixel();
if ( PushButton::GetText().Len() && ! (ImplGetButtonState() & BUTTON_DRAW_NOTEXT) )
{
- ULONG nDrawFlags = 0;
+ sal_uIntPtr nDrawFlags = 0;
Size textSize = GetTextRect( Rectangle( Point(), Size( nMaxWidth ? nMaxWidth : 0x7fffffff, 0x7fffffff ) ),
PushButton::GetText(), ImplGetTextStyle( nDrawFlags ) ).GetSize();
aSize.Width() += int( textSize.Width () * 1.15 );
@@ -2082,7 +2082,7 @@ void OKButton::Click()
if ( pParent->IsDialog() )
{
if ( ((Dialog*)pParent)->IsInExecute() )
- ((Dialog*)pParent)->EndDialog( TRUE );
+ ((Dialog*)pParent)->EndDialog( sal_True );
// gegen rekursive Aufrufe schuetzen
else if ( !((Dialog*)pParent)->IsInClose() )
{
@@ -2148,7 +2148,7 @@ void CancelButton::Click()
if ( pParent->IsDialog() )
{
if ( ((Dialog*)pParent)->IsInExecute() )
- ((Dialog*)pParent)->EndDialog( FALSE );
+ ((Dialog*)pParent)->EndDialog( sal_False );
// gegen rekursive Aufrufe schuetzen
else if ( !((Dialog*)pParent)->IsInClose() )
{
@@ -2222,10 +2222,10 @@ void HelpButton::Click()
void RadioButton::ImplInitRadioButtonData()
{
- mbChecked = FALSE;
- mbSaveValue = FALSE;
- mbRadioCheck = TRUE;
- mbStateChanged = FALSE;
+ mbChecked = sal_False;
+ mbSaveValue = sal_False;
+ mbRadioCheck = sal_True;
+ mbStateChanged = sal_False;
}
// -----------------------------------------------------------------------
@@ -2235,7 +2235,7 @@ void RadioButton::ImplInit( Window* pParent, WinBits nStyle )
nStyle = ImplInitStyle( pParent->GetWindow( WINDOW_LASTCHILD ), nStyle );
Button::ImplInit( pParent, nStyle, NULL );
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
}
// -----------------------------------------------------------------------
@@ -2270,8 +2270,8 @@ const Color& RadioButton::GetCanonicalTextColor( const StyleSettings& _rStyle )
// -----------------------------------------------------------------------
-void RadioButton::ImplInitSettings( BOOL bFont,
- BOOL bForeground, BOOL bBackground )
+void RadioButton::ImplInitSettings( sal_Bool bFont,
+ sal_Bool bForeground, sal_Bool bBackground )
{
Button::ImplInitSettings( bFont, bForeground );
@@ -2281,18 +2281,18 @@ void RadioButton::ImplInitSettings( BOOL bFont,
if ( !IsControlBackground() &&
(pParent->IsChildTransparentModeEnabled() || IsNativeControlSupported( CTRL_RADIOBUTTON, PART_ENTIRE_CONTROL ) ) )
{
- EnableChildTransparentMode( TRUE );
+ EnableChildTransparentMode( sal_True );
SetParentClipMode( PARENTCLIPMODE_NOCLIP );
- SetPaintTransparent( TRUE );
+ SetPaintTransparent( sal_True );
SetBackground();
if( IsNativeControlSupported( CTRL_RADIOBUTTON, PART_ENTIRE_CONTROL ) )
mpWindowImpl->mbUseNativeFocus = ImplGetSVData()->maNWFData.mbNoFocusRects;
}
else
{
- EnableChildTransparentMode( FALSE );
+ EnableChildTransparentMode( sal_False );
SetParentClipMode( 0 );
- SetPaintTransparent( FALSE );
+ SetPaintTransparent( sal_False );
if ( IsControlBackground() )
SetBackground( GetControlBackground() );
@@ -2328,11 +2328,11 @@ void RadioButton::ImplInvalidateOrDrawRadioButtonState()
void RadioButton::ImplDrawRadioButtonState()
{
- USHORT nButtonStyle = 0;
- BOOL bNativeOK = FALSE;
+ sal_uInt16 nButtonStyle = 0;
+ sal_Bool bNativeOK = sal_False;
// no native drawing for image radio buttons
- if ( !maImage && (bNativeOK=IsNativeControlSupported(CTRL_RADIOBUTTON, PART_ENTIRE_CONTROL)) == TRUE )
+ if ( !maImage && (bNativeOK=IsNativeControlSupported(CTRL_RADIOBUTTON, PART_ENTIRE_CONTROL)) == sal_True )
{
ImplControlValue aControlValue( mbChecked ? BUTTONVALUE_ON : BUTTONVALUE_OFF, rtl::OUString(), 0 );
Rectangle aCtrlRect( maStateRect.TopLeft(), maStateRect.GetSize() );
@@ -2352,12 +2352,12 @@ void RadioButton::ImplDrawRadioButtonState()
}
-if ( bNativeOK == FALSE )
+if ( bNativeOK == sal_False )
{
// kein Image-RadioButton
if ( !maImage )
{
- USHORT nStyle = ImplGetButtonState();
+ sal_uInt16 nStyle = ImplGetButtonState();
if ( !IsEnabled() )
nStyle |= BUTTON_DRAW_DISABLED;
if ( mbChecked )
@@ -2376,7 +2376,7 @@ if ( bNativeOK == FALSE )
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
Rectangle aImageRect = maStateRect;
Size aImageSize = maImage.GetSizePixel();
- BOOL bEnabled = IsEnabled();
+ sal_Bool bEnabled = IsEnabled();
aImageSize.Width() = CalcZoom( aImageSize.Width() );
aImageSize.Height() = CalcZoom( aImageSize.Height() );
@@ -2446,7 +2446,7 @@ if ( bNativeOK == FALSE )
// -----------------------------------------------------------------------
-void RadioButton::ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
+void RadioButton::ImplDraw( OutputDevice* pDev, sal_uIntPtr nDrawFlags,
const Point& rPos, const Size& rSize,
const Size& rImageSize, Rectangle& rStateRect,
Rectangle& rMouseRect, bool bLayout )
@@ -2466,7 +2466,7 @@ void RadioButton::ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
if ( ( aText.Len() && ! (ImplGetButtonState() & BUTTON_DRAW_NOTEXT) ) ||
( HasImage() && ! (ImplGetButtonState() & BUTTON_DRAW_NOIMAGE) ) )
{
- USHORT nTextStyle = Button::ImplGetTextStyle( aText, nWinStyle, nDrawFlags );
+ sal_uInt16 nTextStyle = Button::ImplGetTextStyle( aText, nWinStyle, nDrawFlags );
const long nImageSep = GetDrawPixel( pDev, ImplGetImageToTextDistance() );
Size aSize( rSize );
@@ -2540,7 +2540,7 @@ da im Writer ansonsten die Images noch weiter oben haengen
}
else
{
- BOOL bTopImage = (nWinStyle & WB_TOP) != 0;
+ sal_Bool bTopImage = (nWinStyle & WB_TOP) != 0;
Size aImageSize = maImage.GetSizePixel();
Rectangle aImageRect( rPos, rSize );
long nTextHeight = pDev->GetTextHeight();
@@ -2602,7 +2602,7 @@ void RadioButton::ImplDrawRadioButton( bool bLayout )
ImplDraw( this, 0, Point(), GetOutputSizePixel(),
aImageSize, maStateRect, maMouseRect, bLayout );
- if( !bLayout || (IsNativeControlSupported(CTRL_RADIOBUTTON, PART_ENTIRE_CONTROL)==TRUE) )
+ if( !bLayout || (IsNativeControlSupported(CTRL_RADIOBUTTON, PART_ENTIRE_CONTROL)==sal_True) )
{
if ( !maImage && HasFocus() )
ShowFocus( ImplGetFocusRect() );
@@ -2662,7 +2662,7 @@ void RadioButton::ImplUncheckAllOther()
{
ImplDelData aDelData;
pWindow->ImplAddDel( &aDelData );
- ((RadioButton*)pWindow)->SetState( FALSE );
+ ((RadioButton*)pWindow)->SetState( sal_False );
if ( aDelData.IsDelete() )
return;
pWindow->ImplRemoveDel( &aDelData );
@@ -2693,7 +2693,7 @@ void RadioButton::ImplUncheckAllOther()
{
ImplDelData aDelData;
pWindow->ImplAddDel( &aDelData );
- ((RadioButton*)pWindow)->SetState( FALSE );
+ ((RadioButton*)pWindow)->SetState( sal_False );
if ( aDelData.IsDelete() )
return;
pWindow->ImplRemoveDel( &aDelData );
@@ -2709,10 +2709,10 @@ void RadioButton::ImplUncheckAllOther()
// -----------------------------------------------------------------------
-void RadioButton::ImplCallClick( BOOL bGrabFocus, USHORT nFocusFlags )
+void RadioButton::ImplCallClick( sal_Bool bGrabFocus, sal_uInt16 nFocusFlags )
{
mbStateChanged = !mbChecked;
- mbChecked = TRUE;
+ mbChecked = sal_True;
mpWindowImpl->mnStyle |= WB_TABSTOP;
ImplInvalidateOrDrawRadioButtonState();
ImplDelData aDelData;
@@ -2733,7 +2733,7 @@ void RadioButton::ImplCallClick( BOOL bGrabFocus, USHORT nFocusFlags )
if ( aDelData.IsDelete() )
return;
ImplRemoveDel( &aDelData );
- mbStateChanged = FALSE;
+ mbStateChanged = sal_False;
}
// -----------------------------------------------------------------------
@@ -2767,9 +2767,9 @@ void RadioButton::ImplLoadRes( const ResId& rResId )
Button::ImplLoadRes( rResId );
//anderer Wert als Default ?
- USHORT nChecked = ReadShortRes();
+ sal_uInt16 nChecked = ReadShortRes();
if ( nChecked )
- SetState( TRUE );
+ SetState( sal_True );
}
// -----------------------------------------------------------------------
@@ -2890,7 +2890,7 @@ void RadioButton::Paint( const Rectangle& )
// -----------------------------------------------------------------------
void RadioButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
- ULONG nFlags )
+ sal_uIntPtr nFlags )
{
if ( !maImage )
{
@@ -3029,17 +3029,17 @@ void RadioButton::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();
}
}
@@ -3055,7 +3055,7 @@ void RadioButton::DataChanged( const DataChangedEvent& rDCEvt )
((rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE)) )
{
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
Invalidate();
}
}
@@ -3098,7 +3098,7 @@ void RadioButton::Toggle()
// -----------------------------------------------------------------------
-BOOL RadioButton::SetModeRadioImage( const Image& rImage, BmpColorMode eMode )
+sal_Bool RadioButton::SetModeRadioImage( const Image& rImage, BmpColorMode eMode )
{
if( eMode == BMP_COLOR_NORMAL )
{
@@ -3117,9 +3117,9 @@ BOOL RadioButton::SetModeRadioImage( const Image& rImage, BmpColorMode eMode )
}
}
else
- return FALSE;
+ return sal_False;
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -3134,7 +3134,7 @@ const Image& RadioButton::GetModeRadioImage( BmpColorMode eMode ) const
// -----------------------------------------------------------------------
-void RadioButton::SetState( BOOL bCheck )
+void RadioButton::SetState( sal_Bool bCheck )
{
// TabStop-Flag richtig mitfuehren
if ( bCheck )
@@ -3152,7 +3152,7 @@ void RadioButton::SetState( BOOL bCheck )
// -----------------------------------------------------------------------
-void RadioButton::Check( BOOL bCheck )
+void RadioButton::Check( sal_Bool bCheck )
{
// TabStop-Flag richtig mitfuehren
if ( bCheck )
@@ -3219,7 +3219,7 @@ Size RadioButton::ImplGetRadioImageSize() const
static void LoadThemedImageList (const StyleSettings &rStyleSettings,
ImageList *pList, const ResId &rResId,
- USHORT nImages)
+ sal_uInt16 nImages)
{
Color aColorAry1[6];
Color aColorAry2[6];
@@ -3243,11 +3243,11 @@ static void LoadThemedImageList (const StyleSettings &rStyleSettings,
aColorAry1, aColorAry2, sizeof(aColorAry1) / sizeof(Color));
}
-Image RadioButton::GetRadioImage( const AllSettings& rSettings, USHORT nFlags )
+Image RadioButton::GetRadioImage( const AllSettings& rSettings, sal_uInt16 nFlags )
{
ImplSVData* pSVData = ImplGetSVData();
const StyleSettings& rStyleSettings = rSettings.GetStyleSettings();
- USHORT nStyle = rStyleSettings.GetRadioButtonStyle() & STYLE_RADIOBUTTON_STYLE;
+ sal_uInt16 nStyle = rStyleSettings.GetRadioButtonStyle() & STYLE_RADIOBUTTON_STYLE;
if ( rStyleSettings.GetOptions() & STYLE_OPTION_MONO )
nStyle = STYLE_RADIOBUTTON_MONO;
@@ -3289,7 +3289,7 @@ Image RadioButton::GetRadioImage( const AllSettings& rSettings, USHORT nFlags )
pSVData->maCtrlData.mnRadioStyle = nStyle;
}
- USHORT nId;
+ sal_uInt16 nId;
if ( nFlags & BUTTON_DRAW_DISABLED )
{
if ( nFlags & BUTTON_DRAW_CHECKED )
@@ -3400,7 +3400,7 @@ void CheckBox::ImplInitCheckBoxData()
{
meState = STATE_NOCHECK;
meSaveValue = STATE_NOCHECK;
- mbTriState = FALSE;
+ mbTriState = sal_False;
}
// -----------------------------------------------------------------------
@@ -3410,7 +3410,7 @@ void CheckBox::ImplInit( Window* pParent, WinBits nStyle )
nStyle = ImplInitStyle( pParent->GetWindow( WINDOW_LASTCHILD ), nStyle );
Button::ImplInit( pParent, nStyle, NULL );
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
}
// -----------------------------------------------------------------------
@@ -3440,8 +3440,8 @@ const Color& CheckBox::GetCanonicalTextColor( const StyleSettings& _rStyle ) con
// -----------------------------------------------------------------------
-void CheckBox::ImplInitSettings( BOOL bFont,
- BOOL bForeground, BOOL bBackground )
+void CheckBox::ImplInitSettings( sal_Bool bFont,
+ sal_Bool bForeground, sal_Bool bBackground )
{
Button::ImplInitSettings( bFont, bForeground );
@@ -3451,18 +3451,18 @@ void CheckBox::ImplInitSettings( BOOL bFont,
if ( !IsControlBackground() &&
(pParent->IsChildTransparentModeEnabled() || IsNativeControlSupported( CTRL_CHECKBOX, PART_ENTIRE_CONTROL ) ) )
{
- EnableChildTransparentMode( TRUE );
+ EnableChildTransparentMode( sal_True );
SetParentClipMode( PARENTCLIPMODE_NOCLIP );
- SetPaintTransparent( TRUE );
+ SetPaintTransparent( sal_True );
SetBackground();
if( IsNativeControlSupported( CTRL_CHECKBOX, PART_ENTIRE_CONTROL ) )
ImplGetWindowImpl()->mbUseNativeFocus = ImplGetSVData()->maNWFData.mbNoFocusRects;
}
else
{
- EnableChildTransparentMode( FALSE );
+ EnableChildTransparentMode( sal_False );
SetParentClipMode( 0 );
- SetPaintTransparent( FALSE );
+ SetPaintTransparent( sal_False );
if ( IsControlBackground() )
SetBackground( GetControlBackground() );
@@ -3480,10 +3480,10 @@ void CheckBox::ImplLoadRes( const ResId& rResId )
if ( rResId.GetRT() != RSC_TRISTATEBOX )
{
- USHORT nChecked = ReadShortRes();
+ sal_uInt16 nChecked = ReadShortRes();
//anderer Wert als Default ?
if( nChecked )
- Check( TRUE );
+ Check( sal_True );
}
}
@@ -3505,9 +3505,9 @@ void CheckBox::ImplInvalidateOrDrawCheckBoxState()
void CheckBox::ImplDrawCheckBoxState()
{
- bool bNativeOK = TRUE;
+ bool bNativeOK = sal_True;
- if ( (bNativeOK=IsNativeControlSupported(CTRL_CHECKBOX, PART_ENTIRE_CONTROL)) == TRUE )
+ if ( (bNativeOK=IsNativeControlSupported(CTRL_CHECKBOX, PART_ENTIRE_CONTROL)) == sal_True )
{
ImplControlValue aControlValue( meState == STATE_CHECK ? BUTTONVALUE_ON : BUTTONVALUE_OFF, rtl::OUString(), 0 );
Region aCtrlRegion( maStateRect );
@@ -3530,9 +3530,9 @@ void CheckBox::ImplDrawCheckBoxState()
aControlValue, rtl::OUString() );
}
- if ( bNativeOK == FALSE )
+ if ( bNativeOK == sal_False )
{
- USHORT nStyle = ImplGetButtonState();
+ sal_uInt16 nStyle = ImplGetButtonState();
if ( !IsEnabled() )
nStyle |= BUTTON_DRAW_DISABLED;
if ( meState == STATE_DONTKNOW )
@@ -3549,7 +3549,7 @@ void CheckBox::ImplDrawCheckBoxState()
// -----------------------------------------------------------------------
-void CheckBox::ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
+void CheckBox::ImplDraw( OutputDevice* pDev, sal_uIntPtr nDrawFlags,
const Point& rPos, const Size& rSize,
const Size& rImageSize, Rectangle& rStateRect,
Rectangle& rMouseRect, bool bLayout )
@@ -3564,7 +3564,7 @@ void CheckBox::ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
if ( ( aText.Len() && ! (ImplGetButtonState() & BUTTON_DRAW_NOTEXT) ) ||
( HasImage() && ! (ImplGetButtonState() & BUTTON_DRAW_NOIMAGE) ) )
{
- USHORT nTextStyle = Button::ImplGetTextStyle( aText, nWinStyle, nDrawFlags );
+ sal_uInt16 nTextStyle = Button::ImplGetTextStyle( aText, nWinStyle, nDrawFlags );
const long nImageSep = GetDrawPixel( pDev, ImplGetImageToTextDistance() );
Size aSize( rSize );
@@ -3835,7 +3835,7 @@ void CheckBox::Paint( const Rectangle& )
// -----------------------------------------------------------------------
void CheckBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
- ULONG nFlags )
+ sal_uIntPtr nFlags )
{
MapMode aResMapMode( MAP_100TH_MM );
Point aPos = pDev->LogicToPixel( rPos );
@@ -4025,17 +4025,17 @@ void CheckBox::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();
}
}
@@ -4051,7 +4051,7 @@ void CheckBox::DataChanged( const DataChangedEvent& rDCEvt )
((rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE)) )
{
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
Invalidate();
}
}
@@ -4109,7 +4109,7 @@ void CheckBox::SetState( TriState eState )
// -----------------------------------------------------------------------
-void CheckBox::EnableTriState( BOOL bTriState )
+void CheckBox::EnableTriState( sal_Bool bTriState )
{
if ( mbTriState != bTriState )
{
@@ -4160,11 +4160,11 @@ Size CheckBox::ImplGetCheckImageSize() const
return aSize;
}
-Image CheckBox::GetCheckImage( const AllSettings& rSettings, USHORT nFlags )
+Image CheckBox::GetCheckImage( const AllSettings& rSettings, sal_uInt16 nFlags )
{
ImplSVData* pSVData = ImplGetSVData();
const StyleSettings& rStyleSettings = rSettings.GetStyleSettings();
- USHORT nStyle = rStyleSettings.GetCheckBoxStyle() & STYLE_CHECKBOX_STYLE;
+ sal_uInt16 nStyle = rStyleSettings.GetCheckBoxStyle() & STYLE_CHECKBOX_STYLE;
if ( rStyleSettings.GetOptions() & STYLE_OPTION_MONO )
nStyle = STYLE_CHECKBOX_MONO;
@@ -4191,7 +4191,7 @@ Image CheckBox::GetCheckImage( const AllSettings& rSettings, USHORT nFlags )
pSVData->maCtrlData.mnCheckStyle = nStyle;
}
- USHORT nId;
+ sal_uInt16 nId;
if ( nFlags & BUTTON_DRAW_DISABLED )
{
if ( nFlags & BUTTON_DRAW_DONTKNOW )
@@ -4320,7 +4320,7 @@ ImageButton::ImageButton( Window* pParent, WinBits nStyle ) :
ImageButton::ImageButton( Window* pParent, const ResId& rResId ) :
PushButton( pParent, rResId.SetRT( RSC_IMAGEBUTTON ) )
{
- ULONG nObjMask = ReadLongRes();
+ sal_uIntPtr nObjMask = ReadLongRes();
if ( RSC_IMAGEBUTTON_IMAGE & nObjMask )
{
@@ -4369,7 +4369,7 @@ ImageRadioButton::ImageRadioButton( Window* pParent, WinBits nStyle ) :
ImageRadioButton::ImageRadioButton( Window* pParent, const ResId& rResId ) :
RadioButton( pParent, rResId.SetRT( RSC_IMAGERADIOBUTTON ) )
{
- ULONG nObjMask = ReadLongRes();
+ sal_uIntPtr nObjMask = ReadLongRes();
if ( RSC_IMAGERADIOBUTTON_IMAGE & nObjMask )
{
@@ -4389,7 +4389,7 @@ ImageRadioButton::~ImageRadioButton()
TriStateBox::TriStateBox( Window* pParent, WinBits nStyle ) :
CheckBox( pParent, nStyle )
{
- EnableTriState( TRUE );
+ EnableTriState( sal_True );
}
// -----------------------------------------------------------------------
@@ -4397,15 +4397,15 @@ TriStateBox::TriStateBox( Window* pParent, WinBits nStyle ) :
TriStateBox::TriStateBox( Window* pParent, const ResId& rResId ) :
CheckBox( pParent, rResId.SetRT( RSC_TRISTATEBOX ) )
{
- EnableTriState( TRUE );
+ EnableTriState( sal_True );
- ULONG nTriState = ReadLongRes();
- USHORT bDisableTriState = ReadShortRes();
+ sal_uIntPtr nTriState = ReadLongRes();
+ sal_uInt16 bDisableTriState = ReadShortRes();
//anderer Wert als Default ?
if ( (TriState)nTriState != STATE_NOCHECK )
SetState( (TriState)nTriState );
if ( bDisableTriState )
- EnableTriState( FALSE );
+ EnableTriState( sal_False );
}
// -----------------------------------------------------------------------
@@ -4474,7 +4474,7 @@ void DisclosureButton::ImplDrawCheckBoxState()
if( ! pImg )
return;
- USHORT nStyle = 0;
+ sal_uInt16 nStyle = 0;
if( ! IsEnabled() )
nStyle |= IMAGE_DRAW_DISABLE;
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index f5c04b7c3cfa..0060a724b83d 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -47,7 +47,7 @@
// =======================================================================
-inline ULONG ImplCreateKey( USHORT nPos )
+inline sal_uIntPtr ImplCreateKey( sal_uInt16 nPos )
{
// Key = Pos+1, wegen Pos 0
return nPos+1;
@@ -61,7 +61,7 @@ static void lcl_GetSelectedEntries( Table& rSelectedPos, const XubString& rText,
{
XubString aToken = rText.GetToken( --n, cTokenSep );
aToken.EraseLeadingAndTrailingChars( ' ' );
- USHORT nPos = pEntryList->FindEntry( aToken );
+ sal_uInt16 nPos = pEntryList->FindEntry( aToken );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
rSelectedPos.Insert( ImplCreateKey( nPos ), (void*)sal_IntPtr(1L) );
}
@@ -123,9 +123,9 @@ void ComboBox::ImplInitComboBoxData()
mpFloatWin = NULL;
mnDDHeight = 0;
- mbDDAutoSize = TRUE;
- mbSyntheticModify = FALSE;
- mbMatchCase = FALSE;
+ mbDDAutoSize = sal_True;
+ mbSyntheticModify = sal_False;
+ mbMatchCase = sal_False;
mcMultiSep = ';';
}
@@ -135,7 +135,7 @@ void ComboBox::ImplCalcEditHeight()
{
sal_Int32 nLeft, nTop, nRight, nBottom;
GetBorder( nLeft, nTop, nRight, nBottom );
- mnDDHeight = (USHORT)(mpSubEdit->GetTextHeight() + nTop + nBottom + 4);
+ mnDDHeight = (sal_uInt16)(mpSubEdit->GetTextHeight() + nTop + nBottom + 4);
if ( !IsDropDownBox() )
mnDDHeight += 4;
@@ -151,7 +151,7 @@ void ComboBox::ImplCalcEditHeight()
{
const long nNCHeight = aBoundRegion.GetBoundRect().GetHeight();
if( mnDDHeight < nNCHeight )
- mnDDHeight = sal::static_int_cast<USHORT>( nNCHeight );
+ mnDDHeight = sal::static_int_cast<sal_uInt16>( nNCHeight );
}
}
@@ -161,7 +161,7 @@ void ComboBox::ImplInit( Window* pParent, WinBits nStyle )
{
ImplInitStyle( nStyle );
- BOOL bNoBorder = ( nStyle & WB_NOBORDER ) ? TRUE : FALSE;
+ sal_Bool bNoBorder = ( nStyle & WB_NOBORDER ) ? sal_True : sal_False;
if ( !(nStyle & WB_DROPDOWN) )
{
nStyle &= ~WB_BORDER;
@@ -182,7 +182,7 @@ void ComboBox::ImplInit( Window* pParent, WinBits nStyle )
if( nStyle & WB_DROPDOWN )
{
mpFloatWin = new ImplListBoxFloatingWindow( this );
- mpFloatWin->SetAutoWidth( TRUE );
+ mpFloatWin->SetAutoWidth( sal_True );
mpFloatWin->SetPopupModeEndHdl( LINK( this, ComboBox, ImplPopupModeEndHdl ) );
mpBtn = new ImplBtn( this, WB_NOLIGHTBORDER | WB_RECTSTYLE );
@@ -205,10 +205,10 @@ void ComboBox::ImplInit( Window* pParent, WinBits nStyle )
}
mpSubEdit = new Edit( this, nEditStyle );
- mpSubEdit->EnableRTL( FALSE );
+ mpSubEdit->EnableRTL( sal_False );
SetSubEdit( mpSubEdit );
mpSubEdit->SetPosPixel( Point() );
- EnableAutocomplete( TRUE );
+ EnableAutocomplete( sal_True );
mpSubEdit->Show();
Window* pLBParent = this;
@@ -226,11 +226,11 @@ void ComboBox::ImplInit( Window* pParent, WinBits nStyle )
if ( mpFloatWin )
mpFloatWin->SetImplListBox( mpImplLB );
else
- mpImplLB->GetMainWindow()->AllowGrabFocus( TRUE );
+ mpImplLB->GetMainWindow()->AllowGrabFocus( sal_True );
ImplCalcEditHeight();
- SetCompoundControl( TRUE );
+ SetCompoundControl( sal_True );
}
// -----------------------------------------------------------------------
@@ -250,11 +250,11 @@ void ComboBox::ImplLoadRes( const ResId& rResId )
{
Edit::ImplLoadRes( rResId );
- ULONG nNumber = ReadLongRes();
+ sal_uIntPtr nNumber = ReadLongRes();
if( nNumber )
{
- for( USHORT i = 0; i < nNumber; i++ )
+ for( sal_uInt16 i = 0; i < nNumber; i++ )
{
InsertEntry( ReadStringRes(), LISTBOX_APPEND );
}
@@ -263,7 +263,7 @@ void ComboBox::ImplLoadRes( const ResId& rResId )
// -----------------------------------------------------------------------
-void ComboBox::EnableAutocomplete( BOOL bEnable, BOOL bMatchCase )
+void ComboBox::EnableAutocomplete( sal_Bool bEnable, sal_Bool bMatchCase )
{
mbMatchCase = bMatchCase;
@@ -275,7 +275,7 @@ void ComboBox::EnableAutocomplete( BOOL bEnable, BOOL bMatchCase )
// -----------------------------------------------------------------------
-BOOL ComboBox::IsAutocompleteEnabled() const
+sal_Bool ComboBox::IsAutocompleteEnabled() const
{
return mpSubEdit->GetAutocompleteHdl().IsSet();
}
@@ -289,10 +289,10 @@ IMPL_LINK( ComboBox, ImplClickBtnHdl, void*, EMPTYARG )
if ( !mpImplLB->GetEntryList()->GetMRUCount() )
ImplUpdateFloatSelection();
else
- mpImplLB->SelectEntry( 0 , TRUE );
- mpBtn->SetPressed( TRUE );
+ mpImplLB->SelectEntry( 0 , sal_True );
+ mpBtn->SetPressed( sal_True );
SetSelection( Selection( 0, SELECTION_MAX ) );
- mpFloatWin->StartFloat( TRUE );
+ mpFloatWin->StartFloat( sal_True );
ImplCallEventListeners( VCLEVENT_DROPDOWN_OPEN );
ImplClearLayoutData();
@@ -310,9 +310,9 @@ IMPL_LINK( ComboBox, ImplPopupModeEndHdl, void*, EMPTYARG )
{
if ( !mpImplLB->GetEntryList()->IsEntryPosSelected( mpFloatWin->GetPopupModeStartSaveSelection() ) )
{
- mpImplLB->SelectEntry( mpFloatWin->GetPopupModeStartSaveSelection(), TRUE );
- BOOL bTravelSelect = mpImplLB->IsTravelSelect();
- mpImplLB->SetTravelSelect( TRUE );
+ mpImplLB->SelectEntry( mpFloatWin->GetPopupModeStartSaveSelection(), sal_True );
+ sal_Bool bTravelSelect = mpImplLB->IsTravelSelect();
+ mpImplLB->SetTravelSelect( sal_True );
Select();
mpImplLB->SetTravelSelect( bTravelSelect );
}
@@ -322,7 +322,7 @@ IMPL_LINK( ComboBox, ImplPopupModeEndHdl, void*, EMPTYARG )
if( mpImplLB )
mpImplLB->GetMainWindow()->ImplClearLayoutData();
- mpBtn->SetPressed( FALSE );
+ mpBtn->SetPressed( sal_False );
ImplCallEventListeners( VCLEVENT_DROPDOWN_CLOSE );
return 0;
}
@@ -342,36 +342,36 @@ IMPL_LINK( ComboBox, ImplAutocompleteHdl, Edit*, pEdit )
{
XubString aFullText = pEdit->GetText();
XubString aStartText = aFullText.Copy( 0, (xub_StrLen)aSel.Max() );
- USHORT nStart = mpImplLB->GetCurrentPos();
+ sal_uInt16 nStart = mpImplLB->GetCurrentPos();
if ( nStart == LISTBOX_ENTRY_NOTFOUND )
nStart = 0;
- BOOL bForward = TRUE;
+ sal_Bool bForward = sal_True;
if ( eAction == AUTOCOMPLETE_TABFORWARD )
nStart++;
else if ( eAction == AUTOCOMPLETE_TABBACKWARD )
{
- bForward = FALSE;
+ bForward = sal_False;
nStart = nStart ? nStart - 1 : mpImplLB->GetEntryList()->GetEntryCount()-1;
}
- USHORT nPos = LISTBOX_ENTRY_NOTFOUND;
+ sal_uInt16 nPos = LISTBOX_ENTRY_NOTFOUND;
if( ! mbMatchCase )
{
// Try match case insensitive from current position
- nPos = mpImplLB->GetEntryList()->FindMatchingEntry( aStartText, nStart, bForward, TRUE );
+ nPos = mpImplLB->GetEntryList()->FindMatchingEntry( aStartText, nStart, bForward, sal_True );
if ( nPos == LISTBOX_ENTRY_NOTFOUND )
// Try match case insensitive, but from start
- nPos = mpImplLB->GetEntryList()->FindMatchingEntry( aStartText, bForward ? 0 : (mpImplLB->GetEntryList()->GetEntryCount()-1), bForward, TRUE );
+ nPos = mpImplLB->GetEntryList()->FindMatchingEntry( aStartText, bForward ? 0 : (mpImplLB->GetEntryList()->GetEntryCount()-1), bForward, sal_True );
}
if ( nPos == LISTBOX_ENTRY_NOTFOUND )
// Try match full from current position
- nPos = mpImplLB->GetEntryList()->FindMatchingEntry( aStartText, nStart, bForward, FALSE );
+ nPos = mpImplLB->GetEntryList()->FindMatchingEntry( aStartText, nStart, bForward, sal_False );
if ( nPos == LISTBOX_ENTRY_NOTFOUND )
// Match full, but from start
- nPos = mpImplLB->GetEntryList()->FindMatchingEntry( aStartText, bForward ? 0 : (mpImplLB->GetEntryList()->GetEntryCount()-1), bForward, FALSE );
+ nPos = mpImplLB->GetEntryList()->FindMatchingEntry( aStartText, bForward ? 0 : (mpImplLB->GetEntryList()->GetEntryCount()-1), bForward, sal_False );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
{
@@ -388,8 +388,8 @@ IMPL_LINK( ComboBox, ImplAutocompleteHdl, Edit*, pEdit )
IMPL_LINK( ComboBox, ImplSelectHdl, void*, EMPTYARG )
{
- BOOL bPopup = IsInDropDown();
- BOOL bCallSelect = FALSE;
+ sal_Bool bPopup = IsInDropDown();
+ sal_Bool bCallSelect = sal_False;
if ( mpImplLB->IsSelectionChanged() || bPopup )
{
XubString aText;
@@ -405,7 +405,7 @@ IMPL_LINK( ComboBox, ImplSelectHdl, void*, EMPTYARG )
XubString aToken = aText.GetToken( 0, mcMultiSep, nIndex );
xub_StrLen nTokenLen = aToken.Len();
aToken.EraseLeadingAndTrailingChars( ' ' );
- USHORT nP = mpImplLB->GetEntryList()->FindEntry( aToken );
+ sal_uInt16 nP = mpImplLB->GetEntryList()->FindEntry( aToken );
if ( (nP != LISTBOX_ENTRY_NOTFOUND) && (!mpImplLB->GetEntryList()->IsEntryPosSelected( nP )) )
{
aText.Erase( nPrevIndex, nTokenLen );
@@ -422,10 +422,10 @@ IMPL_LINK( ComboBox, ImplSelectHdl, void*, EMPTYARG )
// Fehlende Eintraege anhaengen...
Table aSelInText;
lcl_GetSelectedEntries( aSelInText, aText, mcMultiSep, mpImplLB->GetEntryList() );
- USHORT nSelectedEntries = mpImplLB->GetEntryList()->GetSelectEntryCount();
- for ( USHORT n = 0; n < nSelectedEntries; n++ )
+ sal_uInt16 nSelectedEntries = mpImplLB->GetEntryList()->GetSelectEntryCount();
+ for ( sal_uInt16 n = 0; n < nSelectedEntries; n++ )
{
- USHORT nP = mpImplLB->GetEntryList()->GetSelectEntryPos( n );
+ sal_uInt16 nP = mpImplLB->GetEntryList()->GetSelectEntryPos( n );
if ( !aSelInText.IsKeyValid( ImplCreateKey( nP ) ) )
{
if ( aText.Len() && (aText.GetChar( aText.Len()-1 ) != mcMultiSep) )
@@ -451,7 +451,7 @@ IMPL_LINK( ComboBox, ImplSelectHdl, void*, EMPTYARG )
aNewSelection.Min() = aText.Len();
mpSubEdit->SetSelection( aNewSelection );
- bCallSelect = TRUE;
+ bCallSelect = sal_True;
}
// #84652# Call GrabFocus and EndPopupMode before calling Select/Modify, but after changing the text
@@ -466,9 +466,9 @@ IMPL_LINK( ComboBox, ImplSelectHdl, void*, EMPTYARG )
if ( bCallSelect )
{
mpSubEdit->SetModifyFlag();
- mbSyntheticModify = TRUE;
+ mbSyntheticModify = sal_True;
Modify();
- mbSyntheticModify = FALSE;
+ mbSyntheticModify = sal_False;
Select();
}
@@ -491,7 +491,7 @@ IMPL_LINK( ComboBox, ImplSelectionChangedHdl, void*, n )
{
if ( !mpImplLB->IsTrackingSelect() )
{
- USHORT nChanged = (USHORT)(ULONG)n;
+ sal_uInt16 nChanged = (sal_uInt16)(sal_uIntPtr)n;
if ( !mpSubEdit->IsReadOnly() && mpImplLB->GetEntryList()->IsEntryPosSelected( nChanged ) )
mpSubEdit->SetText( mpImplLB->GetEntryList()->GetEntryText( nChanged ) );
}
@@ -520,11 +520,11 @@ void ComboBox::ToggleDropDown()
if ( !mpImplLB->GetEntryList()->GetMRUCount() )
ImplUpdateFloatSelection();
else
- mpImplLB->SelectEntry( 0 , TRUE );
+ mpImplLB->SelectEntry( 0 , sal_True );
ImplCallEventListeners( VCLEVENT_DROPDOWN_PRE_OPEN );
- mpBtn->SetPressed( TRUE );
+ mpBtn->SetPressed( sal_True );
SetSelection( Selection( 0, SELECTION_MAX ) );
- mpFloatWin->StartFloat( TRUE );
+ mpFloatWin->StartFloat( sal_True );
ImplCallEventListeners( VCLEVENT_DROPDOWN_OPEN );
}
}
@@ -546,7 +546,7 @@ void ComboBox::DoubleClick()
// -----------------------------------------------------------------------
-void ComboBox::EnableAutoSize( BOOL bAuto )
+void ComboBox::EnableAutoSize( sal_Bool bAuto )
{
mbDDAutoSize = bAuto;
if ( mpFloatWin )
@@ -560,7 +560,7 @@ void ComboBox::EnableAutoSize( BOOL bAuto )
// -----------------------------------------------------------------------
-void ComboBox::EnableDDAutoWidth( BOOL b )
+void ComboBox::EnableDDAutoWidth( sal_Bool b )
{
if ( mpFloatWin )
mpFloatWin->SetAutoWidth( b );
@@ -568,15 +568,15 @@ void ComboBox::EnableDDAutoWidth( BOOL b )
// -----------------------------------------------------------------------
-BOOL ComboBox::IsDDAutoWidthEnabled() const
+sal_Bool ComboBox::IsDDAutoWidthEnabled() const
{
- return mpFloatWin ? mpFloatWin->IsAutoWidth() : FALSE;
+ return mpFloatWin ? mpFloatWin->IsAutoWidth() : sal_False;
}
// -----------------------------------------------------------------------
-void ComboBox::SetDropDownLineCount( USHORT nLines )
+void ComboBox::SetDropDownLineCount( sal_uInt16 nLines )
{
if ( mpFloatWin )
mpFloatWin->SetDropDownLineCount( nLines );
@@ -584,9 +584,9 @@ void ComboBox::SetDropDownLineCount( USHORT nLines )
// -----------------------------------------------------------------------
-USHORT ComboBox::GetDropDownLineCount() const
+sal_uInt16 ComboBox::GetDropDownLineCount() const
{
- USHORT nLines = 0;
+ sal_uInt16 nLines = 0;
if ( mpFloatWin )
nLines = mpFloatWin->GetDropDownLineCount();
return nLines;
@@ -595,7 +595,7 @@ USHORT ComboBox::GetDropDownLineCount() const
// -----------------------------------------------------------------------
void ComboBox::SetPosSizePixel( long nX, long nY, long nWidth, long nHeight,
- USHORT nFlags )
+ sal_uInt16 nFlags )
{
if( IsDropDownBox() && ( nFlags & WINDOW_POSSIZE_SIZE ) )
{
@@ -757,7 +757,7 @@ void ComboBox::StateChanged( StateChangedType nType )
else if ( nType == STATE_CHANGE_STYLE )
{
SetStyle( ImplInitStyle( GetStyle() ) );
- mpImplLB->GetMainWindow()->EnableSort( ( GetStyle() & WB_SORT ) ? TRUE : FALSE );
+ mpImplLB->GetMainWindow()->EnableSort( ( GetStyle() & WB_SORT ) ? sal_True : sal_False );
}
else if( nType == STATE_CHANGE_MIRRORING )
{
@@ -812,7 +812,7 @@ long ComboBox::Notify( NotifyEvent& rNEvt )
&& !IsReadOnly() )
{
KeyEvent aKeyEvt = *rNEvt.GetKeyEvent();
- USHORT nKeyCode = aKeyEvt.GetKeyCode().GetCode();
+ sal_uInt16 nKeyCode = aKeyEvt.GetKeyCode().GetCode();
switch( nKeyCode )
{
case KEY_UP:
@@ -824,11 +824,11 @@ long ComboBox::Notify( NotifyEvent& rNEvt )
if( ( nKeyCode == KEY_DOWN ) && mpFloatWin && !mpFloatWin->IsInPopupMode() && aKeyEvt.GetKeyCode().IsMod2() )
{
ImplCallEventListeners( VCLEVENT_DROPDOWN_PRE_OPEN );
- mpBtn->SetPressed( TRUE );
+ mpBtn->SetPressed( sal_True );
if ( mpImplLB->GetEntryList()->GetMRUCount() )
- mpImplLB->SelectEntry( 0 , TRUE );
+ mpImplLB->SelectEntry( 0 , sal_True );
SetSelection( Selection( 0, SELECTION_MAX ) );
- mpFloatWin->StartFloat( FALSE );
+ mpFloatWin->StartFloat( sal_False );
ImplCallEventListeners( VCLEVENT_DROPDOWN_OPEN );
nDone = 1;
}
@@ -859,14 +859,14 @@ long ComboBox::Notify( NotifyEvent& rNEvt )
{
if( mpFloatWin->HasChildPathFocus() )
mpSubEdit->GrabFocus();
- else if ( mpFloatWin->IsInPopupMode() && !HasChildPathFocus( TRUE ) )
+ else if ( mpFloatWin->IsInPopupMode() && !HasChildPathFocus( sal_True ) )
mpFloatWin->EndPopupMode();
}
else if( (rNEvt.GetType() == EVENT_COMMAND) &&
(rNEvt.GetCommandEvent()->GetCommand() == COMMAND_WHEEL) &&
(rNEvt.GetWindow() == mpSubEdit) )
{
- USHORT nWheelBehavior( GetSettings().GetMouseSettings().GetWheelBehavior() );
+ sal_uInt16 nWheelBehavior( GetSettings().GetMouseSettings().GetWheelBehavior() );
if ( ( nWheelBehavior == MOUSE_WHEEL_ALWAYS )
|| ( ( nWheelBehavior == MOUSE_WHEEL_FOCUS_ONLY )
&& HasChildPathFocus()
@@ -923,12 +923,12 @@ void ComboBox::Modify()
void ComboBox::ImplUpdateFloatSelection()
{
// Text in der ListBox in den sichtbaren Bereich bringen
- mpImplLB->SetCallSelectionChangedHdl( FALSE );
+ mpImplLB->SetCallSelectionChangedHdl( sal_False );
if ( !IsMultiSelectionEnabled() )
{
XubString aSearchStr( mpSubEdit->GetText() );
- USHORT nSelect = LISTBOX_ENTRY_NOTFOUND;
- BOOL bSelect = TRUE;
+ sal_uInt16 nSelect = LISTBOX_ENTRY_NOTFOUND;
+ sal_Bool bSelect = sal_True;
if ( mpImplLB->GetCurrentPos() != LISTBOX_ENTRY_NOTFOUND )
{
@@ -942,7 +942,7 @@ void ComboBox::ImplUpdateFloatSelection()
if ( nSelect == LISTBOX_ENTRY_NOTFOUND )
{
nSelect = mpImplLB->GetEntryList()->FindMatchingEntry( aSearchStr );
- bSelect = FALSE;
+ bSelect = sal_False;
}
if( nSelect != LISTBOX_ENTRY_NOTFOUND )
@@ -955,7 +955,7 @@ void ComboBox::ImplUpdateFloatSelection()
{
nSelect = mpImplLB->GetEntryList()->GetSelectEntryPos( 0 );
if( nSelect != LISTBOX_ENTRY_NOTFOUND )
- mpImplLB->SelectEntry( nSelect, FALSE );
+ mpImplLB->SelectEntry( nSelect, sal_False );
mpImplLB->ResetCurrentPos();
}
}
@@ -963,28 +963,28 @@ void ComboBox::ImplUpdateFloatSelection()
{
Table aSelInText;
lcl_GetSelectedEntries( aSelInText, mpSubEdit->GetText(), mcMultiSep, mpImplLB->GetEntryList() );
- for ( USHORT n = 0; n < mpImplLB->GetEntryList()->GetEntryCount(); n++ )
+ for ( sal_uInt16 n = 0; n < mpImplLB->GetEntryList()->GetEntryCount(); n++ )
mpImplLB->SelectEntry( n, aSelInText.IsKeyValid( ImplCreateKey( n ) ) );
}
- mpImplLB->SetCallSelectionChangedHdl( TRUE );
+ mpImplLB->SetCallSelectionChangedHdl( sal_True );
}
// -----------------------------------------------------------------------
-USHORT ComboBox::InsertEntry( const XubString& rStr, USHORT nPos )
+sal_uInt16 ComboBox::InsertEntry( const XubString& rStr, sal_uInt16 nPos )
{
- USHORT nRealPos = mpImplLB->InsertEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount(), rStr );
- nRealPos = sal::static_int_cast<USHORT>(nRealPos - mpImplLB->GetEntryList()->GetMRUCount());
+ sal_uInt16 nRealPos = mpImplLB->InsertEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount(), rStr );
+ nRealPos = sal::static_int_cast<sal_uInt16>(nRealPos - mpImplLB->GetEntryList()->GetMRUCount());
CallEventListeners( VCLEVENT_COMBOBOX_ITEMADDED, (void*) sal_IntPtr(nRealPos) );
return nRealPos;
}
// -----------------------------------------------------------------------
-USHORT ComboBox::InsertEntry( const XubString& rStr, const Image& rImage, USHORT nPos )
+sal_uInt16 ComboBox::InsertEntry( const XubString& rStr, const Image& rImage, sal_uInt16 nPos )
{
- USHORT nRealPos = mpImplLB->InsertEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount(), rStr, rImage );
- nRealPos = sal::static_int_cast<USHORT>(nRealPos - mpImplLB->GetEntryList()->GetMRUCount());
+ sal_uInt16 nRealPos = mpImplLB->InsertEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount(), rStr, rImage );
+ nRealPos = sal::static_int_cast<sal_uInt16>(nRealPos - mpImplLB->GetEntryList()->GetMRUCount());
CallEventListeners( VCLEVENT_COMBOBOX_ITEMADDED, (void*) sal_IntPtr(nRealPos) );
return nRealPos;
}
@@ -998,7 +998,7 @@ void ComboBox::RemoveEntry( const XubString& rStr )
// -----------------------------------------------------------------------
-void ComboBox::RemoveEntry( USHORT nPos )
+void ComboBox::RemoveEntry( sal_uInt16 nPos )
{
mpImplLB->RemoveEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount() );
CallEventListeners( VCLEVENT_COMBOBOX_ITEMREMOVED, (void*) sal_IntPtr(nPos) );
@@ -1014,70 +1014,70 @@ void ComboBox::Clear()
// -----------------------------------------------------------------------
-USHORT ComboBox::GetEntryPos( const XubString& rStr ) const
+sal_uInt16 ComboBox::GetEntryPos( const XubString& rStr ) const
{
- USHORT nPos = mpImplLB->GetEntryList()->FindEntry( rStr );
+ sal_uInt16 nPos = mpImplLB->GetEntryList()->FindEntry( rStr );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
- nPos = sal::static_int_cast<USHORT>(nPos - mpImplLB->GetEntryList()->GetMRUCount());
+ nPos = sal::static_int_cast<sal_uInt16>(nPos - mpImplLB->GetEntryList()->GetMRUCount());
return nPos;
}
// -----------------------------------------------------------------------
-USHORT ComboBox::GetEntryPos( const void* pData ) const
+sal_uInt16 ComboBox::GetEntryPos( const void* pData ) const
{
- USHORT nPos = mpImplLB->GetEntryList()->FindEntry( pData );
+ sal_uInt16 nPos = mpImplLB->GetEntryList()->FindEntry( pData );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
- nPos = sal::static_int_cast<USHORT>(nPos - mpImplLB->GetEntryList()->GetMRUCount());
+ nPos = sal::static_int_cast<sal_uInt16>(nPos - mpImplLB->GetEntryList()->GetMRUCount());
return nPos;
}
// -----------------------------------------------------------------------
-XubString ComboBox::GetEntry( USHORT nPos ) const
+XubString ComboBox::GetEntry( sal_uInt16 nPos ) const
{
return mpImplLB->GetEntryList()->GetEntryText( nPos + mpImplLB->GetEntryList()->GetMRUCount() );
}
// -----------------------------------------------------------------------
-USHORT ComboBox::GetEntryCount() const
+sal_uInt16 ComboBox::GetEntryCount() const
{
return mpImplLB->GetEntryList()->GetEntryCount() - mpImplLB->GetEntryList()->GetMRUCount();
}
// -----------------------------------------------------------------------
-BOOL ComboBox::IsTravelSelect() const
+sal_Bool ComboBox::IsTravelSelect() const
{
return mpImplLB->IsTravelSelect();
}
// -----------------------------------------------------------------------
-BOOL ComboBox::IsInDropDown() const
+sal_Bool ComboBox::IsInDropDown() const
{
return mpFloatWin && mpFloatWin->IsInPopupMode();
}
// -----------------------------------------------------------------------
-void ComboBox::EnableMultiSelection( BOOL bMulti )
+void ComboBox::EnableMultiSelection( sal_Bool bMulti )
{
- mpImplLB->EnableMultiSelection( bMulti, FALSE );
- mpImplLB->SetMultiSelectionSimpleMode( TRUE );
+ mpImplLB->EnableMultiSelection( bMulti, sal_False );
+ mpImplLB->SetMultiSelectionSimpleMode( sal_True );
}
// -----------------------------------------------------------------------
-BOOL ComboBox::IsMultiSelectionEnabled() const
+sal_Bool ComboBox::IsMultiSelectionEnabled() const
{
return mpImplLB->IsMultiSelectionEnabled();
}
// -----------------------------------------------------------------------
-long ComboBox::CalcWindowSizePixel( USHORT nLines ) const
+long ComboBox::CalcWindowSizePixel( sal_uInt16 nLines ) const
{
return mpImplLB->GetEntryHeight() * nLines;
}
@@ -1144,7 +1144,7 @@ Size ComboBox::CalcAdjustedSize( const Size& rPrefSize ) const
// -----------------------------------------------------------------------
-Size ComboBox::CalcSize( USHORT nColumns, USHORT nLines ) const
+Size ComboBox::CalcSize( sal_uInt16 nColumns, sal_uInt16 nLines ) const
{
// ggf. werden ScrollBars eingeblendet
Size aMinSz = CalcMinimumSize();
@@ -1184,28 +1184,28 @@ Size ComboBox::CalcSize( USHORT nColumns, USHORT nLines ) const
// -----------------------------------------------------------------------
-void ComboBox::GetMaxVisColumnsAndLines( USHORT& rnCols, USHORT& rnLines ) const
+void ComboBox::GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLines ) const
{
long nCharWidth = GetTextWidth( UniString( 'x' ) );
if ( !IsDropDownBox() )
{
Size aOutSz = mpImplLB->GetMainWindow()->GetOutputSizePixel();
- rnCols = (USHORT)(aOutSz.Width()/nCharWidth);
- rnLines = (USHORT)(aOutSz.Height()/mpImplLB->GetEntryHeight());
+ rnCols = (sal_uInt16)(aOutSz.Width()/nCharWidth);
+ rnLines = (sal_uInt16)(aOutSz.Height()/mpImplLB->GetEntryHeight());
}
else
{
Size aOutSz = mpSubEdit->GetOutputSizePixel();
- rnCols = (USHORT)(aOutSz.Width()/nCharWidth);
+ rnCols = (sal_uInt16)(aOutSz.Width()/nCharWidth);
rnLines = 1;
}
}
// -----------------------------------------------------------------------
-void ComboBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG nFlags )
+void ComboBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uIntPtr nFlags )
{
- mpImplLB->GetMainWindow()->ImplInitSettings( TRUE, TRUE, TRUE );
+ mpImplLB->GetMainWindow()->ImplInitSettings( sal_True, sal_True, sal_True );
Point aPos = pDev->LogicToPixel( rPos );
Size aSize = pDev->LogicToPixel( rSize );
@@ -1220,8 +1220,8 @@ void ComboBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, U
// 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 );
@@ -1243,7 +1243,7 @@ void ComboBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, U
long nOnePixel = GetDrawPixel( pDev, 1 );
long nTextHeight = pDev->GetTextHeight();
long nEditHeight = nTextHeight + 6*nOnePixel;
- USHORT nTextStyle = TEXT_DRAW_VCENTER;
+ sal_uInt16 nTextStyle = TEXT_DRAW_VCENTER;
// First, draw the edit part
mpSubEdit->Draw( pDev, aPos, Size( aSize.Width(), nEditHeight ), nFlags );
@@ -1275,10 +1275,10 @@ void ComboBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, U
Rectangle aClip( aPos, aSize );
pDev->IntersectClipRegion( aClip );
- USHORT nLines = (USHORT) ( (aSize.Height()-nEditHeight) / nTextHeight );
+ sal_uInt16 nLines = (sal_uInt16) ( (aSize.Height()-nEditHeight) / nTextHeight );
if ( !nLines )
nLines = 1;
- USHORT nTEntry = IsReallyVisible() ? mpImplLB->GetTopEntry() : 0;
+ sal_uInt16 nTEntry = IsReallyVisible() ? mpImplLB->GetTopEntry() : 0;
Rectangle aTextRect( aPos, aSize );
@@ -1288,7 +1288,7 @@ void ComboBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, U
aTextRect.Bottom() = aTextRect.Top() + nTextHeight;
// the drawing starts here
- for ( USHORT n = 0; n < nLines; n++ )
+ for ( sal_uInt16 n = 0; n < nLines; n++ )
{
pDev->DrawText( aTextRect, mpImplLB->GetEntryList()->GetEntryText( n+nTEntry ), nTextStyle );
aTextRect.Top() += nTextHeight;
@@ -1337,21 +1337,21 @@ const Size& ComboBox::GetUserItemSize() const
// -----------------------------------------------------------------------
-void ComboBox::EnableUserDraw( BOOL bUserDraw )
+void ComboBox::EnableUserDraw( sal_Bool bUserDraw )
{
mpImplLB->GetMainWindow()->EnableUserDraw( bUserDraw );
}
// -----------------------------------------------------------------------
-BOOL ComboBox::IsUserDrawEnabled() const
+sal_Bool ComboBox::IsUserDrawEnabled() const
{
return mpImplLB->GetMainWindow()->IsUserDrawEnabled();
}
// -----------------------------------------------------------------------
-void ComboBox::DrawEntry( const UserDrawEvent& rEvt, BOOL bDrawImage, BOOL bDrawText, BOOL bDrawTextAtImagePos )
+void ComboBox::DrawEntry( const UserDrawEvent& rEvt, sal_Bool bDrawImage, sal_Bool bDrawText, sal_Bool bDrawTextAtImagePos )
{
DBG_ASSERT( rEvt.GetDevice() == mpImplLB->GetMainWindow(), "DrawEntry?!" );
mpImplLB->GetMainWindow()->DrawEntry( rEvt.GetItemId(), bDrawImage, bDrawText, bDrawTextAtImagePos );
@@ -1359,7 +1359,7 @@ void ComboBox::DrawEntry( const UserDrawEvent& rEvt, BOOL bDrawImage, BOOL bDraw
// -----------------------------------------------------------------------
-void ComboBox::SetSeparatorPos( USHORT n )
+void ComboBox::SetSeparatorPos( sal_uInt16 n )
{
mpImplLB->SetSeparatorPos( n );
}
@@ -1373,7 +1373,7 @@ void ComboBox::SetSeparatorPos()
// -----------------------------------------------------------------------
-USHORT ComboBox::GetSeparatorPos() const
+sal_uInt16 ComboBox::GetSeparatorPos() const
{
return mpImplLB->GetSeparatorPos();
}
@@ -1394,58 +1394,58 @@ XubString ComboBox::GetMRUEntries( xub_Unicode cSep ) const
// -----------------------------------------------------------------------
-void ComboBox::SetMaxMRUCount( USHORT n )
+void ComboBox::SetMaxMRUCount( sal_uInt16 n )
{
mpImplLB->SetMaxMRUCount( n );
}
// -----------------------------------------------------------------------
-USHORT ComboBox::GetMaxMRUCount() const
+sal_uInt16 ComboBox::GetMaxMRUCount() const
{
return mpImplLB->GetMaxMRUCount();
}
// -----------------------------------------------------------------------
-USHORT ComboBox::GetDisplayLineCount() const
+sal_uInt16 ComboBox::GetDisplayLineCount() const
{
return mpImplLB->GetDisplayLineCount();
}
// -----------------------------------------------------------------------
-void ComboBox::SetEntryData( USHORT nPos, void* pNewData )
+void ComboBox::SetEntryData( sal_uInt16 nPos, void* pNewData )
{
mpImplLB->SetEntryData( nPos + mpImplLB->GetEntryList()->GetMRUCount(), pNewData );
}
// -----------------------------------------------------------------------
-void* ComboBox::GetEntryData( USHORT nPos ) const
+void* ComboBox::GetEntryData( sal_uInt16 nPos ) const
{
return mpImplLB->GetEntryList()->GetEntryData( nPos + mpImplLB->GetEntryList()->GetMRUCount() );
}
// -----------------------------------------------------------------------
-void ComboBox::SetTopEntry( USHORT nPos )
+void ComboBox::SetTopEntry( sal_uInt16 nPos )
{
mpImplLB->SetTopEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount() );
}
// -----------------------------------------------------------------------
-void ComboBox::ShowProminentEntry( USHORT nPos )
+void ComboBox::ShowProminentEntry( sal_uInt16 nPos )
{
mpImplLB->ShowProminentEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount() );
}
// -----------------------------------------------------------------------
-USHORT ComboBox::GetTopEntry() const
+sal_uInt16 ComboBox::GetTopEntry() const
{
- USHORT nPos = GetEntryCount() ? mpImplLB->GetTopEntry() : LISTBOX_ENTRY_NOTFOUND;
+ sal_uInt16 nPos = GetEntryCount() ? mpImplLB->GetTopEntry() : LISTBOX_ENTRY_NOTFOUND;
if ( nPos < mpImplLB->GetEntryList()->GetMRUCount() )
nPos = 0;
return nPos;
@@ -1495,29 +1495,29 @@ const Wallpaper& ComboBox::GetDisplayBackground() const
return rBack;
}
// -----------------------------------------------------------------------------
-USHORT ComboBox::GetSelectEntryCount() const
+sal_uInt16 ComboBox::GetSelectEntryCount() const
{
return mpImplLB->GetEntryList()->GetSelectEntryCount();
}
// -----------------------------------------------------------------------------
-USHORT ComboBox::GetSelectEntryPos( USHORT nIndex ) const
+sal_uInt16 ComboBox::GetSelectEntryPos( sal_uInt16 nIndex ) const
{
- USHORT nPos = mpImplLB->GetEntryList()->GetSelectEntryPos( nIndex );
+ sal_uInt16 nPos = mpImplLB->GetEntryList()->GetSelectEntryPos( nIndex );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
{
if ( nPos < mpImplLB->GetEntryList()->GetMRUCount() )
nPos = mpImplLB->GetEntryList()->FindEntry( mpImplLB->GetEntryList()->GetEntryText( nPos ) );
- nPos = sal::static_int_cast<USHORT>(nPos - mpImplLB->GetEntryList()->GetMRUCount());
+ nPos = sal::static_int_cast<sal_uInt16>(nPos - mpImplLB->GetEntryList()->GetMRUCount());
}
return nPos;
}
// -----------------------------------------------------------------------------
-BOOL ComboBox::IsEntryPosSelected( USHORT nPos ) const
+sal_Bool ComboBox::IsEntryPosSelected( sal_uInt16 nPos ) const
{
return mpImplLB->GetEntryList()->IsEntryPosSelected( nPos + mpImplLB->GetEntryList()->GetMRUCount() );
}
// -----------------------------------------------------------------------------
-void ComboBox::SelectEntryPos( USHORT nPos, BOOL bSelect)
+void ComboBox::SelectEntryPos( sal_uInt16 nPos, sal_Bool bSelect)
{
if ( nPos < mpImplLB->GetEntryList()->GetEntryCount() )
mpImplLB->SelectEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount(), bSelect );
@@ -1529,7 +1529,7 @@ void ComboBox::SetNoSelection()
mpSubEdit->SetText( String() );
}
// -----------------------------------------------------------------------------
-Rectangle ComboBox::GetBoundingRectangle( USHORT nItem ) const
+Rectangle ComboBox::GetBoundingRectangle( sal_uInt16 nItem ) const
{
Rectangle aRect = mpImplLB->GetMainWindow()->GetBoundingRectangle( nItem );
Rectangle aOffset = mpImplLB->GetMainWindow()->GetWindowExtentsRelative( (Window*)this );
@@ -1538,7 +1538,7 @@ Rectangle ComboBox::GetBoundingRectangle( USHORT nItem ) const
}
// -----------------------------------------------------------------------------
-void ComboBox::SetBorderStyle( USHORT nBorderStyle )
+void ComboBox::SetBorderStyle( sal_uInt16 nBorderStyle )
{
Window::SetBorderStyle( nBorderStyle );
if ( !IsDropDownBox() )
@@ -1549,7 +1549,7 @@ void ComboBox::SetBorderStyle( USHORT nBorderStyle )
}
// -----------------------------------------------------------------------------
-long ComboBox::GetIndexForPoint( const Point& rPoint, USHORT& rPos ) const
+long ComboBox::GetIndexForPoint( const Point& rPoint, sal_uInt16& rPos ) const
{
if( !HasLayoutData() )
FillLayoutData();
@@ -1569,7 +1569,7 @@ long ComboBox::GetIndexForPoint( const Point& rPoint, USHORT& rPos ) const
aConvPoint = pMain->PixelToLogic( aConvPoint );
// try to find entry
- USHORT nEntry = pMain->GetEntryPosForPoint( aConvPoint );
+ sal_uInt16 nEntry = pMain->GetEntryPosForPoint( aConvPoint );
if( nEntry == LISTBOX_ENTRY_NOTFOUND )
nIndex = -1;
else
diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx
index 918675cc0783..1386cda5f949 100644
--- a/vcl/source/control/ctrl.cxx
+++ b/vcl/source/control/ctrl.cxx
@@ -49,7 +49,7 @@ using namespace vcl;
void Control::ImplInitControlData()
{
- mbHasFocus = FALSE;
+ mbHasFocus = sal_False;
mpControlData = new ImplControlData;
}
@@ -305,10 +305,10 @@ long Control::Notify( NotifyEvent& rNEvt )
{
if ( !mbHasFocus )
{
- mbHasFocus = TRUE;
+ mbHasFocus = sal_True;
if ( ImplCallEventListenersAndHandler( VCLEVENT_CONTROL_GETFOCUS, maGetFocusHdl, this ) )
// been destroyed within the handler
- return TRUE;
+ return sal_True;
}
}
else
@@ -318,10 +318,10 @@ long Control::Notify( NotifyEvent& rNEvt )
Window* pFocusWin = Application::GetFocusWindow();
if ( !pFocusWin || !ImplIsWindowOrChild( pFocusWin ) )
{
- mbHasFocus = FALSE;
+ mbHasFocus = sal_False;
if ( ImplCallEventListenersAndHandler( VCLEVENT_CONTROL_LOSEFOCUS, maLoseFocusHdl, this ) )
// been destroyed within the handler
- return TRUE;
+ return sal_True;
}
}
}
@@ -374,7 +374,7 @@ void Control::AppendLayoutData( const Control& rSubControl ) const
// -----------------------------------------------------------------
-BOOL Control::ImplCallEventListenersAndHandler( ULONG nEvent, const Link& rHandler, void* pCaller )
+sal_Bool Control::ImplCallEventListenersAndHandler( sal_uIntPtr nEvent, const Link& rHandler, void* pCaller )
{
ImplDelData aCheckDelete;
ImplAddDel( &aCheckDelete );
@@ -387,10 +387,10 @@ BOOL Control::ImplCallEventListenersAndHandler( ULONG nEvent, const Link& rHand
if ( !aCheckDelete.IsDelete() )
{
ImplRemoveDel( &aCheckDelete );
- return FALSE;
+ return sal_False;
}
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------
@@ -449,8 +449,8 @@ void Control::DataChanged( const DataChangedEvent& rDCEvt)
{
AllSettings aSettings = GetSettings();
StyleSettings aStyleSettings = aSettings.GetStyleSettings();
- ULONG nOldOptions = rDCEvt.GetOldSettings()->GetStyleSettings().GetOptions();
- ULONG nNewOptions = aStyleSettings.GetOptions();
+ sal_uIntPtr nOldOptions = rDCEvt.GetOldSettings()->GetStyleSettings().GetOptions();
+ sal_uIntPtr nNewOptions = aStyleSettings.GetOptions();
if ( !(nNewOptions & STYLE_OPTION_MONO) && ( nOldOptions & STYLE_OPTION_MONO ) )
{
@@ -519,7 +519,7 @@ const Color& Control::GetCanonicalTextColor( const StyleSettings& _rStyle ) cons
}
// -----------------------------------------------------------------
-void Control::ImplInitSettings( const BOOL _bFont, const BOOL _bForeground )
+void Control::ImplInitSettings( const sal_Bool _bFont, const sal_Bool _bForeground )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
@@ -546,7 +546,7 @@ void Control::ImplInitSettings( const BOOL _bFont, const BOOL _bForeground )
// -----------------------------------------------------------------
void Control::DrawControlText( OutputDevice& _rTargetDevice, Rectangle& _io_rRect, const XubString& _rStr,
- USHORT _nStyle, MetricVector* _pVector, String* _pDisplayText ) const
+ sal_uInt16 _nStyle, MetricVector* _pVector, String* _pDisplayText ) const
{
#ifdef FS_DEBUG
if ( !_pVector )
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 0a29a627b8e3..4fe401eca98e 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -119,17 +119,17 @@ struct DDInfo
Cursor aCursor;
Selection aDndStartSel;
xub_StrLen nDropPos;
- BOOL bStarterOfDD;
- BOOL bDroppedInMe;
- BOOL bVisCursor;
+ sal_Bool bStarterOfDD;
+ sal_Bool bDroppedInMe;
+ sal_Bool bVisCursor;
DDInfo()
{
aCursor.SetStyle( CURSOR_SHADOW );
nDropPos = 0;
- bStarterOfDD = FALSE;
- bDroppedInMe = FALSE;
- bVisCursor = FALSE;
+ bStarterOfDD = sal_False;
+ bDroppedInMe = sal_False;
+ bVisCursor = sal_False;
}
};
@@ -138,11 +138,11 @@ struct DDInfo
struct Impl_IMEInfos
{
String aOldTextAfterStartPos;
- USHORT* pAttribs;
+ sal_uInt16* pAttribs;
xub_StrLen nPos;
xub_StrLen nLen;
- BOOL bCursor;
- BOOL bWasCursorOverwrite;
+ sal_Bool bCursor;
+ sal_Bool bWasCursorOverwrite;
Impl_IMEInfos( xub_StrLen nPos, const String& rOldTextAfterStartPos );
~Impl_IMEInfos();
@@ -158,9 +158,9 @@ Impl_IMEInfos::Impl_IMEInfos( xub_StrLen nP, const String& rOldTextAfterStartPos
{
nPos = nP;
nLen = 0;
- bCursor = TRUE;
+ bCursor = sal_True;
pAttribs = NULL;
- bWasCursorOverwrite = FALSE;
+ bWasCursorOverwrite = sal_False;
}
// -----------------------------------------------------------------------
@@ -176,8 +176,8 @@ void Impl_IMEInfos::CopyAttribs( const xub_StrLen* pA, xub_StrLen nL )
{
nLen = nL;
delete[] pAttribs;
- pAttribs = new USHORT[ nL ];
- rtl_copyMemory( pAttribs, pA, nL*sizeof(USHORT) );
+ pAttribs = new sal_uInt16[ nL ];
+ rtl_copyMemory( pAttribs, pA, nL*sizeof(sal_uInt16) );
}
// -----------------------------------------------------------------------
@@ -234,7 +234,7 @@ Edit::Edit( Window* pParent, const ResId& rResId, bool bDisableAccessibleLabeled
ImplInit( pParent, nStyle );
ImplLoadRes( rResId );
if ( bDisableAccessibleLabeledByRelation )
- ImplGetWindowImpl()->mbDisableAccessibleLabeledByRelation = TRUE;
+ ImplGetWindowImpl()->mbDisableAccessibleLabeledByRelation = sal_True;
// Derived MultiLineEdit takes care to call Show only after MultiLineEdit
// ctor has already started:
@@ -287,21 +287,21 @@ void Edit::ImplInitEditData()
mnAlign = EDIT_ALIGN_LEFT;
mnMaxTextLen = EDIT_NOLIMIT;
meAutocompleteAction = AUTOCOMPLETE_KEYINPUT;
- mbModified = FALSE;
- mbInternModified = FALSE;
- mbReadOnly = FALSE;
- mbInsertMode = TRUE;
- mbClickedInSelection = FALSE;
- mbActivePopup = FALSE;
- mbIsSubEdit = FALSE;
- mbInMBDown = FALSE;
+ mbModified = sal_False;
+ mbInternModified = sal_False;
+ mbReadOnly = sal_False;
+ mbInsertMode = sal_True;
+ mbClickedInSelection = sal_False;
+ mbActivePopup = sal_False;
+ mbIsSubEdit = sal_False;
+ mbInMBDown = sal_False;
mpDDInfo = NULL;
mpIMEInfos = NULL;
mcEchoChar = 0;
// --- RTL --- no default mirroring for Edit controls
// note: controls that use a subedit will revert this (SpinField, ComboBox)
- EnableRTL( FALSE );
+ EnableRTL( sal_False );
vcl::unohelper::DragAndDropWrapper* pDnDWrapper = new vcl::unohelper::DragAndDropWrapper( this );
mxDnDListener = pDnDWrapper;
@@ -348,7 +348,7 @@ void Edit::ImplInit( Window* pParent, WinBits nStyle )
SetCursor( new Cursor );
SetPointer( Pointer( POINTER_TEXT ) );
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
uno::Reference< datatransfer::dnd::XDragGestureListener> xDGL( mxDnDListener, uno::UNO_QUERY );
uno::Reference< datatransfer::dnd::XDragGestureRecognizer > xDGR = GetDragGestureRecognizer();
@@ -376,7 +376,7 @@ WinBits Edit::ImplInitStyle( WinBits nStyle )
// -----------------------------------------------------------------------
-BOOL Edit::IsCharInput( const KeyEvent& rKeyEvent )
+sal_Bool Edit::IsCharInput( const KeyEvent& rKeyEvent )
{
// In the future we must use new Unicode functions for this
xub_Unicode cCharCode = rKeyEvent.GetCharCode();
@@ -390,13 +390,13 @@ BOOL Edit::IsCharInput( const KeyEvent& rKeyEvent )
void Edit::ImplModified()
{
- mbModified = TRUE;
+ mbModified = sal_True;
Modify();
}
// -----------------------------------------------------------------------
-void Edit::ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground )
+void Edit::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
@@ -543,7 +543,7 @@ void Edit::ImplRepaint( xub_StrLen nStart, xub_StrLen nEnd, bool bLayout )
}
Cursor* pCursor = GetCursor();
- BOOL bVisCursor = pCursor ? pCursor->IsVisible() : FALSE;
+ sal_Bool bVisCursor = pCursor ? pCursor->IsVisible() : sal_False;
if ( pCursor )
pCursor->Hide();
@@ -551,7 +551,7 @@ void Edit::ImplRepaint( xub_StrLen nStart, xub_StrLen nEnd, bool bLayout )
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
if ( IsEnabled() )
- ImplInitSettings( FALSE, TRUE, FALSE );
+ ImplInitSettings( sal_False, sal_True, sal_False );
else
SetTextColor( rStyleSettings.GetDisableColor() );
@@ -572,7 +572,7 @@ void Edit::ImplRepaint( xub_StrLen nStart, xub_StrLen nEnd, bool bLayout )
else
SetTextFillColor( IsControlBackground() ? GetControlBackground() : rStyleSettings.GetFieldColor() );
- BOOL bDrawSelection = maSelection.Len() && ( HasFocus() || ( GetStyle() & WB_NOHIDESELECTION ) || mbActivePopup );
+ sal_Bool bDrawSelection = maSelection.Len() && ( HasFocus() || ( GetStyle() & WB_NOHIDESELECTION ) || mbActivePopup );
long nPos = nStart ? pDX[2*nStart] : 0;
aPos.X() = nPos + mnXOffset + ImplGetExtraOffset();
@@ -662,7 +662,7 @@ void Edit::ImplRepaint( xub_StrLen nStart, xub_StrLen nEnd, bool bLayout )
for( i = 0; i < mpIMEInfos->nLen; )
{
- USHORT nAttr = mpIMEInfos->pAttribs[i];
+ sal_uInt16 nAttr = mpIMEInfos->pAttribs[i];
Region aClip;
int nIndex = i;
while( nIndex < mpIMEInfos->nLen && mpIMEInfos->pAttribs[nIndex] == nAttr) // #112631# check nIndex before using it
@@ -718,7 +718,7 @@ void Edit::ImplRepaint( xub_StrLen nStart, xub_StrLen nEnd, bool bLayout )
// -----------------------------------------------------------------------
-void Edit::ImplDelete( const Selection& rSelection, BYTE nDirection, BYTE nMode )
+void Edit::ImplDelete( const Selection& rSelection, sal_uInt8 nDirection, sal_uInt8 nMode )
{
XubString aText = ImplGetText();
@@ -778,7 +778,7 @@ void Edit::ImplDelete( const Selection& rSelection, BYTE nDirection, BYTE nMode
maSelection.Min() = aSelection.Min();
maSelection.Max() = aSelection.Min();
ImplAlignAndPaint();
- mbInternModified = TRUE;
+ mbInternModified = sal_True;
}
// -----------------------------------------------------------------------
@@ -1001,7 +1001,7 @@ void Edit::ImplInsertText( const XubString& rStr, const Selection* pNewSel, sal_
}
ImplAlignAndPaint();
- mbInternModified = TRUE;
+ mbInternModified = sal_True;
}
// -----------------------------------------------------------------------
@@ -1025,7 +1025,7 @@ void Edit::ImplSetText( const XubString& rText, const Selection* pNewSelection )
ImplAlign();
if ( pNewSelection )
- ImplSetSelection( *pNewSelection, FALSE );
+ ImplSetSelection( *pNewSelection, sal_False );
if ( mnXOffset && !pNewSelection )
maSelection.Max() = 0;
@@ -1163,7 +1163,7 @@ void Edit::ImplClearBackground( long nXStart, long nXEnd )
// -----------------------------------------------------------------------
-void Edit::ImplShowCursor( BOOL bOnlyIfVisible )
+void Edit::ImplShowCursor( sal_Bool bOnlyIfVisible )
{
if ( !IsUpdateMode() || ( bOnlyIfVisible && !IsReallyVisible() ) )
return;
@@ -1356,7 +1356,7 @@ xub_StrLen Edit::ImplGetCharPos( const Point& rWindowPos ) const
// -----------------------------------------------------------------------
-void Edit::ImplSetCursorPos( xub_StrLen nChar, BOOL bSelect )
+void Edit::ImplSetCursorPos( xub_StrLen nChar, sal_Bool bSelect )
{
Selection aSelection( maSelection );
aSelection.Max() = nChar;
@@ -1448,7 +1448,7 @@ void Edit::MouseButtonDown( const MouseEvent& rMEvt )
if ( rMEvt.GetClicks() < 4 )
{
- mbClickedInSelection = FALSE;
+ mbClickedInSelection = sal_False;
if ( rMEvt.GetClicks() == 3 )
{
ImplSetSelection( Selection( 0, 0xFFFF ) );
@@ -1463,7 +1463,7 @@ void Edit::MouseButtonDown( const MouseEvent& rMEvt )
ImplCopyToSelectionClipboard();
}
else if ( !rMEvt.IsShift() && HasFocus() && aSelection.IsInside( nChar ) )
- mbClickedInSelection = TRUE;
+ mbClickedInSelection = sal_True;
else if ( rMEvt.IsLeft() )
ImplSetCursorPos( nChar, rMEvt.IsShift() );
@@ -1471,9 +1471,9 @@ void Edit::MouseButtonDown( const MouseEvent& rMEvt )
StartTracking( STARTTRACK_SCROLLREPEAT );
}
- mbInMBDown = TRUE; // Dann im GetFocus nicht alles selektieren
+ mbInMBDown = sal_True; // Dann im GetFocus nicht alles selektieren
GrabFocus();
- mbInMBDown = FALSE;
+ mbInMBDown = sal_False;
}
// -----------------------------------------------------------------------
@@ -1483,8 +1483,8 @@ void Edit::MouseButtonUp( const MouseEvent& rMEvt )
if ( mbClickedInSelection && rMEvt.IsLeft() )
{
xub_StrLen nChar = ImplGetCharPos( rMEvt.GetPosPixel() );
- ImplSetCursorPos( nChar, FALSE );
- mbClickedInSelection = FALSE;
+ ImplSetCursorPos( nChar, sal_False );
+ mbClickedInSelection = sal_False;
}
else if ( rMEvt.IsMiddle() && !mbReadOnly &&
( GetSettings().GetMouseSettings().GetMiddleButtonAction() == MOUSE_MIDDLE_PASTESELECTION ) )
@@ -1504,8 +1504,8 @@ void Edit::Tracking( const TrackingEvent& rTEvt )
if ( mbClickedInSelection )
{
xub_StrLen nChar = ImplGetCharPos( rTEvt.GetMouseEvent().GetPosPixel() );
- ImplSetCursorPos( nChar, FALSE );
- mbClickedInSelection = FALSE;
+ ImplSetCursorPos( nChar, sal_False );
+ mbClickedInSelection = sal_False;
}
else if ( rTEvt.GetMouseEvent().IsLeft() )
{
@@ -1517,7 +1517,7 @@ void Edit::Tracking( const TrackingEvent& rTEvt )
if( !mbClickedInSelection )
{
xub_StrLen nChar = ImplGetCharPos( rTEvt.GetMouseEvent().GetPosPixel() );
- ImplSetCursorPos( nChar, TRUE );
+ ImplSetCursorPos( nChar, sal_True );
}
}
@@ -1527,13 +1527,13 @@ void Edit::Tracking( const TrackingEvent& rTEvt )
// -----------------------------------------------------------------------
-BOOL Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
+sal_Bool Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
{
- BOOL bDone = FALSE;
- USHORT nCode = rKEvt.GetKeyCode().GetCode();
+ sal_Bool bDone = sal_False;
+ sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
KeyFuncType eFunc = rKEvt.GetKeyCode().GetFunction();
- mbInternModified = FALSE;
+ mbInternModified = sal_False;
if ( eFunc != KEYFUNC_DONTKNOW )
{
@@ -1545,7 +1545,7 @@ BOOL Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
{
Cut();
ImplModified();
- bDone = TRUE;
+ bDone = sal_True;
}
}
break;
@@ -1555,7 +1555,7 @@ BOOL Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
if ( !(GetStyle() & WB_PASSWORD) )
{
Copy();
- bDone = TRUE;
+ bDone = sal_True;
}
}
break;
@@ -1565,7 +1565,7 @@ BOOL Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
if ( !mbReadOnly )
{
Paste();
- bDone = TRUE;
+ bDone = sal_True;
}
}
break;
@@ -1575,7 +1575,7 @@ BOOL Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
if ( !mbReadOnly )
{
Undo();
- bDone = TRUE;
+ bDone = sal_True;
}
}
break;
@@ -1590,7 +1590,7 @@ BOOL Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
if ( nCode == KEY_A )
{
ImplSetSelection( Selection( 0, maText.Len() ) );
- bDone = TRUE;
+ bDone = sal_True;
}
else if ( rKEvt.GetKeyCode().IsShift() && (nCode == KEY_S) )
{
@@ -1604,7 +1604,7 @@ BOOL Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
ImplInsertText( aChars );
ImplModified();
}
- bDone = TRUE;
+ bDone = sal_True;
}
}
}
@@ -1616,7 +1616,7 @@ BOOL Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
case com::sun::star::awt::Key::SELECT_ALL:
{
ImplSetSelection( Selection( 0, maText.Len() ) );
- bDone = TRUE;
+ bDone = sal_True;
}
break;
@@ -1742,7 +1742,7 @@ BOOL Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
}
}
- bDone = TRUE;
+ bDone = sal_True;
}
}
break;
@@ -1756,8 +1756,8 @@ BOOL Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
{
if ( !mbReadOnly && !rKEvt.GetKeyCode().IsMod2() )
{
- BYTE nDel = (nCode == KEY_DELETE) ? EDIT_DEL_RIGHT : EDIT_DEL_LEFT;
- BYTE nMode = rKEvt.GetKeyCode().IsMod1() ? EDIT_DELMODE_RESTOFWORD : EDIT_DELMODE_SIMPLE;
+ sal_uInt8 nDel = (nCode == KEY_DELETE) ? EDIT_DEL_RIGHT : EDIT_DEL_LEFT;
+ sal_uInt8 nMode = rKEvt.GetKeyCode().IsMod1() ? EDIT_DELMODE_RESTOFWORD : EDIT_DELMODE_SIMPLE;
if ( (nMode == EDIT_DELMODE_RESTOFWORD) && rKEvt.GetKeyCode().IsShift() )
nMode = EDIT_DELMODE_RESTOFCONTENT;
switch( nCode )
@@ -1784,7 +1784,7 @@ BOOL Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
ImplDelete( maSelection, nDel, nMode );
if ( maText.Len() != nOldLen )
ImplModified();
- bDone = TRUE;
+ bDone = sal_True;
}
}
break;
@@ -1794,7 +1794,7 @@ BOOL Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
if ( !mpIMEInfos && !mbReadOnly && !rKEvt.GetKeyCode().IsMod2() )
{
SetInsertMode( !mbInsertMode );
- bDone = TRUE;
+ bDone = sal_True;
}
}
break;
@@ -1816,7 +1816,7 @@ BOOL Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
// Wurde nichts veraendert, dann TAB fuer DialogControl
if ( GetSelection().Len() )
- bDone = TRUE;
+ bDone = sal_True;
}
}
break;
@@ -1825,7 +1825,7 @@ BOOL Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
{
if ( IsCharInput( rKEvt ) )
{
- bDone = TRUE; // Auch bei ReadOnly die Zeichen schlucken.
+ bDone = sal_True; // Auch bei ReadOnly die Zeichen schlucken.
if ( !mbReadOnly )
{
ImplInsertText( rKEvt.GetCharCode(), 0, sal_True );
@@ -1893,9 +1893,9 @@ void Edit::Resize()
// -----------------------------------------------------------------------
-void Edit::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG nFlags )
+void Edit::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uIntPtr nFlags )
{
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
Point aPos = pDev->LogicToPixel( rPos );
Size aSize = pDev->LogicToPixel( rSize );
@@ -1910,8 +1910,8 @@ void Edit::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG
// 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 );
@@ -2003,7 +2003,7 @@ void Edit::GetFocus()
{
maUndoText = maText;
- ULONG nSelOptions = GetSettings().GetStyleSettings().GetSelectionOptions();
+ sal_uIntPtr nSelOptions = GetSettings().GetStyleSettings().GetSelectionOptions();
if ( !( GetStyle() & (WB_NOHIDESELECTION|WB_READONLY) )
&& ( GetGetFocusFlags() & (GETFOCUS_INIT|GETFOCUS_TAB|GETFOCUS_CURSOR|GETFOCUS_MNEMONIC) ) )
{
@@ -2100,22 +2100,22 @@ void Edit::Command( const CommandEvent& rCEvt )
if ( !maSelection.Len() )
{
- 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 ( 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 );
}
else
{
// Paste nur, wenn Text im Clipboard
- BOOL bData = FALSE;
+ sal_Bool bData = sal_False;
uno::Reference< datatransfer::clipboard::XClipboard > xClipboard = GetClipboard();
if ( xClipboard.is() )
{
@@ -2133,17 +2133,17 @@ void Edit::Command( const CommandEvent& rCEvt )
}
if ( maUndoText == maText )
- 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 ( !pImplFncGetSpecialChars )
{
- 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;
Selection aSaveSel = GetSelection(); // Falls jemand in Get/LoseFocus die Selektion verbiegt, z.B. URL-Zeile...
Point aPos = rCEvt.GetMousePosPixel();
if ( !rCEvt.IsMouseEvent() )
@@ -2152,7 +2152,7 @@ void Edit::Command( const CommandEvent& rCEvt )
Size aSize = GetOutputSizePixel();
aPos = Point( aSize.Width()/2, aSize.Height()/2 );
}
- USHORT n = pPopup->Execute( this, aPos );
+ sal_uInt16 n = pPopup->Execute( this, aPos );
Edit::DeletePopupMenu( pPopup );
SetSelection( aSaveSel );
switch ( n )
@@ -2191,7 +2191,7 @@ void Edit::Command( const CommandEvent& rCEvt )
}
break;
}
- mbActivePopup = FALSE;
+ mbActivePopup = sal_False;
}
else if ( rCEvt.GetCommand() == COMMAND_VOICE )
{
@@ -2239,12 +2239,12 @@ void Edit::Command( const CommandEvent& rCEvt )
}
else if ( rCEvt.GetCommand() == COMMAND_ENDEXTTEXTINPUT )
{
- BOOL bInsertMode = !mpIMEInfos->bWasCursorOverwrite;
+ sal_Bool bInsertMode = !mpIMEInfos->bWasCursorOverwrite;
delete mpIMEInfos;
mpIMEInfos = NULL;
// Font wieder ohne Attribute einstellen, wird jetzt im Repaint nicht
// mehr neu initialisiert
- ImplInitSettings( TRUE, FALSE, FALSE );
+ ImplInitSettings( sal_True, sal_False, sal_False );
SetInsertMode( bInsertMode );
@@ -2268,20 +2268,20 @@ void Edit::Command( const CommandEvent& rCEvt )
maText.Insert( pData->GetText(), mpIMEInfos->nPos );
if ( mpIMEInfos->bWasCursorOverwrite )
{
- USHORT nOldIMETextLen = mpIMEInfos->nLen;
- USHORT nNewIMETextLen = pData->GetText().Len();
+ sal_uInt16 nOldIMETextLen = mpIMEInfos->nLen;
+ sal_uInt16 nNewIMETextLen = pData->GetText().Len();
if ( ( nOldIMETextLen > nNewIMETextLen ) &&
( nNewIMETextLen < mpIMEInfos->aOldTextAfterStartPos.Len() ) )
{
// restore old characters
- USHORT nRestore = nOldIMETextLen - nNewIMETextLen;
+ sal_uInt16 nRestore = nOldIMETextLen - nNewIMETextLen;
maText.Insert( mpIMEInfos->aOldTextAfterStartPos.Copy( nNewIMETextLen, nRestore ), mpIMEInfos->nPos + nNewIMETextLen );
}
else if ( ( nOldIMETextLen < nNewIMETextLen ) &&
( nOldIMETextLen < mpIMEInfos->aOldTextAfterStartPos.Len() ) )
{
// overwrite
- USHORT nOverwrite = nNewIMETextLen - nOldIMETextLen;
+ sal_uInt16 nOverwrite = nNewIMETextLen - nOldIMETextLen;
if ( ( nOldIMETextLen + nOverwrite ) > mpIMEInfos->aOldTextAfterStartPos.Len() )
nOverwrite = mpIMEInfos->aOldTextAfterStartPos.Len() - nOldIMETextLen;
maText.Erase( mpIMEInfos->nPos + nNewIMETextLen, nOverwrite );
@@ -2313,7 +2313,7 @@ void Edit::Command( const CommandEvent& rCEvt )
{
if ( mpIMEInfos )
{
- xub_StrLen nCursorPos = (USHORT)GetSelection().Max();
+ xub_StrLen nCursorPos = (sal_uInt16)GetSelection().Max();
SetCursorRect( NULL, GetTextWidth(
maText, nCursorPos, mpIMEInfos->nPos+mpIMEInfos->nLen-nCursorPos ) );
}
@@ -2343,10 +2343,10 @@ void Edit::StateChanged( StateChangedType nType )
mnXOffset = 0; // Falls vorher GrabFocus, als Groesse noch falsch.
ImplAlign();
if ( !mpSubEdit )
- ImplShowCursor( FALSE );
+ ImplShowCursor( sal_False );
}
// update background (eventual SetPaintTransparent)
- ImplInitSettings( FALSE, FALSE, TRUE );
+ ImplInitSettings( sal_False, sal_False, sal_True );
}
else if ( nType == STATE_CHANGE_ENABLE )
{
@@ -2365,7 +2365,7 @@ void Edit::StateChanged( StateChangedType nType )
SetStyle( nStyle );
}
- USHORT nOldAlign = mnAlign;
+ sal_uInt16 nOldAlign = mnAlign;
mnAlign = EDIT_ALIGN_LEFT;
// --- RTL --- hack: right align until keyinput and cursor travelling works
@@ -2399,8 +2399,8 @@ void Edit::StateChanged( StateChangedType nType )
{
if ( !mpSubEdit )
{
- ImplInitSettings( TRUE, FALSE, FALSE );
- ImplShowCursor( TRUE );
+ ImplInitSettings( sal_True, sal_False, sal_False );
+ ImplShowCursor( sal_True );
Invalidate();
}
}
@@ -2408,7 +2408,7 @@ void Edit::StateChanged( StateChangedType nType )
{
if ( !mpSubEdit )
{
- ImplInitSettings( TRUE, FALSE, FALSE );
+ ImplInitSettings( sal_True, sal_False, sal_False );
ImplShowCursor();
Invalidate();
}
@@ -2417,7 +2417,7 @@ void Edit::StateChanged( StateChangedType nType )
{
if ( !mpSubEdit )
{
- ImplInitSettings( FALSE, TRUE, FALSE );
+ ImplInitSettings( sal_False, sal_True, sal_False );
Invalidate();
}
}
@@ -2425,7 +2425,7 @@ void Edit::StateChanged( StateChangedType nType )
{
if ( !mpSubEdit )
{
- ImplInitSettings( FALSE, FALSE, TRUE );
+ ImplInitSettings( sal_False, sal_False, sal_True );
Invalidate();
}
}
@@ -2444,8 +2444,8 @@ void Edit::DataChanged( const DataChangedEvent& rDCEvt )
{
if ( !mpSubEdit )
{
- ImplInitSettings( TRUE, TRUE, TRUE );
- ImplShowCursor( TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
+ ImplShowCursor( sal_True );
Invalidate();
}
}
@@ -2466,7 +2466,7 @@ void Edit::ImplShowDDCursor()
mpDDInfo->aCursor.SetPos( aCursorRect.TopLeft() );
mpDDInfo->aCursor.SetSize( aCursorRect.GetSize() );
mpDDInfo->aCursor.Show();
- mpDDInfo->bVisCursor = TRUE;
+ mpDDInfo->bVisCursor = sal_True;
}
}
@@ -2477,7 +2477,7 @@ void Edit::ImplHideDDCursor()
if ( mpDDInfo && mpDDInfo->bVisCursor )
{
mpDDInfo->aCursor.Hide();
- mpDDInfo->bVisCursor = FALSE;
+ mpDDInfo->bVisCursor = sal_False;
}
}
@@ -2529,7 +2529,7 @@ IMPL_LINK( Edit, ImplUpdateDataHdl, Timer*, EMPTYARG )
// -----------------------------------------------------------------------
-void Edit::EnableUpdateData( ULONG nTimeout )
+void Edit::EnableUpdateData( sal_uIntPtr nTimeout )
{
if ( !nTimeout )
DisableUpdateData();
@@ -2556,7 +2556,7 @@ void Edit::SetEchoChar( xub_Unicode c )
// -----------------------------------------------------------------------
-void Edit::SetReadOnly( BOOL bReadOnly )
+void Edit::SetReadOnly( sal_Bool bReadOnly )
{
if ( mbReadOnly != bReadOnly )
{
@@ -2579,7 +2579,7 @@ void Edit::SetAutocompleteHdl( const Link& rHdl )
// -----------------------------------------------------------------------
-void Edit::SetInsertMode( BOOL bInsert )
+void Edit::SetInsertMode( sal_Bool bInsert )
{
if ( bInsert != mbInsertMode )
{
@@ -2593,7 +2593,7 @@ void Edit::SetInsertMode( BOOL bInsert )
// -----------------------------------------------------------------------
-BOOL Edit::IsInsertMode() const
+sal_Bool Edit::IsInsertMode() const
{
if ( mpSubEdit )
return mpSubEdit->IsInsertMode();
@@ -2632,7 +2632,7 @@ void Edit::SetSelection( const Selection& rSelection )
// -----------------------------------------------------------------------
-void Edit::ImplSetSelection( const Selection& rSelection, BOOL bPaint )
+void Edit::ImplSetSelection( const Selection& rSelection, sal_Bool bPaint )
{
if ( mpSubEdit )
mpSubEdit->ImplSetSelection( rSelection );
@@ -2803,9 +2803,9 @@ XubString Edit::GetText() const
void Edit::SetModifyFlag()
{
if ( mpSubEdit )
- mpSubEdit->mbModified = TRUE;
+ mpSubEdit->mbModified = sal_True;
else
- mbModified = TRUE;
+ mbModified = sal_True;
}
// -----------------------------------------------------------------------
@@ -2813,9 +2813,9 @@ void Edit::SetModifyFlag()
void Edit::ClearModifyFlag()
{
if ( mpSubEdit )
- mpSubEdit->mbModified = FALSE;
+ mpSubEdit->mbModified = sal_False;
else
- mbModified = FALSE;
+ mbModified = sal_False;
}
// -----------------------------------------------------------------------
@@ -2826,7 +2826,7 @@ void Edit::SetSubEdit( Edit* pEdit )
if ( mpSubEdit )
{
SetPointer( POINTER_ARROW ); // Nur das SubEdit hat den BEAM...
- mpSubEdit->mbIsSubEdit = TRUE;
+ mpSubEdit->mbIsSubEdit = sal_True;
mpSubEdit->SetReadOnly( mbReadOnly );
}
@@ -2931,8 +2931,8 @@ PopupMenu* Edit::CreatePopupMenu()
pPopup->SetAccelKey( SV_MENU_EDIT_COPY, KeyCode( KEYFUNC_COPY ) );
pPopup->SetAccelKey( SV_MENU_EDIT_PASTE, KeyCode( KEYFUNC_PASTE ) );
pPopup->SetAccelKey( SV_MENU_EDIT_DELETE, KeyCode( KEYFUNC_DELETE ) );
- pPopup->SetAccelKey( SV_MENU_EDIT_SELECTALL, KeyCode( KEY_A, FALSE, TRUE, FALSE, FALSE ) );
- pPopup->SetAccelKey( SV_MENU_EDIT_INSERTSYMBOL, KeyCode( KEY_S, TRUE, TRUE, FALSE, FALSE ) );
+ pPopup->SetAccelKey( SV_MENU_EDIT_SELECTALL, KeyCode( KEY_A, sal_False, sal_True, sal_False, sal_False ) );
+ pPopup->SetAccelKey( SV_MENU_EDIT_INSERTSYMBOL, KeyCode( KEY_S, sal_True, sal_True, sal_False, sal_False ) );
return pPopup;
}
@@ -2949,7 +2949,7 @@ void Edit::dragGestureRecognized( const ::com::sun::star::datatransfer::dnd::Dra
vos::OGuard aVclGuard( Application::GetSolarMutex() );
if ( !IsTracking() && maSelection.Len() &&
- !(GetStyle() & WB_PASSWORD) && (!mpDDInfo || mpDDInfo->bStarterOfDD == FALSE) ) // Kein Mehrfach D&D
+ !(GetStyle() & WB_PASSWORD) && (!mpDDInfo || mpDDInfo->bStarterOfDD == sal_False) ) // Kein Mehrfach D&D
{
Selection aSel( maSelection );
aSel.Justify();
@@ -2962,7 +2962,7 @@ void Edit::dragGestureRecognized( const ::com::sun::star::datatransfer::dnd::Dra
if ( !mpDDInfo )
mpDDInfo = new DDInfo;
- mpDDInfo->bStarterOfDD = TRUE;
+ mpDDInfo->bStarterOfDD = sal_True;
mpDDInfo->aDndStartSel = aSel;
@@ -3012,7 +3012,7 @@ void Edit::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEvent&
{
vos::OGuard aVclGuard( Application::GetSolarMutex() );
- BOOL bChanges = FALSE;
+ sal_Bool bChanges = sal_False;
if ( !mbReadOnly && mpDDInfo )
{
ImplHideDDCursor();
@@ -3023,7 +3023,7 @@ void Edit::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEvent&
if ( aSel.Len() && !mpDDInfo->bStarterOfDD )
ImplDelete( aSel, EDIT_DEL_RIGHT, EDIT_DELMODE_SIMPLE );
- mpDDInfo->bDroppedInMe = TRUE;
+ mpDDInfo->bDroppedInMe = sal_True;
aSel.Min() = mpDDInfo->nDropPos;
aSel.Max() = mpDDInfo->nDropPos;
@@ -3040,7 +3040,7 @@ void Edit::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEvent&
::rtl::OUString aText;
aData >>= aText;
ImplInsertText( aText );
- bChanges = TRUE;
+ bChanges = sal_True;
ImplModified();
}
}
diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx
index 090aa2a84163..90b70f2b2b63 100644
--- a/vcl/source/control/field.cxx
+++ b/vcl/source/control/field.cxx
@@ -62,9 +62,9 @@ static ResStringArray *strAllUnits = NULL;
// -----------------------------------------------------------------------
-static sal_Int64 ImplPower10( USHORT n )
+static sal_Int64 ImplPower10( sal_uInt16 n )
{
- USHORT i;
+ sal_uInt16 i;
sal_Int64 nValue = 1;
for ( i=0; i < n; i++ )
@@ -75,16 +75,16 @@ static sal_Int64 ImplPower10( USHORT n )
// -----------------------------------------------------------------------
-static BOOL ImplNumericProcessKeyInput( Edit*, const KeyEvent& rKEvt,
- BOOL bStrictFormat, BOOL bThousandSep,
+static sal_Bool ImplNumericProcessKeyInput( Edit*, const KeyEvent& rKEvt,
+ sal_Bool bStrictFormat, sal_Bool bThousandSep,
const LocaleDataWrapper& rLocaleDataWrappper )
{
if ( !bStrictFormat )
- return FALSE;
+ return sal_False;
else
{
xub_Unicode cChar = rKEvt.GetCharCode();
- USHORT nGroup = rKEvt.GetKeyCode().GetGroup();
+ sal_uInt16 nGroup = rKEvt.GetKeyCode().GetGroup();
if ( (nGroup == KEYGROUP_FKEYS) || (nGroup == KEYGROUP_CURSOR) ||
(nGroup == KEYGROUP_MISC) ||
@@ -92,28 +92,28 @@ static BOOL ImplNumericProcessKeyInput( Edit*, const KeyEvent& rKEvt,
(cChar == rLocaleDataWrappper.getNumDecimalSep() ) ||
(bThousandSep && (cChar == rLocaleDataWrappper.getNumThousandSep())) ||
(cChar == '-') )
- return FALSE;
+ return sal_False;
else
- return TRUE;
+ return sal_True;
}
}
// -----------------------------------------------------------------------
-static BOOL ImplNumericGetValue( const XubString& rStr, double& rValue,
- USHORT nDecDigits, const LocaleDataWrapper& rLocaleDataWrappper,
- BOOL bCurrency = FALSE )
+static sal_Bool ImplNumericGetValue( const XubString& rStr, double& rValue,
+ sal_uInt16 nDecDigits, const LocaleDataWrapper& rLocaleDataWrappper,
+ sal_Bool bCurrency = sal_False )
{
XubString aStr = rStr;
XubString aStr1;
XubString aStr2;
- BOOL bNegative = FALSE;
+ sal_Bool bNegative = sal_False;
xub_StrLen nDecPos;
xub_StrLen i;
// Reaktion auf leeren String
if ( !rStr.Len() )
- return FALSE;
+ return sal_False;
// Fuehrende und nachfolgende Leerzeichen entfernen
aStr.EraseLeadingAndTrailingChars( ' ' );
@@ -132,7 +132,7 @@ static BOOL ImplNumericGetValue( const XubString& rStr, double& rValue,
if ( bCurrency )
{
if ( (aStr.GetChar( 0 ) == '(') && (aStr.GetChar( aStr.Len()-1 ) == ')') )
- bNegative = TRUE;
+ bNegative = sal_True;
if ( !bNegative )
{
for ( i=0; i < aStr.Len(); i++ )
@@ -141,14 +141,14 @@ static BOOL ImplNumericGetValue( const XubString& rStr, double& rValue,
break;
else if ( aStr.GetChar( i ) == '-' )
{
- bNegative = TRUE;
+ bNegative = sal_True;
break;
}
}
}
if ( !bNegative && bCurrency && aStr.Len() )
{
- USHORT nFormat = rLocaleDataWrappper.getCurrNegativeFormat();
+ sal_uInt16 nFormat = rLocaleDataWrappper.getCurrNegativeFormat();
if ( (nFormat == 3) || (nFormat == 6) ||
(nFormat == 7) || (nFormat == 10) )
{
@@ -158,7 +158,7 @@ static BOOL ImplNumericGetValue( const XubString& rStr, double& rValue,
break;
else if ( aStr.GetChar( i ) == '-' )
{
- bNegative = TRUE;
+ bNegative = sal_True;
break;
}
}
@@ -168,7 +168,7 @@ static BOOL ImplNumericGetValue( const XubString& rStr, double& rValue,
else
{
if ( aStr1.GetChar( 0 ) == '-' )
- bNegative = TRUE;
+ bNegative = sal_True;
}
// Alle unerwuenschten Zeichen rauswerfen
@@ -188,7 +188,7 @@ static BOOL ImplNumericGetValue( const XubString& rStr, double& rValue,
}
if ( !aStr1.Len() && !aStr2.Len() )
- return FALSE;
+ return sal_False;
if ( !aStr1.Len() )
aStr1.Insert( '0' );
@@ -196,11 +196,11 @@ static BOOL ImplNumericGetValue( const XubString& rStr, double& rValue,
aStr1.Insert( '-', 0 );
// Nachkommateil zurechtstutzen und dabei runden
- BOOL bRound = FALSE;
+ sal_Bool bRound = sal_False;
if ( aStr2.Len() > nDecDigits )
{
if ( aStr2.GetChar( nDecDigits ) >= '5' )
- bRound = TRUE;
+ bRound = sal_True;
aStr2.Erase( nDecDigits );
}
if ( aStr2.Len() < nDecDigits )
@@ -221,7 +221,7 @@ static BOOL ImplNumericGetValue( const XubString& rStr, double& rValue,
rValue = nValue;
- return TRUE;
+ return sal_True;
}
static void ImplUpdateSeparators( const String& rOldDecSep, const String& rNewDecSep,
@@ -233,8 +233,8 @@ static void ImplUpdateSeparators( const String& rOldDecSep, const String& rNewDe
if( bChangeDec || bChangeTh )
{
- BOOL bUpdateMode = pEdit->IsUpdateMode();
- pEdit->SetUpdateMode( FALSE );
+ sal_Bool bUpdateMode = pEdit->IsUpdateMode();
+ pEdit->SetUpdateMode( sal_False );
String aText = pEdit->GetText();
if( bChangeDec )
aText.SearchAndReplaceAll( rNewDecSep, rOldDecSep );
@@ -246,8 +246,8 @@ static void ImplUpdateSeparators( const String& rOldDecSep, const String& rNewDe
if( pCombo )
{
// update box entries
- USHORT nEntryCount = pCombo->GetEntryCount();
- for ( USHORT i=0; i < nEntryCount; i++ )
+ sal_uInt16 nEntryCount = pCombo->GetEntryCount();
+ for ( sal_uInt16 i=0; i < nEntryCount; i++ )
{
aText = pCombo->GetEntry( i );
if( bChangeDec )
@@ -269,11 +269,11 @@ FormatterBase::FormatterBase( Edit* pField )
{
mpField = pField;
mpLocaleDataWrapper = NULL;
- mbReformat = FALSE;
- mbStrictFormat = FALSE;
- mbEmptyFieldValue = FALSE;
- mbEmptyFieldValueEnabled = FALSE;
- mbDefaultLocale = TRUE;
+ mbReformat = sal_False;
+ mbStrictFormat = sal_False;
+ mbEmptyFieldValue = sal_False;
+ mbEmptyFieldValueEnabled = sal_False;
+ mbDefaultLocale = sal_True;
}
// -----------------------------------------------------------------------
@@ -314,7 +314,7 @@ void FormatterBase::ReformatAll()
// -----------------------------------------------------------------------
-void FormatterBase::SetStrictFormat( BOOL bStrict )
+void FormatterBase::SetStrictFormat( sal_Bool bStrict )
{
if ( bStrict != mbStrictFormat )
{
@@ -329,7 +329,7 @@ void FormatterBase::SetStrictFormat( BOOL bStrict )
void FormatterBase::SetLocale( const lang::Locale& rLocale )
{
ImplGetLocaleDataWrapper().setLocale( rLocale );
- mbDefaultLocale = FALSE;
+ mbDefaultLocale = sal_False;
ReformatAll();
}
@@ -360,7 +360,7 @@ const AllSettings& FormatterBase::GetFieldSettings() const
// -----------------------------------------------------------------------
-void FormatterBase::SetFieldText( const XubString& rText, BOOL bKeepSelection )
+void FormatterBase::SetFieldText( const XubString& rText, sal_Bool bKeepSelection )
{
if ( mpField )
{
@@ -387,7 +387,7 @@ void FormatterBase::ImplSetText( const XubString& rText, Selection* pNewSelectio
mpField->SetText( rText, aSel );
}
- MarkToBeReformatted( FALSE );
+ MarkToBeReformatted( sal_False );
}
}
@@ -397,23 +397,23 @@ void FormatterBase::SetEmptyFieldValue()
{
if ( mpField )
mpField->SetText( ImplGetSVEmptyStr() );
- mbEmptyFieldValue = TRUE;
+ mbEmptyFieldValue = sal_True;
}
// -----------------------------------------------------------------------
-BOOL FormatterBase::IsEmptyFieldValue() const
+sal_Bool FormatterBase::IsEmptyFieldValue() const
{
return (!mpField || !mpField->GetText().Len());
}
// -----------------------------------------------------------------------
-BOOL NumericFormatter::ImplNumericReformat( const XubString& rStr, double& rValue,
+sal_Bool NumericFormatter::ImplNumericReformat( const XubString& rStr, double& rValue,
XubString& rOutStr )
{
if ( !ImplNumericGetValue( rStr, rValue, GetDecimalDigits(), ImplGetLocaleDataWrapper() ) )
- return TRUE;
+ return sal_True;
else
{
double nTempVal = rValue;
@@ -429,14 +429,14 @@ BOOL NumericFormatter::ImplNumericReformat( const XubString& rStr, double& rValu
if ( !GetErrorHdl().Call( this ) )
{
mnCorrectedValue = 0;
- return FALSE;
+ return sal_False;
}
else
mnCorrectedValue = 0;
}
rOutStr = CreateFieldText( (sal_Int64)nTempVal );
- return TRUE;
+ return sal_True;
}
}
@@ -451,8 +451,8 @@ void NumericFormatter::ImplInit()
mnCorrectedValue = 0;
mnDecimalDigits = 2;
mnType = FORMAT_NUMERIC;
- mbThousandSep = TRUE;
- mbShowTrailingZeros = TRUE;
+ mbThousandSep = sal_True;
+ mbShowTrailingZeros = sal_True;
// for fields
mnSpinSize = 1;
@@ -477,7 +477,7 @@ void NumericFormatter::ImplLoadRes( const ResId& rResId )
if( pMgr )
{
- ULONG nMask = pMgr->ReadLong();
+ sal_uIntPtr nMask = pMgr->ReadLong();
if ( NUMERICFORMATTER_MIN & nMask )
mnMin = pMgr->ReadLong();
@@ -486,7 +486,7 @@ void NumericFormatter::ImplLoadRes( const ResId& rResId )
mnMax = pMgr->ReadLong();
if ( NUMERICFORMATTER_STRICTFORMAT & nMask )
- SetStrictFormat( (BOOL)pMgr->ReadShort() );
+ SetStrictFormat( (sal_Bool)pMgr->ReadShort() );
if ( NUMERICFORMATTER_DECIMALDIGITS & nMask )
SetDecimalDigits( pMgr->ReadShort() );
@@ -502,7 +502,7 @@ void NumericFormatter::ImplLoadRes( const ResId& rResId )
}
if ( NUMERICFORMATTER_NOTHOUSANDSEP & nMask )
- SetUseThousandSep( !(BOOL)pMgr->ReadShort() );
+ SetUseThousandSep( !(sal_Bool)pMgr->ReadShort() );
}
}
@@ -532,7 +532,7 @@ void NumericFormatter::SetMax( sal_Int64 nNewMax )
// -----------------------------------------------------------------------
-void NumericFormatter::SetUseThousandSep( BOOL b )
+void NumericFormatter::SetUseThousandSep( sal_Bool b )
{
mbThousandSep = b;
ReformatAll();
@@ -540,7 +540,7 @@ void NumericFormatter::SetUseThousandSep( BOOL b )
// -----------------------------------------------------------------------
-void NumericFormatter::SetDecimalDigits( USHORT nDigits )
+void NumericFormatter::SetDecimalDigits( sal_uInt16 nDigits )
{
mnDecimalDigits = nDigits;
ReformatAll();
@@ -548,7 +548,7 @@ void NumericFormatter::SetDecimalDigits( USHORT nDigits )
// -----------------------------------------------------------------------
-void NumericFormatter::SetShowTrailingZeros( BOOL bShowTrailingZeros )
+void NumericFormatter::SetShowTrailingZeros( sal_Bool bShowTrailingZeros )
{
if ( mbShowTrailingZeros != bShowTrailingZeros )
{
@@ -559,7 +559,7 @@ void NumericFormatter::SetShowTrailingZeros( BOOL bShowTrailingZeros )
// -----------------------------------------------------------------------
-USHORT NumericFormatter::GetDecimalDigits() const
+sal_uInt16 NumericFormatter::GetDecimalDigits() const
{
return mnDecimalDigits;
}
@@ -570,7 +570,7 @@ void NumericFormatter::SetValue( sal_Int64 nNewValue )
{
SetUserValue( nNewValue );
mnFieldValue = mnLastValue;
- SetEmptyFieldValueData( FALSE );
+ SetEmptyFieldValueData( sal_False );
}
// -----------------------------------------------------------------------
@@ -626,14 +626,14 @@ sal_Int64 NumericFormatter::GetValue() const
// -----------------------------------------------------------------------
-BOOL NumericFormatter::IsValueModified() const
+sal_Bool NumericFormatter::IsValueModified() const
{
if ( ImplGetEmptyFieldValue() )
return !IsEmptyFieldValue();
else if ( GetValue() != mnFieldValue )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -684,7 +684,7 @@ void NumericFormatter::Reformat()
XubString aStr;
// caution: precision loss in double cast
double nTemp = (double)mnLastValue;
- BOOL bOK = ImplNumericReformat( GetField()->GetText(), nTemp, aStr );
+ sal_Bool bOK = ImplNumericReformat( GetField()->GetText(), nTemp, aStr );
mnLastValue = (sal_Int64)nTemp;
if ( !bOK )
return;
@@ -804,7 +804,7 @@ void NumericField::ImplLoadRes( const ResId& rResId )
SpinField::ImplLoadRes( rResId );
NumericFormatter::ImplLoadRes( ResId( (RSHEADER_TYPE *)GetClassRes(), *rResId.GetResMgr() ) );
- ULONG nMask = ReadLongRes();
+ sal_uIntPtr nMask = ReadLongRes();
if ( NUMERICFIELD_FIRST & nMask )
mnFirst = ReadLongRes();
@@ -840,7 +840,7 @@ long NumericField::PreNotify( NotifyEvent& rNEvt )
long NumericField::Notify( NotifyEvent& rNEvt )
{
if ( rNEvt.GetType() == EVENT_GETFOCUS )
- MarkToBeReformatted( FALSE );
+ MarkToBeReformatted( sal_False );
else if ( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
if ( MustBeReformatted() && (GetText().Len() || !IsEmptyFieldValueEnabled()) )
@@ -873,7 +873,7 @@ void NumericField::DataChanged( const DataChangedEvent& rDCEvt )
void NumericField::Modify()
{
- MarkToBeReformatted( TRUE );
+ MarkToBeReformatted( sal_True );
SpinField::Modify();
}
@@ -959,7 +959,7 @@ long NumericBox::PreNotify( NotifyEvent& rNEvt )
long NumericBox::Notify( NotifyEvent& rNEvt )
{
if ( rNEvt.GetType() == EVENT_GETFOCUS )
- MarkToBeReformatted( FALSE );
+ MarkToBeReformatted( sal_False );
else if ( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
if ( MustBeReformatted() && (GetText().Len() || !IsEmptyFieldValueEnabled()) )
@@ -992,7 +992,7 @@ void NumericBox::DataChanged( const DataChangedEvent& rDCEvt )
void NumericBox::Modify()
{
- MarkToBeReformatted( TRUE );
+ MarkToBeReformatted( sal_True );
ComboBox::Modify();
}
@@ -1002,21 +1002,21 @@ void NumericBox::ReformatAll()
{
double nValue;
XubString aStr;
- SetUpdateMode( FALSE );
- USHORT nEntryCount = GetEntryCount();
- for ( USHORT i=0; i < nEntryCount; i++ )
+ SetUpdateMode( sal_False );
+ sal_uInt16 nEntryCount = GetEntryCount();
+ for ( sal_uInt16 i=0; i < nEntryCount; i++ )
{
ImplNumericReformat( GetEntry( i ), nValue, aStr );
RemoveEntry( i );
InsertEntry( aStr, i );
}
NumericFormatter::Reformat();
- SetUpdateMode( TRUE );
+ SetUpdateMode( sal_True );
}
// -----------------------------------------------------------------------
-void NumericBox::InsertValue( sal_Int64 nValue, USHORT nPos )
+void NumericBox::InsertValue( sal_Int64 nValue, sal_uInt16 nPos )
{
ComboBox::InsertEntry( CreateFieldText( nValue ), nPos );
}
@@ -1030,7 +1030,7 @@ void NumericBox::RemoveValue( sal_Int64 nValue )
// -----------------------------------------------------------------------
-sal_Int64 NumericBox::GetValue( USHORT nPos ) const
+sal_Int64 NumericBox::GetValue( sal_uInt16 nPos ) const
{
double nValue = 0;
ImplNumericGetValue( ComboBox::GetEntry( nPos ), nValue, GetDecimalDigits(), ImplGetLocaleDataWrapper() );
@@ -1039,19 +1039,19 @@ sal_Int64 NumericBox::GetValue( USHORT nPos ) const
// -----------------------------------------------------------------------
-USHORT NumericBox::GetValuePos( sal_Int64 nValue ) const
+sal_uInt16 NumericBox::GetValuePos( sal_Int64 nValue ) const
{
return ComboBox::GetEntryPos( CreateFieldText( nValue ) );
}
// -----------------------------------------------------------------------
-static BOOL ImplMetricProcessKeyInput( Edit* pEdit, const KeyEvent& rKEvt,
- BOOL, BOOL bUseThousandSep, const LocaleDataWrapper& rWrapper )
+static sal_Bool ImplMetricProcessKeyInput( Edit* pEdit, const KeyEvent& rKEvt,
+ sal_Bool, sal_Bool bUseThousandSep, const LocaleDataWrapper& rWrapper )
{
// Es gibt hier kein sinnvolles StrictFormat, also alle
// Zeichen erlauben
- return ImplNumericProcessKeyInput( pEdit, rKEvt, FALSE, bUseThousandSep, rWrapper );
+ return ImplNumericProcessKeyInput( pEdit, rKEvt, sal_False, bUseThousandSep, rWrapper );
}
// -----------------------------------------------------------------------
@@ -1077,7 +1077,7 @@ static XubString ImplMetricGetUnitText( const XubString& rStr )
/*
// MT: #90545# Preparation for translated strings...
String aMetricText;
- for ( USHORT n = rStr.Len(); n; )
+ for ( sal_uInt16 n = rStr.Len(); n; )
{
sal_Unicode c = rStr.GetChar( --n );
sal_Int32 nType = xCharClass->getStringType( rStr, n, 1, rLocale );
@@ -1107,7 +1107,7 @@ static String ImplMetricToString( FieldUnit rUnit )
strAllUnits = new ResStringArray( ResId (SV_FUNIT_STRINGS, *pResMgr) );
}
// return unit's default string (ie, the first one )
- for( USHORT i=0; i < strAllUnits->Count(); i++ )
+ for( sal_uInt16 i=0; i < strAllUnits->Count(); i++ )
if( (FieldUnit) strAllUnits->GetValue( i ) == rUnit )
return strAllUnits->GetString( i );
@@ -1124,7 +1124,7 @@ static FieldUnit ImplStringToMetric( const String &rMetricString )
// return FieldUnit
String aStr( rMetricString );
aStr.ToLowerAscii();
- for( USHORT i=0; i < strAllUnits->Count(); i++ )
+ for( sal_uInt16 i=0; i < strAllUnits->Count(); i++ )
if ( strAllUnits->GetString( i ).Equals( aStr ) )
return (FieldUnit) strAllUnits->GetValue( i );
@@ -1212,7 +1212,7 @@ static double nonValueDoubleToValueDouble( double nValue )
return rtl::math::isFinite( nValue ) ? nValue : 0.0;
}
-sal_Int64 MetricField::ConvertValue( sal_Int64 nValue, sal_Int64 mnBaseValue, USHORT nDecDigits,
+sal_Int64 MetricField::ConvertValue( sal_Int64 nValue, sal_Int64 mnBaseValue, sal_uInt16 nDecDigits,
FieldUnit eInUnit, FieldUnit eOutUnit )
{
// caution: precision loss in double cast
@@ -1226,7 +1226,7 @@ sal_Int64 MetricField::ConvertValue( sal_Int64 nValue, sal_Int64 mnBaseValue, US
// -----------------------------------------------------------------------
-sal_Int64 MetricField::ConvertValue( sal_Int64 nValue, USHORT nDigits,
+sal_Int64 MetricField::ConvertValue( sal_Int64 nValue, sal_uInt16 nDigits,
MapUnit eInUnit, FieldUnit eOutUnit )
{
return static_cast<sal_Int64>(
@@ -1238,7 +1238,7 @@ sal_Int64 MetricField::ConvertValue( sal_Int64 nValue, USHORT nDigits,
// -----------------------------------------------------------------------
-sal_Int64 MetricField::ConvertValue( sal_Int64 nValue, USHORT nDigits,
+sal_Int64 MetricField::ConvertValue( sal_Int64 nValue, sal_uInt16 nDigits,
FieldUnit eInUnit, MapUnit eOutUnit )
{
return static_cast<sal_Int64>(
@@ -1250,7 +1250,7 @@ sal_Int64 MetricField::ConvertValue( sal_Int64 nValue, USHORT nDigits,
// -----------------------------------------------------------------------
-double MetricField::ConvertDoubleValue( double nValue, sal_Int64 mnBaseValue, USHORT nDecDigits,
+double MetricField::ConvertDoubleValue( double nValue, sal_Int64 mnBaseValue, sal_uInt16 nDecDigits,
FieldUnit eInUnit, FieldUnit eOutUnit )
{
if ( eInUnit != eOutUnit )
@@ -1262,7 +1262,7 @@ double MetricField::ConvertDoubleValue( double nValue, sal_Int64 mnBaseValue, US
if ( (mnBaseValue <= 0) || (nValue <= 0) )
return nValue;
nDiv = 100;
- for ( USHORT i=0; i < nDecDigits; i++ )
+ for ( sal_uInt16 i=0; i < nDecDigits; i++ )
nDiv *= 10;
nMult = mnBaseValue;
@@ -1301,7 +1301,7 @@ double MetricField::ConvertDoubleValue( double nValue, sal_Int64 mnBaseValue, US
// -----------------------------------------------------------------------
-double MetricField::ConvertDoubleValue( double nValue, USHORT nDigits,
+double MetricField::ConvertDoubleValue( double nValue, sal_uInt16 nDigits,
MapUnit eInUnit, FieldUnit eOutUnit )
{
if ( eOutUnit == FUNIT_PERCENT ||
@@ -1358,7 +1358,7 @@ double MetricField::ConvertDoubleValue( double nValue, USHORT nDigits,
// -----------------------------------------------------------------------
-double MetricField::ConvertDoubleValue( double nValue, USHORT nDigits,
+double MetricField::ConvertDoubleValue( double nValue, sal_uInt16 nDigits,
FieldUnit eInUnit, MapUnit eOutUnit )
{
if ( eInUnit == FUNIT_PERCENT ||
@@ -1415,12 +1415,12 @@ double MetricField::ConvertDoubleValue( double nValue, USHORT nDigits,
// -----------------------------------------------------------------------
-static BOOL ImplMetricGetValue( const XubString& rStr, double& rValue, sal_Int64 nBaseValue,
- USHORT nDecDigits, const LocaleDataWrapper& rLocaleDataWrapper, FieldUnit eUnit )
+static sal_Bool ImplMetricGetValue( const XubString& rStr, double& rValue, sal_Int64 nBaseValue,
+ sal_uInt16 nDecDigits, const LocaleDataWrapper& rLocaleDataWrapper, FieldUnit eUnit )
{
// Zahlenwert holen
if ( !ImplNumericGetValue( rStr, rValue, nDecDigits, rLocaleDataWrapper ) )
- return FALSE;
+ return sal_False;
// Einheit rausfinden
FieldUnit eEntryUnit = ImplMetricGetUnit( rStr );
@@ -1428,15 +1428,15 @@ static BOOL ImplMetricGetValue( const XubString& rStr, double& rValue, sal_Int64
// Einheiten umrechnen
rValue = MetricField::ConvertDoubleValue( rValue, nBaseValue, nDecDigits, eEntryUnit, eUnit );
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-BOOL MetricFormatter::ImplMetricReformat( const XubString& rStr, double& rValue, XubString& rOutStr )
+sal_Bool MetricFormatter::ImplMetricReformat( const XubString& rStr, double& rValue, XubString& rOutStr )
{
if ( !ImplMetricGetValue( rStr, rValue, mnBaseValue, GetDecimalDigits(), ImplGetLocaleDataWrapper(), meUnit ) )
- return TRUE;
+ return sal_True;
else
{
double nTempVal = rValue;
@@ -1452,14 +1452,14 @@ BOOL MetricFormatter::ImplMetricReformat( const XubString& rStr, double& rValue,
if ( !GetErrorHdl().Call( this ) )
{
mnCorrectedValue = 0;
- return FALSE;
+ return sal_False;
}
else
mnCorrectedValue = 0;
}
rOutStr = CreateFieldText( (sal_Int64)nTempVal );
- return TRUE;
+ return sal_True;
}
}
@@ -1488,7 +1488,7 @@ void MetricFormatter::ImplLoadRes( const ResId& rResId )
ResMgr* pMgr = rResId.GetResMgr();
if( pMgr )
{
- ULONG nMask = pMgr->ReadLong();
+ sal_uIntPtr nMask = pMgr->ReadLong();
if ( METRICFORMATTER_UNIT & nMask )
meUnit = (FieldUnit)pMgr->ReadLong();
@@ -1662,7 +1662,7 @@ void MetricFormatter::Reformat()
XubString aStr;
// caution: precision loss in double cast
double nTemp = (double)mnLastValue;
- BOOL bOK = ImplMetricReformat( aText, nTemp, aStr );
+ sal_Bool bOK = ImplMetricReformat( aText, nTemp, aStr );
mnLastValue = (sal_Int64)nTemp;
if ( !bOK )
@@ -1719,7 +1719,7 @@ void MetricField::ImplLoadRes( const ResId& rResId )
SpinField::ImplLoadRes( rResId );
MetricFormatter::ImplLoadRes( ResId( (RSHEADER_TYPE *)GetClassRes(), *rResId.GetResMgr() ) );
- ULONG nMask = ReadLongRes();
+ sal_uIntPtr nMask = ReadLongRes();
if ( METRICFIELD_FIRST & nMask )
mnFirst = ReadLongRes();
@@ -1795,7 +1795,7 @@ long MetricField::PreNotify( NotifyEvent& rNEvt )
long MetricField::Notify( NotifyEvent& rNEvt )
{
if ( rNEvt.GetType() == EVENT_GETFOCUS )
- MarkToBeReformatted( FALSE );
+ MarkToBeReformatted( sal_False );
else if ( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
if ( MustBeReformatted() && (GetText().Len() || !IsEmptyFieldValueEnabled()) )
@@ -1828,7 +1828,7 @@ void MetricField::DataChanged( const DataChangedEvent& rDCEvt )
void MetricField::Modify()
{
- MarkToBeReformatted( TRUE );
+ MarkToBeReformatted( sal_True );
SpinField::Modify();
}
@@ -1921,7 +1921,7 @@ long MetricBox::PreNotify( NotifyEvent& rNEvt )
long MetricBox::Notify( NotifyEvent& rNEvt )
{
if ( rNEvt.GetType() == EVENT_GETFOCUS )
- MarkToBeReformatted( FALSE );
+ MarkToBeReformatted( sal_False );
else if ( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
if ( MustBeReformatted() && (GetText().Len() || !IsEmptyFieldValueEnabled()) )
@@ -1954,7 +1954,7 @@ void MetricBox::DataChanged( const DataChangedEvent& rDCEvt )
void MetricBox::Modify()
{
- MarkToBeReformatted( TRUE );
+ MarkToBeReformatted( sal_True );
ComboBox::Modify();
}
@@ -1964,16 +1964,16 @@ void MetricBox::ReformatAll()
{
double nValue;
XubString aStr;
- SetUpdateMode( FALSE );
- USHORT nEntryCount = GetEntryCount();
- for ( USHORT i=0; i < nEntryCount; i++ )
+ SetUpdateMode( sal_False );
+ sal_uInt16 nEntryCount = GetEntryCount();
+ for ( sal_uInt16 i=0; i < nEntryCount; i++ )
{
ImplMetricReformat( GetEntry( i ), nValue, aStr );
RemoveEntry( i );
InsertEntry( aStr, i );
}
MetricFormatter::Reformat();
- SetUpdateMode( TRUE );
+ SetUpdateMode( sal_True );
}
// -----------------------------------------------------------------------
@@ -1985,7 +1985,7 @@ void MetricBox::CustomConvert()
// -----------------------------------------------------------------------
-void MetricBox::InsertValue( sal_Int64 nValue, FieldUnit eInUnit, USHORT nPos )
+void MetricBox::InsertValue( sal_Int64 nValue, FieldUnit eInUnit, sal_uInt16 nPos )
{
// Umrechnen auf eingestellte Einheiten
nValue = MetricField::ConvertValue( nValue, mnBaseValue, GetDecimalDigits(),
@@ -2005,7 +2005,7 @@ void MetricBox::RemoveValue( sal_Int64 nValue, FieldUnit eInUnit )
// -----------------------------------------------------------------------
-sal_Int64 MetricBox::GetValue( USHORT nPos, FieldUnit eOutUnit ) const
+sal_Int64 MetricBox::GetValue( sal_uInt16 nPos, FieldUnit eOutUnit ) const
{
double nValue = 0;
ImplMetricGetValue( ComboBox::GetEntry( nPos ), nValue, mnBaseValue,
@@ -2020,7 +2020,7 @@ sal_Int64 MetricBox::GetValue( USHORT nPos, FieldUnit eOutUnit ) const
// -----------------------------------------------------------------------
-USHORT MetricBox::GetValuePos( sal_Int64 nValue, FieldUnit eInUnit ) const
+sal_uInt16 MetricBox::GetValuePos( sal_Int64 nValue, FieldUnit eInUnit ) const
{
// Umrechnen auf eingestellte Einheiten
nValue = MetricField::ConvertValue( nValue, mnBaseValue, GetDecimalDigits(),
@@ -2046,31 +2046,31 @@ sal_Int64 MetricBox::GetValue() const
// -----------------------------------------------------------------------
-static BOOL ImplCurrencyProcessKeyInput( Edit* pEdit, const KeyEvent& rKEvt,
- BOOL, BOOL bUseThousandSep, const LocaleDataWrapper& rWrapper )
+static sal_Bool ImplCurrencyProcessKeyInput( Edit* pEdit, const KeyEvent& rKEvt,
+ sal_Bool, sal_Bool bUseThousandSep, const LocaleDataWrapper& rWrapper )
{
// Es gibt hier kein sinnvolles StrictFormat, also alle
// Zeichen erlauben
- return ImplNumericProcessKeyInput( pEdit, rKEvt, FALSE, bUseThousandSep, rWrapper );
+ return ImplNumericProcessKeyInput( pEdit, rKEvt, sal_False, bUseThousandSep, rWrapper );
}
// -----------------------------------------------------------------------
-inline BOOL ImplCurrencyGetValue( const XubString& rStr, double& rValue,
- USHORT nDecDigits, const LocaleDataWrapper& rWrapper )
+inline sal_Bool ImplCurrencyGetValue( const XubString& rStr, double& rValue,
+ sal_uInt16 nDecDigits, const LocaleDataWrapper& rWrapper )
{
// Zahlenwert holen
- return ImplNumericGetValue( rStr, rValue, nDecDigits, rWrapper, TRUE );
+ return ImplNumericGetValue( rStr, rValue, nDecDigits, rWrapper, sal_True );
}
// -----------------------------------------------------------------------
-BOOL CurrencyFormatter::ImplCurrencyReformat( const XubString& rStr,
+sal_Bool CurrencyFormatter::ImplCurrencyReformat( const XubString& rStr,
XubString& rOutStr )
{
double nValue;
- if ( !ImplNumericGetValue( rStr, nValue, GetDecimalDigits(), ImplGetLocaleDataWrapper(), TRUE ) )
- return TRUE;
+ if ( !ImplNumericGetValue( rStr, nValue, GetDecimalDigits(), ImplGetLocaleDataWrapper(), sal_True ) )
+ return sal_True;
else
{
double nTempVal = nValue;
@@ -2086,14 +2086,14 @@ BOOL CurrencyFormatter::ImplCurrencyReformat( const XubString& rStr,
if ( !GetErrorHdl().Call( this ) )
{
mnCorrectedValue = 0;
- return FALSE;
+ return sal_False;
}
else
mnCorrectedValue = 0;
}
rOutStr = CreateFieldText( (long)nTempVal );
- return TRUE;
+ return sal_True;
}
}
@@ -2138,7 +2138,7 @@ void CurrencyFormatter::SetValue( sal_Int64 nNewValue )
{
SetUserValue( nNewValue );
mnFieldValue = mnLastValue;
- SetEmptyFieldValueData( FALSE );
+ SetEmptyFieldValueData( sal_False );
}
// -----------------------------------------------------------------------
@@ -2177,7 +2177,7 @@ void CurrencyFormatter::Reformat()
return;
XubString aStr;
- BOOL bOK = ImplCurrencyReformat( GetField()->GetText(), aStr );
+ sal_Bool bOK = ImplCurrencyReformat( GetField()->GetText(), aStr );
if ( !bOK )
return;
@@ -2224,7 +2224,7 @@ void CurrencyField::ImplLoadRes( const ResId& rResId )
SpinField::ImplLoadRes( rResId );
CurrencyFormatter::ImplLoadRes( ResId( (RSHEADER_TYPE *)GetClassRes(), *rResId.GetResMgr() ) );
- ULONG nMask = ReadLongRes();
+ sal_uIntPtr nMask = ReadLongRes();
if ( CURRENCYFIELD_FIRST & nMask )
mnFirst = ReadLongRes();
@@ -2262,7 +2262,7 @@ long CurrencyField::PreNotify( NotifyEvent& rNEvt )
long CurrencyField::Notify( NotifyEvent& rNEvt )
{
if ( rNEvt.GetType() == EVENT_GETFOCUS )
- MarkToBeReformatted( FALSE );
+ MarkToBeReformatted( sal_False );
else if ( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
if ( MustBeReformatted() && (GetText().Len() || !IsEmptyFieldValueEnabled()) )
@@ -2295,7 +2295,7 @@ void CurrencyField::DataChanged( const DataChangedEvent& rDCEvt )
void CurrencyField::Modify()
{
- MarkToBeReformatted( TRUE );
+ MarkToBeReformatted( sal_True );
SpinField::Modify();
}
@@ -2381,7 +2381,7 @@ long CurrencyBox::PreNotify( NotifyEvent& rNEvt )
long CurrencyBox::Notify( NotifyEvent& rNEvt )
{
if ( rNEvt.GetType() == EVENT_GETFOCUS )
- MarkToBeReformatted( FALSE );
+ MarkToBeReformatted( sal_False );
else if ( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
if ( MustBeReformatted() && (GetText().Len() || !IsEmptyFieldValueEnabled()) )
@@ -2414,7 +2414,7 @@ void CurrencyBox::DataChanged( const DataChangedEvent& rDCEvt )
void CurrencyBox::Modify()
{
- MarkToBeReformatted( TRUE );
+ MarkToBeReformatted( sal_True );
ComboBox::Modify();
}
@@ -2423,21 +2423,21 @@ void CurrencyBox::Modify()
void CurrencyBox::ReformatAll()
{
XubString aStr;
- SetUpdateMode( FALSE );
- USHORT nEntryCount = GetEntryCount();
- for ( USHORT i=0; i < nEntryCount; i++ )
+ SetUpdateMode( sal_False );
+ sal_uInt16 nEntryCount = GetEntryCount();
+ for ( sal_uInt16 i=0; i < nEntryCount; i++ )
{
ImplCurrencyReformat( GetEntry( i ), aStr );
RemoveEntry( i );
InsertEntry( aStr, i );
}
CurrencyFormatter::Reformat();
- SetUpdateMode( TRUE );
+ SetUpdateMode( sal_True );
}
// -----------------------------------------------------------------------
-void CurrencyBox::InsertValue( sal_Int64 nValue, USHORT nPos )
+void CurrencyBox::InsertValue( sal_Int64 nValue, sal_uInt16 nPos )
{
ComboBox::InsertEntry( CreateFieldText( nValue ), nPos );
}
@@ -2451,7 +2451,7 @@ void CurrencyBox::RemoveValue( sal_Int64 nValue )
// -----------------------------------------------------------------------
-sal_Int64 CurrencyBox::GetValue( USHORT nPos ) const
+sal_Int64 CurrencyBox::GetValue( sal_uInt16 nPos ) const
{
double nValue = 0;
ImplCurrencyGetValue( ComboBox::GetEntry( nPos ), nValue, GetDecimalDigits(), ImplGetLocaleDataWrapper() );
@@ -2460,7 +2460,7 @@ sal_Int64 CurrencyBox::GetValue( USHORT nPos ) const
// -----------------------------------------------------------------------
-USHORT CurrencyBox::GetValuePos( sal_Int64 nValue ) const
+sal_uInt16 CurrencyBox::GetValuePos( sal_Int64 nValue ) const
{
return ComboBox::GetEntryPos( CreateFieldText( nValue ) );
}
diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx
index 8ae2ecff41b9..5e1562a19a10 100644
--- a/vcl/source/control/field2.cxx
+++ b/vcl/source/control/field2.cxx
@@ -95,7 +95,7 @@ static sal_Unicode* ImplAddString( sal_Unicode* pBuf, const String& rStr )
// -----------------------------------------------------------------------
-static sal_Unicode* ImplAddNum( sal_Unicode* pBuf, ULONG nNumber, int nMinLen )
+static sal_Unicode* ImplAddNum( sal_Unicode* pBuf, sal_uIntPtr nNumber, int nMinLen )
{
// fill temp buffer with digits
sal_Unicode aTempBuf[30];
@@ -132,15 +132,15 @@ static sal_Unicode* ImplAddNum( sal_Unicode* pBuf, ULONG nNumber, int nMinLen )
// -----------------------------------------------------------------------
-static USHORT ImplGetNum( const sal_Unicode*& rpBuf, BOOL& rbError )
+static sal_uInt16 ImplGetNum( const sal_Unicode*& rpBuf, sal_Bool& rbError )
{
if ( !*rpBuf )
{
- rbError = TRUE;
+ rbError = sal_True;
return 0;
}
- USHORT nNumber = 0;
+ sal_uInt16 nNumber = 0;
while( ( *rpBuf >= '0' ) && ( *rpBuf <= '9' ) )
{
nNumber *= 10;
@@ -176,38 +176,38 @@ static int ImplIsPatternChar( xub_Unicode cChar, sal_Char cEditMask )
catch ( ::com::sun::star::uno::Exception& )
{
DBG_ERRORFILE( "ImplIsPatternChar: Exception caught!" );
- return FALSE;
+ return sal_False;
}
if ( (cEditMask == EDITMASK_ALPHA) || (cEditMask == EDITMASK_UPPERALPHA) )
{
if( !CharClass::isLetterType( nType ) )
- return FALSE;
+ return sal_False;
}
else if ( cEditMask == EDITMASK_NUM )
{
if( !CharClass::isNumericType( nType ) )
- return FALSE;
+ return sal_False;
}
else if ( (cEditMask == EDITMASK_ALPHANUM) || (cEditMask == EDITMASK_UPPERALPHANUM) )
{
if( !CharClass::isLetterNumericType( nType ) )
- return FALSE;
+ return sal_False;
}
else if ( (cEditMask == EDITMASK_ALLCHAR) || (cEditMask == EDITMASK_UPPERALLCHAR) )
{
if ( cChar < 32 )
- return FALSE;
+ return sal_False;
}
else if ( cEditMask == EDITMASK_NUMSPACE )
{
if ( !CharClass::isNumericType( nType ) && ( cChar != ' ' ) )
- return FALSE;
+ return sal_False;
}
else
- return FALSE;
+ return sal_False;
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -233,12 +233,12 @@ static xub_Unicode ImplPatternChar( xub_Unicode cChar, sal_Char cEditMask )
static int ImplKommaPointCharEqual( xub_Unicode c1, xub_Unicode c2 )
{
if ( c1 == c2 )
- return TRUE;
+ return sal_True;
else if ( ((c1 == '.') || (c1 == ',')) &&
((c2 == '.') || (c2 == ',')) )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -246,7 +246,7 @@ static int ImplKommaPointCharEqual( xub_Unicode c1, xub_Unicode c2 )
static XubString ImplPatternReformat( const XubString& rStr,
const ByteString& rEditMask,
const XubString& rLiteralMask,
- USHORT nFormatFlags )
+ sal_uInt16 nFormatFlags )
{
if ( !rEditMask.Len() )
return rStr;
@@ -350,8 +350,8 @@ static XubString ImplPatternReformat( const XubString& rStr,
// -----------------------------------------------------------------------
static void ImplPatternMaxPos( const XubString rStr, const ByteString& rEditMask,
- USHORT nFormatFlags, BOOL bSameMask,
- USHORT nCursorPos, USHORT& rPos )
+ sal_uInt16 nFormatFlags, sal_Bool bSameMask,
+ sal_uInt16 nCursorPos, sal_uInt16& rPos )
{
// Letzte Position darf nicht groesser als der enthaltene String sein
@@ -395,7 +395,7 @@ static void ImplPatternMaxPos( const XubString rStr, const ByteString& rEditMask
static void ImplPatternProcessStrictModify( Edit* pEdit,
const ByteString& rEditMask,
const XubString& rLiteralMask,
- USHORT nFormatFlags, BOOL bSameMask )
+ sal_uInt16 nFormatFlags, sal_Bool bSameMask )
{
XubString aText = pEdit->GetText();
@@ -424,7 +424,7 @@ static void ImplPatternProcessStrictModify( Edit* pEdit,
// Selection so anpassen, das diese wenn sie vorher am Ende
// stand, immer noch am Ende steht
Selection aSel = pEdit->GetSelection();
- ULONG nMaxSel = Max( aSel.Min(), aSel.Max() );
+ sal_uIntPtr nMaxSel = Max( aSel.Min(), aSel.Max() );
if ( nMaxSel >= aText.Len() )
{
xub_StrLen nMaxPos = aNewText.Len();
@@ -465,7 +465,7 @@ static xub_StrLen ImplPatternLeftPos( const ByteString& rEditMask, xub_StrLen nC
// -----------------------------------------------------------------------
static xub_StrLen ImplPatternRightPos( const XubString& rStr, const ByteString& rEditMask,
- USHORT nFormatFlags, BOOL bSameMask,
+ sal_uInt16 nFormatFlags, sal_Bool bSameMask,
xub_StrLen nCursorPos )
{
// Naechstes Zeichen suchen, was kein Literal ist
@@ -486,22 +486,22 @@ static xub_StrLen ImplPatternRightPos( const XubString& rStr, const ByteString&
// -----------------------------------------------------------------------
-static BOOL ImplPatternProcessKeyInput( Edit* pEdit, const KeyEvent& rKEvt,
+static sal_Bool ImplPatternProcessKeyInput( Edit* pEdit, const KeyEvent& rKEvt,
const ByteString& rEditMask,
const XubString& rLiteralMask,
- BOOL bStrictFormat,
- USHORT nFormatFlags,
- BOOL bSameMask,
- BOOL& rbInKeyInput )
+ sal_Bool bStrictFormat,
+ sal_uInt16 nFormatFlags,
+ sal_Bool bSameMask,
+ sal_Bool& rbInKeyInput )
{
if ( !rEditMask.Len() || !bStrictFormat )
- return FALSE;
+ return sal_False;
Selection aOldSel = pEdit->GetSelection();
KeyCode aCode = rKEvt.GetKeyCode();
xub_Unicode cChar = rKEvt.GetCharCode();
- USHORT nKeyCode = aCode.GetCode();
- BOOL bShift = aCode.IsShift();
+ sal_uInt16 nKeyCode = aCode.GetCode();
+ sal_Bool bShift = aCode.IsShift();
xub_StrLen nCursorPos = (xub_StrLen)aOldSel.Max();
xub_StrLen nNewPos;
xub_StrLen nTempPos;
@@ -514,7 +514,7 @@ static BOOL ImplPatternProcessKeyInput( Edit* pEdit, const KeyEvent& rKEvt,
if ( bShift )
aSel.Min() = aOldSel.Min();
pEdit->SetSelection( aSel );
- return TRUE;
+ return sal_True;
}
else if ( nKeyCode == KEY_RIGHT )
{
@@ -530,7 +530,7 @@ static BOOL ImplPatternProcessKeyInput( Edit* pEdit, const KeyEvent& rKEvt,
else
aSel.Min() = aSel.Max();
pEdit->SetSelection( aSel );
- return TRUE;
+ return sal_True;
}
else if ( nKeyCode == KEY_HOME )
{
@@ -546,7 +546,7 @@ static BOOL ImplPatternProcessKeyInput( Edit* pEdit, const KeyEvent& rKEvt,
if ( bShift )
aSel.Min() = aOldSel.Min();
pEdit->SetSelection( aSel );
- return TRUE;
+ return sal_True;
}
else if ( nKeyCode == KEY_END )
{
@@ -568,7 +568,7 @@ static BOOL ImplPatternProcessKeyInput( Edit* pEdit, const KeyEvent& rKEvt,
else
aSel.Min() = aSel.Max();
pEdit->SetSelection( aSel );
- return TRUE;
+ return sal_True;
}
else if ( (nKeyCode == KEY_BACKSPACE) || (nKeyCode == KEY_DELETE) )
{
@@ -619,16 +619,16 @@ static BOOL ImplPatternProcessKeyInput( Edit* pEdit, const KeyEvent& rKEvt,
{
if ( bSameMask )
aStr = ImplPatternReformat( aStr, rEditMask, rLiteralMask, nFormatFlags );
- rbInKeyInput = TRUE;
+ rbInKeyInput = sal_True;
pEdit->SetText( aStr, Selection( nNewPos ) );
pEdit->SetModifyFlag();
pEdit->Modify();
- rbInKeyInput = FALSE;
+ rbInKeyInput = sal_False;
}
else
pEdit->SetSelection( Selection( nNewPos ) );
- return TRUE;
+ return sal_True;
}
else if ( nKeyCode == KEY_INSERT )
{
@@ -638,13 +638,13 @@ static BOOL ImplPatternProcessKeyInput( Edit* pEdit, const KeyEvent& rKEvt,
if ( !bSameMask )
{
Sound::Beep();
- return TRUE;
+ return sal_True;
}
}
}
if ( rKEvt.GetKeyCode().IsMod2() || (cChar < 32) || (cChar == 127) )
- return FALSE;
+ return sal_False;
Selection aSel = aOldSel;
aSel.Justify();
@@ -682,7 +682,7 @@ static BOOL ImplPatternProcessKeyInput( Edit* pEdit, const KeyEvent& rKEvt,
if ( nTempPos > nNewPos )
{
pEdit->SetSelection( Selection( nTempPos ) );
- return TRUE;
+ return sal_True;
}
}
break;
@@ -699,7 +699,7 @@ static BOOL ImplPatternProcessKeyInput( Edit* pEdit, const KeyEvent& rKEvt,
if ( cChar )
{
XubString aStr = pEdit->GetText();
- BOOL bError = FALSE;
+ sal_Bool bError = sal_False;
if ( bSameMask && pEdit->IsInsertMode() )
{
// Text um Spacezeichen und Literale am Ende kuerzen, bis zur
@@ -730,7 +730,7 @@ static BOOL ImplPatternProcessKeyInput( Edit* pEdit, const KeyEvent& rKEvt,
aStr = ImplPatternReformat( aStr, rEditMask, rLiteralMask, nFormatFlags );
}
else
- bError = TRUE;
+ bError = sal_True;
}
else
{
@@ -751,18 +751,18 @@ static BOOL ImplPatternProcessKeyInput( Edit* pEdit, const KeyEvent& rKEvt,
Sound::Beep();
else
{
- rbInKeyInput = TRUE;
+ rbInKeyInput = sal_True;
Selection aNewSel( ImplPatternRightPos( aStr, rEditMask, nFormatFlags, bSameMask, nNewPos ) );
pEdit->SetText( aStr, aNewSel );
pEdit->SetModifyFlag();
pEdit->Modify();
- rbInKeyInput = FALSE;
+ rbInKeyInput = sal_False;
}
}
else
Sound::Beep();
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -772,7 +772,7 @@ void PatternFormatter::ImplSetMask( const ByteString& rEditMask,
{
maEditMask = rEditMask;
maLiteralMask = rLiteralMask;
- mbSameMask = TRUE;
+ mbSameMask = sal_True;
if ( maEditMask.Len() != maLiteralMask.Len() )
{
@@ -797,14 +797,14 @@ void PatternFormatter::ImplSetMask( const ByteString& rEditMask,
(cTemp == EDITMASK_UPPERALLCHAR) ||
(cTemp == EDITMASK_NUMSPACE) )
{
- mbSameMask = FALSE;
+ mbSameMask = sal_False;
break;
}
if ( i < rLiteralMask.Len() )
{
if ( rLiteralMask.GetChar( i ) != ' ' )
{
- mbSameMask = FALSE;
+ mbSameMask = sal_False;
break;
}
}
@@ -812,7 +812,7 @@ void PatternFormatter::ImplSetMask( const ByteString& rEditMask,
c = cTemp;
if ( cTemp != c )
{
- mbSameMask = FALSE;
+ mbSameMask = sal_False;
break;
}
}
@@ -825,8 +825,8 @@ void PatternFormatter::ImplSetMask( const ByteString& rEditMask,
PatternFormatter::PatternFormatter()
{
mnFormatFlags = 0;
- mbSameMask = TRUE;
- mbInPattKeyInput = FALSE;
+ mbSameMask = sal_True;
+ mbInPattKeyInput = sal_False;
}
// -----------------------------------------------------------------------
@@ -838,10 +838,10 @@ void PatternFormatter::ImplLoadRes( const ResId& rResId )
ResMgr* pMgr = rResId.GetResMgr();
if( pMgr )
{
- ULONG nMask = pMgr->ReadLong();
+ sal_uIntPtr nMask = pMgr->ReadLong();
if ( PATTERNFORMATTER_STRICTFORMAT & nMask )
- SetStrictFormat( (BOOL)pMgr->ReadShort() );
+ SetStrictFormat( (sal_Bool)pMgr->ReadShort() );
if ( PATTERNFORMATTER_EDITMASK & nMask )
aEditMask = ByteString( pMgr->ReadString(), RTL_TEXTENCODING_ASCII_US );
@@ -877,7 +877,7 @@ void PatternFormatter::SetString( const XubString& rStr )
if ( GetField() )
{
GetField()->SetText( rStr );
- MarkToBeReformatted( FALSE );
+ MarkToBeReformatted( sal_False );
}
}
@@ -899,7 +899,7 @@ void PatternFormatter::Reformat()
{
ImplSetText( ImplPatternReformat( GetField()->GetText(), maEditMask, maLiteralMask, mnFormatFlags ) );
if ( !mbSameMask && IsStrictFormat() && !GetField()->IsReadOnly() )
- GetField()->SetInsertMode( FALSE );
+ GetField()->SetInsertMode( sal_False );
}
}
@@ -970,7 +970,7 @@ long PatternField::PreNotify( NotifyEvent& rNEvt )
long PatternField::Notify( NotifyEvent& rNEvt )
{
if ( rNEvt.GetType() == EVENT_GETFOCUS )
- MarkToBeReformatted( FALSE );
+ MarkToBeReformatted( sal_False );
else if ( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
if ( MustBeReformatted() && (GetText().Len() || !IsEmptyFieldValueEnabled()) )
@@ -989,7 +989,7 @@ void PatternField::Modify()
if ( IsStrictFormat() )
ImplPatternProcessStrictModify( GetField(), GetEditMask(), GetLiteralMask(), GetFormatFlags(), ImplIsSameMask() );
else
- MarkToBeReformatted( TRUE );
+ MarkToBeReformatted( sal_True );
}
SpinField::Modify();
@@ -1048,7 +1048,7 @@ long PatternBox::PreNotify( NotifyEvent& rNEvt )
long PatternBox::Notify( NotifyEvent& rNEvt )
{
if ( rNEvt.GetType() == EVENT_GETFOCUS )
- MarkToBeReformatted( FALSE );
+ MarkToBeReformatted( sal_False );
else if ( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
if ( MustBeReformatted() && (GetText().Len() || !IsEmptyFieldValueEnabled()) )
@@ -1067,7 +1067,7 @@ void PatternBox::Modify()
if ( IsStrictFormat() )
ImplPatternProcessStrictModify( GetField(), GetEditMask(), GetLiteralMask(), GetFormatFlags(), ImplIsSameMask() );
else
- MarkToBeReformatted( TRUE );
+ MarkToBeReformatted( sal_True );
}
ComboBox::Modify();
@@ -1078,21 +1078,21 @@ void PatternBox::Modify()
void PatternBox::ReformatAll()
{
XubString aStr;
- SetUpdateMode( FALSE );
- USHORT nEntryCount = GetEntryCount();
- for ( USHORT i=0; i < nEntryCount; i++ )
+ SetUpdateMode( sal_False );
+ sal_uInt16 nEntryCount = GetEntryCount();
+ for ( sal_uInt16 i=0; i < nEntryCount; i++ )
{
aStr = ImplPatternReformat( GetEntry( i ), GetEditMask(), GetLiteralMask(), GetFormatFlags() );
RemoveEntry( i );
InsertEntry( aStr, i );
}
PatternFormatter::Reformat();
- SetUpdateMode( TRUE );
+ SetUpdateMode( sal_True );
}
// -----------------------------------------------------------------------
-void PatternBox::InsertString( const XubString& rStr, USHORT nPos )
+void PatternBox::InsertString( const XubString& rStr, sal_uInt16 nPos )
{
ComboBox::InsertEntry( ImplPatternReformat( rStr, GetEditMask(), GetLiteralMask(), GetFormatFlags() ), nPos );
}
@@ -1106,14 +1106,14 @@ void PatternBox::RemoveString( const XubString& rStr )
// -----------------------------------------------------------------------
-XubString PatternBox::GetString( USHORT nPos ) const
+XubString PatternBox::GetString( sal_uInt16 nPos ) const
{
return ImplPatternReformat( ComboBox::GetEntry( nPos ), GetEditMask(), GetLiteralMask(), GetFormatFlags() );
}
// -----------------------------------------------------------------------
-USHORT PatternBox::GetStringPos( const XubString& rStr ) const
+sal_uInt16 PatternBox::GetStringPos( const XubString& rStr ) const
{
return ComboBox::GetEntryPos( ImplPatternReformat( rStr, GetEditMask(), GetLiteralMask(), GetFormatFlags() ) );
}
@@ -1132,7 +1132,7 @@ static ExtDateFieldFormat ImplGetExtFormat( DateFormat eOld )
// -----------------------------------------------------------------------
-static USHORT ImplCutNumberFromString( XubString& rStr )
+static sal_uInt16 ImplCutNumberFromString( XubString& rStr )
{
// Nach Zahl suchen
while ( rStr.Len() && !(rStr.GetChar( 0 ) >= '0' && rStr.GetChar( 0 ) <= '9') )
@@ -1145,28 +1145,28 @@ static USHORT ImplCutNumberFromString( XubString& rStr )
aNumStr.Insert( rStr.GetChar( 0 ) );
rStr.Erase( 0, 1 );
}
- return (USHORT)aNumStr.ToInt32();
+ return (sal_uInt16)aNumStr.ToInt32();
}
// -----------------------------------------------------------------------
-static BOOL ImplCutMonthName( XubString& rStr, const XubString& _rLookupMonthName )
+static sal_Bool ImplCutMonthName( XubString& rStr, const XubString& _rLookupMonthName )
{
- USHORT nPos = rStr.Search( _rLookupMonthName );
+ sal_uInt16 nPos = rStr.Search( _rLookupMonthName );
if ( nPos != STRING_NOTFOUND )
{
rStr.Erase( 0, nPos + _rLookupMonthName.Len() );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-static USHORT ImplCutMonthFromString( XubString& rStr, const CalendarWrapper& rCalendarWrapper )
+static sal_uInt16 ImplCutMonthFromString( XubString& rStr, const CalendarWrapper& rCalendarWrapper )
{
// search for a month' name
- for ( USHORT i=1; i <= 12; i++ )
+ for ( sal_uInt16 i=1; i <= 12; i++ )
{
String aMonthName = rCalendarWrapper.getMonths()[i-1].FullName;
// long month name?
@@ -1194,31 +1194,31 @@ static String ImplGetDateSep( const LocaleDataWrapper& rLocaleDataWrapper, ExtDa
return aDateSep;
}
-static BOOL ImplDateProcessKeyInput( Edit*, const KeyEvent& rKEvt, ExtDateFieldFormat eFormat,
+static sal_Bool ImplDateProcessKeyInput( Edit*, const KeyEvent& rKEvt, ExtDateFieldFormat eFormat,
const LocaleDataWrapper& rLocaleDataWrapper )
{
xub_Unicode cChar = rKEvt.GetCharCode();
- USHORT nGroup = rKEvt.GetKeyCode().GetGroup();
+ sal_uInt16 nGroup = rKEvt.GetKeyCode().GetGroup();
if ( (nGroup == KEYGROUP_FKEYS) || (nGroup == KEYGROUP_CURSOR) ||
(nGroup == KEYGROUP_MISC)||
((cChar >= '0') && (cChar <= '9')) ||
(cChar == ImplGetDateSep( rLocaleDataWrapper, eFormat ).GetChar(0) ) )
- return FALSE;
+ return sal_False;
else
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-static BOOL ImplDateGetValue( const XubString& rStr, Date& rDate, ExtDateFieldFormat eDateFormat,
+static sal_Bool ImplDateGetValue( const XubString& rStr, Date& rDate, ExtDateFieldFormat eDateFormat,
const LocaleDataWrapper& rLocaleDataWrapper, const CalendarWrapper& rCalendarWrapper,
const AllSettings& )
{
- USHORT nDay = 0;
- USHORT nMonth = 0;
- USHORT nYear = 0;
- BOOL bYear = TRUE;
- BOOL bError = FALSE;
+ sal_uInt16 nDay = 0;
+ sal_uInt16 nMonth = 0;
+ sal_uInt16 nYear = 0;
+ sal_Bool bYear = sal_True;
+ sal_Bool bError = sal_False;
String aStr( rStr );
if ( eDateFormat == XTDATEF_SYSTEM_LONG )
@@ -1248,13 +1248,13 @@ static BOOL ImplDateGetValue( const XubString& rStr, Date& rDate, ExtDateFieldFo
{
// Check if year is present:
String aDateSep = ImplGetDateSep( rLocaleDataWrapper, eDateFormat );
- USHORT nSepPos = aStr.Search( aDateSep );
+ sal_uInt16 nSepPos = aStr.Search( aDateSep );
if ( nSepPos == STRING_NOTFOUND )
- return FALSE;
+ return sal_False;
nSepPos = aStr.Search( aDateSep, nSepPos+1 );
if ( ( nSepPos == STRING_NOTFOUND ) || ( nSepPos == (aStr.Len()-1) ) )
{
- bYear = FALSE;
+ bYear = sal_False;
nYear = Date().GetYear();
}
@@ -1307,25 +1307,25 @@ static BOOL ImplDateGetValue( const XubString& rStr, Date& rDate, ExtDateFieldFo
}
if ( bError || !nDay || !nMonth )
- return FALSE;
+ return sal_False;
Date aNewDate( nDay, nMonth, nYear );
DateFormatter::ExpandCentury( aNewDate, utl::MiscCfg().GetYear2000() );
if ( aNewDate.IsValid() )
{
rDate = aNewDate;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL DateFormatter::ImplDateReformat( const XubString& rStr, XubString& rOutStr, const AllSettings& rSettings )
+sal_Bool DateFormatter::ImplDateReformat( const XubString& rStr, XubString& rOutStr, const AllSettings& rSettings )
{
Date aDate( 0, 0, 0 );
- if ( !ImplDateGetValue( rStr, aDate, GetExtDateFormat(TRUE), ImplGetLocaleDataWrapper(), GetCalendarWrapper(), GetFieldSettings() ) )
- return TRUE;
+ if ( !ImplDateGetValue( rStr, aDate, GetExtDateFormat(sal_True), ImplGetLocaleDataWrapper(), GetCalendarWrapper(), GetFieldSettings() ) )
+ return sal_True;
Date aTempDate = aDate;
if ( aTempDate > GetMax() )
@@ -1339,7 +1339,7 @@ BOOL DateFormatter::ImplDateReformat( const XubString& rStr, XubString& rOutStr,
if( !GetErrorHdl().Call( this ) )
{
maCorrectedDate = Date();
- return FALSE;
+ return sal_False;
}
else
maCorrectedDate = Date();
@@ -1347,7 +1347,7 @@ BOOL DateFormatter::ImplDateReformat( const XubString& rStr, XubString& rOutStr,
rOutStr = ImplGetDateAsText( aTempDate, rSettings );
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -1355,7 +1355,7 @@ BOOL DateFormatter::ImplDateReformat( const XubString& rStr, XubString& rOutStr,
XubString DateFormatter::ImplGetDateAsText( const Date& rDate,
const AllSettings& ) const
{
- BOOL bShowCentury = FALSE;
+ sal_Bool bShowCentury = sal_False;
switch ( GetExtDateFormat() )
{
case XTDATEF_SYSTEM_SHORT_YYYY:
@@ -1365,43 +1365,43 @@ XubString DateFormatter::ImplGetDateAsText( const Date& rDate,
case XTDATEF_SHORT_YYYYMMDD:
case XTDATEF_SHORT_YYYYMMDD_DIN5008:
{
- bShowCentury = TRUE;
+ bShowCentury = sal_True;
}
break;
default:
{
- bShowCentury = FALSE;
+ bShowCentury = sal_False;
}
}
if ( !bShowCentury )
{
// Check if I have to use force showing the century
- USHORT nTwoDigitYearStart = utl::MiscCfg().GetYear2000();
- USHORT nYear = rDate.GetYear();
+ sal_uInt16 nTwoDigitYearStart = utl::MiscCfg().GetYear2000();
+ sal_uInt16 nYear = rDate.GetYear();
// Wenn Jahr nicht im 2stelligen Grenzbereich liegt,
if ( (nYear < nTwoDigitYearStart) || (nYear >= nTwoDigitYearStart+100) )
- bShowCentury = TRUE;
+ bShowCentury = sal_True;
}
sal_Unicode aBuf[128];
sal_Unicode* pBuf = aBuf;
- String aDateSep = ImplGetDateSep( ImplGetLocaleDataWrapper(), GetExtDateFormat( TRUE ) );
- USHORT nDay = rDate.GetDay();
- USHORT nMonth = rDate.GetMonth();
- USHORT nYear = rDate.GetYear();
- USHORT nYearLen = bShowCentury ? 4 : 2;
+ String aDateSep = ImplGetDateSep( ImplGetLocaleDataWrapper(), GetExtDateFormat( sal_True ) );
+ sal_uInt16 nDay = rDate.GetDay();
+ sal_uInt16 nMonth = rDate.GetMonth();
+ sal_uInt16 nYear = rDate.GetYear();
+ sal_uInt16 nYearLen = bShowCentury ? 4 : 2;
if ( !bShowCentury )
nYear %= 100;
- switch ( GetExtDateFormat( TRUE ) )
+ switch ( GetExtDateFormat( sal_True ) )
{
case XTDATEF_SYSTEM_LONG:
{
- return ImplGetLocaleDataWrapper().getLongDate( rDate, GetCalendarWrapper(), 1, FALSE, 1, !bShowCentury );
+ return ImplGetLocaleDataWrapper().getLongDate( rDate, GetCalendarWrapper(), 1, sal_False, 1, !bShowCentury );
}
case XTDATEF_SHORT_DDMMYY:
case XTDATEF_SHORT_DDMMYYYY:
@@ -1441,12 +1441,12 @@ XubString DateFormatter::ImplGetDateAsText( const Date& rDate,
}
}
- return String( aBuf, (xub_StrLen)(ULONG)(pBuf-aBuf) );
+ return String( aBuf, (xub_StrLen)(sal_uIntPtr)(pBuf-aBuf) );
}
// -----------------------------------------------------------------------
-static void ImplDateIncrementDay( Date& rDate, BOOL bUp )
+static void ImplDateIncrementDay( Date& rDate, sal_Bool bUp )
{
DateFormatter::ExpandCentury( rDate );
@@ -1464,12 +1464,12 @@ static void ImplDateIncrementDay( Date& rDate, BOOL bUp )
// -----------------------------------------------------------------------
-static void ImplDateIncrementMonth( Date& rDate, BOOL bUp )
+static void ImplDateIncrementMonth( Date& rDate, sal_Bool bUp )
{
DateFormatter::ExpandCentury( rDate );
- USHORT nMonth = rDate.GetMonth();
- USHORT nYear = rDate.GetYear();
+ sal_uInt16 nMonth = rDate.GetMonth();
+ sal_uInt16 nYear = rDate.GetYear();
if ( bUp )
{
if ( (nMonth == 12) && (nYear < 9999) )
@@ -1497,18 +1497,18 @@ static void ImplDateIncrementMonth( Date& rDate, BOOL bUp )
}
}
- USHORT nDaysInMonth = rDate.GetDaysInMonth();
+ sal_uInt16 nDaysInMonth = rDate.GetDaysInMonth();
if ( rDate.GetDay() > nDaysInMonth )
rDate.SetDay( nDaysInMonth );
}
// -----------------------------------------------------------------------
-static void ImplDateIncrementYear( Date& rDate, BOOL bUp )
+static void ImplDateIncrementYear( Date& rDate, sal_Bool bUp )
{
DateFormatter::ExpandCentury( rDate );
- USHORT nYear = rDate.GetYear();
+ sal_uInt16 nYear = rDate.GetYear();
if ( bUp )
{
if ( nYear < 9999 )
@@ -1522,14 +1522,14 @@ static void ImplDateIncrementYear( Date& rDate, BOOL bUp )
}
// -----------------------------------------------------------------------
-BOOL DateFormatter::ImplAllowMalformedInput() const
+sal_Bool DateFormatter::ImplAllowMalformedInput() const
{
return !IsEnforceValidValue();
}
// -----------------------------------------------------------------------
-void DateField::ImplDateSpinArea( BOOL bUp )
+void DateField::ImplDateSpinArea( sal_Bool bUp )
{
// Wenn alles selektiert ist, Tage hochzaehlen
if ( GetField() )
@@ -1544,7 +1544,7 @@ void DateField::ImplDateSpinArea( BOOL bUp )
{
xub_StrLen nDateArea = 0;
- ExtDateFieldFormat eFormat = GetExtDateFormat( TRUE );
+ ExtDateFieldFormat eFormat = GetExtDateFormat( sal_True );
if ( eFormat == XTDATEF_SYSTEM_LONG )
{
eFormat = ImplGetExtFormat( ImplGetLocaleDataWrapper().getLongDateFormat() );
@@ -1558,7 +1558,7 @@ void DateField::ImplDateSpinArea( BOOL bUp )
for ( xub_StrLen i = 1; i <= 3; i++ )
{
nPos = aText.Search( aDateSep, nPos );
- if ( nPos >= (USHORT)aSelection.Max() )
+ if ( nPos >= (sal_uInt16)aSelection.Max() )
{
nDateArea = i;
break;
@@ -1623,8 +1623,8 @@ void DateField::ImplDateSpinArea( BOOL bUp )
void DateFormatter::ImplInit()
{
- mbLongFormat = FALSE;
- mbShowDateCentury = TRUE;
+ mbLongFormat = sal_False;
+ mbShowDateCentury = sal_True;
mpCalendarWrapper = NULL;
mnDateFormat = 0xFFFF;
mnExtDateFormat = XTDATEF_SYSTEM_SHORT;
@@ -1637,7 +1637,7 @@ DateFormatter::DateFormatter() :
maLastDate( 0 ),
maMin( 1, 1, 1900 ),
maMax( 31, 12, 2200 ),
- mbEnforceValidValue( TRUE )
+ mbEnforceValidValue( sal_True )
{
ImplInit();
}
@@ -1649,7 +1649,7 @@ void DateFormatter::ImplLoadRes( const ResId& rResId )
ResMgr* pMgr = rResId.GetResMgr();
if( pMgr )
{
- ULONG nMask = pMgr->ReadLong();
+ sal_uIntPtr nMask = pMgr->ReadLong();
if ( DATEFORMATTER_MIN & nMask )
{
@@ -1662,10 +1662,10 @@ void DateFormatter::ImplLoadRes( const ResId& rResId )
pMgr->Increment( pMgr->GetObjSize( (RSHEADER_TYPE*)pMgr->GetClass() ) );
}
if ( DATEFORMATTER_LONGFORMAT & nMask )
- mbLongFormat = (BOOL)pMgr->ReadShort();
+ mbLongFormat = (sal_Bool)pMgr->ReadShort();
if ( DATEFORMATTER_STRICTFORMAT & nMask )
- SetStrictFormat( (BOOL)pMgr->ReadShort() );
+ SetStrictFormat( (sal_Bool)pMgr->ReadShort() );
if ( DATEFORMATTER_VALUE & nMask )
{
@@ -1721,13 +1721,13 @@ void DateFormatter::SetExtDateFormat( ExtDateFieldFormat eFormat )
// -----------------------------------------------------------------------
-ExtDateFieldFormat DateFormatter::GetExtDateFormat( BOOL bResolveSystemFormat ) const
+ExtDateFieldFormat DateFormatter::GetExtDateFormat( sal_Bool bResolveSystemFormat ) const
{
ExtDateFieldFormat eDateFormat = (ExtDateFieldFormat)mnExtDateFormat;
if ( bResolveSystemFormat && ( eDateFormat <= XTDATEF_SYSTEM_SHORT_YYYY ) )
{
- BOOL bShowCentury = (eDateFormat == XTDATEF_SYSTEM_SHORT_YYYY);
+ sal_Bool bShowCentury = (eDateFormat == XTDATEF_SYSTEM_SHORT_YYYY);
switch ( ImplGetLocaleDataWrapper().getDateFormat() )
{
case DMY: eDateFormat = bShowCentury ? XTDATEF_SHORT_DDMMYYYY : XTDATEF_SHORT_DDMMYY;
@@ -1769,7 +1769,7 @@ void DateFormatter::SetMax( const Date& rNewMax )
// -----------------------------------------------------------------------
-void DateFormatter::SetLongFormat( BOOL bLong )
+void DateFormatter::SetLongFormat( sal_Bool bLong )
{
mbLongFormat = bLong;
@@ -1789,7 +1789,7 @@ void DateFormatter::SetLongFormat( BOOL bLong )
// -----------------------------------------------------------------------
-void DateFormatter::SetShowDateCentury( BOOL bShowDateCentury )
+void DateFormatter::SetShowDateCentury( sal_Bool bShowDateCentury )
{
mbShowDateCentury = bShowDateCentury;
@@ -1905,7 +1905,7 @@ Date DateFormatter::GetDate() const
if ( GetField() )
{
- if ( ImplDateGetValue( GetField()->GetText(), aDate, GetExtDateFormat(TRUE), ImplGetLocaleDataWrapper(), GetCalendarWrapper(), GetFieldSettings() ) )
+ if ( ImplDateGetValue( GetField()->GetText(), aDate, GetExtDateFormat(sal_True), ImplGetLocaleDataWrapper(), GetCalendarWrapper(), GetFieldSettings() ) )
{
if ( aDate > maMax )
aDate = maMax;
@@ -1945,7 +1945,7 @@ Date DateFormatter::GetRealDate() const
if ( GetField() )
{
- if ( !ImplDateGetValue( GetField()->GetText(), aDate, GetExtDateFormat(TRUE), ImplGetLocaleDataWrapper(), GetCalendarWrapper(), GetFieldSettings() ) )
+ if ( !ImplDateGetValue( GetField()->GetText(), aDate, GetExtDateFormat(sal_True), ImplGetLocaleDataWrapper(), GetCalendarWrapper(), GetFieldSettings() ) )
if ( ImplAllowMalformedInput() )
aDate = GetInvalidDate();
}
@@ -1962,20 +1962,20 @@ void DateFormatter::SetEmptyDate()
// -----------------------------------------------------------------------
-BOOL DateFormatter::IsEmptyDate() const
+sal_Bool DateFormatter::IsEmptyDate() const
{
- BOOL bEmpty = FormatterBase::IsEmptyFieldValue();
+ sal_Bool bEmpty = FormatterBase::IsEmptyFieldValue();
if ( GetField() && MustBeReformatted() && IsEmptyFieldValueEnabled() )
{
if ( !GetField()->GetText().Len() )
{
- bEmpty = TRUE;
+ bEmpty = sal_True;
}
else if ( !maLastDate.GetDate() )
{
Date aDate;
- bEmpty = !ImplDateGetValue( GetField()->GetText(), aDate, GetExtDateFormat(TRUE), ImplGetLocaleDataWrapper(), GetCalendarWrapper(), GetFieldSettings() );
+ bEmpty = !ImplDateGetValue( GetField()->GetText(), aDate, GetExtDateFormat(sal_True), ImplGetLocaleDataWrapper(), GetCalendarWrapper(), GetFieldSettings() );
}
}
return bEmpty;
@@ -1983,14 +1983,14 @@ BOOL DateFormatter::IsEmptyDate() const
// -----------------------------------------------------------------------
-BOOL DateFormatter::IsDateModified() const
+sal_Bool DateFormatter::IsDateModified() const
{
if ( ImplGetEmptyFieldValue() )
return !IsEmptyDate();
else if ( GetDate() != maFieldDate )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -2004,14 +2004,14 @@ void DateFormatter::Reformat()
return;
XubString aStr;
- BOOL bOK = ImplDateReformat( GetField()->GetText(), aStr, GetFieldSettings() );
+ sal_Bool bOK = ImplDateReformat( GetField()->GetText(), aStr, GetFieldSettings() );
if( !bOK )
return;
if ( aStr.Len() )
{
ImplSetText( aStr );
- ImplDateGetValue( aStr, maLastDate, GetExtDateFormat(TRUE), ImplGetLocaleDataWrapper(), GetCalendarWrapper(), GetFieldSettings() );
+ ImplDateGetValue( aStr, maLastDate, GetExtDateFormat(sal_True), ImplGetLocaleDataWrapper(), GetCalendarWrapper(), GetFieldSettings() );
}
else
{
@@ -2022,7 +2022,7 @@ void DateFormatter::Reformat()
else
{
ImplSetText( ImplGetSVEmptyStr() );
- SetEmptyFieldValueData( TRUE );
+ SetEmptyFieldValueData( sal_True );
}
}
}
@@ -2036,12 +2036,12 @@ void DateFormatter::ExpandCentury( Date& rDate )
// -----------------------------------------------------------------------
-void DateFormatter::ExpandCentury( Date& rDate, USHORT nTwoDigitYearStart )
+void DateFormatter::ExpandCentury( Date& rDate, sal_uInt16 nTwoDigitYearStart )
{
- USHORT nDateYear = rDate.GetYear();
+ sal_uInt16 nDateYear = rDate.GetYear();
if ( nDateYear < 100 )
{
- USHORT nCentury = nTwoDigitYearStart / 100;
+ sal_uInt16 nCentury = nTwoDigitYearStart / 100;
if ( nDateYear < (nTwoDigitYearStart % 100) )
nCentury++;
rDate.SetYear( nDateYear + (nCentury*100) );
@@ -2092,7 +2092,7 @@ void DateField::ImplLoadRes( const ResId& rResId )
{
DateFormatter::ImplLoadRes( ResId( (RSHEADER_TYPE *)GetClassRes(), *pMgr ) );
- ULONG nMask = ReadLongRes();
+ sal_uIntPtr nMask = ReadLongRes();
if ( DATEFIELD_FIRST & nMask )
{
maFirst = Date( ResId( (RSHEADER_TYPE *)GetClassRes(), *pMgr ) );
@@ -2122,7 +2122,7 @@ long DateField::PreNotify( NotifyEvent& rNEvt )
( GetExtDateFormat() != XTDATEF_SYSTEM_LONG ) &&
!rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() )
{
- if ( ImplDateProcessKeyInput( GetField(), *rNEvt.GetKeyEvent(), GetExtDateFormat( TRUE ), ImplGetLocaleDataWrapper() ) )
+ if ( ImplDateProcessKeyInput( GetField(), *rNEvt.GetKeyEvent(), GetExtDateFormat( sal_True ), ImplGetLocaleDataWrapper() ) )
return 1;
}
@@ -2134,7 +2134,7 @@ long DateField::PreNotify( NotifyEvent& rNEvt )
long DateField::Notify( NotifyEvent& rNEvt )
{
if ( rNEvt.GetType() == EVENT_GETFOCUS )
- MarkToBeReformatted( FALSE );
+ MarkToBeReformatted( sal_False );
else if ( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
if ( MustBeReformatted() )
@@ -2144,7 +2144,7 @@ long DateField::Notify( NotifyEvent& rNEvt )
// !!! allen anderen Feldern anders behandelt wird.
// !!! Siehe dazu Bug: 52304
- BOOL bTextLen = GetText().Len() != 0;
+ sal_Bool bTextLen = GetText().Len() != 0;
if ( bTextLen || !IsEmptyFieldValueEnabled() )
{
if ( !ImplAllowMalformedInput() )
@@ -2152,7 +2152,7 @@ long DateField::Notify( NotifyEvent& rNEvt )
else
{
Date aDate( 0, 0, 0 );
- if ( ImplDateGetValue( GetText(), aDate, GetExtDateFormat(TRUE), ImplGetLocaleDataWrapper(), GetCalendarWrapper(), GetFieldSettings() ) )
+ if ( ImplDateGetValue( GetText(), aDate, GetExtDateFormat(sal_True), ImplGetLocaleDataWrapper(), GetCalendarWrapper(), GetFieldSettings() ) )
// even with strict text analysis, our text is a valid date -> do a complete
// reformat
Reformat();
@@ -2161,7 +2161,7 @@ long DateField::Notify( NotifyEvent& rNEvt )
else if ( !bTextLen && IsEmptyFieldValueEnabled() )
{
ResetLastDate();
- SetEmptyFieldValueData( TRUE );
+ SetEmptyFieldValueData( sal_True );
}
}
}
@@ -2187,7 +2187,7 @@ void DateField::DataChanged( const DataChangedEvent& rDCEvt )
void DateField::Modify()
{
- MarkToBeReformatted( TRUE );
+ MarkToBeReformatted( sal_True );
SpinField::Modify();
}
@@ -2195,7 +2195,7 @@ void DateField::Modify()
void DateField::Up()
{
- ImplDateSpinArea( TRUE );
+ ImplDateSpinArea( sal_True );
SpinField::Up();
}
@@ -2203,7 +2203,7 @@ void DateField::Up()
void DateField::Down()
{
- ImplDateSpinArea( FALSE );
+ ImplDateSpinArea( sal_False );
SpinField::Down();
}
@@ -2267,7 +2267,7 @@ long DateBox::PreNotify( NotifyEvent& rNEvt )
( GetExtDateFormat() != XTDATEF_SYSTEM_LONG ) &&
!rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() )
{
- if ( ImplDateProcessKeyInput( GetField(), *rNEvt.GetKeyEvent(), GetExtDateFormat( TRUE ), ImplGetLocaleDataWrapper() ) )
+ if ( ImplDateProcessKeyInput( GetField(), *rNEvt.GetKeyEvent(), GetExtDateFormat( sal_True ), ImplGetLocaleDataWrapper() ) )
return 1;
}
@@ -2293,18 +2293,18 @@ void DateBox::DataChanged( const DataChangedEvent& rDCEvt )
long DateBox::Notify( NotifyEvent& rNEvt )
{
if ( rNEvt.GetType() == EVENT_GETFOCUS )
- MarkToBeReformatted( FALSE );
+ MarkToBeReformatted( sal_False );
else if ( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
if ( MustBeReformatted() )
{
- BOOL bTextLen = GetText().Len() != 0;
+ sal_Bool bTextLen = GetText().Len() != 0;
if ( bTextLen || !IsEmptyFieldValueEnabled() )
Reformat();
else if ( !bTextLen && IsEmptyFieldValueEnabled() )
{
ResetLastDate();
- SetEmptyFieldValueData( TRUE );
+ SetEmptyFieldValueData( sal_True );
}
}
}
@@ -2316,7 +2316,7 @@ long DateBox::Notify( NotifyEvent& rNEvt )
void DateBox::Modify()
{
- MarkToBeReformatted( TRUE );
+ MarkToBeReformatted( sal_True );
ComboBox::Modify();
}
@@ -2325,21 +2325,21 @@ void DateBox::Modify()
void DateBox::ReformatAll()
{
XubString aStr;
- SetUpdateMode( FALSE );
- USHORT nEntryCount = GetEntryCount();
- for ( USHORT i=0; i < nEntryCount; i++ )
+ SetUpdateMode( sal_False );
+ sal_uInt16 nEntryCount = GetEntryCount();
+ for ( sal_uInt16 i=0; i < nEntryCount; i++ )
{
ImplDateReformat( GetEntry( i ), aStr, GetFieldSettings() );
RemoveEntry( i );
InsertEntry( aStr, i );
}
DateFormatter::Reformat();
- SetUpdateMode( TRUE );
+ SetUpdateMode( sal_True );
}
// -----------------------------------------------------------------------
-void DateBox::InsertDate( const Date& rDate, USHORT nPos )
+void DateBox::InsertDate( const Date& rDate, sal_uInt16 nPos )
{
Date aDate = rDate;
if ( aDate > GetMax() )
@@ -2359,20 +2359,20 @@ void DateBox::RemoveDate( const Date& rDate )
// -----------------------------------------------------------------------
-Date DateBox::GetDate( USHORT nPos ) const
+Date DateBox::GetDate( sal_uInt16 nPos ) const
{
Date aDate( 0, 0, 0 );
- ImplDateGetValue( ComboBox::GetEntry( nPos ), aDate, GetExtDateFormat(TRUE), ImplGetLocaleDataWrapper(), GetCalendarWrapper(), GetSettings() );
+ ImplDateGetValue( ComboBox::GetEntry( nPos ), aDate, GetExtDateFormat(sal_True), ImplGetLocaleDataWrapper(), GetCalendarWrapper(), GetSettings() );
return aDate;
}
// -----------------------------------------------------------------------
-USHORT DateBox::GetDatePos( const Date& rDate ) const
+sal_uInt16 DateBox::GetDatePos( const Date& rDate ) const
{
XubString aStr;
if ( IsLongFormat() )
- aStr = ImplGetLocaleDataWrapper().getLongDate( rDate, GetCalendarWrapper(), 1, FALSE, 1, !IsShowDateCentury() );
+ aStr = ImplGetLocaleDataWrapper().getLongDate( rDate, GetCalendarWrapper(), 1, sal_False, 1, !IsShowDateCentury() );
else
aStr = ImplGetLocaleDataWrapper().getDate( rDate );
return ComboBox::GetEntryPos( aStr );
@@ -2380,18 +2380,18 @@ USHORT DateBox::GetDatePos( const Date& rDate ) const
// -----------------------------------------------------------------------
-static BOOL ImplTimeProcessKeyInput( Edit*, const KeyEvent& rKEvt,
- BOOL bStrictFormat, BOOL bDuration,
+static sal_Bool ImplTimeProcessKeyInput( Edit*, const KeyEvent& rKEvt,
+ sal_Bool bStrictFormat, sal_Bool bDuration,
TimeFieldFormat eFormat,
const LocaleDataWrapper& rLocaleDataWrapper )
{
xub_Unicode cChar = rKEvt.GetCharCode();
if ( !bStrictFormat )
- return FALSE;
+ return sal_False;
else
{
- USHORT nGroup = rKEvt.GetKeyCode().GetGroup();
+ sal_uInt16 nGroup = rKEvt.GetKeyCode().GetGroup();
if ( (nGroup == KEYGROUP_FKEYS) || (nGroup == KEYGROUP_CURSOR) ||
(nGroup == KEYGROUP_MISC) ||
((cChar >= '0') && (cChar <= '9')) ||
@@ -2403,55 +2403,55 @@ static BOOL ImplTimeProcessKeyInput( Edit*, const KeyEvent& rKEvt,
((eFormat == TIMEF_100TH_SEC) && (cChar == rLocaleDataWrapper.getTime100SecSep())) ||
((eFormat == TIMEF_SEC_CS) && (cChar == rLocaleDataWrapper.getTime100SecSep())) ||
(bDuration && (cChar == '-')) )
- return FALSE;
+ return sal_False;
else
- return TRUE;
+ return sal_True;
}
}
// -----------------------------------------------------------------------
-static BOOL ImplIsOnlyDigits( const String& _rStr )
+static sal_Bool ImplIsOnlyDigits( const String& _rStr )
{
const sal_Unicode* _pChr = _rStr.GetBuffer();
for ( xub_StrLen i = 0; i < _rStr.Len(); ++i, ++_pChr )
{
if ( *_pChr < '0' || *_pChr > '9' )
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-static BOOL ImplIsValidTimePortion( BOOL _bSkipInvalidCharacters, const String& _rStr )
+static sal_Bool ImplIsValidTimePortion( sal_Bool _bSkipInvalidCharacters, const String& _rStr )
{
if ( !_bSkipInvalidCharacters )
{
if ( ( _rStr.Len() > 2 ) || ( _rStr.Len() < 1 ) || !ImplIsOnlyDigits( _rStr ) )
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-static BOOL ImplCutTimePortion( String& _rStr, xub_StrLen _nSepPos, BOOL _bSkipInvalidCharacters, short* _pPortion )
+static sal_Bool ImplCutTimePortion( String& _rStr, xub_StrLen _nSepPos, sal_Bool _bSkipInvalidCharacters, short* _pPortion )
{
String sPortion = _rStr.Copy( 0, _nSepPos );
_rStr.Erase( 0, _nSepPos + 1 );
if ( !ImplIsValidTimePortion( _bSkipInvalidCharacters, sPortion ) )
- return FALSE;
+ return sal_False;
*_pPortion = (short)sPortion.ToInt32();
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-static BOOL ImplTimeGetValue( const XubString& rStr, Time& rTime,
- TimeFieldFormat eFormat, BOOL bDuration,
- const LocaleDataWrapper& rLocaleDataWrapper, BOOL _bSkipInvalidCharacters = TRUE )
+static sal_Bool ImplTimeGetValue( const XubString& rStr, Time& rTime,
+ TimeFieldFormat eFormat, sal_Bool bDuration,
+ const LocaleDataWrapper& rLocaleDataWrapper, sal_Bool _bSkipInvalidCharacters = sal_True )
{
XubString aStr = rStr;
short nHour = 0;
@@ -2461,7 +2461,7 @@ static BOOL ImplTimeGetValue( const XubString& rStr, Time& rTime,
Time aTime( 0, 0, 0 );
if ( !rStr.Len() )
- return FALSE;
+ return sal_False;
// Nach Separatoren suchen
if ( rLocaleDataWrapper.getTimeSep().Len() )
@@ -2483,34 +2483,34 @@ static BOOL ImplTimeGetValue( const XubString& rStr, Time& rTime,
}
}
- BOOL bNegative = FALSE;
+ sal_Bool bNegative = sal_False;
xub_StrLen nSepPos = aStr.Search( rLocaleDataWrapper.getTimeSep() );
if ( aStr.GetChar( 0 ) == '-' )
- bNegative = TRUE;
+ bNegative = sal_True;
if ( eFormat != TIMEF_SEC_CS )
{
if ( nSepPos == STRING_NOTFOUND )
nSepPos = aStr.Len();
if ( !ImplCutTimePortion( aStr, nSepPos, _bSkipInvalidCharacters, &nHour ) )
- return FALSE;
+ return sal_False;
nSepPos = aStr.Search( rLocaleDataWrapper.getTimeSep() );
if ( aStr.GetChar( 0 ) == '-' )
- bNegative = TRUE;
+ bNegative = sal_True;
if ( nSepPos != STRING_NOTFOUND )
{
if ( !ImplCutTimePortion( aStr, nSepPos, _bSkipInvalidCharacters, &nMinute ) )
- return FALSE;
+ return sal_False;
nSepPos = aStr.Search( rLocaleDataWrapper.getTimeSep() );
if ( aStr.GetChar( 0 ) == '-' )
- bNegative = TRUE;
+ bNegative = sal_True;
if ( nSepPos != STRING_NOTFOUND )
{
if ( !ImplCutTimePortion( aStr, nSepPos, _bSkipInvalidCharacters, &nSecond ) )
- return FALSE;
+ return sal_False;
if ( aStr.GetChar( 0 ) == '-' )
- bNegative = TRUE;
+ bNegative = sal_True;
n100Sec = (short)aStr.ToInt32();
}
else
@@ -2534,7 +2534,7 @@ static BOOL ImplTimeGetValue( const XubString& rStr, Time& rTime,
nSepPos = aStr.Search( rLocaleDataWrapper.getTimeSep() );
if ( aStr.GetChar( 0 ) == '-' )
- bNegative = TRUE;
+ bNegative = sal_True;
if ( nSepPos != STRING_NOTFOUND )
{
nMinute = nSecond;
@@ -2543,7 +2543,7 @@ static BOOL ImplTimeGetValue( const XubString& rStr, Time& rTime,
nSepPos = aStr.Search( rLocaleDataWrapper.getTimeSep() );
if ( aStr.GetChar( 0 ) == '-' )
- bNegative = TRUE;
+ bNegative = sal_True;
if ( nSepPos != STRING_NOTFOUND )
{
nHour = nMinute;
@@ -2595,7 +2595,7 @@ static BOOL ImplTimeGetValue( const XubString& rStr, Time& rTime,
}
if ( (nMinute > 59) || (nSecond > 59) || (n100Sec > 100) )
- return FALSE;
+ return sal_False;
if ( eFormat == TIMEF_NONE )
nSecond = n100Sec = 0;
@@ -2606,7 +2606,7 @@ static BOOL ImplTimeGetValue( const XubString& rStr, Time& rTime,
{
if ( bNegative || (nHour < 0) || (nMinute < 0) ||
(nSecond < 0) || (n100Sec < 0) )
- return FALSE;
+ return sal_False;
aStr.ToUpperAscii();
XubString aAM( rLocaleDataWrapper.getTimeAM() );
@@ -2622,39 +2622,39 @@ static BOOL ImplTimeGetValue( const XubString& rStr, Time& rTime,
if ( (nHour == 12) && ( ( aStr.Search( aAM ) != STRING_NOTFOUND ) || ( aStr.Search( aAM2 ) != STRING_NOTFOUND ) ) )
nHour = 0;
- aTime = Time( (USHORT)nHour, (USHORT)nMinute, (USHORT)nSecond,
- (USHORT)n100Sec );
+ aTime = Time( (sal_uInt16)nHour, (sal_uInt16)nMinute, (sal_uInt16)nSecond,
+ (sal_uInt16)n100Sec );
}
else
{
if ( bNegative || (nHour < 0) || (nMinute < 0) ||
(nSecond < 0) || (n100Sec < 0) )
{
- bNegative = TRUE;
+ bNegative = sal_True;
nHour = nHour < 0 ? -nHour : nHour;
nMinute = nMinute < 0 ? -nMinute : nMinute;
nSecond = nSecond < 0 ? -nSecond : nSecond;
n100Sec = n100Sec < 0 ? -n100Sec : n100Sec;
}
- aTime = Time( (USHORT)nHour, (USHORT)nMinute, (USHORT)nSecond,
- (USHORT)n100Sec );
+ aTime = Time( (sal_uInt16)nHour, (sal_uInt16)nMinute, (sal_uInt16)nSecond,
+ (sal_uInt16)n100Sec );
if ( bNegative )
aTime = -aTime;
}
rTime = aTime;
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-BOOL TimeFormatter::ImplTimeReformat( const XubString& rStr, XubString& rOutStr )
+sal_Bool TimeFormatter::ImplTimeReformat( const XubString& rStr, XubString& rOutStr )
{
Time aTime( 0, 0, 0 );
if ( !ImplTimeGetValue( rStr, aTime, GetFormat(), IsDuration(), ImplGetLocaleDataWrapper() ) )
- return TRUE;
+ return sal_True;
Time aTempTime = aTime;
if ( aTempTime > GetMax() )
@@ -2668,22 +2668,22 @@ BOOL TimeFormatter::ImplTimeReformat( const XubString& rStr, XubString& rOutStr
if ( !GetErrorHdl().Call( this ) )
{
maCorrectedTime = Time();
- return FALSE;
+ return sal_False;
}
else
maCorrectedTime = Time();
}
- BOOL bSecond = FALSE;
- BOOL b100Sec = FALSE;
+ sal_Bool bSecond = sal_False;
+ sal_Bool b100Sec = sal_False;
if ( meFormat != TIMEF_NONE )
- bSecond = TRUE;
+ bSecond = sal_True;
if ( meFormat == TIMEF_100TH_SEC )
- b100Sec = TRUE;
+ b100Sec = sal_True;
if ( meFormat == TIMEF_SEC_CS )
{
- ULONG n = aTempTime.GetHour() * 3600L;
+ sal_uIntPtr n = aTempTime.GetHour() * 3600L;
n += aTempTime.GetMin() * 60L;
n += aTempTime.GetSec();
rOutStr = String::CreateFromInt32( n );
@@ -2713,18 +2713,18 @@ BOOL TimeFormatter::ImplTimeReformat( const XubString& rStr, XubString& rOutStr
}
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-BOOL TimeFormatter::ImplAllowMalformedInput() const
+sal_Bool TimeFormatter::ImplAllowMalformedInput() const
{
return !IsEnforceValidValue();
}
// -----------------------------------------------------------------------
-void TimeField::ImplTimeSpinArea( BOOL bUp )
+void TimeField::ImplTimeSpinArea( sal_Bool bUp )
{
if ( GetField() )
{
@@ -2795,7 +2795,7 @@ void TimeField::ImplTimeSpinArea( BOOL bUp )
void TimeFormatter::ImplInit()
{
meFormat = TIMEF_NONE;
- mbDuration = FALSE;
+ mbDuration = sal_False;
mnTimeFormat = HOUR_24; // Should become a ExtTimeFieldFormat in next implementation, merge with mbDuration and meFormat
}
@@ -2805,7 +2805,7 @@ TimeFormatter::TimeFormatter() :
maLastTime( 0, 0 ),
maMin( 0, 0 ),
maMax( 23, 59, 59, 99 ),
- mbEnforceValidValue( TRUE ),
+ mbEnforceValidValue( sal_True ),
maFieldTime( 0, 0 )
{
ImplInit();
@@ -2818,7 +2818,7 @@ void TimeFormatter::ImplLoadRes( const ResId& rResId )
ResMgr* pMgr = rResId.GetResMgr();
if( pMgr )
{
- ULONG nMask = pMgr->ReadLong();
+ sal_uIntPtr nMask = pMgr->ReadLong();
if ( TIMEFORMATTER_MIN & nMask )
{
@@ -2836,10 +2836,10 @@ void TimeFormatter::ImplLoadRes( const ResId& rResId )
meFormat = (TimeFieldFormat)pMgr->ReadLong();
if ( TIMEFORMATTER_DURATION & nMask )
- mbDuration = (BOOL)pMgr->ReadShort();
+ mbDuration = (sal_Bool)pMgr->ReadShort();
if ( TIMEFORMATTER_STRICTFORMAT & nMask )
- SetStrictFormat( (BOOL)pMgr->ReadShort() );
+ SetStrictFormat( (sal_Bool)pMgr->ReadShort() );
if ( TIMEFORMATTER_VALUE & nMask )
{
@@ -2890,7 +2890,7 @@ void TimeFormatter::SetMax( const Time& rNewMax )
void TimeFormatter::SetTimeFormat( TimeFormatter::TimeFormat eNewFormat )
{
- mnTimeFormat = sal::static_int_cast<USHORT>(eNewFormat);
+ mnTimeFormat = sal::static_int_cast<sal_uInt16>(eNewFormat);
}
// -----------------------------------------------------------------------
@@ -2910,7 +2910,7 @@ void TimeFormatter::SetFormat( TimeFieldFormat eNewFormat )
// -----------------------------------------------------------------------
-void TimeFormatter::SetDuration( BOOL bNewDuration )
+void TimeFormatter::SetDuration( sal_Bool bNewDuration )
{
mbDuration = bNewDuration;
ReformatAll();
@@ -2922,7 +2922,7 @@ void TimeFormatter::SetTime( const Time& rNewTime )
{
SetUserTime( rNewTime );
maFieldTime = maLastTime;
- SetEmptyFieldValueData( FALSE );
+ SetEmptyFieldValueData( sal_False );
}
// -----------------------------------------------------------------------
@@ -2969,15 +2969,15 @@ void TimeFormatter::ImplSetUserTime( const Time& rNewTime, Selection* pNewSelect
if ( GetField() )
{
XubString aStr;
- BOOL bSec = FALSE;
- BOOL b100Sec = FALSE;
+ sal_Bool bSec = sal_False;
+ sal_Bool b100Sec = sal_False;
if ( meFormat != TIMEF_NONE )
- bSec = TRUE;
+ bSec = sal_True;
if ( meFormat == TIMEF_100TH_SEC || meFormat == TIMEF_SEC_CS )
- b100Sec = TRUE;
+ b100Sec = sal_True;
if ( meFormat == TIMEF_SEC_CS )
{
- ULONG n = aNewTime.GetHour() * 3600L;
+ sal_uIntPtr n = aNewTime.GetHour() * 3600L;
n += aNewTime.GetMin() * 60L;
n += aNewTime.GetSec();
aStr = String::CreateFromInt32( n );
@@ -3028,7 +3028,7 @@ Time TimeFormatter::GetTime() const
if ( GetField() )
{
- BOOL bAllowMailformed = ImplAllowMalformedInput();
+ sal_Bool bAllowMailformed = ImplAllowMalformedInput();
if ( ImplTimeGetValue( GetField()->GetText(), aTime, GetFormat(), IsDuration(), ImplGetLocaleDataWrapper(), !bAllowMailformed ) )
{
if ( aTime > GetMax() )
@@ -3056,7 +3056,7 @@ Time TimeFormatter::GetRealTime() const
if ( GetField() )
{
- BOOL bAllowMailformed = ImplAllowMalformedInput();
+ sal_Bool bAllowMailformed = ImplAllowMalformedInput();
if ( !ImplTimeGetValue( GetField()->GetText(), aTime, GetFormat(), IsDuration(), ImplGetLocaleDataWrapper(), !bAllowMailformed ) )
if ( bAllowMailformed )
aTime = GetInvalidTime();
@@ -3067,14 +3067,14 @@ Time TimeFormatter::GetRealTime() const
// -----------------------------------------------------------------------
-BOOL TimeFormatter::IsTimeModified() const
+sal_Bool TimeFormatter::IsTimeModified() const
{
if ( ImplGetEmptyFieldValue() )
return !IsEmptyTime();
else if ( GetTime() != maFieldTime )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -3088,7 +3088,7 @@ void TimeFormatter::Reformat()
return;
XubString aStr;
- BOOL bOK = ImplTimeReformat( GetField()->GetText(), aStr );
+ sal_Bool bOK = ImplTimeReformat( GetField()->GetText(), aStr );
if ( !bOK )
return;
@@ -3109,7 +3109,7 @@ TimeField::TimeField( Window* pParent, WinBits nWinStyle ) :
maLast( GetMax() )
{
SetField( this );
- SetText( ImplGetLocaleDataWrapper().getTime( maFieldTime, FALSE, FALSE ) );
+ SetText( ImplGetLocaleDataWrapper().getTime( maFieldTime, sal_False, sal_False ) );
Reformat();
}
@@ -3124,7 +3124,7 @@ TimeField::TimeField( Window* pParent, const ResId& rResId ) :
WinBits nStyle = ImplInitRes( rResId );
SpinField::ImplInit( pParent, nStyle );
SetField( this );
- SetText( ImplGetLocaleDataWrapper().getTime( maFieldTime, FALSE, FALSE ) );
+ SetText( ImplGetLocaleDataWrapper().getTime( maFieldTime, sal_False, sal_False ) );
ImplLoadRes( rResId );
if ( !(nStyle & WB_HIDE ) )
@@ -3141,7 +3141,7 @@ void TimeField::ImplLoadRes( const ResId& rResId )
{
TimeFormatter::ImplLoadRes( ResId( (RSHEADER_TYPE *)GetClassRes(), *pMgr ) );
- ULONG nMask = ReadLongRes();
+ sal_uIntPtr nMask = ReadLongRes();
if ( TIMEFIELD_FIRST & nMask )
{
@@ -3182,7 +3182,7 @@ long TimeField::PreNotify( NotifyEvent& rNEvt )
long TimeField::Notify( NotifyEvent& rNEvt )
{
if ( rNEvt.GetType() == EVENT_GETFOCUS )
- MarkToBeReformatted( FALSE );
+ MarkToBeReformatted( sal_False );
else if ( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
if ( MustBeReformatted() && (GetText().Len() || !IsEmptyFieldValueEnabled()) )
@@ -3192,7 +3192,7 @@ long TimeField::Notify( NotifyEvent& rNEvt )
else
{
Time aTime( 0, 0, 0 );
- if ( ImplTimeGetValue( GetText(), aTime, GetFormat(), IsDuration(), ImplGetLocaleDataWrapper(), FALSE ) )
+ if ( ImplTimeGetValue( GetText(), aTime, GetFormat(), IsDuration(), ImplGetLocaleDataWrapper(), sal_False ) )
// even with strict text analysis, our text is a valid time -> do a complete
// reformat
Reformat();
@@ -3221,7 +3221,7 @@ void TimeField::DataChanged( const DataChangedEvent& rDCEvt )
void TimeField::Modify()
{
- MarkToBeReformatted( TRUE );
+ MarkToBeReformatted( sal_True );
SpinField::Modify();
}
@@ -3229,7 +3229,7 @@ void TimeField::Modify()
void TimeField::Up()
{
- ImplTimeSpinArea( TRUE );
+ ImplTimeSpinArea( sal_True );
SpinField::Up();
}
@@ -3237,7 +3237,7 @@ void TimeField::Up()
void TimeField::Down()
{
- ImplTimeSpinArea( FALSE );
+ ImplTimeSpinArea( sal_False );
SpinField::Down();
}
@@ -3266,40 +3266,40 @@ void TimeField::SetExtFormat( ExtTimeFieldFormat eFormat )
case EXTTIMEF_24H_SHORT:
{
SetTimeFormat( HOUR_24 );
- SetDuration( FALSE );
+ SetDuration( sal_False );
SetFormat( TIMEF_NONE );
}
break;
case EXTTIMEF_24H_LONG:
{
SetTimeFormat( HOUR_24 );
- SetDuration( FALSE );
+ SetDuration( sal_False );
SetFormat( TIMEF_SEC );
}
break;
case EXTTIMEF_12H_SHORT:
{
SetTimeFormat( HOUR_12 );
- SetDuration( FALSE );
+ SetDuration( sal_False );
SetFormat( TIMEF_NONE );
}
break;
case EXTTIMEF_12H_LONG:
{
SetTimeFormat( HOUR_12 );
- SetDuration( FALSE );
+ SetDuration( sal_False );
SetFormat( TIMEF_SEC );
}
break;
case EXTTIMEF_DURATION_SHORT:
{
- SetDuration( TRUE );
+ SetDuration( sal_True );
SetFormat( TIMEF_NONE );
}
break;
case EXTTIMEF_DURATION_LONG:
{
- SetDuration( TRUE );
+ SetDuration( sal_True );
SetFormat( TIMEF_SEC );
}
break;
@@ -3317,7 +3317,7 @@ TimeBox::TimeBox( Window* pParent, WinBits nWinStyle ) :
ComboBox( pParent, nWinStyle )
{
SetField( this );
- SetText( ImplGetLocaleDataWrapper().getTime( maFieldTime, FALSE, FALSE ) );
+ SetText( ImplGetLocaleDataWrapper().getTime( maFieldTime, sal_False, sal_False ) );
Reformat();
}
@@ -3330,7 +3330,7 @@ TimeBox::TimeBox( Window* pParent, const ResId& rResId ) :
WinBits nStyle = ImplInitRes( rResId );
ComboBox::ImplInit( pParent, nStyle );
SetField( this );
- SetText( ImplGetLocaleDataWrapper().getTime( maFieldTime, FALSE, FALSE ) );
+ SetText( ImplGetLocaleDataWrapper().getTime( maFieldTime, sal_False, sal_False ) );
ComboBox::ImplLoadRes( rResId );
ResMgr* pMgr = rResId.GetResMgr();
if( pMgr )
@@ -3365,7 +3365,7 @@ long TimeBox::PreNotify( NotifyEvent& rNEvt )
long TimeBox::Notify( NotifyEvent& rNEvt )
{
if ( rNEvt.GetType() == EVENT_GETFOCUS )
- MarkToBeReformatted( FALSE );
+ MarkToBeReformatted( sal_False );
else if ( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
if ( MustBeReformatted() && (GetText().Len() || !IsEmptyFieldValueEnabled()) )
@@ -3393,7 +3393,7 @@ void TimeBox::DataChanged( const DataChangedEvent& rDCEvt )
void TimeBox::Modify()
{
- MarkToBeReformatted( TRUE );
+ MarkToBeReformatted( sal_True );
ComboBox::Modify();
}
@@ -3402,21 +3402,21 @@ void TimeBox::Modify()
void TimeBox::ReformatAll()
{
XubString aStr;
- SetUpdateMode( FALSE );
- USHORT nEntryCount = GetEntryCount();
- for ( USHORT i=0; i < nEntryCount; i++ )
+ SetUpdateMode( sal_False );
+ sal_uInt16 nEntryCount = GetEntryCount();
+ for ( sal_uInt16 i=0; i < nEntryCount; i++ )
{
ImplTimeReformat( GetEntry( i ), aStr );
RemoveEntry( i );
InsertEntry( aStr, i );
}
TimeFormatter::Reformat();
- SetUpdateMode( TRUE );
+ SetUpdateMode( sal_True );
}
// -----------------------------------------------------------------------
-void TimeBox::InsertTime( const Time& rTime, USHORT nPos )
+void TimeBox::InsertTime( const Time& rTime, sal_uInt16 nPos )
{
Time aTime = rTime;
if ( aTime > GetMax() )
@@ -3424,12 +3424,12 @@ void TimeBox::InsertTime( const Time& rTime, USHORT nPos )
else if ( aTime < GetMin() )
aTime = GetMin();
- BOOL bSec = FALSE;
- BOOL b100Sec = FALSE;
+ sal_Bool bSec = sal_False;
+ sal_Bool b100Sec = sal_False;
if ( GetFormat() == TIMEF_SEC )
- bSec = TRUE;
+ bSec = sal_True;
if ( GetFormat() == TIMEF_100TH_SEC || GetFormat() == TIMEF_SEC_CS )
- bSec = b100Sec = TRUE;
+ bSec = b100Sec = sal_True;
ComboBox::InsertEntry( ImplGetLocaleDataWrapper().getTime( aTime, bSec, b100Sec ), nPos );
}
@@ -3437,18 +3437,18 @@ void TimeBox::InsertTime( const Time& rTime, USHORT nPos )
void TimeBox::RemoveTime( const Time& rTime )
{
- BOOL bSec = FALSE;
- BOOL b100Sec = FALSE;
+ sal_Bool bSec = sal_False;
+ sal_Bool b100Sec = sal_False;
if ( GetFormat() == TIMEF_SEC )
- bSec = TRUE;
+ bSec = sal_True;
if ( GetFormat() == TIMEF_100TH_SEC || TIMEF_SEC_CS )
- bSec = b100Sec = TRUE;
+ bSec = b100Sec = sal_True;
ComboBox::RemoveEntry( ImplGetLocaleDataWrapper().getTime( rTime, bSec, b100Sec ) );
}
// -----------------------------------------------------------------------
-Time TimeBox::GetTime( USHORT nPos ) const
+Time TimeBox::GetTime( sal_uInt16 nPos ) const
{
Time aTime( 0, 0, 0 );
ImplTimeGetValue( ComboBox::GetEntry( nPos ), aTime, GetFormat(), IsDuration(), ImplGetLocaleDataWrapper() );
@@ -3457,13 +3457,13 @@ Time TimeBox::GetTime( USHORT nPos ) const
// -----------------------------------------------------------------------
-USHORT TimeBox::GetTimePos( const Time& rTime ) const
+sal_uInt16 TimeBox::GetTimePos( const Time& rTime ) const
{
- BOOL bSec = FALSE;
- BOOL b100Sec = FALSE;
+ sal_Bool bSec = sal_False;
+ sal_Bool b100Sec = sal_False;
if ( GetFormat() == TIMEF_SEC )
- bSec = TRUE;
+ bSec = sal_True;
if ( GetFormat() == TIMEF_100TH_SEC || TIMEF_SEC_CS )
- bSec = b100Sec = TRUE;
+ bSec = b100Sec = sal_True;
return ComboBox::GetEntryPos( ImplGetLocaleDataWrapper().getTime( rTime, bSec, b100Sec ) );
}
diff --git a/vcl/source/control/fixbrd.cxx b/vcl/source/control/fixbrd.cxx
index b519174f95d1..904a6558d524 100644
--- a/vcl/source/control/fixbrd.cxx
+++ b/vcl/source/control/fixbrd.cxx
@@ -41,7 +41,7 @@
void FixedBorder::ImplInit( Window* pParent, WinBits nStyle )
{
mnType = FIXEDBORDER_TYPE_DOUBLEOUT;
- mbTransparent = TRUE;
+ mbTransparent = sal_True;
nStyle = ImplInitStyle( nStyle );
Control::ImplInit( pParent, nStyle, NULL );
@@ -66,18 +66,18 @@ void FixedBorder::ImplInitSettings()
!(pParent->GetStyle() & WB_CLIPCHILDREN) ) &&
!IsControlBackground() && mbTransparent )
{
- SetMouseTransparent( TRUE );
- EnableChildTransparentMode( TRUE );
+ SetMouseTransparent( sal_True );
+ EnableChildTransparentMode( sal_True );
SetParentClipMode( PARENTCLIPMODE_NOCLIP );
- SetPaintTransparent( TRUE );
+ SetPaintTransparent( sal_True );
SetBackground();
}
else
{
- SetMouseTransparent( FALSE );
- EnableChildTransparentMode( FALSE );
+ SetMouseTransparent( sal_False );
+ EnableChildTransparentMode( sal_False );
SetParentClipMode( 0 );
- SetPaintTransparent( FALSE );
+ SetPaintTransparent( sal_False );
if ( IsControlBackground() )
SetBackground( GetControlBackground() );
@@ -116,12 +116,12 @@ FixedBorder::~FixedBorder()
// -----------------------------------------------------------------------
-void FixedBorder::ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
+void FixedBorder::ImplDraw( OutputDevice* pDev, sal_uIntPtr nDrawFlags,
const Point& rPos, const Size& rSize )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
Rectangle aRect( rPos, rSize );
- USHORT nBorderStyle = mnType;
+ sal_uInt16 nBorderStyle = mnType;
if ( (nDrawFlags & WINDOW_DRAW_MONO) ||
(rStyleSettings.GetOptions() & STYLE_OPTION_MONO) )
@@ -159,7 +159,7 @@ void FixedBorder::Paint( const Rectangle& )
// -----------------------------------------------------------------------
void FixedBorder::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
- ULONG nFlags )
+ sal_uIntPtr nFlags )
{
Point aPos = pDev->LogicToPixel( rPos );
Size aSize = pDev->LogicToPixel( rSize );
@@ -214,7 +214,7 @@ void FixedBorder::DataChanged( const DataChangedEvent& rDCEvt )
// -----------------------------------------------------------------------
-void FixedBorder::SetTransparent( BOOL bTransparent )
+void FixedBorder::SetTransparent( sal_Bool bTransparent )
{
if ( mbTransparent != bTransparent )
{
@@ -226,7 +226,7 @@ void FixedBorder::SetTransparent( BOOL bTransparent )
// -----------------------------------------------------------------------
-void FixedBorder::SetBorderType( USHORT nType )
+void FixedBorder::SetBorderType( sal_uInt16 nType )
{
if ( mnType != nType )
{
diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx
index 37406293d7cf..5cdcf3943a65 100644
--- a/vcl/source/control/fixed.cxx
+++ b/vcl/source/control/fixed.cxx
@@ -94,7 +94,7 @@ void FixedText::ImplInit( Window* pParent, WinBits nStyle )
{
nStyle = ImplInitStyle( nStyle );
Control::ImplInit( pParent, nStyle, NULL );
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
}
// -----------------------------------------------------------------------
@@ -121,8 +121,8 @@ const Color& FixedText::GetCanonicalTextColor( const StyleSettings& _rStyle ) co
// -----------------------------------------------------------------------
-void FixedText::ImplInitSettings( BOOL bFont,
- BOOL bForeground, BOOL bBackground )
+void FixedText::ImplInitSettings( sal_Bool bFont,
+ sal_Bool bForeground, sal_Bool bBackground )
{
Control::ImplInitSettings( bFont, bForeground );
@@ -131,16 +131,16 @@ void FixedText::ImplInitSettings( BOOL bFont,
Window* pParent = GetParent();
if ( pParent->IsChildTransparentModeEnabled() && !IsControlBackground() )
{
- EnableChildTransparentMode( TRUE );
+ EnableChildTransparentMode( sal_True );
SetParentClipMode( PARENTCLIPMODE_NOCLIP );
- SetPaintTransparent( TRUE );
+ SetPaintTransparent( sal_True );
SetBackground();
}
else
{
- EnableChildTransparentMode( FALSE );
+ EnableChildTransparentMode( sal_False );
SetParentClipMode( 0 );
- SetPaintTransparent( FALSE );
+ SetPaintTransparent( sal_False );
if ( IsControlBackground() )
SetBackground( GetControlBackground() );
@@ -182,7 +182,7 @@ FixedText::FixedText( Window* pParent, const ResId& rResId, bool bDisableAccessi
ImplInit( pParent, nStyle );
ImplLoadRes( rResId );
if ( bDisableAccessibleLabelForRelation )
- ImplGetWindowImpl()->mbDisableAccessibleLabelForRelation = TRUE;
+ ImplGetWindowImpl()->mbDisableAccessibleLabelForRelation = sal_True;
if ( !(nStyle & WB_HIDE) )
Show();
@@ -190,9 +190,9 @@ FixedText::FixedText( Window* pParent, const ResId& rResId, bool bDisableAccessi
// -----------------------------------------------------------------------
-USHORT FixedText::ImplGetTextStyle( WinBits nWinStyle )
+sal_uInt16 FixedText::ImplGetTextStyle( WinBits nWinStyle )
{
- USHORT nTextStyle = TEXT_DRAW_MNEMONIC | TEXT_DRAW_ENDELLIPSIS;
+ sal_uInt16 nTextStyle = TEXT_DRAW_MNEMONIC | TEXT_DRAW_ENDELLIPSIS;
if( ! (nWinStyle & WB_NOMULTILINE) )
nTextStyle |= TEXT_DRAW_MULTILINE;
@@ -223,7 +223,7 @@ USHORT FixedText::ImplGetTextStyle( WinBits nWinStyle )
// -----------------------------------------------------------------------
-void FixedText::ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
+void FixedText::ImplDraw( OutputDevice* pDev, sal_uIntPtr nDrawFlags,
const Point& rPos, const Size& rSize,
bool bFillLayout
) const
@@ -231,7 +231,7 @@ void FixedText::ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
WinBits nWinStyle = GetStyle();
XubString aText( GetText() );
- USHORT nTextStyle = FixedText::ImplGetTextStyle( nWinStyle );
+ sal_uInt16 nTextStyle = FixedText::ImplGetTextStyle( nWinStyle );
Point aPos = rPos;
if ( nWinStyle & WB_EXTRAOFFSET )
@@ -279,9 +279,9 @@ void FixedText::Paint( const Rectangle& )
// -----------------------------------------------------------------------
void FixedText::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
- ULONG nFlags )
+ sal_uIntPtr nFlags )
{
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
Point aPos = pDev->LogicToPixel( rPos );
Size aSize = pDev->LogicToPixel( rSize );
@@ -296,8 +296,8 @@ void FixedText::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
pDev->SetTextColor( GetTextColor() );
pDev->SetTextFillColor();
- 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 );
@@ -343,24 +343,24 @@ void FixedText::StateChanged( StateChangedType nType )
if ( (GetPrevStyle() & FIXEDTEXT_VIEW_STYLE) !=
(GetStyle() & FIXEDTEXT_VIEW_STYLE) )
{
- ImplInitSettings( TRUE, FALSE, FALSE );
+ ImplInitSettings( sal_True, sal_False, sal_False );
Invalidate();
}
}
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();
}
}
@@ -376,7 +376,7 @@ void FixedText::DataChanged( const DataChangedEvent& rDCEvt )
((rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE)) )
{
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
Invalidate();
}
}
@@ -385,7 +385,7 @@ void FixedText::DataChanged( const DataChangedEvent& rDCEvt )
Size FixedText::CalcMinimumTextSize( Control const *pControl, long nMaxWidth )
{
- USHORT nStyle = ImplGetTextStyle( pControl->GetStyle() );
+ sal_uInt16 nStyle = ImplGetTextStyle( pControl->GetStyle() );
if ( !( pControl->GetStyle() & WB_NOLABEL ) )
nStyle |= TEXT_DRAW_MNEMONIC;
@@ -434,7 +434,7 @@ void FixedLine::ImplInit( Window* pParent, WinBits nStyle )
{
nStyle = ImplInitStyle( nStyle );
Control::ImplInit( pParent, nStyle, NULL );
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
}
// -----------------------------------------------------------------------
@@ -461,8 +461,8 @@ const Color& FixedLine::GetCanonicalTextColor( const StyleSettings& _rStyle ) co
// -----------------------------------------------------------------------
-void FixedLine::ImplInitSettings( BOOL bFont,
- BOOL bForeground, BOOL bBackground )
+void FixedLine::ImplInitSettings( sal_Bool bFont,
+ sal_Bool bForeground, sal_Bool bBackground )
{
Control::ImplInitSettings( bFont, bForeground );
@@ -471,16 +471,16 @@ void FixedLine::ImplInitSettings( BOOL bFont,
Window* pParent = GetParent();
if ( pParent->IsChildTransparentModeEnabled() && !IsControlBackground() )
{
- EnableChildTransparentMode( TRUE );
+ EnableChildTransparentMode( sal_True );
SetParentClipMode( PARENTCLIPMODE_NOCLIP );
- SetPaintTransparent( TRUE );
+ SetPaintTransparent( sal_True );
SetBackground();
}
else
{
- EnableChildTransparentMode( FALSE );
+ EnableChildTransparentMode( sal_False );
SetParentClipMode( 0 );
- SetPaintTransparent( FALSE );
+ SetPaintTransparent( sal_False );
if ( IsControlBackground() )
SetBackground( GetControlBackground() );
@@ -522,7 +522,7 @@ void FixedLine::ImplDraw( bool bLayout )
}
else
{
- USHORT nStyle = TEXT_DRAW_MNEMONIC | TEXT_DRAW_LEFT | TEXT_DRAW_VCENTER | TEXT_DRAW_ENDELLIPSIS;
+ sal_uInt16 nStyle = TEXT_DRAW_MNEMONIC | TEXT_DRAW_LEFT | TEXT_DRAW_VCENTER | TEXT_DRAW_ENDELLIPSIS;
Rectangle aRect( 0, 0, aOutSize.Width(), aOutSize.Height() );
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
@@ -584,7 +584,7 @@ void FixedLine::Paint( const Rectangle& )
// -----------------------------------------------------------------------
-void FixedLine::Draw( OutputDevice*, const Point&, const Size&, ULONG )
+void FixedLine::Draw( OutputDevice*, const Point&, const Size&, sal_uIntPtr )
{
}
@@ -620,17 +620,17 @@ void FixedLine::StateChanged( StateChangedType nType )
(nType == STATE_CHANGE_STYLE) ||
(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();
}
}
@@ -646,7 +646,7 @@ void FixedLine::DataChanged( const DataChangedEvent& rDCEvt )
((rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE)) )
{
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
Invalidate();
}
}
@@ -688,16 +688,16 @@ void FixedBitmap::ImplInitSettings()
Window* pParent = GetParent();
if ( pParent->IsChildTransparentModeEnabled() && !IsControlBackground() )
{
- EnableChildTransparentMode( TRUE );
+ EnableChildTransparentMode( sal_True );
SetParentClipMode( PARENTCLIPMODE_NOCLIP );
- SetPaintTransparent( TRUE );
+ SetPaintTransparent( sal_True );
SetBackground();
}
else
{
- EnableChildTransparentMode( FALSE );
+ EnableChildTransparentMode( sal_False );
SetParentClipMode( 0 );
- SetPaintTransparent( FALSE );
+ SetPaintTransparent( sal_False );
if ( IsControlBackground() )
SetBackground( GetControlBackground() );
@@ -712,7 +712,7 @@ void FixedBitmap::ImplLoadRes( const ResId& rResId )
{
Control::ImplLoadRes( rResId );
- ULONG nObjMask = ReadLongRes();
+ sal_uIntPtr nObjMask = ReadLongRes();
if ( RSC_FIXEDBITMAP_BITMAP & nObjMask )
{
@@ -751,10 +751,10 @@ FixedBitmap::~FixedBitmap()
// -----------------------------------------------------------------------
-void FixedBitmap::ImplDraw( OutputDevice* pDev, ULONG /* nDrawFlags */,
+void FixedBitmap::ImplDraw( OutputDevice* pDev, sal_uIntPtr /* nDrawFlags */,
const Point& rPos, const Size& rSize )
{
- USHORT nStyle = 0;
+ sal_uInt16 nStyle = 0;
Bitmap* pBitmap = &maBitmap;
Color aCol;
if( !!maBitmapHC )
@@ -804,7 +804,7 @@ void FixedBitmap::Paint( const Rectangle& )
// -----------------------------------------------------------------------
void FixedBitmap::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
- ULONG nFlags )
+ sal_uIntPtr nFlags )
{
Point aPos = pDev->LogicToPixel( rPos );
Size aSize = pDev->LogicToPixel( rSize );
@@ -883,7 +883,7 @@ void FixedBitmap::SetBitmap( const Bitmap& rBitmap )
// -----------------------------------------------------------------------
-BOOL FixedBitmap::SetModeBitmap( const Bitmap& rBitmap, BmpColorMode eMode )
+sal_Bool FixedBitmap::SetModeBitmap( const Bitmap& rBitmap, BmpColorMode eMode )
{
if( eMode == BMP_COLOR_NORMAL )
SetBitmap( rBitmap );
@@ -893,8 +893,8 @@ BOOL FixedBitmap::SetModeBitmap( const Bitmap& rBitmap, BmpColorMode eMode )
StateChanged( STATE_CHANGE_DATA );
}
else
- return FALSE;
- return TRUE;
+ return sal_False;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -912,7 +912,7 @@ const Bitmap& FixedBitmap::GetModeBitmap( BmpColorMode eMode) const
void FixedImage::ImplInit( Window* pParent, WinBits nStyle )
{
nStyle = ImplInitStyle( nStyle );
- mbInUserDraw = FALSE;
+ mbInUserDraw = sal_False;
Control::ImplInit( pParent, nStyle, NULL );
ImplInitSettings();
}
@@ -933,16 +933,16 @@ void FixedImage::ImplInitSettings()
Window* pParent = GetParent();
if ( pParent->IsChildTransparentModeEnabled() && !IsControlBackground() )
{
- EnableChildTransparentMode( TRUE );
+ EnableChildTransparentMode( sal_True );
SetParentClipMode( PARENTCLIPMODE_NOCLIP );
- SetPaintTransparent( TRUE );
+ SetPaintTransparent( sal_True );
SetBackground();
}
else
{
- EnableChildTransparentMode( FALSE );
+ EnableChildTransparentMode( sal_False );
SetParentClipMode( 0 );
- SetPaintTransparent( FALSE );
+ SetPaintTransparent( sal_False );
if ( IsControlBackground() )
SetBackground( GetControlBackground() );
@@ -957,7 +957,7 @@ void FixedImage::ImplLoadRes( const ResId& rResId )
{
Control::ImplLoadRes( rResId );
- ULONG nObjMask = ReadLongRes();
+ sal_uIntPtr nObjMask = ReadLongRes();
if ( RSC_FIXEDIMAGE_IMAGE & nObjMask )
{
@@ -996,10 +996,10 @@ FixedImage::~FixedImage()
// -----------------------------------------------------------------------
-void FixedImage::ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
+void FixedImage::ImplDraw( OutputDevice* pDev, sal_uIntPtr nDrawFlags,
const Point& rPos, const Size& rSize )
{
- USHORT nStyle = 0;
+ sal_uInt16 nStyle = 0;
if ( !(nDrawFlags & WINDOW_DRAW_NODISABLE) )
{
if ( !IsEnabled() )
@@ -1026,10 +1026,10 @@ void FixedImage::ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
}
}
- mbInUserDraw = TRUE;
+ mbInUserDraw = sal_True;
UserDrawEvent aUDEvt( pDev, Rectangle( rPos, rSize ), 0, nStyle );
UserDraw( aUDEvt );
- mbInUserDraw = FALSE;
+ mbInUserDraw = sal_False;
}
// -----------------------------------------------------------------------
@@ -1056,7 +1056,7 @@ void FixedImage::UserDraw( const UserDrawEvent& )
// -----------------------------------------------------------------------
void FixedImage::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
- ULONG nFlags )
+ sal_uIntPtr nFlags )
{
Point aPos = pDev->LogicToPixel( rPos );
Size aSize = pDev->LogicToPixel( rSize );
@@ -1138,7 +1138,7 @@ void FixedImage::SetImage( const Image& rImage )
// -----------------------------------------------------------------------
-BOOL FixedImage::SetModeImage( const Image& rImage, BmpColorMode eMode )
+sal_Bool FixedImage::SetModeImage( const Image& rImage, BmpColorMode eMode )
{
if( eMode == BMP_COLOR_NORMAL )
SetImage( rImage );
@@ -1151,8 +1151,8 @@ BOOL FixedImage::SetModeImage( const Image& rImage, BmpColorMode eMode )
}
}
else
- return FALSE;
- return TRUE;
+ return sal_False;
+ return sal_True;
}
// -----------------------------------------------------------------------
diff --git a/vcl/source/control/group.cxx b/vcl/source/control/group.cxx
index ecf00568e11f..084dbf96f7f7 100644
--- a/vcl/source/control/group.cxx
+++ b/vcl/source/control/group.cxx
@@ -50,8 +50,8 @@ void GroupBox::ImplInit( Window* pParent, WinBits nStyle )
{
nStyle = ImplInitStyle( nStyle );
Control::ImplInit( pParent, nStyle, NULL );
- SetMouseTransparent( TRUE );
- ImplInitSettings( TRUE, TRUE, TRUE );
+ SetMouseTransparent( sal_True );
+ ImplInitSettings( sal_True, sal_True, sal_True );
}
// -----------------------------------------------------------------------
@@ -78,8 +78,8 @@ const Color& GroupBox::GetCanonicalTextColor( const StyleSettings& _rStyle ) con
// -----------------------------------------------------------------------
-void GroupBox::ImplInitSettings( BOOL bFont,
- BOOL bForeground, BOOL bBackground )
+void GroupBox::ImplInitSettings( sal_Bool bFont,
+ sal_Bool bForeground, sal_Bool bBackground )
{
Control::ImplInitSettings( bFont, bForeground );
@@ -90,16 +90,16 @@ void GroupBox::ImplInitSettings( BOOL bFont,
!(pParent->GetStyle() & WB_CLIPCHILDREN) ) &&
!IsControlBackground() )
{
- EnableChildTransparentMode( TRUE );
+ EnableChildTransparentMode( sal_True );
SetParentClipMode( PARENTCLIPMODE_NOCLIP );
- SetPaintTransparent( TRUE );
+ SetPaintTransparent( sal_True );
SetBackground();
}
else
{
- EnableChildTransparentMode( FALSE );
+ EnableChildTransparentMode( sal_False );
SetParentClipMode( 0 );
- SetPaintTransparent( FALSE );
+ SetPaintTransparent( sal_False );
if ( IsControlBackground() )
SetBackground( GetControlBackground() );
@@ -133,7 +133,7 @@ GroupBox::GroupBox( Window* pParent, const ResId& rResId ) :
// -----------------------------------------------------------------------
-void GroupBox::ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
+void GroupBox::ImplDraw( OutputDevice* pDev, sal_uIntPtr nDrawFlags,
const Point& rPos, const Size& rSize, bool bLayout )
{
long nTop;
@@ -141,7 +141,7 @@ void GroupBox::ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
XubString aText( GetText() );
Rectangle aRect( rPos, rSize );
- USHORT nTextStyle = TEXT_DRAW_LEFT | TEXT_DRAW_TOP | TEXT_DRAW_ENDELLIPSIS | TEXT_DRAW_MNEMONIC;
+ sal_uInt16 nTextStyle = TEXT_DRAW_LEFT | TEXT_DRAW_TOP | TEXT_DRAW_ENDELLIPSIS | TEXT_DRAW_MNEMONIC;
if ( GetStyle() & WB_NOLABEL )
nTextStyle &= ~TEXT_DRAW_MNEMONIC;
@@ -241,7 +241,7 @@ void GroupBox::Paint( const Rectangle& )
// -----------------------------------------------------------------------
void GroupBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
- ULONG nFlags )
+ sal_uIntPtr nFlags )
{
Point aPos = pDev->LogicToPixel( rPos );
Size aSize = pDev->LogicToPixel( rSize );
@@ -291,17 +291,17 @@ void GroupBox::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();
}
}
@@ -317,7 +317,7 @@ void GroupBox::DataChanged( const DataChangedEvent& rDCEvt )
((rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE)) )
{
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
Invalidate();
}
}
diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx
index ebccfdc1e6bb..2c4f2109eab0 100644
--- a/vcl/source/control/ilstbox.cxx
+++ b/vcl/source/control/ilstbox.cxx
@@ -57,7 +57,7 @@ using namespace ::com::sun::star;
// =======================================================================
-void ImplInitFieldSettings( Window* pWin, BOOL bFont, BOOL bForeground, BOOL bBackground )
+void ImplInitFieldSettings( Window* pWin, sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground )
{
const StyleSettings& rStyleSettings = pWin->GetSettings().GetStyleSettings();
@@ -108,7 +108,7 @@ ImplEntryList::ImplEntryList( Window* pWindow )
mnLastSelected = LISTBOX_ENTRY_NOTFOUND;
mnSelectionAnchor = LISTBOX_ENTRY_NOTFOUND;
mnImages = 0;
- mbCallSelectionChangedHdl = TRUE;
+ mbCallSelectionChangedHdl = sal_True;
mnMRUCount = 0;
mnMaxMRUCount = 0;
@@ -126,7 +126,7 @@ ImplEntryList::~ImplEntryList()
void ImplEntryList::Clear()
{
mnImages = 0;
- for ( USHORT n = GetEntryCount(); n; )
+ for ( sal_uInt16 n = GetEntryCount(); n; )
{
ImplEntryType* pImplEntry = GetEntry( --n );
delete pImplEntry;
@@ -136,7 +136,7 @@ void ImplEntryList::Clear()
// -----------------------------------------------------------------------
-void ImplEntryList::SelectEntry( USHORT nPos, BOOL bSelect )
+void ImplEntryList::SelectEntry( sal_uInt16 nPos, sal_Bool bSelect )
{
ImplEntryType* pImplEntry = GetEntry( nPos );
if ( pImplEntry &&
@@ -162,7 +162,7 @@ uno::Reference< i18n::XCollator > ImplGetCollator (lang::Locale &rLocale)
return xCollator;
}
-USHORT ImplEntryList::InsertEntry( USHORT nPos, ImplEntryType* pNewEntry, BOOL bSort )
+sal_uInt16 ImplEntryList::InsertEntry( sal_uInt16 nPos, ImplEntryType* pNewEntry, sal_Bool bSort )
{
if ( !!pNewEntry->maImage )
mnImages++;
@@ -177,11 +177,11 @@ USHORT ImplEntryList::InsertEntry( USHORT nPos, ImplEntryType* pNewEntry, BOOL b
uno::Reference< i18n::XCollator > xCollator = ImplGetCollator(aLocale);
const XubString& rStr = pNewEntry->maStr;
- ULONG nLow, nHigh, nMid;
+ sal_uIntPtr nLow, nHigh, nMid;
nHigh = Count();
- ImplEntryType* pTemp = GetEntry( (USHORT)(nHigh-1) );
+ ImplEntryType* pTemp = GetEntry( (sal_uInt16)(nHigh-1) );
try
{
@@ -199,12 +199,12 @@ USHORT ImplEntryList::InsertEntry( USHORT nPos, ImplEntryType* pNewEntry, BOOL b
else
{
nLow = mnMRUCount;
- pTemp = (ImplEntryType*)GetEntry( (USHORT)nLow );
+ pTemp = (ImplEntryType*)GetEntry( (sal_uInt16)nLow );
eComp = (StringCompare)xCollator->compareString (rStr, pTemp->maStr);
if ( eComp != COMPARE_GREATER )
{
- Insert( pNewEntry, (ULONG)0 );
+ Insert( pNewEntry, (sal_uIntPtr)0 );
}
else
{
@@ -242,17 +242,17 @@ USHORT ImplEntryList::InsertEntry( USHORT nPos, ImplEntryType* pNewEntry, BOOL b
// garbage you wouldn't insert it. If the exception occured because the
// Collator implementation is garbage then give the user a chance to see
// his stuff
- Insert( pNewEntry, (ULONG)0 );
+ Insert( pNewEntry, (sal_uIntPtr)0 );
}
}
- return (USHORT)GetPos( pNewEntry );
+ return (sal_uInt16)GetPos( pNewEntry );
}
// -----------------------------------------------------------------------
-void ImplEntryList::RemoveEntry( USHORT nPos )
+void ImplEntryList::RemoveEntry( sal_uInt16 nPos )
{
ImplEntryType* pImplEntry = (ImplEntryType*)List::Remove( nPos );
if ( pImplEntry )
@@ -266,10 +266,10 @@ void ImplEntryList::RemoveEntry( USHORT nPos )
// -----------------------------------------------------------------------
-USHORT ImplEntryList::FindEntry( const XubString& rString, BOOL bSearchMRUArea ) const
+sal_uInt16 ImplEntryList::FindEntry( const XubString& rString, sal_Bool bSearchMRUArea ) const
{
- USHORT nEntries = GetEntryCount();
- for ( USHORT n = bSearchMRUArea ? 0 : GetMRUCount(); n < nEntries; n++ )
+ sal_uInt16 nEntries = GetEntryCount();
+ for ( sal_uInt16 n = bSearchMRUArea ? 0 : GetMRUCount(); n < nEntries; n++ )
{
ImplEntryType* pImplEntry = GetEntry( n );
String aComp( vcl::I18nHelper::filterFormattingChars( pImplEntry->maStr ) );
@@ -281,21 +281,21 @@ USHORT ImplEntryList::FindEntry( const XubString& rString, BOOL bSearchMRUArea )
// -----------------------------------------------------------------------
-USHORT ImplEntryList::FindMatchingEntry( const XubString& rStr, USHORT nStart, BOOL bForward, BOOL bLazy ) const
+sal_uInt16 ImplEntryList::FindMatchingEntry( const XubString& rStr, sal_uInt16 nStart, sal_Bool bForward, sal_Bool bLazy ) const
{
- USHORT nPos = LISTBOX_ENTRY_NOTFOUND;
- USHORT nEntryCount = GetEntryCount();
+ sal_uInt16 nPos = LISTBOX_ENTRY_NOTFOUND;
+ sal_uInt16 nEntryCount = GetEntryCount();
if ( !bForward )
nStart++; // wird sofort dekrementiert
const vcl::I18nHelper& rI18nHelper = mpWindow->GetSettings().GetLocaleI18nHelper();
- for ( USHORT n = nStart; bForward ? ( n < nEntryCount ) : n; )
+ for ( sal_uInt16 n = nStart; bForward ? ( n < nEntryCount ) : n; )
{
if ( !bForward )
n--;
ImplEntryType* pImplEntry = GetEntry( n );
- BOOL bMatch = bLazy ? rI18nHelper.MatchString( rStr, pImplEntry->maStr ) != 0 : ( rStr.Match( pImplEntry->maStr ) == STRING_MATCH );
+ sal_Bool bMatch = bLazy ? rI18nHelper.MatchString( rStr, pImplEntry->maStr ) != 0 : ( rStr.Match( pImplEntry->maStr ) == STRING_MATCH );
if ( bMatch )
{
nPos = n;
@@ -311,10 +311,10 @@ USHORT ImplEntryList::FindMatchingEntry( const XubString& rStr, USHORT nStart, B
// -----------------------------------------------------------------------
-USHORT ImplEntryList::FindEntry( const void* pData ) const
+sal_uInt16 ImplEntryList::FindEntry( const void* pData ) const
{
- USHORT nPos = LISTBOX_ENTRY_NOTFOUND;
- for ( USHORT n = GetEntryCount(); n; )
+ sal_uInt16 nPos = LISTBOX_ENTRY_NOTFOUND;
+ for ( sal_uInt16 n = GetEntryCount(); n; )
{
ImplEntryType* pImplEntry = GetEntry( --n );
if ( pImplEntry->mpUserData == pData )
@@ -328,12 +328,12 @@ USHORT ImplEntryList::FindEntry( const void* pData ) const
// -----------------------------------------------------------------------
-long ImplEntryList::GetAddedHeight( USHORT i_nEndIndex, USHORT i_nBeginIndex, long i_nBeginHeight ) const
+long ImplEntryList::GetAddedHeight( sal_uInt16 i_nEndIndex, sal_uInt16 i_nBeginIndex, long i_nBeginHeight ) const
{
long nHeight = i_nBeginHeight;
- USHORT nStart = i_nEndIndex > i_nBeginIndex ? i_nBeginIndex : i_nEndIndex;
- USHORT nStop = i_nEndIndex > i_nBeginIndex ? i_nEndIndex : i_nBeginIndex;
- USHORT nEntryCount = GetEntryCount();
+ sal_uInt16 nStart = i_nEndIndex > i_nBeginIndex ? i_nBeginIndex : i_nEndIndex;
+ sal_uInt16 nStop = i_nEndIndex > i_nBeginIndex ? i_nEndIndex : i_nBeginIndex;
+ sal_uInt16 nEntryCount = GetEntryCount();
if( nStop != LISTBOX_ENTRY_NOTFOUND && nEntryCount != 0 )
{
// sanity check
@@ -342,7 +342,7 @@ long ImplEntryList::GetAddedHeight( USHORT i_nEndIndex, USHORT i_nBeginIndex, lo
if( nStart > nEntryCount-1 )
nStart = nEntryCount-1;
- USHORT nIndex = nStart;
+ sal_uInt16 nIndex = nStart;
while( nIndex != LISTBOX_ENTRY_NOTFOUND && nIndex < nStop )
{
nHeight += GetEntryPtr( nIndex )-> mnHeight;
@@ -356,7 +356,7 @@ long ImplEntryList::GetAddedHeight( USHORT i_nEndIndex, USHORT i_nBeginIndex, lo
// -----------------------------------------------------------------------
-long ImplEntryList::GetEntryHeight( USHORT nPos ) const
+long ImplEntryList::GetEntryHeight( sal_uInt16 nPos ) const
{
ImplEntryType* pImplEntry = GetEntry( nPos );
return pImplEntry ? pImplEntry->mnHeight : 0;
@@ -364,7 +364,7 @@ long ImplEntryList::GetEntryHeight( USHORT nPos ) const
// -----------------------------------------------------------------------
-XubString ImplEntryList::GetEntryText( USHORT nPos ) const
+XubString ImplEntryList::GetEntryText( sal_uInt16 nPos ) const
{
XubString aEntryText;
ImplEntryType* pImplEntry = GetEntry( nPos );
@@ -375,9 +375,9 @@ XubString ImplEntryList::GetEntryText( USHORT nPos ) const
// -----------------------------------------------------------------------
-BOOL ImplEntryList::HasEntryImage( USHORT nPos ) const
+sal_Bool ImplEntryList::HasEntryImage( sal_uInt16 nPos ) const
{
- BOOL bImage = FALSE;
+ sal_Bool bImage = sal_False;
ImplEntryType* pImplEntry = (ImplEntryType*)List::GetObject( nPos );
if ( pImplEntry )
bImage = !!pImplEntry->maImage;
@@ -386,7 +386,7 @@ BOOL ImplEntryList::HasEntryImage( USHORT nPos ) const
// -----------------------------------------------------------------------
-Image ImplEntryList::GetEntryImage( USHORT nPos ) const
+Image ImplEntryList::GetEntryImage( sal_uInt16 nPos ) const
{
Image aImage;
ImplEntryType* pImplEntry = (ImplEntryType*)List::GetObject( nPos );
@@ -397,7 +397,7 @@ Image ImplEntryList::GetEntryImage( USHORT nPos ) const
// -----------------------------------------------------------------------
-void ImplEntryList::SetEntryData( USHORT nPos, void* pNewData )
+void ImplEntryList::SetEntryData( sal_uInt16 nPos, void* pNewData )
{
ImplEntryType* pImplEntry = (ImplEntryType*)List::GetObject( nPos );
if ( pImplEntry )
@@ -406,7 +406,7 @@ void ImplEntryList::SetEntryData( USHORT nPos, void* pNewData )
// -----------------------------------------------------------------------
-void* ImplEntryList::GetEntryData( USHORT nPos ) const
+void* ImplEntryList::GetEntryData( sal_uInt16 nPos ) const
{
ImplEntryType* pImplEntry = (ImplEntryType*)List::GetObject( nPos );
return pImplEntry ? pImplEntry->mpUserData : NULL;
@@ -414,7 +414,7 @@ void* ImplEntryList::GetEntryData( USHORT nPos ) const
// -----------------------------------------------------------------------
-void ImplEntryList::SetEntryFlags( USHORT nPos, long nFlags )
+void ImplEntryList::SetEntryFlags( sal_uInt16 nPos, long nFlags )
{
ImplEntryType* pImplEntry = (ImplEntryType*)List::GetObject( nPos );
if ( pImplEntry )
@@ -423,7 +423,7 @@ void ImplEntryList::SetEntryFlags( USHORT nPos, long nFlags )
// -----------------------------------------------------------------------
-long ImplEntryList::GetEntryFlags( USHORT nPos ) const
+long ImplEntryList::GetEntryFlags( sal_uInt16 nPos ) const
{
ImplEntryType* pImplEntry = (ImplEntryType*)List::GetObject( nPos );
return pImplEntry ? pImplEntry->mnFlags : 0;
@@ -431,10 +431,10 @@ long ImplEntryList::GetEntryFlags( USHORT nPos ) const
// -----------------------------------------------------------------------
-USHORT ImplEntryList::GetSelectEntryCount() const
+sal_uInt16 ImplEntryList::GetSelectEntryCount() const
{
- USHORT nSelCount = 0;
- for ( USHORT n = GetEntryCount(); n; )
+ sal_uInt16 nSelCount = 0;
+ for ( sal_uInt16 n = GetEntryCount(); n; )
{
ImplEntryType* pImplEntry = GetEntry( --n );
if ( pImplEntry->mbIsSelected )
@@ -445,20 +445,20 @@ USHORT ImplEntryList::GetSelectEntryCount() const
// -----------------------------------------------------------------------
-XubString ImplEntryList::GetSelectEntry( USHORT nIndex ) const
+XubString ImplEntryList::GetSelectEntry( sal_uInt16 nIndex ) const
{
return GetEntryText( GetSelectEntryPos( nIndex ) );
}
// -----------------------------------------------------------------------
-USHORT ImplEntryList::GetSelectEntryPos( USHORT nIndex ) const
+sal_uInt16 ImplEntryList::GetSelectEntryPos( sal_uInt16 nIndex ) const
{
- USHORT nSelEntryPos = LISTBOX_ENTRY_NOTFOUND;
- USHORT nSel = 0;
- USHORT nEntryCount = GetEntryCount();
+ sal_uInt16 nSelEntryPos = LISTBOX_ENTRY_NOTFOUND;
+ sal_uInt16 nSel = 0;
+ sal_uInt16 nEntryCount = GetEntryCount();
- for ( USHORT n = 0; n < nEntryCount; n++ )
+ for ( sal_uInt16 n = 0; n < nEntryCount; n++ )
{
ImplEntryType* pImplEntry = GetEntry( n );
if ( pImplEntry->mbIsSelected )
@@ -477,22 +477,22 @@ USHORT ImplEntryList::GetSelectEntryPos( USHORT nIndex ) const
// -----------------------------------------------------------------------
-BOOL ImplEntryList::IsEntrySelected( const XubString& rStr ) const
+sal_Bool ImplEntryList::IsEntrySelected( const XubString& rStr ) const
{
return IsEntryPosSelected( FindEntry( rStr ) );
}
// -----------------------------------------------------------------------
-BOOL ImplEntryList::IsEntryPosSelected( USHORT nIndex ) const
+sal_Bool ImplEntryList::IsEntryPosSelected( sal_uInt16 nIndex ) const
{
ImplEntryType* pImplEntry = GetEntry( nIndex );
- return pImplEntry ? pImplEntry->mbIsSelected : FALSE;
+ return pImplEntry ? pImplEntry->mbIsSelected : sal_False;
}
// -----------------------------------------------------------------------
-bool ImplEntryList::IsEntrySelectable( USHORT nPos ) const
+bool ImplEntryList::IsEntrySelectable( sal_uInt16 nPos ) const
{
ImplEntryType* pImplEntry = GetEntry( nPos );
return pImplEntry ? ((pImplEntry->mnFlags & LISTBOX_ENTRY_FLAG_DISABLE_SELECTION) == 0) : true;
@@ -500,7 +500,7 @@ bool ImplEntryList::IsEntrySelectable( USHORT nPos ) const
// -----------------------------------------------------------------------
-USHORT ImplEntryList::FindFirstSelectable( USHORT nPos, bool bForward /* = true */ )
+sal_uInt16 ImplEntryList::FindFirstSelectable( sal_uInt16 nPos, bool bForward /* = true */ )
{
if( IsEntrySelectable( nPos ) )
return nPos;
@@ -538,26 +538,26 @@ ImplListBoxWindow::ImplListBoxWindow( Window* pParent, WinBits nWinStyle ) :
mnBorder = 1;
mnSelectModifier = 0;
mnUserDrawEntry = LISTBOX_ENTRY_NOTFOUND;
- mbTrack = FALSE;
- mbImgsDiffSz = FALSE;
- mbTravelSelect = FALSE;
- mbTrackingSelect = FALSE;
- mbSelectionChanged = FALSE;
- mbMouseMoveSelect = FALSE;
- mbMulti = FALSE;
- mbStackMode = FALSE;
- mbGrabFocus = FALSE;
- mbUserDrawEnabled = FALSE;
- mbInUserDraw = FALSE;
- mbReadOnly = FALSE;
- mbHasFocusRect = FALSE;
- mbRight = ( nWinStyle & WB_RIGHT ) ? TRUE : FALSE;
- mbCenter = ( nWinStyle & WB_CENTER ) ? TRUE : FALSE;
- mbSimpleMode = ( nWinStyle & WB_SIMPLEMODE ) ? TRUE : FALSE;
- mbSort = ( nWinStyle & WB_SORT ) ? TRUE : FALSE;
+ mbTrack = sal_False;
+ mbImgsDiffSz = sal_False;
+ mbTravelSelect = sal_False;
+ mbTrackingSelect = sal_False;
+ mbSelectionChanged = sal_False;
+ mbMouseMoveSelect = sal_False;
+ mbMulti = sal_False;
+ mbStackMode = sal_False;
+ mbGrabFocus = sal_False;
+ mbUserDrawEnabled = sal_False;
+ mbInUserDraw = sal_False;
+ mbReadOnly = sal_False;
+ mbHasFocusRect = sal_False;
+ mbRight = ( nWinStyle & WB_RIGHT ) ? sal_True : sal_False;
+ mbCenter = ( nWinStyle & WB_CENTER ) ? sal_True : sal_False;
+ mbSimpleMode = ( nWinStyle & WB_SIMPLEMODE ) ? sal_True : sal_False;
+ mbSort = ( nWinStyle & WB_SORT ) ? sal_True : sal_False;
// pb: #106948# explicit mirroring for calc
- mbMirroring = FALSE;
+ mbMirroring = sal_False;
mnCurrentPos = LISTBOX_ENTRY_NOTFOUND;
mnTrackingSaveSelection = LISTBOX_ENTRY_NOTFOUND;
@@ -571,7 +571,7 @@ ImplListBoxWindow::ImplListBoxWindow( Window* pParent, WinBits nWinStyle ) :
maSearchTimeout.SetTimeout( 2500 );
maSearchTimeout.SetTimeoutHdl( LINK( this, ImplListBoxWindow, SearchStringTimeout ) );
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
ImplCalcMetrics();
}
@@ -585,7 +585,7 @@ ImplListBoxWindow::~ImplListBoxWindow()
// -----------------------------------------------------------------------
-void ImplListBoxWindow::ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground )
+void ImplListBoxWindow::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground )
{
ImplInitFieldSettings( this, bFont, bForeground, bBackground );
}
@@ -600,16 +600,16 @@ void ImplListBoxWindow::ImplCalcMetrics()
mnMaxImgTxtWidth= 0;
mnMaxImgHeight = 0;
- mnTextHeight = (USHORT)GetTextHeight();
+ mnTextHeight = (sal_uInt16)GetTextHeight();
mnMaxTxtHeight = mnTextHeight + mnBorder;
mnMaxHeight = mnMaxTxtHeight;
if ( maUserItemSize.Height() > mnMaxHeight )
- mnMaxHeight = (USHORT) maUserItemSize.Height();
+ mnMaxHeight = (sal_uInt16) maUserItemSize.Height();
if ( maUserItemSize.Width() > mnMaxWidth )
- mnMaxWidth= (USHORT) maUserItemSize.Width();
+ mnMaxWidth= (sal_uInt16) maUserItemSize.Width();
- for ( USHORT n = mpEntryList->GetEntryCount(); n; )
+ for ( sal_uInt16 n = mpEntryList->GetEntryCount(); n; )
{
ImplEntryType* pEntry = mpEntryList->GetMutableEntryPtr( --n );
ImplUpdateEntryMetrics( *pEntry );
@@ -644,7 +644,7 @@ void ImplListBoxWindow::Clear()
mnMaxImgHeight = 0;
mnTop = 0;
mnLeft = 0;
- mbImgsDiffSz = FALSE;
+ mbImgsDiffSz = sal_False;
ImplClearLayoutData();
mnCurrentPos = LISTBOX_ENTRY_NOTFOUND;
@@ -663,8 +663,8 @@ void ImplListBoxWindow::SetUserItemSize( const Size& rSz )
struct ImplEntryMetrics
{
- BOOL bText;
- BOOL bImage;
+ sal_Bool bText;
+ sal_Bool bImage;
long nEntryWidth;
long nEntryHeight;
long nTextWidth;
@@ -677,7 +677,7 @@ struct ImplEntryMetrics
void ImplListBoxWindow::ImplUpdateEntryMetrics( ImplEntryType& rEntry )
{
ImplEntryMetrics aMetrics;
- aMetrics.bText = rEntry.maStr.Len() ? TRUE : FALSE;
+ aMetrics.bText = rEntry.maStr.Len() ? sal_True : sal_False;
aMetrics.bImage = !!rEntry.maImage;
aMetrics.nEntryWidth = 0;
aMetrics.nEntryHeight = 0;
@@ -705,7 +705,7 @@ void ImplListBoxWindow::ImplUpdateEntryMetrics( ImplEntryType& rEntry )
else
{
// normal single line case
- aMetrics.nTextWidth = (USHORT)GetTextWidth( rEntry.maStr );
+ aMetrics.nTextWidth = (sal_uInt16)GetTextWidth( rEntry.maStr );
if( aMetrics.nTextWidth > mnMaxTxtWidth )
mnMaxTxtWidth = aMetrics.nTextWidth;
aMetrics.nEntryWidth = mnMaxTxtWidth;
@@ -715,13 +715,13 @@ void ImplListBoxWindow::ImplUpdateEntryMetrics( ImplEntryType& rEntry )
if ( aMetrics.bImage )
{
Size aImgSz = rEntry.maImage.GetSizePixel();
- aMetrics.nImgWidth = (USHORT) CalcZoom( aImgSz.Width() );
- aMetrics.nImgHeight = (USHORT) CalcZoom( aImgSz.Height() );
+ aMetrics.nImgWidth = (sal_uInt16) CalcZoom( aImgSz.Width() );
+ aMetrics.nImgHeight = (sal_uInt16) CalcZoom( aImgSz.Height() );
if( mnMaxImgWidth && ( aMetrics.nImgWidth != mnMaxImgWidth ) )
- mbImgsDiffSz = TRUE;
+ mbImgsDiffSz = sal_True;
else if ( mnMaxImgHeight && ( aMetrics.nImgHeight != mnMaxImgHeight ) )
- mbImgsDiffSz = TRUE;
+ mbImgsDiffSz = sal_True;
if( aMetrics.nImgWidth > mnMaxImgWidth )
mnMaxImgWidth = aMetrics.nImgWidth;
@@ -763,19 +763,19 @@ void ImplListBoxWindow::ImplCallSelect()
if ( !IsTravelSelect() && GetEntryList()->GetMaxMRUCount() )
{
// Insert the selected entry as MRU, if not allready first MRU
- USHORT nSelected = GetEntryList()->GetSelectEntryPos( 0 );
- USHORT nMRUCount = GetEntryList()->GetMRUCount();
+ sal_uInt16 nSelected = GetEntryList()->GetSelectEntryPos( 0 );
+ sal_uInt16 nMRUCount = GetEntryList()->GetMRUCount();
String aSelected = GetEntryList()->GetEntryText( nSelected );
- USHORT nFirstMatchingEntryPos = GetEntryList()->FindEntry( aSelected, TRUE );
+ sal_uInt16 nFirstMatchingEntryPos = GetEntryList()->FindEntry( aSelected, sal_True );
if ( nFirstMatchingEntryPos || !nMRUCount )
{
- BOOL bSelectNewEntry = FALSE;
+ sal_Bool bSelectNewEntry = sal_False;
if ( nFirstMatchingEntryPos < nMRUCount )
{
RemoveEntry( nFirstMatchingEntryPos );
nMRUCount--;
if ( nFirstMatchingEntryPos == nSelected )
- bSelectNewEntry = TRUE;
+ bSelectNewEntry = sal_True;
}
else if ( nMRUCount == GetEntryList()->GetMaxMRUCount() )
{
@@ -787,7 +787,7 @@ void ImplListBoxWindow::ImplCallSelect()
ImplEntryType* pNewEntry = new ImplEntryType( aSelected );
pNewEntry->mbIsSelected = bSelectNewEntry;
- GetEntryList()->InsertEntry( 0, pNewEntry, FALSE );
+ GetEntryList()->InsertEntry( 0, pNewEntry, sal_False );
ImplUpdateEntryMetrics( *pNewEntry );
GetEntryList()->SetMRUCount( ++nMRUCount );
SetSeparatorPos( nMRUCount ? nMRUCount-1 : 0 );
@@ -796,15 +796,15 @@ void ImplListBoxWindow::ImplCallSelect()
}
maSelectHdl.Call( NULL );
- mbSelectionChanged = FALSE;
+ mbSelectionChanged = sal_False;
}
// -----------------------------------------------------------------------
-USHORT ImplListBoxWindow::InsertEntry( USHORT nPos, ImplEntryType* pNewEntry )
+sal_uInt16 ImplListBoxWindow::InsertEntry( sal_uInt16 nPos, ImplEntryType* pNewEntry )
{
ImplClearLayoutData();
- USHORT nNewPos = mpEntryList->InsertEntry( nPos, pNewEntry, mbSort );
+ sal_uInt16 nNewPos = mpEntryList->InsertEntry( nPos, pNewEntry, mbSort );
if( (GetStyle() & WB_WORDBREAK) )
pNewEntry->mnFlags |= LISTBOX_ENTRY_FLAG_MULTILINE;
@@ -815,7 +815,7 @@ USHORT ImplListBoxWindow::InsertEntry( USHORT nPos, ImplEntryType* pNewEntry )
// -----------------------------------------------------------------------
-void ImplListBoxWindow::RemoveEntry( USHORT nPos )
+void ImplListBoxWindow::RemoveEntry( sal_uInt16 nPos )
{
ImplClearLayoutData();
mpEntryList->RemoveEntry( nPos );
@@ -826,7 +826,7 @@ void ImplListBoxWindow::RemoveEntry( USHORT nPos )
// -----------------------------------------------------------------------
-void ImplListBoxWindow::SetEntryFlags( USHORT nPos, long nFlags )
+void ImplListBoxWindow::SetEntryFlags( sal_uInt16 nPos, long nFlags )
{
mpEntryList->SetEntryFlags( nPos, nFlags );
ImplEntryType* pEntry = mpEntryList->GetMutableEntryPtr( nPos );
@@ -841,7 +841,7 @@ void ImplListBoxWindow::ImplShowFocusRect()
if ( mbHasFocusRect )
HideFocus();
ShowFocus( maFocusRect );
- mbHasFocusRect = TRUE;
+ mbHasFocusRect = sal_True;
}
// -----------------------------------------------------------------------
@@ -851,18 +851,18 @@ void ImplListBoxWindow::ImplHideFocusRect()
if ( mbHasFocusRect )
{
HideFocus();
- mbHasFocusRect = FALSE;
+ mbHasFocusRect = sal_False;
}
}
// -----------------------------------------------------------------------
-USHORT ImplListBoxWindow::GetEntryPosForPoint( const Point& rPoint ) const
+sal_uInt16 ImplListBoxWindow::GetEntryPosForPoint( const Point& rPoint ) const
{
long nY = mnBorder;
- USHORT nSelect = mnTop;
+ sal_uInt16 nSelect = mnTop;
const ImplEntryType* pEntry = mpEntryList->GetEntryPtr( nSelect );
while( pEntry && rPoint.Y() > pEntry->mnHeight + nY )
{
@@ -877,16 +877,16 @@ USHORT ImplListBoxWindow::GetEntryPosForPoint( const Point& rPoint ) const
// -----------------------------------------------------------------------
-BOOL ImplListBoxWindow::IsVisible( USHORT i_nEntry ) const
+sal_Bool ImplListBoxWindow::IsVisible( sal_uInt16 i_nEntry ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( i_nEntry >= mnTop )
{
if( mpEntryList->GetAddedHeight( i_nEntry, mnTop ) <
PixelToLogic( GetSizePixel() ).Height() )
{
- bRet = TRUE;
+ bRet = sal_True;
}
}
@@ -895,11 +895,11 @@ BOOL ImplListBoxWindow::IsVisible( USHORT i_nEntry ) const
// -----------------------------------------------------------------------
-USHORT ImplListBoxWindow::GetLastVisibleEntry() const
+sal_uInt16 ImplListBoxWindow::GetLastVisibleEntry() const
{
- USHORT nPos = mnTop;
+ sal_uInt16 nPos = mnTop;
long nWindowHeight = GetSizePixel().Height();
- USHORT nCount = mpEntryList->GetEntryCount();
+ sal_uInt16 nCount = mpEntryList->GetEntryCount();
long nDiff;
for( nDiff = 0; nDiff < nWindowHeight && nPos < nCount; nDiff = mpEntryList->GetAddedHeight( nPos, mnTop ) )
nPos++;
@@ -917,14 +917,14 @@ USHORT ImplListBoxWindow::GetLastVisibleEntry() const
void ImplListBoxWindow::MouseButtonDown( const MouseEvent& rMEvt )
{
- mbMouseMoveSelect = FALSE; // Nur bis zum ersten MouseButtonDown
+ mbMouseMoveSelect = sal_False; // Nur bis zum ersten MouseButtonDown
maSearchStr.Erase();
if ( !IsReadOnly() )
{
if( rMEvt.GetClicks() == 1 )
{
- USHORT nSelect = GetEntryPosForPoint( rMEvt.GetPosPixel() );
+ sal_uInt16 nSelect = GetEntryPosForPoint( rMEvt.GetPosPixel() );
if( nSelect != LISTBOX_ENTRY_NOTFOUND )
{
if ( !mbMulti && GetEntryList()->GetSelectEntryCount() )
@@ -933,9 +933,9 @@ void ImplListBoxWindow::MouseButtonDown( const MouseEvent& rMEvt )
mnTrackingSaveSelection = LISTBOX_ENTRY_NOTFOUND;
mnCurrentPos = nSelect;
- mbTrackingSelect = TRUE;
+ mbTrackingSelect = sal_True;
SelectEntries( nSelect, LET_MBDOWN, rMEvt.IsShift(), rMEvt.IsMod1() );
- mbTrackingSelect = FALSE;
+ mbTrackingSelect = sal_False;
if ( mbGrabFocus )
GrabFocus();
@@ -968,10 +968,10 @@ void ImplListBoxWindow::MouseMove( const MouseEvent& rMEvt )
SetTopEntry( 0 );
if ( mbStackMode ) // #87072#, #92323#
{
- mbTravelSelect = TRUE;
+ mbTravelSelect = sal_True;
mnSelectModifier = rMEvt.GetModifier();
ImplCallSelect();
- mbTravelSelect = FALSE;
+ mbTravelSelect = sal_False;
}
}
@@ -985,28 +985,28 @@ void ImplListBoxWindow::MouseMove( const MouseEvent& rMEvt )
{
if ( IsMouseMoveSelect() )
{
- USHORT nSelect = GetEntryPosForPoint( rMEvt.GetPosPixel() );
+ sal_uInt16 nSelect = GetEntryPosForPoint( rMEvt.GetPosPixel() );
if( nSelect == LISTBOX_ENTRY_NOTFOUND )
nSelect = mpEntryList->GetEntryCount() - 1;
nSelect = Min( nSelect, GetLastVisibleEntry() );
- nSelect = Min( nSelect, (USHORT) ( mpEntryList->GetEntryCount() - 1 ) );
+ nSelect = Min( nSelect, (sal_uInt16) ( mpEntryList->GetEntryCount() - 1 ) );
// Select only visible Entries with MouseMove, otherwise Tracking...
if ( IsVisible( nSelect ) &&
mpEntryList->IsEntrySelectable( nSelect ) &&
( ( nSelect != mnCurrentPos ) || !GetEntryList()->GetSelectEntryCount() || ( nSelect != GetEntryList()->GetSelectEntryPos( 0 ) ) ) )
{
- mbTrackingSelect = TRUE;
- if ( SelectEntries( nSelect, LET_TRACKING, FALSE, FALSE ) )
+ mbTrackingSelect = sal_True;
+ if ( SelectEntries( nSelect, LET_TRACKING, sal_False, sal_False ) )
{
if ( mbStackMode ) // #87072#
{
- mbTravelSelect = TRUE;
+ mbTravelSelect = sal_True;
mnSelectModifier = rMEvt.GetModifier();
ImplCallSelect();
- mbTravelSelect = FALSE;
+ mbTravelSelect = sal_False;
}
}
- mbTrackingSelect = FALSE;
+ mbTrackingSelect = sal_False;
}
}
@@ -1034,14 +1034,14 @@ void ImplListBoxWindow::DeselectAll()
{
while ( GetEntryList()->GetSelectEntryCount() )
{
- USHORT nS = GetEntryList()->GetSelectEntryPos( 0 );
- SelectEntry( nS, FALSE );
+ sal_uInt16 nS = GetEntryList()->GetSelectEntryPos( 0 );
+ SelectEntry( nS, sal_False );
}
}
// -----------------------------------------------------------------------
-void ImplListBoxWindow::SelectEntry( USHORT nPos, BOOL bSelect )
+void ImplListBoxWindow::SelectEntry( sal_uInt16 nPos, sal_Bool bSelect )
{
if( (mpEntryList->IsEntryPosSelected( nPos ) != bSelect) && mpEntryList->IsEntrySelectable( nPos ) )
{
@@ -1051,16 +1051,16 @@ void ImplListBoxWindow::SelectEntry( USHORT nPos, BOOL bSelect )
if( !mbMulti )
{
// Selektierten Eintrag deselektieren
- USHORT nDeselect = GetEntryList()->GetSelectEntryPos( 0 );
+ sal_uInt16 nDeselect = GetEntryList()->GetSelectEntryPos( 0 );
if( nDeselect != LISTBOX_ENTRY_NOTFOUND )
{
- //SelectEntryPos( nDeselect, FALSE );
- GetEntryList()->SelectEntry( nDeselect, FALSE );
+ //SelectEntryPos( nDeselect, sal_False );
+ GetEntryList()->SelectEntry( nDeselect, sal_False );
if ( IsUpdateMode() && IsReallyVisible() )
- ImplPaint( nDeselect, TRUE );
+ ImplPaint( nDeselect, sal_True );
}
}
- mpEntryList->SelectEntry( nPos, TRUE );
+ mpEntryList->SelectEntry( nPos, sal_True );
mnCurrentPos = nPos;
if ( ( nPos != LISTBOX_ENTRY_NOTFOUND ) && IsUpdateMode() )
{
@@ -1068,7 +1068,7 @@ void ImplListBoxWindow::SelectEntry( USHORT nPos, BOOL bSelect )
if ( !IsVisible( nPos ) )
{
ImplClearLayoutData();
- USHORT nVisibleEntries = GetLastVisibleEntry()-mnTop;
+ sal_uInt16 nVisibleEntries = GetLastVisibleEntry()-mnTop;
if ( !nVisibleEntries || !IsReallyVisible() || ( nPos < GetTopEntry() ) )
{
Resize();
@@ -1083,46 +1083,46 @@ void ImplListBoxWindow::SelectEntry( USHORT nPos, BOOL bSelect )
}
else
{
- mpEntryList->SelectEntry( nPos, FALSE );
- ImplPaint( nPos, TRUE );
+ mpEntryList->SelectEntry( nPos, sal_False );
+ ImplPaint( nPos, sal_True );
}
- mbSelectionChanged = TRUE;
+ mbSelectionChanged = sal_True;
}
}
// -----------------------------------------------------------------------
-BOOL ImplListBoxWindow::SelectEntries( USHORT nSelect, LB_EVENT_TYPE eLET, BOOL bShift, BOOL bCtrl )
+sal_Bool ImplListBoxWindow::SelectEntries( sal_uInt16 nSelect, LB_EVENT_TYPE eLET, sal_Bool bShift, sal_Bool bCtrl )
{
- BOOL bFocusChanged = FALSE;
- BOOL bSelectionChanged = FALSE;
+ sal_Bool bFocusChanged = sal_False;
+ sal_Bool bSelectionChanged = sal_False;
if( IsEnabled() && mpEntryList->IsEntrySelectable( nSelect ) )
{
// Hier (Single-ListBox) kann nur ein Eintrag deselektiert werden
if( !mbMulti )
{
- USHORT nDeselect = mpEntryList->GetSelectEntryPos( 0 );
+ sal_uInt16 nDeselect = mpEntryList->GetSelectEntryPos( 0 );
if( nSelect != nDeselect )
{
- SelectEntry( nSelect, TRUE );
+ SelectEntry( nSelect, sal_True );
mpEntryList->SetLastSelected( nSelect );
- bFocusChanged = TRUE;
- bSelectionChanged = TRUE;
+ bFocusChanged = sal_True;
+ bSelectionChanged = sal_True;
}
}
// MultiListBox ohne Modifier
else if( mbSimpleMode && !bCtrl && !bShift )
{
- USHORT nEntryCount = mpEntryList->GetEntryCount();
- for ( USHORT nPos = 0; nPos < nEntryCount; nPos++ )
+ sal_uInt16 nEntryCount = mpEntryList->GetEntryCount();
+ for ( sal_uInt16 nPos = 0; nPos < nEntryCount; nPos++ )
{
- BOOL bSelect = nPos == nSelect;
+ sal_Bool bSelect = nPos == nSelect;
if ( mpEntryList->IsEntryPosSelected( nPos ) != bSelect )
{
SelectEntry( nPos, bSelect );
- bFocusChanged = TRUE;
- bSelectionChanged = TRUE;
+ bFocusChanged = sal_True;
+ bSelectionChanged = sal_True;
}
}
mpEntryList->SetLastSelected( nSelect );
@@ -1134,20 +1134,20 @@ BOOL ImplListBoxWindow::SelectEntries( USHORT nSelect, LB_EVENT_TYPE eLET, BOOL
// Space fuer Selektionswechsel
if( !bShift && ( ( eLET == LET_KEYSPACE ) || ( eLET == LET_MBDOWN ) ) )
{
- BOOL bSelect = ( mbStackMode && IsMouseMoveSelect() ) ? TRUE : !mpEntryList->IsEntryPosSelected( nSelect );
+ sal_Bool bSelect = ( mbStackMode && IsMouseMoveSelect() ) ? sal_True : !mpEntryList->IsEntryPosSelected( nSelect );
if ( mbStackMode )
{
- USHORT n;
+ sal_uInt16 n;
if ( bSelect )
{
// All entries before nSelect must be selected...
for ( n = 0; n < nSelect; n++ )
- SelectEntry( n, TRUE );
+ SelectEntry( n, sal_True );
}
if ( !bSelect )
{
for ( n = nSelect+1; n < mpEntryList->GetEntryCount(); n++ )
- SelectEntry( n, FALSE );
+ SelectEntry( n, sal_False );
}
}
SelectEntry( nSelect, bSelect );
@@ -1155,16 +1155,16 @@ BOOL ImplListBoxWindow::SelectEntries( USHORT nSelect, LB_EVENT_TYPE eLET, BOOL
mpEntryList->SetSelectionAnchor( mbStackMode ? 0 : nSelect );
if ( !mpEntryList->IsEntryPosSelected( nSelect ) )
mpEntryList->SetSelectionAnchor( LISTBOX_ENTRY_NOTFOUND );
- bFocusChanged = TRUE;
- bSelectionChanged = TRUE;
+ bFocusChanged = sal_True;
+ bSelectionChanged = sal_True;
}
else if( ( ( eLET == LET_TRACKING ) && ( nSelect != mnCurrentPos ) ) ||
( (bShift||mbStackMode) && ( ( eLET == LET_KEYMOVE ) || ( eLET == LET_MBDOWN ) ) ) )
{
mnCurrentPos = nSelect;
- bFocusChanged = TRUE;
+ bFocusChanged = sal_True;
- USHORT nAnchor = mpEntryList->GetSelectionAnchor();
+ sal_uInt16 nAnchor = mpEntryList->GetSelectionAnchor();
if( ( nAnchor == LISTBOX_ENTRY_NOTFOUND ) && ( mpEntryList->GetSelectEntryCount() || mbStackMode ) )
{
nAnchor = mbStackMode ? 0 : mpEntryList->GetSelectEntryPos( mpEntryList->GetSelectEntryCount() - 1 );
@@ -1172,40 +1172,40 @@ BOOL ImplListBoxWindow::SelectEntries( USHORT nSelect, LB_EVENT_TYPE eLET, BOOL
if( nAnchor != LISTBOX_ENTRY_NOTFOUND )
{
// Alle Eintraege vom Anchor bis nSelect muessen selektiert sein
- USHORT nStart = Min( nSelect, nAnchor );
- USHORT nEnd = Max( nSelect, nAnchor );
- for ( USHORT n = nStart; n <= nEnd; n++ )
+ sal_uInt16 nStart = Min( nSelect, nAnchor );
+ sal_uInt16 nEnd = Max( nSelect, nAnchor );
+ for ( sal_uInt16 n = nStart; n <= nEnd; n++ )
{
if ( !mpEntryList->IsEntryPosSelected( n ) )
{
- SelectEntry( n, TRUE );
- bSelectionChanged = TRUE;
+ SelectEntry( n, sal_True );
+ bSelectionChanged = sal_True;
}
}
// Ggf. muss noch was deselektiert werden...
- USHORT nLast = mpEntryList->GetLastSelected();
+ sal_uInt16 nLast = mpEntryList->GetLastSelected();
if ( nLast != LISTBOX_ENTRY_NOTFOUND )
{
if ( ( nLast > nSelect ) && ( nLast > nAnchor ) )
{
- for ( USHORT n = nSelect+1; n <= nLast; n++ )
+ for ( sal_uInt16 n = nSelect+1; n <= nLast; n++ )
{
if ( mpEntryList->IsEntryPosSelected( n ) )
{
- SelectEntry( n, FALSE );
- bSelectionChanged = TRUE;
+ SelectEntry( n, sal_False );
+ bSelectionChanged = sal_True;
}
}
}
else if ( ( nLast < nSelect ) && ( nLast < nAnchor ) )
{
- for ( USHORT n = nLast; n < nSelect; n++ )
+ for ( sal_uInt16 n = nLast; n < nSelect; n++ )
{
if ( mpEntryList->IsEntryPosSelected( n ) )
{
- SelectEntry( n, FALSE );
- bSelectionChanged = TRUE;
+ SelectEntry( n, sal_False );
+ bSelectionChanged = sal_True;
}
}
}
@@ -1216,17 +1216,17 @@ BOOL ImplListBoxWindow::SelectEntries( USHORT nSelect, LB_EVENT_TYPE eLET, BOOL
else if( eLET != LET_TRACKING )
{
ImplHideFocusRect();
- ImplPaint( nSelect, TRUE );
- bFocusChanged = TRUE;
+ ImplPaint( nSelect, sal_True );
+ bFocusChanged = sal_True;
}
}
else if( bShift )
{
- bFocusChanged = TRUE;
+ bFocusChanged = sal_True;
}
if( bSelectionChanged )
- mbSelectionChanged = TRUE;
+ mbSelectionChanged = sal_True;
if( bFocusChanged )
{
@@ -1249,7 +1249,7 @@ void ImplListBoxWindow::Tracking( const TrackingEvent& rTEvt )
{
Point aPoint;
Rectangle aRect( aPoint, GetOutputSizePixel() );
- BOOL bInside = aRect.IsInside( rTEvt.GetMouseEvent().GetPosPixel() );
+ sal_Bool bInside = aRect.IsInside( rTEvt.GetMouseEvent().GetPosPixel() );
if( rTEvt.IsTrackingCanceled() || rTEvt.IsTrackingEnded() ) // MouseButtonUp
{
@@ -1263,9 +1263,9 @@ void ImplListBoxWindow::Tracking( const TrackingEvent& rTEvt )
maCancelHdl.Call( NULL );
if ( !mbMulti )
{
- mbTrackingSelect = TRUE;
- SelectEntry( mnTrackingSaveSelection, TRUE );
- mbTrackingSelect = FALSE;
+ mbTrackingSelect = sal_True;
+ SelectEntry( mnTrackingSaveSelection, sal_True );
+ mbTrackingSelect = sal_False;
if ( mnTrackingSaveSelection != LISTBOX_ENTRY_NOTFOUND )
{
long nHeightDiff = mpEntryList->GetAddedHeight( mnCurrentPos, mnTop, 0 );
@@ -1278,23 +1278,23 @@ void ImplListBoxWindow::Tracking( const TrackingEvent& rTEvt )
}
}
- mbTrack = FALSE;
+ mbTrack = sal_False;
}
else
{
- BOOL bTrackOrQuickClick = mbTrack;
+ sal_Bool bTrackOrQuickClick = mbTrack;
if( !mbTrack )
{
if ( bInside )
{
- mbTrack = TRUE;
+ mbTrack = sal_True;
}
// Folgender Fall tritt nur auf, wenn man ganz kurz die Maustaste drueckt
if( rTEvt.IsTrackingEnded() && mbTrack )
{
- bTrackOrQuickClick = TRUE;
- mbTrack = FALSE;
+ bTrackOrQuickClick = sal_True;
+ mbTrack = sal_False;
}
}
@@ -1302,10 +1302,10 @@ void ImplListBoxWindow::Tracking( const TrackingEvent& rTEvt )
{
MouseEvent aMEvt = rTEvt.GetMouseEvent();
Point aPt( aMEvt.GetPosPixel() );
- BOOL bShift = aMEvt.IsShift();
- BOOL bCtrl = aMEvt.IsMod1();
+ sal_Bool bShift = aMEvt.IsShift();
+ sal_Bool bCtrl = aMEvt.IsMod1();
- USHORT nSelect = LISTBOX_ENTRY_NOTFOUND;
+ sal_uInt16 nSelect = LISTBOX_ENTRY_NOTFOUND;
if( aPt.Y() < 0 )
{
if ( mnCurrentPos != LISTBOX_ENTRY_NOTFOUND )
@@ -1319,43 +1319,43 @@ void ImplListBoxWindow::Tracking( const TrackingEvent& rTEvt )
{
if ( mnCurrentPos != LISTBOX_ENTRY_NOTFOUND )
{
- nSelect = Min( (USHORT)(mnCurrentPos+1), (USHORT)(mpEntryList->GetEntryCount()-1) );
+ nSelect = Min( (sal_uInt16)(mnCurrentPos+1), (sal_uInt16)(mpEntryList->GetEntryCount()-1) );
if( nSelect >= GetLastVisibleEntry() )
SetTopEntry( mnTop+1 );
}
}
else
{
- nSelect = (USHORT) ( ( aPt.Y() + mnBorder ) / mnMaxHeight ) + (USHORT) mnTop;
+ nSelect = (sal_uInt16) ( ( aPt.Y() + mnBorder ) / mnMaxHeight ) + (sal_uInt16) mnTop;
nSelect = Min( nSelect, GetLastVisibleEntry() );
- nSelect = Min( nSelect, (USHORT) ( mpEntryList->GetEntryCount() - 1 ) );
+ nSelect = Min( nSelect, (sal_uInt16) ( mpEntryList->GetEntryCount() - 1 ) );
}
if ( bInside )
{
if ( ( nSelect != mnCurrentPos ) || !GetEntryList()->GetSelectEntryCount() )
{
- mbTrackingSelect = TRUE;
+ mbTrackingSelect = sal_True;
if ( SelectEntries( nSelect, LET_TRACKING, bShift, bCtrl ) )
{
if ( mbStackMode ) // #87734# (#87072#)
{
- mbTravelSelect = TRUE;
+ mbTravelSelect = sal_True;
mnSelectModifier = rTEvt.GetMouseEvent().GetModifier();
ImplCallSelect();
- mbTravelSelect = FALSE;
+ mbTravelSelect = sal_False;
}
}
- mbTrackingSelect = FALSE;
+ mbTrackingSelect = sal_False;
}
}
else
{
if ( !mbMulti && GetEntryList()->GetSelectEntryCount() )
{
- mbTrackingSelect = TRUE;
- SelectEntry( GetEntryList()->GetSelectEntryPos( 0 ), FALSE );
- mbTrackingSelect = FALSE;
+ mbTrackingSelect = sal_True;
+ SelectEntry( GetEntryList()->GetSelectEntryPos( 0 ), sal_False );
+ mbTrackingSelect = sal_False;
}
else if ( mbStackMode )
{
@@ -1363,32 +1363,32 @@ void ImplListBoxWindow::Tracking( const TrackingEvent& rTEvt )
{
if ( ( rTEvt.GetMouseEvent().GetPosPixel().Y() < 0 ) || ( rTEvt.GetMouseEvent().GetPosPixel().Y() > GetOutputSizePixel().Height() ) )
{
- BOOL bSelectionChanged = FALSE;
+ sal_Bool bSelectionChanged = sal_False;
if ( ( rTEvt.GetMouseEvent().GetPosPixel().Y() < 0 )
&& !mnCurrentPos )
{
if ( mpEntryList->IsEntryPosSelected( 0 ) )
{
- SelectEntry( 0, FALSE );
- bSelectionChanged = TRUE;
+ SelectEntry( 0, sal_False );
+ bSelectionChanged = sal_True;
nSelect = LISTBOX_ENTRY_NOTFOUND;
}
}
else
{
- mbTrackingSelect = TRUE;
+ mbTrackingSelect = sal_True;
bSelectionChanged = SelectEntries( nSelect, LET_TRACKING, bShift, bCtrl );
- mbTrackingSelect = FALSE;
+ mbTrackingSelect = sal_False;
}
if ( bSelectionChanged )
{
- mbSelectionChanged = TRUE;
- mbTravelSelect = TRUE;
+ mbSelectionChanged = sal_True;
+ mbTravelSelect = sal_True;
mnSelectModifier = rTEvt.GetMouseEvent().GetModifier();
ImplCallSelect();
- mbTravelSelect = FALSE;
+ mbTravelSelect = sal_False;
}
}
}
@@ -1426,18 +1426,18 @@ void ImplListBoxWindow::KeyInput( const KeyEvent& rKEvt )
#define IMPL_SELECT_UP 1
#define IMPL_SELECT_DOWN 2
-BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
+sal_Bool ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
{
// zu selektierender Eintrag
- USHORT nSelect = LISTBOX_ENTRY_NOTFOUND;
+ sal_uInt16 nSelect = LISTBOX_ENTRY_NOTFOUND;
LB_EVENT_TYPE eLET = LET_KEYMOVE;
KeyCode aKeyCode = rKEvt.GetKeyCode();
- BOOL bShift = aKeyCode.IsShift();
- BOOL bCtrl = aKeyCode.IsMod1() || aKeyCode.IsMod3();
- BOOL bMod2 = aKeyCode.IsMod2();
- BOOL bDone = FALSE;
+ sal_Bool bShift = aKeyCode.IsShift();
+ sal_Bool bCtrl = aKeyCode.IsMod1() || aKeyCode.IsMod3();
+ sal_Bool bMod2 = aKeyCode.IsMod2();
+ sal_Bool bDone = sal_False;
switch( aKeyCode.GetCode() )
{
@@ -1463,7 +1463,7 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
if( ( nSelect != LISTBOX_ENTRY_NOTFOUND ) && ( nSelect < mnTop ) )
SetTopEntry( mnTop-1 );
- bDone = TRUE;
+ bDone = sal_True;
}
maSearchStr.Erase();
}
@@ -1490,7 +1490,7 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
if( ( nSelect != LISTBOX_ENTRY_NOTFOUND ) && ( nSelect >= GetLastVisibleEntry() ) )
SetTopEntry( mnTop+1 );
- bDone = TRUE;
+ bDone = sal_True;
}
maSearchStr.Erase();
}
@@ -1500,7 +1500,7 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
{
if ( IsReadOnly() )
{
- USHORT nCurVis = GetLastVisibleEntry() - mnTop +1;
+ sal_uInt16 nCurVis = GetLastVisibleEntry() - mnTop +1;
SetTopEntry( ( mnTop > nCurVis ) ?
(mnTop-nCurVis) : 0 );
}
@@ -1514,14 +1514,14 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
{
if( mnCurrentPos == mnTop )
{
- USHORT nCurVis = GetLastVisibleEntry() - mnTop +1;
+ sal_uInt16 nCurVis = GetLastVisibleEntry() - mnTop +1;
SetTopEntry( ( mnTop > nCurVis ) ? ( mnTop-nCurVis+1 ) : 0 );
}
// find first selectable starting from mnTop looking foreward
nSelect = mpEntryList->FindFirstSelectable( mnTop, true );
}
- bDone = TRUE;
+ bDone = sal_True;
}
maSearchStr.Erase();
}
@@ -1541,21 +1541,21 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
}
else if ( (mnCurrentPos+1) < mpEntryList->GetEntryCount() )
{
- USHORT nCount = mpEntryList->GetEntryCount();
- USHORT nCurVis = GetLastVisibleEntry() - mnTop;
- USHORT nTmp = Min( nCurVis, nCount );
+ sal_uInt16 nCount = mpEntryList->GetEntryCount();
+ sal_uInt16 nCurVis = GetLastVisibleEntry() - mnTop;
+ sal_uInt16 nTmp = Min( nCurVis, nCount );
nTmp += mnTop - 1;
if( mnCurrentPos == nTmp && mnCurrentPos != nCount - 1 )
{
long nTmp2 = Min( (long)(nCount-nCurVis), (long)((long)mnTop+(long)nCurVis-1) );
nTmp2 = Max( (long)0 , nTmp2 );
- nTmp = (USHORT)(nTmp2+(nCurVis-1) );
- SetTopEntry( (USHORT)nTmp2 );
+ nTmp = (sal_uInt16)(nTmp2+(nCurVis-1) );
+ SetTopEntry( (sal_uInt16)nTmp2 );
}
// find first selectable starting from nTmp looking backwards
nSelect = mpEntryList->FindFirstSelectable( nTmp, false );
}
- bDone = TRUE;
+ bDone = sal_True;
}
maSearchStr.Erase();
}
@@ -1575,7 +1575,7 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
if( mnTop != 0 )
SetTopEntry( 0 );
- bDone = TRUE;
+ bDone = sal_True;
}
}
maSearchStr.Erase();
@@ -1596,13 +1596,13 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
}
else if ( (mnCurrentPos+1) < mpEntryList->GetEntryCount() )
{
- USHORT nCount = mpEntryList->GetEntryCount();
+ sal_uInt16 nCount = mpEntryList->GetEntryCount();
nSelect = mpEntryList->FindFirstSelectable( nCount - 1, false );
- USHORT nCurVis = GetLastVisibleEntry() - mnTop + 1;
+ sal_uInt16 nCurVis = GetLastVisibleEntry() - mnTop + 1;
if( nCount > nCurVis )
SetTopEntry( nCount - nCurVis );
}
- bDone = TRUE;
+ bDone = sal_True;
}
maSearchStr.Erase();
}
@@ -1613,7 +1613,7 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
if ( !bCtrl && !bMod2 )
{
ScrollHorz( -HORZ_SCROLL );
- bDone = TRUE;
+ bDone = sal_True;
}
maSearchStr.Erase();
}
@@ -1624,7 +1624,7 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
if ( !bCtrl && !bMod2 )
{
ScrollHorz( HORZ_SCROLL );
- bDone = TRUE;
+ bDone = sal_True;
}
maSearchStr.Erase();
}
@@ -1636,7 +1636,7 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
{
mnSelectModifier = rKEvt.GetKeyCode().GetModifier();
ImplCallSelect();
- bDone = FALSE; // RETURN nicht abfangen.
+ bDone = sal_False; // RETURN nicht abfangen.
}
maSearchStr.Erase();
}
@@ -1651,7 +1651,7 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
nSelect = mnCurrentPos;
eLET = LET_KEYSPACE;
}
- bDone = TRUE;
+ bDone = sal_True;
}
maSearchStr.Erase();
}
@@ -1662,12 +1662,12 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
if( bCtrl && mbMulti )
{
// paint only once
- BOOL bUpdates = IsUpdateMode();
- SetUpdateMode( FALSE );
+ sal_Bool bUpdates = IsUpdateMode();
+ SetUpdateMode( sal_False );
- USHORT nEntryCount = mpEntryList->GetEntryCount();
- for( USHORT i = 0; i < nEntryCount; i++ )
- SelectEntry( i, TRUE );
+ sal_uInt16 nEntryCount = mpEntryList->GetEntryCount();
+ for( sal_uInt16 i = 0; i < nEntryCount; i++ )
+ SelectEntry( i, sal_True );
// restore update mode
SetUpdateMode( bUpdates );
@@ -1675,7 +1675,7 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
maSearchStr.Erase();
- bDone = TRUE;
+ bDone = sal_True;
break;
}
}
@@ -1693,8 +1693,8 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
if ( (nSelect == LISTBOX_ENTRY_NOTFOUND) && (aTmpSearch.Len() > 1) )
{
// Wenn alles die gleichen Buchstaben, dann anderer Such-Modus
- BOOL bAllEqual = TRUE;
- for ( USHORT n = aTmpSearch.Len(); n && bAllEqual; )
+ sal_Bool bAllEqual = sal_True;
+ for ( sal_uInt16 n = aTmpSearch.Len(); n && bAllEqual; )
bAllEqual = aTmpSearch.GetChar( --n ) == c;
if ( bAllEqual )
{
@@ -1716,7 +1716,7 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
}
else
maSearchStr.Erase();
- bDone = TRUE;
+ bDone = sal_True;
}
}
}
@@ -1733,10 +1733,10 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
mnCurrentPos = nSelect;
if ( SelectEntries( nSelect, eLET, bShift, bCtrl ) )
{
- mbTravelSelect = TRUE;
+ mbTravelSelect = sal_True;
mnSelectModifier = rKEvt.GetKeyCode().GetModifier();
ImplCallSelect();
- mbTravelSelect = FALSE;
+ mbTravelSelect = sal_False;
}
}
@@ -1745,7 +1745,7 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
// -----------------------------------------------------------------------
-void ImplListBoxWindow::ImplPaint( USHORT nPos, BOOL bErase, bool bLayout )
+void ImplListBoxWindow::ImplPaint( sal_uInt16 nPos, sal_Bool bErase, bool bLayout )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
@@ -1768,7 +1768,7 @@ void ImplListBoxWindow::ImplPaint( USHORT nPos, BOOL bErase, bool bLayout )
}
else
{
- ImplInitSettings( FALSE, TRUE, FALSE );
+ ImplInitSettings( sal_False, sal_True, sal_False );
if( !IsEnabled() )
SetTextColor( rStyleSettings.GetDisableColor() );
SetTextFillColor();
@@ -1779,25 +1779,25 @@ void ImplListBoxWindow::ImplPaint( USHORT nPos, BOOL bErase, bool bLayout )
if ( IsUserDrawEnabled() )
{
- mbInUserDraw = TRUE;
+ mbInUserDraw = sal_True;
mnUserDrawEntry = nPos;
aRect.Left() -= mnLeft;
if ( nPos < GetEntryList()->GetMRUCount() )
nPos = GetEntryList()->FindEntry( GetEntryList()->GetEntryText( nPos ) );
- nPos = sal::static_int_cast<USHORT>(nPos - GetEntryList()->GetMRUCount());
+ nPos = sal::static_int_cast<sal_uInt16>(nPos - GetEntryList()->GetMRUCount());
UserDrawEvent aUDEvt( this, aRect, nPos, 0 );
maUserDrawHdl.Call( &aUDEvt );
- mbInUserDraw = FALSE;
+ mbInUserDraw = sal_False;
}
else
{
- DrawEntry( nPos, TRUE, TRUE, FALSE, bLayout );
+ DrawEntry( nPos, sal_True, sal_True, sal_False, bLayout );
}
}
// -----------------------------------------------------------------------
-void ImplListBoxWindow::DrawEntry( USHORT nPos, BOOL bDrawImage, BOOL bDrawText, BOOL bDrawTextAtImagePos, bool bLayout )
+void ImplListBoxWindow::DrawEntry( sal_uInt16 nPos, sal_Bool bDrawImage, sal_Bool bDrawText, sal_Bool bDrawTextAtImagePos, bool bLayout )
{
const ImplEntryType* pEntry = mpEntryList->GetEntryPtr( nPos );
if( ! pEntry )
@@ -1871,7 +1871,7 @@ void ImplListBoxWindow::DrawEntry( USHORT nPos, BOOL bDrawImage, BOOL bDrawText,
aTextRect.Left() -= ( aImgSz.Width() + IMG_TXT_DISTANCE );
}
- USHORT nDrawStyle = ImplGetTextStyle();
+ sal_uInt16 nDrawStyle = ImplGetTextStyle();
if( (pEntry->mnFlags & LISTBOX_ENTRY_FLAG_MULTILINE) )
nDrawStyle |= MULTILINE_ENTRY_DRAW_FLAGS;
if( (pEntry->mnFlags & LISTBOX_ENTRY_FLAG_DRAW_DISABLED) )
@@ -1912,22 +1912,22 @@ void ImplListBoxWindow::FillLayoutData() const
void ImplListBoxWindow::ImplDoPaint( const Rectangle& rRect, bool bLayout )
{
- USHORT nCount = mpEntryList->GetEntryCount();
+ sal_uInt16 nCount = mpEntryList->GetEntryCount();
- BOOL bShowFocusRect = mbHasFocusRect;
+ sal_Bool bShowFocusRect = mbHasFocusRect;
if ( mbHasFocusRect && ! bLayout )
ImplHideFocusRect();
long nY = 0; // + mnBorder;
long nHeight = GetOutputSizePixel().Height();// - mnMaxHeight + mnBorder;
- for( USHORT i = (USHORT)mnTop; i < nCount && nY < nHeight + mnMaxHeight; i++ )
+ for( sal_uInt16 i = (sal_uInt16)mnTop; i < nCount && nY < nHeight + mnMaxHeight; i++ )
{
const ImplEntryType* pEntry = mpEntryList->GetEntryPtr( i );
if( nY + pEntry->mnHeight >= rRect.Top() &&
nY <= rRect.Bottom() + mnMaxHeight )
{
- ImplPaint( i, FALSE, bLayout );
+ ImplPaint( i, sal_False, bLayout );
}
nY += pEntry->mnHeight;
}
@@ -1949,13 +1949,13 @@ void ImplListBoxWindow::Paint( const Rectangle& rRect )
// -----------------------------------------------------------------------
-USHORT ImplListBoxWindow::GetDisplayLineCount() const
+sal_uInt16 ImplListBoxWindow::GetDisplayLineCount() const
{
// FIXME: LISTBOX_ENTRY_FLAG_MULTILINE
- USHORT nCount = mpEntryList->GetEntryCount();
+ sal_uInt16 nCount = mpEntryList->GetEntryCount();
long nHeight = GetOutputSizePixel().Height();// - mnMaxHeight + mnBorder;
- USHORT nEntries = static_cast< USHORT >( ( nHeight + mnMaxHeight - 1 ) / mnMaxHeight );
+ sal_uInt16 nEntries = static_cast< sal_uInt16 >( ( nHeight + mnMaxHeight - 1 ) / mnMaxHeight );
if( nEntries > nCount-mnTop )
nEntries = nCount-mnTop;
@@ -1968,7 +1968,7 @@ void ImplListBoxWindow::Resize()
{
Control::Resize();
- BOOL bShowFocusRect = mbHasFocusRect;
+ sal_Bool bShowFocusRect = mbHasFocusRect;
if ( bShowFocusRect )
ImplHideFocusRect();
@@ -1988,7 +1988,7 @@ void ImplListBoxWindow::Resize()
void ImplListBoxWindow::GetFocus()
{
- USHORT nPos = mnCurrentPos;
+ sal_uInt16 nPos = mnCurrentPos;
if ( nPos == LISTBOX_ENTRY_NOTFOUND )
nPos = 0;
long nHeightDiff = mpEntryList->GetAddedHeight( nPos, mnTop, 0 );
@@ -2021,14 +2021,14 @@ void ImplListBoxWindow::RequestHelp( const HelpEvent& rHEvt )
// -----------------------------------------------------------------------
-void ImplListBoxWindow::SetTopEntry( USHORT nTop )
+void ImplListBoxWindow::SetTopEntry( sal_uInt16 nTop )
{
if( mpEntryList->GetEntryCount() == 0 )
return;
long nWHeight = PixelToLogic( GetSizePixel() ).Height();
- USHORT nLastEntry = mpEntryList->GetEntryCount()-1;
+ sal_uInt16 nLastEntry = mpEntryList->GetEntryCount()-1;
if( nTop > nLastEntry )
nTop = nLastEntry;
const ImplEntryType* pLast = mpEntryList->GetEntryPtr( nLastEntry );
@@ -2054,11 +2054,11 @@ void ImplListBoxWindow::SetTopEntry( USHORT nTop )
// -----------------------------------------------------------------------
-void ImplListBoxWindow::ShowProminentEntry( USHORT nEntryPos )
+void ImplListBoxWindow::ShowProminentEntry( sal_uInt16 nEntryPos )
{
if( meProminentType == PROMINENT_MIDDLE )
{
- USHORT nPos = nEntryPos;
+ sal_uInt16 nPos = nEntryPos;
long nWHeight = PixelToLogic( GetSizePixel() ).Height();
while( nEntryPos > 0 && mpEntryList->GetAddedHeight( nPos+1, nEntryPos ) < nWHeight/2 )
nEntryPos--;
@@ -2096,7 +2096,7 @@ void ImplListBoxWindow::ScrollHorz( long n )
if ( nDiff )
{
ImplClearLayoutData();
- mnLeft = sal::static_int_cast<USHORT>(mnLeft + nDiff);
+ mnLeft = sal::static_int_cast<sal_uInt16>(mnLeft + nDiff);
Update();
ImplHideFocusRect();
Scroll( -nDiff, 0 );
@@ -2109,12 +2109,12 @@ void ImplListBoxWindow::ScrollHorz( long n )
// -----------------------------------------------------------------------
-Size ImplListBoxWindow::CalcSize( USHORT nMaxLines ) const
+Size ImplListBoxWindow::CalcSize( sal_uInt16 nMaxLines ) const
{
// FIXME: LISTBOX_ENTRY_FLAG_MULTILINE
Size aSz;
-// USHORT nL = Min( nMaxLines, mpEntryList->GetEntryCount() );
+// sal_uInt16 nL = Min( nMaxLines, mpEntryList->GetEntryCount() );
aSz.Height() = nMaxLines * mnMaxHeight;
aSz.Width() = mnMaxWidth + 2*mnBorder;
return aSz;
@@ -2122,7 +2122,7 @@ Size ImplListBoxWindow::CalcSize( USHORT nMaxLines ) const
// -----------------------------------------------------------------------
-Rectangle ImplListBoxWindow::GetBoundingRectangle( USHORT nItem ) const
+Rectangle ImplListBoxWindow::GetBoundingRectangle( sal_uInt16 nItem ) const
{
const ImplEntryType* pEntry = mpEntryList->GetEntryPtr( nItem );
Size aSz( GetSizePixel().Width(), pEntry ? pEntry->mnHeight : GetEntryHeight() );
@@ -2140,7 +2140,7 @@ void ImplListBoxWindow::StateChanged( StateChangedType nType )
if ( nType == STATE_CHANGE_ZOOM )
{
- ImplInitSettings( TRUE, FALSE, FALSE );
+ ImplInitSettings( sal_True, sal_False, sal_False );
ImplCalcMetrics();
Invalidate();
}
@@ -2151,18 +2151,18 @@ void ImplListBoxWindow::StateChanged( StateChangedType nType )
}
else if ( nType == STATE_CHANGE_CONTROLFONT )
{
- ImplInitSettings( TRUE, FALSE, FALSE );
+ ImplInitSettings( sal_True, sal_False, sal_False );
ImplCalcMetrics();
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();
}
ImplClearLayoutData();
@@ -2180,7 +2180,7 @@ void ImplListBoxWindow::DataChanged( const DataChangedEvent& rDCEvt )
(rDCEvt.GetFlags() & SETTINGS_STYLE)) )
{
ImplClearLayoutData();
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
ImplCalcMetrics();
Invalidate();
}
@@ -2188,9 +2188,9 @@ void ImplListBoxWindow::DataChanged( const DataChangedEvent& rDCEvt )
// -----------------------------------------------------------------------
-USHORT ImplListBoxWindow::ImplGetTextStyle() const
+sal_uInt16 ImplListBoxWindow::ImplGetTextStyle() const
{
- USHORT nTextStyle = TEXT_DRAW_VCENTER;
+ sal_uInt16 nTextStyle = TEXT_DRAW_VCENTER;
if ( mpEntryList->HasImages() )
nTextStyle |= TEXT_DRAW_LEFT;
@@ -2221,9 +2221,9 @@ ImplListBox::ImplListBox( Window* pParent, WinBits nWinStyle ) :
mpVScrollBar->SetScrollHdl( aLink );
mpHScrollBar->SetScrollHdl( aLink );
- mbVScroll = FALSE;
- mbHScroll = FALSE;
- mbAutoHScroll = ( nWinStyle & WB_AUTOHSCROLL ) ? TRUE : FALSE;
+ mbVScroll = sal_False;
+ mbHScroll = sal_False;
+ mbAutoHScroll = ( nWinStyle & WB_AUTOHSCROLL ) ? sal_True : sal_False;
maLBWindow.SetScrollHdl( LINK( this, ImplListBox, LBWindowScrolled ) );
maLBWindow.SetMRUChangedHdl( LINK( this, ImplListBox, MRUChanged ) );
@@ -2256,37 +2256,37 @@ void ImplListBox::Clear()
// -----------------------------------------------------------------------
-USHORT ImplListBox::InsertEntry( USHORT nPos, const XubString& rStr )
+sal_uInt16 ImplListBox::InsertEntry( sal_uInt16 nPos, const XubString& rStr )
{
ImplEntryType* pNewEntry = new ImplEntryType( rStr );
- USHORT nNewPos = maLBWindow.InsertEntry( nPos, pNewEntry );
+ sal_uInt16 nNewPos = maLBWindow.InsertEntry( nPos, pNewEntry );
StateChanged( STATE_CHANGE_DATA );
return nNewPos;
}
// -----------------------------------------------------------------------
-USHORT ImplListBox::InsertEntry( USHORT nPos, const Image& rImage )
+sal_uInt16 ImplListBox::InsertEntry( sal_uInt16 nPos, const Image& rImage )
{
ImplEntryType* pNewEntry = new ImplEntryType( rImage );
- USHORT nNewPos = maLBWindow.InsertEntry( nPos, pNewEntry );
+ sal_uInt16 nNewPos = maLBWindow.InsertEntry( nPos, pNewEntry );
StateChanged( STATE_CHANGE_DATA );
return nNewPos;
}
// -----------------------------------------------------------------------
-USHORT ImplListBox::InsertEntry( USHORT nPos, const XubString& rStr, const Image& rImage )
+sal_uInt16 ImplListBox::InsertEntry( sal_uInt16 nPos, const XubString& rStr, const Image& rImage )
{
ImplEntryType* pNewEntry = new ImplEntryType( rStr, rImage );
- USHORT nNewPos = maLBWindow.InsertEntry( nPos, pNewEntry );
+ sal_uInt16 nNewPos = maLBWindow.InsertEntry( nPos, pNewEntry );
StateChanged( STATE_CHANGE_DATA );
return nNewPos;
}
// -----------------------------------------------------------------------
-void ImplListBox::RemoveEntry( USHORT nPos )
+void ImplListBox::RemoveEntry( sal_uInt16 nPos )
{
maLBWindow.RemoveEntry( nPos );
StateChanged( STATE_CHANGE_DATA );
@@ -2294,21 +2294,21 @@ void ImplListBox::RemoveEntry( USHORT nPos )
// -----------------------------------------------------------------------
-void ImplListBox::SetEntryFlags( USHORT nPos, long nFlags )
+void ImplListBox::SetEntryFlags( sal_uInt16 nPos, long nFlags )
{
maLBWindow.SetEntryFlags( nPos, nFlags );
}
// -----------------------------------------------------------------------
-long ImplListBox::GetEntryFlags( USHORT nPos ) const
+long ImplListBox::GetEntryFlags( sal_uInt16 nPos ) const
{
return maLBWindow.GetEntryList()->GetEntryFlags( nPos );
}
// -----------------------------------------------------------------------
-void ImplListBox::SelectEntry( USHORT nPos, BOOL bSelect )
+void ImplListBox::SelectEntry( sal_uInt16 nPos, sal_Bool bSelect )
{
maLBWindow.SelectEntry( nPos, bSelect );
}
@@ -2368,7 +2368,7 @@ IMPL_LINK( ImplListBox, LBWindowScrolled, void*, EMPTYARG )
IMPL_LINK( ImplListBox, ScrollBarHdl, ScrollBar*, pSB )
{
- USHORT nPos = (USHORT) pSB->GetThumbPos();
+ sal_uInt16 nPos = (sal_uInt16) pSB->GetThumbPos();
if( pSB == mpVScrollBar )
SetTopEntry( nPos );
else if( pSB == mpHScrollBar )
@@ -2381,18 +2381,18 @@ IMPL_LINK( ImplListBox, ScrollBarHdl, ScrollBar*, pSB )
void ImplListBox::ImplCheckScrollBars()
{
- BOOL bArrange = FALSE;
+ sal_Bool bArrange = sal_False;
Size aOutSz = GetOutputSizePixel();
- USHORT nEntries = GetEntryList()->GetEntryCount();
- USHORT nMaxVisEntries = (USHORT) (aOutSz.Height() / GetEntryHeight());
+ sal_uInt16 nEntries = GetEntryList()->GetEntryCount();
+ sal_uInt16 nMaxVisEntries = (sal_uInt16) (aOutSz.Height() / GetEntryHeight());
// vert. ScrollBar
if( nEntries > nMaxVisEntries )
{
if( !mbVScroll )
- bArrange = TRUE;
- mbVScroll = TRUE;
+ bArrange = sal_True;
+ mbVScroll = sal_True;
// Ueberpruefung des rausgescrollten Bereichs
SetTopEntry( GetTopEntry() ); // MaxTop wird geprueft...
@@ -2400,15 +2400,15 @@ void ImplListBox::ImplCheckScrollBars()
else
{
if( mbVScroll )
- bArrange = TRUE;
- mbVScroll = FALSE;
+ bArrange = sal_True;
+ mbVScroll = sal_False;
SetTopEntry( 0 );
}
// horz. ScrollBar
if( mbAutoHScroll )
{
- long nWidth = (USHORT) aOutSz.Width();
+ long nWidth = (sal_uInt16) aOutSz.Width();
if ( mbVScroll )
nWidth -= mpVScrollBar->GetSizePixel().Width();
@@ -2416,16 +2416,16 @@ void ImplListBox::ImplCheckScrollBars()
if( nWidth < nMaxWidth )
{
if( !mbHScroll )
- bArrange = TRUE;
- mbHScroll = TRUE;
+ bArrange = sal_True;
+ mbHScroll = sal_True;
if ( !mbVScroll ) // ggf. brauchen wir jetzt doch einen
{
- nMaxVisEntries = (USHORT) ( ( aOutSz.Height() - mpHScrollBar->GetSizePixel().Height() ) / GetEntryHeight() );
+ nMaxVisEntries = (sal_uInt16) ( ( aOutSz.Height() - mpHScrollBar->GetSizePixel().Height() ) / GetEntryHeight() );
if( nEntries > nMaxVisEntries )
{
- bArrange = TRUE;
- mbVScroll = TRUE;
+ bArrange = sal_True;
+ mbVScroll = sal_True;
// Ueberpruefung des rausgescrollten Bereichs
SetTopEntry( GetTopEntry() ); // MaxTop wird geprueft...
@@ -2433,15 +2433,15 @@ void ImplListBox::ImplCheckScrollBars()
}
// Ueberpruefung des rausgescrollten Bereichs
- USHORT nMaxLI = (USHORT) (nMaxWidth - nWidth);
+ sal_uInt16 nMaxLI = (sal_uInt16) (nMaxWidth - nWidth);
if ( nMaxLI < GetLeftIndent() )
SetLeftIndent( nMaxLI );
}
else
{
if( mbHScroll )
- bArrange = TRUE;
- mbHScroll = FALSE;
+ bArrange = sal_True;
+ mbHScroll = sal_False;
SetLeftIndent( 0 );
}
}
@@ -2460,8 +2460,8 @@ void ImplListBox::ImplInitScrollBars()
if ( mbVScroll )
{
- USHORT nEntries = GetEntryList()->GetEntryCount();
- USHORT nVisEntries = (USHORT) (aOutSz.Height() / GetEntryHeight());
+ sal_uInt16 nEntries = GetEntryList()->GetEntryCount();
+ sal_uInt16 nVisEntries = (sal_uInt16) (aOutSz.Height() / GetEntryHeight());
mpVScrollBar->SetRangeMax( nEntries );
mpVScrollBar->SetVisibleSize( nVisEntries );
mpVScrollBar->SetPageSize( nVisEntries - 1 );
@@ -2470,7 +2470,7 @@ void ImplListBox::ImplInitScrollBars()
if ( mbHScroll )
{
mpHScrollBar->SetRangeMax( GetMaxEntryWidth() + HORZ_SCROLL );
- mpHScrollBar->SetVisibleSize( (USHORT)aOutSz.Width() );
+ mpHScrollBar->SetVisibleSize( (sal_uInt16)aOutSz.Width() );
mpHScrollBar->SetLineSize( HORZ_SCROLL );
mpHScrollBar->SetPageSize( aOutSz.Width() - HORZ_SCROLL );
}
@@ -2495,7 +2495,7 @@ void ImplListBox::ImplResizeControls()
// pb: #106948# explicit mirroring for calc
// Scrollbar on left or right side?
- BOOL bMirroring = maLBWindow.IsMirroring();
+ sal_Bool bMirroring = maLBWindow.IsMirroring();
Point aWinPos( bMirroring && mbVScroll ? nSBWidth : 0, 0 );
maLBWindow.SetPosSizePixel( aWinPos, aInnerSz );
@@ -2550,7 +2550,7 @@ void ImplListBox::StateChanged( StateChangedType nType )
}
else if ( ( nType == STATE_CHANGE_UPDATEMODE ) || ( nType == STATE_CHANGE_DATA ) )
{
- BOOL bUpdate = IsUpdateMode();
+ sal_Bool bUpdate = IsUpdateMode();
maLBWindow.SetUpdateMode( bUpdate );
// mpHScrollBar->SetUpdateMode( bUpdate );
// mpVScrollBar->SetUpdateMode( bUpdate );
@@ -2636,15 +2636,15 @@ const Wallpaper& ImplListBox::GetDisplayBackground() const
// -----------------------------------------------------------------------
-BOOL ImplListBox::HandleWheelAsCursorTravel( const CommandEvent& rCEvt )
+sal_Bool ImplListBox::HandleWheelAsCursorTravel( const CommandEvent& rCEvt )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
if ( rCEvt.GetCommand() == COMMAND_WHEEL )
{
const CommandWheelData* pData = rCEvt.GetWheelData();
if( !pData->GetModifier() && ( pData->GetMode() == COMMAND_WHEEL_SCROLL ) )
{
- USHORT nKey = ( pData->GetDelta() < 0 ) ? KEY_DOWN : KEY_UP;
+ sal_uInt16 nKey = ( pData->GetDelta() < 0 ) ? KEY_DOWN : KEY_UP;
KeyEvent aKeyEvent( 0, KeyCode( nKey ) );
bDone = ProcessKeyInput( aKeyEvent );
}
@@ -2656,23 +2656,23 @@ BOOL ImplListBox::HandleWheelAsCursorTravel( const CommandEvent& rCEvt )
void ImplListBox::SetMRUEntries( const XubString& rEntries, xub_Unicode cSep )
{
- BOOL bChanges = GetEntryList()->GetMRUCount() ? TRUE : FALSE;
+ sal_Bool bChanges = GetEntryList()->GetMRUCount() ? sal_True : sal_False;
// Remove old MRU entries
- for ( USHORT n = GetEntryList()->GetMRUCount();n; )
+ for ( sal_uInt16 n = GetEntryList()->GetMRUCount();n; )
maLBWindow.RemoveEntry( --n );
- USHORT nMRUCount = 0;
- USHORT nEntries = rEntries.GetTokenCount( cSep );
- for ( USHORT nEntry = 0; nEntry < nEntries; nEntry++ )
+ sal_uInt16 nMRUCount = 0;
+ sal_uInt16 nEntries = rEntries.GetTokenCount( cSep );
+ for ( sal_uInt16 nEntry = 0; nEntry < nEntries; nEntry++ )
{
XubString aEntry = rEntries.GetToken( nEntry, cSep );
// Accept only existing entries
if ( GetEntryList()->FindEntry( aEntry ) != LISTBOX_ENTRY_NOTFOUND )
{
ImplEntryType* pNewEntry = new ImplEntryType( aEntry );
- maLBWindow.GetEntryList()->InsertEntry( nMRUCount++, pNewEntry, FALSE );
- bChanges = TRUE;
+ maLBWindow.GetEntryList()->InsertEntry( nMRUCount++, pNewEntry, sal_False );
+ bChanges = sal_True;
}
}
@@ -2689,7 +2689,7 @@ void ImplListBox::SetMRUEntries( const XubString& rEntries, xub_Unicode cSep )
XubString ImplListBox::GetMRUEntries( xub_Unicode cSep ) const
{
String aEntries;
- for ( USHORT n = 0; n < GetEntryList()->GetMRUCount(); n++ )
+ for ( sal_uInt16 n = 0; n < GetEntryList()->GetMRUCount(); n++ )
{
aEntries += GetEntryList()->GetEntryText( n );
if( n < ( GetEntryList()->GetMRUCount() - 1 ) )
@@ -2709,22 +2709,22 @@ ImplWin::ImplWin( Window* pParent, WinBits nWinStyle ) :
else
SetBackground( Wallpaper( GetSettings().GetStyleSettings().GetFieldColor() ) );
- mbInUserDraw = FALSE;
- mbUserDrawEnabled = FALSE;
+ mbInUserDraw = sal_False;
+ mbUserDrawEnabled = sal_False;
mnItemPos = LISTBOX_ENTRY_NOTFOUND;
}
// -----------------------------------------------------------------------
-BOOL ImplWin::SetModeImage( const Image& rImage, BmpColorMode eMode )
+sal_Bool ImplWin::SetModeImage( const Image& rImage, BmpColorMode eMode )
{
if( eMode == BMP_COLOR_NORMAL )
SetImage( rImage );
else if( eMode == BMP_COLOR_HIGHCONTRAST )
maImageHC = rImage;
else
- return FALSE;
- return TRUE;
+ return sal_False;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -2794,7 +2794,7 @@ void ImplWin::ImplDraw( bool bLayout )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- BOOL bNativeOK = FALSE;
+ sal_Bool bNativeOK = sal_False;
if( ! bLayout )
{
@@ -2821,11 +2821,11 @@ void ImplWin::ImplDraw( bool bLayout )
Point aPoint( -nLeft, -nTop );
Region aCtrlRegion( Rectangle( aPoint - GetPosPixel(), pWin->GetSizePixel() ) );
- BOOL bMouseOver = FALSE;
+ sal_Bool bMouseOver = sal_False;
if( GetParent() )
{
Window *pChild = GetParent()->GetWindow( WINDOW_FIRSTCHILD );
- while( pChild && (bMouseOver = pChild->IsMouseOver()) == FALSE )
+ while( pChild && (bMouseOver = pChild->IsMouseOver()) == sal_False )
pChild = pChild->GetWindow( WINDOW_NEXT );
}
@@ -2879,14 +2879,14 @@ void ImplWin::ImplDraw( bool bLayout )
if ( IsUserDrawEnabled() )
{
- mbInUserDraw = TRUE;
+ mbInUserDraw = sal_True;
UserDrawEvent aUDEvt( this, maFocusRect, mnItemPos, 0 );
maUserDrawHdl.Call( &aUDEvt );
- mbInUserDraw = FALSE;
+ mbInUserDraw = sal_False;
}
else
{
- DrawEntry( TRUE, TRUE, FALSE, bLayout );
+ DrawEntry( sal_True, sal_True, sal_False, bLayout );
}
}
@@ -2899,15 +2899,15 @@ void ImplWin::Paint( const Rectangle& )
// -----------------------------------------------------------------------
-void ImplWin::DrawEntry( BOOL bDrawImage, BOOL bDrawText, BOOL bDrawTextAtImagePos, bool bLayout )
+void ImplWin::DrawEntry( sal_Bool bDrawImage, sal_Bool bDrawText, sal_Bool bDrawTextAtImagePos, bool bLayout )
{
long nBorder = 1;
Size aOutSz = GetOutputSizePixel();
- BOOL bImage = !!maImage;
+ sal_Bool bImage = !!maImage;
if( bDrawImage && bImage && !bLayout )
{
- USHORT nStyle = 0;
+ sal_uInt16 nStyle = 0;
Size aImgSz = maImage.GetSizePixel();
Point aPtImg( nBorder, ( ( aOutSz.Height() - aImgSz.Height() ) / 2 ) );
@@ -2934,7 +2934,7 @@ void ImplWin::DrawEntry( BOOL bDrawImage, BOOL bDrawText, BOOL bDrawTextAtImageP
if( bDrawText && maString.Len() )
{
- USHORT nTextStyle = TEXT_DRAW_VCENTER;
+ sal_uInt16 nTextStyle = TEXT_DRAW_VCENTER;
if ( bDrawImage && bImage && !bLayout )
nTextStyle |= TEXT_DRAW_LEFT;
@@ -3013,7 +3013,7 @@ void ImplWin::LoseFocus()
ImplBtn::ImplBtn( Window* pParent, WinBits nWinStyle ) :
PushButton( pParent, nWinStyle ),
- mbDown ( FALSE )
+ mbDown ( sal_False )
{
}
@@ -3033,7 +3033,7 @@ void ImplBtn::MouseButtonDown( const MouseEvent& )
if( IsEnabled() )
{
MBDown();
- mbDown = TRUE;
+ mbDown = sal_True;
}
}
@@ -3044,7 +3044,7 @@ ImplListBoxFloatingWindow::ImplListBoxFloatingWindow( Window* pParent ) :
{
mpImplLB = NULL;
mnDDLineCount = 0;
- mbAutoWidth = FALSE;
+ mbAutoWidth = sal_False;
mnPopupModeStartSaveSelection = LISTBOX_ENTRY_NOTFOUND;
@@ -3069,7 +3069,7 @@ long ImplListBoxFloatingWindow::PreNotify( NotifyEvent& rNEvt )
{
if( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
- if( !GetParent()->HasChildPathFocus( TRUE ) )
+ if( !GetParent()->HasChildPathFocus( sal_True ) )
EndPopupMode();
}
@@ -3078,7 +3078,7 @@ long ImplListBoxFloatingWindow::PreNotify( NotifyEvent& rNEvt )
// -----------------------------------------------------------------------
-void ImplListBoxFloatingWindow::SetPosSizePixel( long nX, long nY, long nWidth, long nHeight, USHORT nFlags )
+void ImplListBoxFloatingWindow::SetPosSizePixel( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags )
{
FloatingWindow::SetPosSizePixel( nX, nY, nWidth, nHeight, nFlags );
@@ -3095,7 +3095,7 @@ void ImplListBoxFloatingWindow::SetPosSizePixel( long nX, long nY, long nWidth,
if ( nFlags & WINDOW_POSSIZE_Y )
aPos.Y() = nY;
- USHORT nIndex;
+ sal_uInt16 nIndex;
SetPosPixel( ImplCalcPos( this, Rectangle( aPos, GetParent()->GetSizePixel() ), FLOATWIN_POPUPMODE_DOWN, nIndex ) );
}
@@ -3130,7 +3130,7 @@ Size ImplListBoxFloatingWindow::CalcFloatSize()
sal_Int32 nLeft, nTop, nRight, nBottom;
GetBorder( nLeft, nTop, nRight, nBottom );
- USHORT nLines = mpImplLB->GetEntryList()->GetEntryCount();
+ sal_uInt16 nLines = mpImplLB->GetEntryList()->GetEntryCount();
if ( mnDDLineCount && ( nLines > mnDDLineCount ) )
nLines = mnDDLineCount;
@@ -3184,7 +3184,7 @@ Size ImplListBoxFloatingWindow::CalcFloatSize()
// -----------------------------------------------------------------------
-void ImplListBoxFloatingWindow::StartFloat( BOOL bStartTracking )
+void ImplListBoxFloatingWindow::StartFloat( sal_Bool bStartTracking )
{
if( !IsInPopupMode() )
{
@@ -3193,7 +3193,7 @@ void ImplListBoxFloatingWindow::StartFloat( BOOL bStartTracking )
SetSizePixel( aFloatSz );
mpImplLB->SetSizePixel( GetOutputSizePixel() );
- USHORT nPos = mpImplLB->GetEntryList()->GetSelectEntryPos( 0 );
+ sal_uInt16 nPos = mpImplLB->GetEntryList()->GetSelectEntryPos( 0 );
mnPopupModeStartSaveSelection = nPos;
Size aSz = GetParent()->GetSizePixel();
@@ -3224,7 +3224,7 @@ void ImplListBoxFloatingWindow::StartFloat( BOOL bStartTracking )
mpImplLB->ShowProminentEntry( nPos );
if( bStartTracking )
- mpImplLB->GetMainWindow()->EnableMouseMoveSelect( TRUE );
+ mpImplLB->GetMainWindow()->EnableMouseMoveSelect( sal_True );
if ( mpImplLB->GetMainWindow()->IsGrabFocusAllowed() )
mpImplLB->GetMainWindow()->GrabFocus();
diff --git a/vcl/source/control/imgctrl.cxx b/vcl/source/control/imgctrl.cxx
index 075a8b1b95e2..0fb5879ce724 100644
--- a/vcl/source/control/imgctrl.cxx
+++ b/vcl/source/control/imgctrl.cxx
@@ -88,7 +88,7 @@ namespace
void ImageControl::UserDraw( const UserDrawEvent& rUDEvt )
{
- USHORT nStyle = 0;
+ sal_uInt16 nStyle = 0;
BitmapEx* pBitmap = &maBmp;
if( !!maBmpHC )
{
@@ -103,7 +103,7 @@ void ImageControl::UserDraw( const UserDrawEvent& rUDEvt )
return;
WinBits nWinStyle = GetStyle();
- USHORT nTextStyle = FixedText::ImplGetTextStyle( nWinStyle );
+ sal_uInt16 nTextStyle = FixedText::ImplGetTextStyle( nWinStyle );
if ( !IsEnabled() )
nTextStyle |= TEXT_DRAW_DISABLE;
@@ -200,7 +200,7 @@ void ImageControl::SetBitmap( const BitmapEx& rBmp )
// -----------------------------------------------------------------------
-BOOL ImageControl::SetModeBitmap( const BitmapEx& rBitmap, BmpColorMode eMode )
+sal_Bool ImageControl::SetModeBitmap( const BitmapEx& rBitmap, BmpColorMode eMode )
{
if( eMode == BMP_COLOR_NORMAL )
SetBitmap( rBitmap );
@@ -210,8 +210,8 @@ BOOL ImageControl::SetModeBitmap( const BitmapEx& rBitmap, BmpColorMode eMode )
StateChanged( STATE_CHANGE_DATA );
}
else
- return FALSE;
- return TRUE;
+ return sal_False;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -233,7 +233,7 @@ void ImageControl::Paint( const Rectangle& rRect )
{
Window *pWin = GetWindow( WINDOW_BORDER );
- BOOL bFlat = (GetBorderStyle() == 2);
+ sal_Bool bFlat = (GetBorderStyle() == 2);
Rectangle aRect( Point(0,0), pWin->GetOutputSizePixel() );
Color oldLineCol = pWin->GetLineColor();
Color oldFillCol = pWin->GetFillColor();
diff --git a/vcl/source/control/longcurr.cxx b/vcl/source/control/longcurr.cxx
index 65fe11929d1e..f53fa08cd4ec 100644
--- a/vcl/source/control/longcurr.cxx
+++ b/vcl/source/control/longcurr.cxx
@@ -53,9 +53,9 @@
// =======================================================================
-static BigInt ImplPower10( USHORT n )
+static BigInt ImplPower10( sal_uInt16 n )
{
- USHORT i;
+ sal_uInt16 i;
BigInt nValue = 1;
for ( i=0; i < n; i++ )
@@ -66,7 +66,7 @@ static BigInt ImplPower10( USHORT n )
// -----------------------------------------------------------------------
-static XubString ImplGetCurr( const LocaleDataWrapper& rLocaleDataWrapper, const BigInt &rNumber, USHORT nDigits, const String& rCurrSymbol, BOOL bShowThousandSep )
+static XubString ImplGetCurr( const LocaleDataWrapper& rLocaleDataWrapper, const BigInt &rNumber, sal_uInt16 nDigits, const String& rCurrSymbol, sal_Bool bShowThousandSep )
{
DBG_ASSERT( nDigits < 10, "LongCurrency duerfen nur maximal 9 Nachkommastellen haben" );
@@ -114,16 +114,16 @@ static XubString ImplGetCurr( const LocaleDataWrapper& rLocaleDataWrapper, const
// -----------------------------------------------------------------------
-static BOOL ImplNumericProcessKeyInput( Edit*, const KeyEvent& rKEvt,
- BOOL bStrictFormat, BOOL bThousandSep,
+static sal_Bool ImplNumericProcessKeyInput( Edit*, const KeyEvent& rKEvt,
+ sal_Bool bStrictFormat, sal_Bool bThousandSep,
const LocaleDataWrapper& rLocaleDataWrapper )
{
if ( !bStrictFormat )
- return FALSE;
+ return sal_False;
else
{
sal_Unicode cChar = rKEvt.GetCharCode();
- USHORT nGroup = rKEvt.GetKeyCode().GetGroup();
+ sal_uInt16 nGroup = rKEvt.GetKeyCode().GetGroup();
if ( (nGroup == KEYGROUP_FKEYS) || (nGroup == KEYGROUP_CURSOR) ||
(nGroup == KEYGROUP_MISC) ||
@@ -131,28 +131,28 @@ static BOOL ImplNumericProcessKeyInput( Edit*, const KeyEvent& rKEvt,
(bThousandSep && (cChar == rLocaleDataWrapper.getNumThousandSep())) ||
(cChar == rLocaleDataWrapper.getNumDecimalSep() ) ||
(cChar == '-') )
- return FALSE;
+ return sal_False;
else
- return TRUE;
+ return sal_True;
}
}
// -----------------------------------------------------------------------
-static BOOL ImplNumericGetValue( const XubString& rStr, BigInt& rValue,
- USHORT nDecDigits, const LocaleDataWrapper& rLocaleDataWrapper,
- BOOL bCurrency = FALSE )
+static sal_Bool ImplNumericGetValue( const XubString& rStr, BigInt& rValue,
+ sal_uInt16 nDecDigits, const LocaleDataWrapper& rLocaleDataWrapper,
+ sal_Bool bCurrency = sal_False )
{
XubString aStr = rStr;
XubString aStr1;
XubString aStr2;
- USHORT nDecPos;
- BOOL bNegative = FALSE;
+ sal_uInt16 nDecPos;
+ sal_Bool bNegative = sal_False;
xub_StrLen i;
// Reaktion auf leeren String
if ( !rStr.Len() )
- return FALSE;
+ return sal_False;
// Fuehrende und nachfolgende Leerzeichen entfernen
aStr.EraseLeadingAndTrailingChars( ' ' );
@@ -172,7 +172,7 @@ static BOOL ImplNumericGetValue( const XubString& rStr, BigInt& rValue,
if ( bCurrency )
{
if ( (aStr.GetChar( 0 ) == '(') && (aStr.GetChar( aStr.Len()-1 ) == ')') )
- bNegative = TRUE;
+ bNegative = sal_True;
if ( !bNegative )
{
for ( i=0; i < aStr.Len(); i++ )
@@ -181,24 +181,24 @@ static BOOL ImplNumericGetValue( const XubString& rStr, BigInt& rValue,
break;
else if ( aStr.GetChar( i ) == '-' )
{
- bNegative = TRUE;
+ bNegative = sal_True;
break;
}
}
}
if ( !bNegative && bCurrency && aStr.Len() )
{
- USHORT nFormat = rLocaleDataWrapper.getCurrNegativeFormat();
+ sal_uInt16 nFormat = rLocaleDataWrapper.getCurrNegativeFormat();
if ( (nFormat == 3) || (nFormat == 6) ||
(nFormat == 7) || (nFormat == 10) )
{
- for ( i = (USHORT)(aStr.Len()-1); i > 0; i++ )
+ for ( i = (sal_uInt16)(aStr.Len()-1); i > 0; i++ )
{
if ( (aStr.GetChar( i ) >= '0') && (aStr.GetChar( i ) <= '9') )
break;
else if ( aStr.GetChar( i ) == '-' )
{
- bNegative = TRUE;
+ bNegative = sal_True;
break;
}
}
@@ -208,7 +208,7 @@ static BOOL ImplNumericGetValue( const XubString& rStr, BigInt& rValue,
else
{
if ( aStr1.GetChar( 0 ) == '-' )
- bNegative = TRUE;
+ bNegative = sal_True;
}
// Alle unerwuenschten Zeichen rauswerfen
@@ -228,7 +228,7 @@ static BOOL ImplNumericGetValue( const XubString& rStr, BigInt& rValue,
}
if ( !aStr1.Len() && !aStr2.Len() )
- return FALSE;
+ return sal_False;
if ( !aStr1.Len() )
aStr1.Insert( '0' );
@@ -236,11 +236,11 @@ static BOOL ImplNumericGetValue( const XubString& rStr, BigInt& rValue,
aStr1.Insert( '-', 0 );
// Nachkommateil zurechtstutzen und dabei runden
- BOOL bRound = FALSE;
+ sal_Bool bRound = sal_False;
if ( aStr2.Len() > nDecDigits )
{
if ( aStr2.GetChar( nDecDigits ) >= '5' )
- bRound = TRUE;
+ bRound = sal_True;
aStr2.Erase( nDecDigits );
}
if ( aStr2.Len() < nDecDigits )
@@ -261,38 +261,38 @@ static BOOL ImplNumericGetValue( const XubString& rStr, BigInt& rValue,
rValue = nValue;
- return TRUE;
+ return sal_True;
}
// =======================================================================
-static BOOL ImplLongCurrencyProcessKeyInput( Edit* pEdit, const KeyEvent& rKEvt,
- BOOL, BOOL bUseThousandSep, const LocaleDataWrapper& rLocaleDataWrapper )
+static sal_Bool ImplLongCurrencyProcessKeyInput( Edit* pEdit, const KeyEvent& rKEvt,
+ sal_Bool, sal_Bool bUseThousandSep, const LocaleDataWrapper& rLocaleDataWrapper )
{
// Es gibt hier kein sinnvolles StrictFormat, also alle
// Zeichen erlauben
- return ImplNumericProcessKeyInput( pEdit, rKEvt, FALSE, bUseThousandSep, rLocaleDataWrapper );
+ return ImplNumericProcessKeyInput( pEdit, rKEvt, sal_False, bUseThousandSep, rLocaleDataWrapper );
}
// -----------------------------------------------------------------------
-inline BOOL ImplLongCurrencyGetValue( const XubString& rStr, BigInt& rValue,
- USHORT nDecDigits, const LocaleDataWrapper& rLocaleDataWrapper )
+inline sal_Bool ImplLongCurrencyGetValue( const XubString& rStr, BigInt& rValue,
+ sal_uInt16 nDecDigits, const LocaleDataWrapper& rLocaleDataWrapper )
{
// Zahlenwert holen
- return ImplNumericGetValue( rStr, rValue, nDecDigits, rLocaleDataWrapper, TRUE );
+ return ImplNumericGetValue( rStr, rValue, nDecDigits, rLocaleDataWrapper, sal_True );
}
// -----------------------------------------------------------------------
-BOOL ImplLongCurrencyReformat( const XubString& rStr, BigInt nMin, BigInt nMax,
- USHORT nDecDigits,
+sal_Bool ImplLongCurrencyReformat( const XubString& rStr, BigInt nMin, BigInt nMax,
+ sal_uInt16 nDecDigits,
const LocaleDataWrapper& rLocaleDataWrapper, String& rOutStr,
LongCurrencyFormatter& rFormatter )
{
BigInt nValue;
- if ( !ImplNumericGetValue( rStr, nValue, nDecDigits, rLocaleDataWrapper, TRUE ) )
- return TRUE;
+ if ( !ImplNumericGetValue( rStr, nValue, nDecDigits, rLocaleDataWrapper, sal_True ) )
+ return sal_True;
else
{
BigInt nTempVal = nValue;
@@ -307,7 +307,7 @@ BOOL ImplLongCurrencyReformat( const XubString& rStr, BigInt nMin, BigInt nMax,
if ( !rFormatter.GetErrorHdl().Call( &rFormatter ) )
{
rFormatter.mnCorrectedValue = 0;
- return FALSE;
+ return sal_False;
}
else
{
@@ -316,7 +316,7 @@ BOOL ImplLongCurrencyReformat( const XubString& rStr, BigInt nMin, BigInt nMax,
}
rOutStr = ImplGetCurr( rLocaleDataWrapper, nTempVal, nDecDigits, rFormatter.GetCurrencySymbol(), rFormatter.IsUseThousandSep() );
- return TRUE;
+ return sal_True;
}
}
@@ -333,7 +333,7 @@ void LongCurrencyFormatter::ImpInit()
mnCorrectedValue = 0;
mnDecimalDigits = 0;
mnType = FORMAT_LONGCURRENCY;
- mbThousandSep = TRUE;
+ mbThousandSep = sal_True;
SetDecimalDigits( 0 );
}
@@ -353,7 +353,7 @@ void LongCurrencyFormatter::ImplLoadRes( const ResId& rResId )
ResMgr* pMgr = rResId.GetResMgr();
if( pMgr )
{
- ULONG nMask = pMgr->ReadLong();
+ sal_uIntPtr nMask = pMgr->ReadLong();
if ( NUMERICFORMATTER_MIN & nMask )
mnMin = pMgr->ReadLong();
@@ -362,7 +362,7 @@ void LongCurrencyFormatter::ImplLoadRes( const ResId& rResId )
mnMax = pMgr->ReadLong();
if ( NUMERICFORMATTER_STRICTFORMAT & nMask )
- SetStrictFormat( (BOOL)pMgr->ReadShort() );
+ SetStrictFormat( (sal_Bool)pMgr->ReadShort() );
if ( NUMERICFORMATTER_DECIMALDIGITS & nMask )
SetDecimalDigits( pMgr->ReadShort() );
@@ -406,7 +406,7 @@ void LongCurrencyFormatter::SetValue( BigInt nNewValue )
{
SetUserValue( nNewValue );
mnFieldValue = mnLastValue;
- SetEmptyFieldValueData( FALSE );
+ SetEmptyFieldValueData( sal_False );
}
// -----------------------------------------------------------------------
@@ -431,7 +431,7 @@ void LongCurrencyFormatter::SetUserValue( BigInt nNewValue )
}
else
GetField()->SetText( aStr );
- MarkToBeReformatted( FALSE );
+ MarkToBeReformatted( sal_False );
}
// -----------------------------------------------------------------------
@@ -465,7 +465,7 @@ void LongCurrencyFormatter::Reformat()
return;
XubString aStr;
- BOOL bOK = ImplLongCurrencyReformat( GetField()->GetText(), mnMin, mnMax,
+ sal_Bool bOK = ImplLongCurrencyReformat( GetField()->GetText(), mnMin, mnMax,
GetDecimalDigits(), GetLocaleDataWrapper(), aStr, *this );
if ( !bOK )
return;
@@ -473,7 +473,7 @@ void LongCurrencyFormatter::Reformat()
if ( aStr.Len() )
{
GetField()->SetText( aStr );
- MarkToBeReformatted( FALSE );
+ MarkToBeReformatted( sal_False );
ImplLongCurrencyGetValue( aStr, mnLastValue, GetDecimalDigits(), GetLocaleDataWrapper() );
}
else
@@ -505,7 +505,7 @@ void LongCurrencyFormatter::SetMax( BigInt nNewMax )
// -----------------------------------------------------------------------
-void LongCurrencyFormatter::SetUseThousandSep( BOOL b )
+void LongCurrencyFormatter::SetUseThousandSep( sal_Bool b )
{
mbThousandSep = b;
ReformatAll();
@@ -514,7 +514,7 @@ void LongCurrencyFormatter::SetUseThousandSep( BOOL b )
// -----------------------------------------------------------------------
-void LongCurrencyFormatter::SetDecimalDigits( USHORT nDigits )
+void LongCurrencyFormatter::SetDecimalDigits( sal_uInt16 nDigits )
{
// DBG_ASSERT( nDigits < 10, "LongCurrency duerfen nur maximal 9 Nachkommastellen haben" );
@@ -527,21 +527,21 @@ void LongCurrencyFormatter::SetDecimalDigits( USHORT nDigits )
// -----------------------------------------------------------------------
-USHORT LongCurrencyFormatter::GetDecimalDigits() const
+sal_uInt16 LongCurrencyFormatter::GetDecimalDigits() const
{
return mnDecimalDigits;
}
// -----------------------------------------------------------------------
-BOOL LongCurrencyFormatter::IsValueModified() const
+sal_Bool LongCurrencyFormatter::IsValueModified() const
{
if ( ImplGetEmptyFieldValue() )
return !IsEmptyValue();
else if ( GetValue() != mnFieldValue )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -549,7 +549,7 @@ BOOL LongCurrencyFormatter::IsValueModified() const
void LongCurrencyFormatter::SetEmptyValue()
{
GetField()->SetText( ImplGetSVEmptyStr() );
- SetEmptyFieldValueData( TRUE );
+ SetEmptyFieldValueData( sal_True );
}
// -----------------------------------------------------------------------
@@ -578,7 +578,7 @@ void ImplNewLongCurrencyFieldValue( LongCurrencyField* pField, BigInt nNewValue
Selection aSelect = pField->GetSelection();
aSelect.Justify();
XubString aText = pField->GetText();
- BOOL bLastSelected = ((xub_StrLen)aSelect.Max() == aText.Len()) ? TRUE : FALSE;
+ sal_Bool bLastSelected = ((xub_StrLen)aSelect.Max() == aText.Len()) ? sal_True : sal_False;
BigInt nOldLastValue = pField->mnLastValue;
pField->SetUserValue( nNewValue );
@@ -635,7 +635,7 @@ void LongCurrencyField::ImplLoadRes( const ResId& rResId )
SpinField::ImplLoadRes( rResId );
LongCurrencyFormatter::ImplLoadRes( ResId( (RSHEADER_TYPE *)GetClassRes(), *rResId.GetResMgr() ) );
- ULONG nMask = ReadLongRes();
+ sal_uIntPtr nMask = ReadLongRes();
if ( CURRENCYFIELD_FIRST & nMask )
mnFirst = ReadLongRes();
@@ -670,7 +670,7 @@ long LongCurrencyField::Notify( NotifyEvent& rNEvt )
{
if( rNEvt.GetType() == EVENT_GETFOCUS )
{
- MarkToBeReformatted( FALSE );
+ MarkToBeReformatted( sal_False );
}
else if( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
@@ -687,7 +687,7 @@ long LongCurrencyField::Notify( NotifyEvent& rNEvt )
void LongCurrencyField::Modify()
{
- MarkToBeReformatted( TRUE );
+ MarkToBeReformatted( sal_True );
SpinField::Modify();
}
@@ -782,7 +782,7 @@ long LongCurrencyBox::Notify( NotifyEvent& rNEvt )
{
if( rNEvt.GetType() == EVENT_GETFOCUS )
{
- MarkToBeReformatted( FALSE );
+ MarkToBeReformatted( sal_False );
}
else if( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
@@ -799,7 +799,7 @@ long LongCurrencyBox::Notify( NotifyEvent& rNEvt )
void LongCurrencyBox::Modify()
{
- MarkToBeReformatted( TRUE );
+ MarkToBeReformatted( sal_True );
ComboBox::Modify();
}
@@ -808,9 +808,9 @@ void LongCurrencyBox::Modify()
void LongCurrencyBox::ReformatAll()
{
XubString aStr;
- SetUpdateMode( FALSE );
- USHORT nEntryCount = GetEntryCount();
- for ( USHORT i=0; i < nEntryCount; i++ )
+ SetUpdateMode( sal_False );
+ sal_uInt16 nEntryCount = GetEntryCount();
+ for ( sal_uInt16 i=0; i < nEntryCount; i++ )
{
ImplLongCurrencyReformat( GetEntry( i ), mnMin, mnMax,
GetDecimalDigits(), GetLocaleDataWrapper(),
@@ -819,12 +819,12 @@ void LongCurrencyBox::ReformatAll()
InsertEntry( aStr, i );
}
LongCurrencyFormatter::Reformat();
- SetUpdateMode( TRUE );
+ SetUpdateMode( sal_True );
}
// -----------------------------------------------------------------------
-void LongCurrencyBox::InsertValue( BigInt nValue, USHORT nPos )
+void LongCurrencyBox::InsertValue( BigInt nValue, sal_uInt16 nPos )
{
XubString aStr = ImplGetCurr( GetLocaleDataWrapper(), nValue, GetDecimalDigits(), GetCurrencySymbol(), IsUseThousandSep() );
ComboBox::InsertEntry( aStr, nPos );
@@ -840,7 +840,7 @@ void LongCurrencyBox::RemoveValue( BigInt nValue )
// -----------------------------------------------------------------------
-BigInt LongCurrencyBox::GetValue( USHORT nPos ) const
+BigInt LongCurrencyBox::GetValue( sal_uInt16 nPos ) const
{
BigInt nValue = 0;
ImplLongCurrencyGetValue( ComboBox::GetEntry( nPos ), nValue,
@@ -850,7 +850,7 @@ BigInt LongCurrencyBox::GetValue( USHORT nPos ) const
// -----------------------------------------------------------------------
-USHORT LongCurrencyBox::GetValuePos( BigInt nValue ) const
+sal_uInt16 LongCurrencyBox::GetValuePos( BigInt nValue ) const
{
XubString aStr = ImplGetCurr( GetLocaleDataWrapper(), nValue, GetDecimalDigits(), GetCurrencySymbol(), IsUseThousandSep() );
return ComboBox::GetEntryPos( aStr );
diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx
index 6c7df5b106bf..25cb57c7859b 100644
--- a/vcl/source/control/lstbox.cxx
+++ b/vcl/source/control/lstbox.cxx
@@ -103,7 +103,7 @@ void ListBox::ImplInitListBoxData()
mpBtn = NULL;
mnDDHeight = 0;
- mbDDAutoSize = TRUE;
+ mbDDAutoSize = sal_True;
mnSaveValue = LISTBOX_ENTRY_NOTFOUND;
mnLineCount = 0;
}
@@ -123,7 +123,7 @@ void ListBox::ImplInit( Window* pParent, WinBits nStyle )
{
sal_Int32 nLeft, nTop, nRight, nBottom;
GetBorder( nLeft, nTop, nRight, nBottom );
- mnDDHeight = (USHORT)(GetTextHeight() + nTop + nBottom + 4);
+ mnDDHeight = (sal_uInt16)(GetTextHeight() + nTop + nBottom + 4);
if( IsNativeWidgetEnabled() &&
IsNativeControlSupported( CTRL_LISTBOX, PART_ENTIRE_CONTROL ) )
@@ -138,12 +138,12 @@ void ListBox::ImplInit( Window* pParent, WinBits nStyle )
{
sal_Int32 nHeight = aBoundingRgn.GetBoundRect().GetHeight();
if( nHeight > mnDDHeight )
- mnDDHeight = static_cast<USHORT>(nHeight);
+ mnDDHeight = static_cast<sal_uInt16>(nHeight);
}
}
mpFloatWin = new ImplListBoxFloatingWindow( this );
- mpFloatWin->SetAutoWidth( TRUE );
+ mpFloatWin->SetAutoWidth( sal_True );
mpFloatWin->SetPopupModeEndHdl( LINK( this, ListBox, ImplPopupModeEndHdl ) );
mpImplWin = new ImplWin( this, (nStyle & (WB_LEFT|WB_RIGHT|WB_CENTER))|WB_NOBORDER );
@@ -176,9 +176,9 @@ void ListBox::ImplInit( Window* pParent, WinBits nStyle )
mpImplLB->SetSelectionChangedHdl( LINK( this, ListBox, ImplSelectionChangedHdl ) );
}
else
- mpImplLB->GetMainWindow()->AllowGrabFocus( TRUE );
+ mpImplLB->GetMainWindow()->AllowGrabFocus( sal_True );
- SetCompoundControl( TRUE );
+ SetCompoundControl( sal_True );
}
// -----------------------------------------------------------------------
@@ -198,12 +198,12 @@ void ListBox::ImplLoadRes( const ResId& rResId )
{
Control::ImplLoadRes( rResId );
- USHORT nSelPos = ReadShortRes();
- USHORT nNumber = sal::static_int_cast<USHORT>(ReadLongRes());
+ sal_uInt16 nSelPos = ReadShortRes();
+ sal_uInt16 nNumber = sal::static_int_cast<sal_uInt16>(ReadLongRes());
- for( USHORT i = 0; i < nNumber; i++ )
+ for( sal_uInt16 i = 0; i < nNumber; i++ )
{
- USHORT nPos = InsertEntry( ReadStringRes(), LISTBOX_APPEND );
+ sal_uInt16 nPos = InsertEntry( ReadStringRes(), LISTBOX_APPEND );
long nId = ReadLongRes();
if( nId )
@@ -218,7 +218,7 @@ void ListBox::ImplLoadRes( const ResId& rResId )
IMPL_LINK( ListBox, ImplSelectHdl, void*, EMPTYARG )
{
- BOOL bPopup = IsInDropDown();
+ sal_Bool bPopup = IsInDropDown();
if( IsDropDownBox() )
{
if( !mpImplLB->IsTravelSelect() )
@@ -267,7 +267,7 @@ IMPL_LINK( ListBox, ImplSelectionChangedHdl, void*, n )
{
if ( !mpImplLB->IsTrackingSelect() )
{
- USHORT nChanged = (USHORT)(ULONG)n;
+ sal_uInt16 nChanged = (sal_uInt16)(sal_uIntPtr)n;
const ImplEntryList* pEntryList = mpImplLB->GetEntryList();
if ( pEntryList->IsEntryPosSelected( nChanged ) )
{
@@ -303,8 +303,8 @@ IMPL_LINK( ListBox, ImplClickBtnHdl, void*, EMPTYARG )
{
ImplCallEventListeners( VCLEVENT_DROPDOWN_PRE_OPEN );
mpImplWin->GrabFocus();
- mpBtn->SetPressed( TRUE );
- mpFloatWin->StartFloat( TRUE );
+ mpBtn->SetPressed( sal_True );
+ mpFloatWin->StartFloat( sal_True );
ImplCallEventListeners( VCLEVENT_DROPDOWN_OPEN );
ImplClearLayoutData();
@@ -326,9 +326,9 @@ IMPL_LINK( ListBox, ImplPopupModeEndHdl, void*, EMPTYARG )
if ( ( mpFloatWin->GetPopupModeStartSaveSelection() != LISTBOX_ENTRY_NOTFOUND )
&& !IsEntryPosSelected( mpFloatWin->GetPopupModeStartSaveSelection() ) )
{
- mpImplLB->SelectEntry( mpFloatWin->GetPopupModeStartSaveSelection(), TRUE );
- BOOL bTravelSelect = mpImplLB->IsTravelSelect();
- mpImplLB->SetTravelSelect( TRUE );
+ mpImplLB->SelectEntry( mpFloatWin->GetPopupModeStartSaveSelection(), sal_True );
+ sal_Bool bTravelSelect = mpImplLB->IsTravelSelect();
+ mpImplLB->SetTravelSelect( sal_True );
ImplDelData aCheckDelete;
ImplAddDel( &aCheckDelete );
@@ -347,7 +347,7 @@ IMPL_LINK( ListBox, ImplPopupModeEndHdl, void*, EMPTYARG )
if( mpImplWin )
mpImplWin->ImplClearLayoutData();
- mpBtn->SetPressed( FALSE );
+ mpBtn->SetPressed( sal_False );
ImplCallEventListeners( VCLEVENT_DROPDOWN_CLOSE );
return 0;
}
@@ -364,8 +364,8 @@ void ListBox::ToggleDropDown()
{
ImplCallEventListeners( VCLEVENT_DROPDOWN_PRE_OPEN );
mpImplWin->GrabFocus();
- mpBtn->SetPressed( TRUE );
- mpFloatWin->StartFloat( TRUE );
+ mpBtn->SetPressed( sal_True );
+ mpFloatWin->StartFloat( sal_True );
ImplCallEventListeners( VCLEVENT_DROPDOWN_OPEN );
}
}
@@ -373,9 +373,9 @@ void ListBox::ToggleDropDown()
// -----------------------------------------------------------------------
-void ListBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG nFlags )
+void ListBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uIntPtr nFlags )
{
- mpImplLB->GetMainWindow()->ImplInitSettings( TRUE, TRUE, TRUE );
+ mpImplLB->GetMainWindow()->ImplInitSettings( sal_True, sal_True, sal_True );
Point aPos = pDev->LogicToPixel( rPos );
Size aSize = pDev->LogicToPixel( rSize );
@@ -390,8 +390,8 @@ void ListBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, UL
// 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 );
@@ -425,7 +425,7 @@ void ListBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, UL
}
long nOnePixel = GetDrawPixel( pDev, 1 );
- USHORT nTextStyle = TEXT_DRAW_VCENTER;
+ sal_uInt16 nTextStyle = TEXT_DRAW_VCENTER;
Rectangle aTextRect( aPos, aSize );
if ( GetStyle() & WB_CENTER )
@@ -462,7 +462,7 @@ void ListBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, UL
else
{
long nTextHeight = pDev->GetTextHeight();
- USHORT nLines = (USHORT)(aSize.Height() / nTextHeight);
+ sal_uInt16 nLines = (sal_uInt16)(aSize.Height() / nTextHeight);
Rectangle aClip( aPos, aSize );
pDev->IntersectClipRegion( aClip );
@@ -470,10 +470,10 @@ void ListBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, UL
if ( !nLines )
nLines = 1;
- for ( USHORT n = 0; n < nLines; n++ )
+ for ( sal_uInt16 n = 0; n < nLines; n++ )
{
- USHORT nEntry = n+mpImplLB->GetTopEntry();
- BOOL bSelected = mpImplLB->GetEntryList()->IsEntryPosSelected( nEntry );
+ sal_uInt16 nEntry = n+mpImplLB->GetTopEntry();
+ sal_Bool bSelected = mpImplLB->GetEntryList()->IsEntryPosSelected( nEntry );
if ( bSelected )
{
pDev->SetFillColor( COL_BLACK );
@@ -557,7 +557,7 @@ void ListBox::DataChanged( const DataChangedEvent& rDCEvt )
if ( mpImplWin )
{
mpImplWin->SetSettings( GetSettings() ); // Falls noch nicht eingestellt...
- ImplInitFieldSettings( mpImplWin, TRUE, TRUE, TRUE );
+ ImplInitFieldSettings( mpImplWin, sal_True, sal_True, sal_True );
mpBtn->SetSettings( GetSettings() );
ImplInitDropDownButton( mpBtn );
@@ -571,7 +571,7 @@ void ListBox::DataChanged( const DataChangedEvent& rDCEvt )
// -----------------------------------------------------------------------
-void ListBox::EnableAutoSize( BOOL bAuto )
+void ListBox::EnableAutoSize( sal_Bool bAuto )
{
mbDDAutoSize = bAuto;
if ( mpFloatWin )
@@ -585,7 +585,7 @@ void ListBox::EnableAutoSize( BOOL bAuto )
// -----------------------------------------------------------------------
-void ListBox::EnableDDAutoWidth( BOOL b )
+void ListBox::EnableDDAutoWidth( sal_Bool b )
{
if ( mpFloatWin )
mpFloatWin->SetAutoWidth( b );
@@ -593,14 +593,14 @@ void ListBox::EnableDDAutoWidth( BOOL b )
// -----------------------------------------------------------------------
-BOOL ListBox::IsDDAutoWidthEnabled() const
+sal_Bool ListBox::IsDDAutoWidthEnabled() const
{
- return mpFloatWin ? mpFloatWin->IsAutoWidth() : FALSE;
+ return mpFloatWin ? mpFloatWin->IsAutoWidth() : sal_False;
}
// -----------------------------------------------------------------------
-void ListBox::SetDropDownLineCount( USHORT nLines )
+void ListBox::SetDropDownLineCount( sal_uInt16 nLines )
{
mnLineCount = nLines;
if ( mpFloatWin )
@@ -609,7 +609,7 @@ void ListBox::SetDropDownLineCount( USHORT nLines )
// -----------------------------------------------------------------------
-USHORT ListBox::GetDropDownLineCount() const
+sal_uInt16 ListBox::GetDropDownLineCount() const
{
if ( mpFloatWin )
return mpFloatWin->GetDropDownLineCount();
@@ -618,7 +618,7 @@ USHORT ListBox::GetDropDownLineCount() const
// -----------------------------------------------------------------------
-void ListBox::SetPosSizePixel( long nX, long nY, long nWidth, long nHeight, USHORT nFlags )
+void ListBox::SetPosSizePixel( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags )
{
if( IsDropDownBox() && ( nFlags & WINDOW_POSSIZE_SIZE ) )
{
@@ -739,7 +739,7 @@ void ListBox::FillLayoutData() const
// -----------------------------------------------------------------------
-long ListBox::GetIndexForPoint( const Point& rPoint, USHORT& rPos ) const
+long ListBox::GetIndexForPoint( const Point& rPoint, sal_uInt16& rPos ) const
{
if( !HasLayoutData() )
FillLayoutData();
@@ -759,7 +759,7 @@ long ListBox::GetIndexForPoint( const Point& rPoint, USHORT& rPos ) const
aConvPoint = pMain->PixelToLogic( aConvPoint );
// try to find entry
- USHORT nEntry = pMain->GetEntryPosForPoint( aConvPoint );
+ sal_uInt16 nEntry = pMain->GetEntryPosForPoint( aConvPoint );
if( nEntry == LISTBOX_ENTRY_NOTFOUND )
{
// not found, maybe dropdown case
@@ -884,8 +884,8 @@ void ListBox::StateChanged( StateChangedType nType )
else if ( nType == STATE_CHANGE_STYLE )
{
SetStyle( ImplInitStyle( GetStyle() ) );
- mpImplLB->GetMainWindow()->EnableSort( ( GetStyle() & WB_SORT ) ? TRUE : FALSE );
- BOOL bSimpleMode = ( GetStyle() & WB_SIMPLEMODE ) ? TRUE : FALSE;
+ mpImplLB->GetMainWindow()->EnableSort( ( GetStyle() & WB_SORT ) ? sal_True : sal_False );
+ sal_Bool bSimpleMode = ( GetStyle() & WB_SIMPLEMODE ) ? sal_True : sal_False;
mpImplLB->SetMultiSelectionSimpleMode( bSimpleMode );
}
else if( nType == STATE_CHANGE_MIRRORING )
@@ -922,8 +922,8 @@ long ListBox::PreNotify( NotifyEvent& rNEvt )
aKeyEvt.GetKeyCode().IsMod2() )
{
ImplCallEventListeners( VCLEVENT_DROPDOWN_PRE_OPEN );
- mpBtn->SetPressed( TRUE );
- mpFloatWin->StartFloat( FALSE );
+ mpBtn->SetPressed( sal_True );
+ mpFloatWin->StartFloat( sal_False );
ImplCallEventListeners( VCLEVENT_DROPDOWN_OPEN );
nDone = 1;
}
@@ -965,14 +965,14 @@ long ListBox::PreNotify( NotifyEvent& rNEvt )
}
else if ( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
- if ( IsInDropDown() && !HasChildPathFocus( TRUE ) )
+ if ( IsInDropDown() && !HasChildPathFocus( sal_True ) )
mpFloatWin->EndPopupMode();
}
else if ( (rNEvt.GetType() == EVENT_COMMAND) &&
(rNEvt.GetCommandEvent()->GetCommand() == COMMAND_WHEEL) &&
(rNEvt.GetWindow() == mpImplWin) )
{
- USHORT nWheelBehavior( GetSettings().GetMouseSettings().GetWheelBehavior() );
+ sal_uInt16 nWheelBehavior( GetSettings().GetMouseSettings().GetWheelBehavior() );
if ( ( nWheelBehavior == MOUSE_WHEEL_ALWAYS )
|| ( ( nWheelBehavior == MOUSE_WHEEL_FOCUS_ONLY )
&& HasChildPathFocus()
@@ -1038,30 +1038,30 @@ void ListBox::SetNoSelection()
// -----------------------------------------------------------------------
-USHORT ListBox::InsertEntry( const XubString& rStr, USHORT nPos )
+sal_uInt16 ListBox::InsertEntry( const XubString& rStr, sal_uInt16 nPos )
{
- USHORT nRealPos = mpImplLB->InsertEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount(), rStr );
- nRealPos = sal::static_int_cast<USHORT>(nRealPos - mpImplLB->GetEntryList()->GetMRUCount());
+ sal_uInt16 nRealPos = mpImplLB->InsertEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount(), rStr );
+ nRealPos = sal::static_int_cast<sal_uInt16>(nRealPos - mpImplLB->GetEntryList()->GetMRUCount());
CallEventListeners( VCLEVENT_LISTBOX_ITEMADDED, (void*) sal_IntPtr(nRealPos) );
return nRealPos;
}
// -----------------------------------------------------------------------
-USHORT ListBox::InsertEntry( const Image& rImage, USHORT nPos )
+sal_uInt16 ListBox::InsertEntry( const Image& rImage, sal_uInt16 nPos )
{
- USHORT nRealPos = mpImplLB->InsertEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount(), rImage );
- nRealPos = sal::static_int_cast<USHORT>(nRealPos - mpImplLB->GetEntryList()->GetMRUCount());
+ sal_uInt16 nRealPos = mpImplLB->InsertEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount(), rImage );
+ nRealPos = sal::static_int_cast<sal_uInt16>(nRealPos - mpImplLB->GetEntryList()->GetMRUCount());
CallEventListeners( VCLEVENT_LISTBOX_ITEMADDED, (void*) sal_IntPtr(nRealPos) );
return nRealPos;
}
// -----------------------------------------------------------------------
-USHORT ListBox::InsertEntry( const XubString& rStr, const Image& rImage, USHORT nPos )
+sal_uInt16 ListBox::InsertEntry( const XubString& rStr, const Image& rImage, sal_uInt16 nPos )
{
- USHORT nRealPos = mpImplLB->InsertEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount(), rStr, rImage );
- nRealPos = sal::static_int_cast<USHORT>(nRealPos - mpImplLB->GetEntryList()->GetMRUCount());
+ sal_uInt16 nRealPos = mpImplLB->InsertEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount(), rStr, rImage );
+ nRealPos = sal::static_int_cast<sal_uInt16>(nRealPos - mpImplLB->GetEntryList()->GetMRUCount());
CallEventListeners( VCLEVENT_LISTBOX_ITEMADDED, (void*) sal_IntPtr(nRealPos) );
return nRealPos;
}
@@ -1075,7 +1075,7 @@ void ListBox::RemoveEntry( const XubString& rStr )
// -----------------------------------------------------------------------
-void ListBox::RemoveEntry( USHORT nPos )
+void ListBox::RemoveEntry( sal_uInt16 nPos )
{
mpImplLB->RemoveEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount() );
CallEventListeners( VCLEVENT_LISTBOX_ITEMREMOVED, (void*) sal_IntPtr(nPos) );
@@ -1083,7 +1083,7 @@ void ListBox::RemoveEntry( USHORT nPos )
// -----------------------------------------------------------------------
-Image ListBox::GetEntryImage( USHORT nPos ) const
+Image ListBox::GetEntryImage( sal_uInt16 nPos ) const
{
if ( mpImplLB->GetEntryList()->HasEntryImage( nPos ) )
return mpImplLB->GetEntryList()->GetEntryImage( nPos );
@@ -1092,90 +1092,90 @@ Image ListBox::GetEntryImage( USHORT nPos ) const
// -----------------------------------------------------------------------
-USHORT ListBox::GetEntryPos( const XubString& rStr ) const
+sal_uInt16 ListBox::GetEntryPos( const XubString& rStr ) const
{
- USHORT nPos = mpImplLB->GetEntryList()->FindEntry( rStr );
+ sal_uInt16 nPos = mpImplLB->GetEntryList()->FindEntry( rStr );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
- nPos = sal::static_int_cast<USHORT>(nPos - mpImplLB->GetEntryList()->GetMRUCount());
+ nPos = sal::static_int_cast<sal_uInt16>(nPos - mpImplLB->GetEntryList()->GetMRUCount());
return nPos;
}
// -----------------------------------------------------------------------
-USHORT ListBox::GetEntryPos( const void* pData ) const
+sal_uInt16 ListBox::GetEntryPos( const void* pData ) const
{
- USHORT nPos = mpImplLB->GetEntryList()->FindEntry( pData );
+ sal_uInt16 nPos = mpImplLB->GetEntryList()->FindEntry( pData );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
- nPos = sal::static_int_cast<USHORT>(nPos - mpImplLB->GetEntryList()->GetMRUCount());
+ nPos = sal::static_int_cast<sal_uInt16>(nPos - mpImplLB->GetEntryList()->GetMRUCount());
return nPos;
}
// -----------------------------------------------------------------------
-XubString ListBox::GetEntry( USHORT nPos ) const
+XubString ListBox::GetEntry( sal_uInt16 nPos ) const
{
return mpImplLB->GetEntryList()->GetEntryText( nPos + mpImplLB->GetEntryList()->GetMRUCount() );
}
// -----------------------------------------------------------------------
-USHORT ListBox::GetEntryCount() const
+sal_uInt16 ListBox::GetEntryCount() const
{
return mpImplLB->GetEntryList()->GetEntryCount() - mpImplLB->GetEntryList()->GetMRUCount();
}
// -----------------------------------------------------------------------
-XubString ListBox::GetSelectEntry( USHORT nIndex ) const
+XubString ListBox::GetSelectEntry( sal_uInt16 nIndex ) const
{
return GetEntry( GetSelectEntryPos( nIndex ) );
}
// -----------------------------------------------------------------------
-USHORT ListBox::GetSelectEntryCount() const
+sal_uInt16 ListBox::GetSelectEntryCount() const
{
return mpImplLB->GetEntryList()->GetSelectEntryCount();
}
// -----------------------------------------------------------------------
-USHORT ListBox::GetSelectEntryPos( USHORT nIndex ) const
+sal_uInt16 ListBox::GetSelectEntryPos( sal_uInt16 nIndex ) const
{
- USHORT nPos = mpImplLB->GetEntryList()->GetSelectEntryPos( nIndex );
+ sal_uInt16 nPos = mpImplLB->GetEntryList()->GetSelectEntryPos( nIndex );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
{
if ( nPos < mpImplLB->GetEntryList()->GetMRUCount() )
nPos = mpImplLB->GetEntryList()->FindEntry( mpImplLB->GetEntryList()->GetEntryText( nPos ) );
- nPos = sal::static_int_cast<USHORT>(nPos - mpImplLB->GetEntryList()->GetMRUCount());
+ nPos = sal::static_int_cast<sal_uInt16>(nPos - mpImplLB->GetEntryList()->GetMRUCount());
}
return nPos;
}
// -----------------------------------------------------------------------
-BOOL ListBox::IsEntrySelected( const XubString& rStr ) const
+sal_Bool ListBox::IsEntrySelected( const XubString& rStr ) const
{
return IsEntryPosSelected( GetEntryPos( rStr ) );
}
// -----------------------------------------------------------------------
-BOOL ListBox::IsEntryPosSelected( USHORT nPos ) const
+sal_Bool ListBox::IsEntryPosSelected( sal_uInt16 nPos ) const
{
return mpImplLB->GetEntryList()->IsEntryPosSelected( nPos + mpImplLB->GetEntryList()->GetMRUCount() );
}
// -----------------------------------------------------------------------
-void ListBox::SelectEntry( const XubString& rStr, BOOL bSelect )
+void ListBox::SelectEntry( const XubString& rStr, sal_Bool bSelect )
{
SelectEntryPos( GetEntryPos( rStr ), bSelect );
}
// -----------------------------------------------------------------------
-void ListBox::SelectEntryPos( USHORT nPos, BOOL bSelect )
+void ListBox::SelectEntryPos( sal_uInt16 nPos, sal_Bool bSelect )
{
if ( nPos < mpImplLB->GetEntryList()->GetEntryCount() )
mpImplLB->SelectEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount(), bSelect );
@@ -1183,51 +1183,51 @@ void ListBox::SelectEntryPos( USHORT nPos, BOOL bSelect )
// -----------------------------------------------------------------------
-void ListBox::SetEntryData( USHORT nPos, void* pNewData )
+void ListBox::SetEntryData( sal_uInt16 nPos, void* pNewData )
{
mpImplLB->SetEntryData( nPos + mpImplLB->GetEntryList()->GetMRUCount(), pNewData );
}
// -----------------------------------------------------------------------
-void* ListBox::GetEntryData( USHORT nPos ) const
+void* ListBox::GetEntryData( sal_uInt16 nPos ) const
{
return mpImplLB->GetEntryList()->GetEntryData( nPos + mpImplLB->GetEntryList()->GetMRUCount() );
}
// -----------------------------------------------------------------------
-void ListBox::SetEntryFlags( USHORT nPos, long nFlags )
+void ListBox::SetEntryFlags( sal_uInt16 nPos, long nFlags )
{
mpImplLB->SetEntryFlags( nPos + mpImplLB->GetEntryList()->GetMRUCount(), nFlags );
}
// -----------------------------------------------------------------------
-long ListBox::GetEntryFlags( USHORT nPos ) const
+long ListBox::GetEntryFlags( sal_uInt16 nPos ) const
{
return mpImplLB->GetEntryList()->GetEntryFlags( nPos + mpImplLB->GetEntryList()->GetMRUCount() );
}
// -----------------------------------------------------------------------
-void ListBox::SetTopEntry( USHORT nPos )
+void ListBox::SetTopEntry( sal_uInt16 nPos )
{
mpImplLB->SetTopEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount() );
}
// -----------------------------------------------------------------------
-void ListBox::ShowProminentEntry( USHORT nPos )
+void ListBox::ShowProminentEntry( sal_uInt16 nPos )
{
mpImplLB->ShowProminentEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount() );
}
// -----------------------------------------------------------------------
-USHORT ListBox::GetTopEntry() const
+sal_uInt16 ListBox::GetTopEntry() const
{
- USHORT nPos = GetEntryCount() ? mpImplLB->GetTopEntry() : LISTBOX_ENTRY_NOTFOUND;
+ sal_uInt16 nPos = GetEntryCount() ? mpImplLB->GetTopEntry() : LISTBOX_ENTRY_NOTFOUND;
if ( nPos < mpImplLB->GetEntryList()->GetMRUCount() )
nPos = 0;
return nPos;
@@ -1249,26 +1249,26 @@ ProminentEntry ListBox::GetProminentEntryType() const
// -----------------------------------------------------------------------
-BOOL ListBox::IsTravelSelect() const
+sal_Bool ListBox::IsTravelSelect() const
{
return mpImplLB->IsTravelSelect();
}
// -----------------------------------------------------------------------
-BOOL ListBox::IsInDropDown() const
+sal_Bool ListBox::IsInDropDown() const
{
return mpFloatWin && mpFloatWin->IsInPopupMode();
}
// -----------------------------------------------------------------------
-long ListBox::CalcWindowSizePixel( USHORT nLines ) const
+long ListBox::CalcWindowSizePixel( sal_uInt16 nLines ) const
{
return mpImplLB->GetEntryHeight() * nLines;
}
-Rectangle ListBox::GetBoundingRectangle( USHORT nItem ) const
+Rectangle ListBox::GetBoundingRectangle( sal_uInt16 nItem ) const
{
Rectangle aRect = mpImplLB->GetMainWindow()->GetBoundingRectangle( nItem );
Rectangle aOffset = mpImplLB->GetMainWindow()->GetWindowExtentsRelative( (Window*)this );
@@ -1278,12 +1278,12 @@ Rectangle ListBox::GetBoundingRectangle( USHORT nItem ) const
// -----------------------------------------------------------------------
-void ListBox::EnableMultiSelection( BOOL bMulti )
+void ListBox::EnableMultiSelection( sal_Bool bMulti )
{
- EnableMultiSelection( bMulti, FALSE );
+ EnableMultiSelection( bMulti, sal_False );
}
-void ListBox::EnableMultiSelection( BOOL bMulti, BOOL bStackSelection )
+void ListBox::EnableMultiSelection( sal_Bool bMulti, sal_Bool bStackSelection )
{
mpImplLB->EnableMultiSelection( bMulti, bStackSelection );
@@ -1291,7 +1291,7 @@ void ListBox::EnableMultiSelection( BOOL bMulti, BOOL bStackSelection )
// Die MultiListBox verh�lt sich wie eine normale ListBox.
// Die Mehrfachselektion kann nur �ber entsprechende Zusatztasten erfolgen.
- BOOL bSimpleMode = ( GetStyle() & WB_SIMPLEMODE ) ? TRUE : FALSE;
+ sal_Bool bSimpleMode = ( GetStyle() & WB_SIMPLEMODE ) ? sal_True : sal_False;
mpImplLB->SetMultiSelectionSimpleMode( bSimpleMode );
// ohne Focus ist das Traveln in einer MultiSelection nicht zu sehen:
@@ -1301,7 +1301,7 @@ void ListBox::EnableMultiSelection( BOOL bMulti, BOOL bStackSelection )
// -----------------------------------------------------------------------
-BOOL ListBox::IsMultiSelectionEnabled() const
+sal_Bool ListBox::IsMultiSelectionEnabled() const
{
return mpImplLB->IsMultiSelectionEnabled();
}
@@ -1400,7 +1400,7 @@ Size ListBox::CalcAdjustedSize( const Size& rPrefSize ) const
// -----------------------------------------------------------------------
-Size ListBox::CalcSize( USHORT nColumns, USHORT nLines ) const
+Size ListBox::CalcSize( sal_uInt16 nColumns, sal_uInt16 nLines ) const
{
// ggf. werden ScrollBars eingeblendet
Size aMinSz = CalcMinimumSize();
@@ -1442,19 +1442,19 @@ Size ListBox::CalcSize( USHORT nColumns, USHORT nLines ) const
// -----------------------------------------------------------------------
-void ListBox::GetMaxVisColumnsAndLines( USHORT& rnCols, USHORT& rnLines ) const
+void ListBox::GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLines ) const
{
long nCharWidth = GetTextWidth( UniString( 'x' ) );
if ( !IsDropDownBox() )
{
Size aOutSz = mpImplLB->GetMainWindow()->GetOutputSizePixel();
- rnCols = (USHORT) (aOutSz.Width()/nCharWidth);
- rnLines = (USHORT) (aOutSz.Height()/mpImplLB->GetEntryHeight());
+ rnCols = (sal_uInt16) (aOutSz.Width()/nCharWidth);
+ rnLines = (sal_uInt16) (aOutSz.Height()/mpImplLB->GetEntryHeight());
}
else
{
Size aOutSz = mpImplWin->GetOutputSizePixel();
- rnCols = (USHORT) (aOutSz.Width()/nCharWidth);
+ rnCols = (sal_uInt16) (aOutSz.Width()/nCharWidth);
rnLines = 1;
}
}
@@ -1475,7 +1475,7 @@ void ListBox::UserDraw( const UserDrawEvent& )
// -----------------------------------------------------------------------
-void ListBox::DrawEntry( const UserDrawEvent& rEvt, BOOL bDrawImage, BOOL bDrawText, BOOL bDrawTextAtImagePos )
+void ListBox::DrawEntry( const UserDrawEvent& rEvt, sal_Bool bDrawImage, sal_Bool bDrawText, sal_Bool bDrawTextAtImagePos )
{
if ( rEvt.GetDevice() == mpImplLB->GetMainWindow() )
mpImplLB->GetMainWindow()->DrawEntry( rEvt.GetItemId(), bDrawImage, bDrawText, bDrawTextAtImagePos );
@@ -1501,7 +1501,7 @@ const Size& ListBox::GetUserItemSize() const
// -----------------------------------------------------------------------
-void ListBox::EnableUserDraw( BOOL bUserDraw )
+void ListBox::EnableUserDraw( sal_Bool bUserDraw )
{
mpImplLB->GetMainWindow()->EnableUserDraw( bUserDraw );
if ( mpImplWin )
@@ -1510,14 +1510,14 @@ void ListBox::EnableUserDraw( BOOL bUserDraw )
// -----------------------------------------------------------------------
-BOOL ListBox::IsUserDrawEnabled() const
+sal_Bool ListBox::IsUserDrawEnabled() const
{
return mpImplLB->GetMainWindow()->IsUserDrawEnabled();
}
// -----------------------------------------------------------------------
-void ListBox::SetReadOnly( BOOL bReadOnly )
+void ListBox::SetReadOnly( sal_Bool bReadOnly )
{
if ( mpImplLB->IsReadOnly() != bReadOnly )
{
@@ -1528,14 +1528,14 @@ void ListBox::SetReadOnly( BOOL bReadOnly )
// -----------------------------------------------------------------------
-BOOL ListBox::IsReadOnly() const
+sal_Bool ListBox::IsReadOnly() const
{
return mpImplLB->IsReadOnly();
}
// -----------------------------------------------------------------------
-void ListBox::SetSeparatorPos( USHORT n )
+void ListBox::SetSeparatorPos( sal_uInt16 n )
{
mpImplLB->SetSeparatorPos( n );
}
@@ -1549,7 +1549,7 @@ void ListBox::SetSeparatorPos()
// -----------------------------------------------------------------------
-USHORT ListBox::GetSeparatorPos() const
+sal_uInt16 ListBox::GetSeparatorPos() const
{
return mpImplLB->GetSeparatorPos();
}
@@ -1570,21 +1570,21 @@ XubString ListBox::GetMRUEntries( xub_Unicode cSep ) const
// -----------------------------------------------------------------------
-void ListBox::SetMaxMRUCount( USHORT n )
+void ListBox::SetMaxMRUCount( sal_uInt16 n )
{
mpImplLB->SetMaxMRUCount( n );
}
// -----------------------------------------------------------------------
-USHORT ListBox::GetMaxMRUCount() const
+sal_uInt16 ListBox::GetMaxMRUCount() const
{
return mpImplLB->GetMaxMRUCount();
}
// -----------------------------------------------------------------------
-USHORT ListBox::GetDisplayLineCount() const
+sal_uInt16 ListBox::GetDisplayLineCount() const
{
return mpImplLB->GetDisplayLineCount();
}
@@ -1620,7 +1620,7 @@ MultiListBox::MultiListBox( Window* pParent, WinBits nStyle ) :
ListBox( WINDOW_MULTILISTBOX )
{
ImplInit( pParent, nStyle );
- EnableMultiSelection( TRUE );
+ EnableMultiSelection( sal_True );
}
// -----------------------------------------------------------------------
@@ -1635,5 +1635,5 @@ MultiListBox::MultiListBox( Window* pParent, const ResId& rResId ) :
if ( !(nStyle & WB_HIDE ) )
Show();
- EnableMultiSelection( TRUE );
+ EnableMultiSelection( sal_True );
}
diff --git a/vcl/source/control/menubtn.cxx b/vcl/source/control/menubtn.cxx
index 94f61818ac92..ef7c230dc24e 100644
--- a/vcl/source/control/menubtn.cxx
+++ b/vcl/source/control/menubtn.cxx
@@ -87,10 +87,10 @@ void MenuButton::ImplExecuteMenu()
aRect.Right() -= 2;
aRect.Bottom() -= 2;
}
- SetPressed( TRUE );
+ SetPressed( sal_True );
EndSelection();
mnCurItemId = mpMenu->Execute( this, aRect, POPUPMENU_EXECUTE_DOWN );
- SetPressed( FALSE );
+ SetPressed( sal_False );
if ( mnCurItemId )
{
Select();
@@ -129,7 +129,7 @@ void MenuButton::ImplLoadRes( const ResId& rResId )
{
Control::ImplLoadRes( rResId );
- ULONG nObjMask = ReadLongRes();
+ sal_uIntPtr nObjMask = ReadLongRes();
if ( RSCMENUBUTTON_MENU & nObjMask )
{
@@ -198,7 +198,7 @@ void MenuButton::MouseButtonDown( const MouseEvent& rMEvt )
void MenuButton::KeyInput( const KeyEvent& rKEvt )
{
KeyCode aKeyCode = rKEvt.GetKeyCode();
- USHORT nCode = aKeyCode.GetCode();
+ sal_uInt16 nCode = aKeyCode.GetCode();
if ( (nCode == KEY_DOWN) && aKeyCode.IsMod2() )
ImplExecuteMenu();
else if ( !(mnMenuMode & MENUBUTTON_MENUMODE_TIMED) &&
@@ -225,7 +225,7 @@ void MenuButton::Select()
// -----------------------------------------------------------------------
-void MenuButton::SetMenuMode( USHORT nMode )
+void MenuButton::SetMenuMode( sal_uInt16 nMode )
{
// Fuer die 5.1-Auslieferung besser noch nicht inline, ansonsten kann
// diese Funktion zur 6.0 inline werden
diff --git a/vcl/source/control/morebtn.cxx b/vcl/source/control/morebtn.cxx
index 921a25756d32..341de3f5b7ad 100644
--- a/vcl/source/control/morebtn.cxx
+++ b/vcl/source/control/morebtn.cxx
@@ -53,7 +53,7 @@ void MoreButton::ImplInit( Window* pParent, WinBits nStyle )
mpMBData = new ImplMoreButtonData;
mnDelta = 0;
meUnit = MAP_PIXEL;
- mbState = FALSE;
+ mbState = sal_False;
mpMBData->mpItemList = NULL;
@@ -67,7 +67,7 @@ void MoreButton::ImplInit( Window* pParent, WinBits nStyle )
ShowState();
SetSymbolAlign( SYMBOLALIGN_RIGHT );
- ImplSetSmallSymbol( TRUE );
+ ImplSetSmallSymbol( sal_True );
if ( ! ( nStyle & ( WB_RIGHT | WB_LEFT ) ) )
{
@@ -119,12 +119,12 @@ void MoreButton::ImplLoadRes( const ResId& rResId )
{
PushButton::ImplLoadRes( rResId );
- ULONG nObjMask = ReadLongRes();
+ sal_uIntPtr nObjMask = ReadLongRes();
if ( nObjMask & RSC_MOREBUTTON_STATE )
{
// Nicht Methode rufen, da Dialog nicht umgeschaltet werden soll
- mbState = (BOOL)ReadShortRes();
+ mbState = (sal_Bool)ReadShortRes();
// SetText( GetText() );
ShowState();
}
diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx
index 54a1e0a97eab..730b96eaee89 100644
--- a/vcl/source/control/scrbar.cxx
+++ b/vcl/source/control/scrbar.cxx
@@ -70,30 +70,30 @@ static long ImplMulDiv( long nNumber, long nNumerator, long nDenominator )
// =======================================================================
-#define SCRBAR_DRAW_BTN1 ((USHORT)0x0001)
-#define SCRBAR_DRAW_BTN2 ((USHORT)0x0002)
-#define SCRBAR_DRAW_PAGE1 ((USHORT)0x0004)
-#define SCRBAR_DRAW_PAGE2 ((USHORT)0x0008)
-#define SCRBAR_DRAW_THUMB ((USHORT)0x0010)
-#define SCRBAR_DRAW_BACKGROUND ((USHORT)0x0020)
+#define SCRBAR_DRAW_BTN1 ((sal_uInt16)0x0001)
+#define SCRBAR_DRAW_BTN2 ((sal_uInt16)0x0002)
+#define SCRBAR_DRAW_PAGE1 ((sal_uInt16)0x0004)
+#define SCRBAR_DRAW_PAGE2 ((sal_uInt16)0x0008)
+#define SCRBAR_DRAW_THUMB ((sal_uInt16)0x0010)
+#define SCRBAR_DRAW_BACKGROUND ((sal_uInt16)0x0020)
#define SCRBAR_DRAW_ALL (SCRBAR_DRAW_BTN1 | SCRBAR_DRAW_BTN2 | \
SCRBAR_DRAW_PAGE1 | SCRBAR_DRAW_PAGE2 |\
SCRBAR_DRAW_THUMB | SCRBAR_DRAW_BACKGROUND )
-#define SCRBAR_STATE_BTN1_DOWN ((USHORT)0x0001)
-#define SCRBAR_STATE_BTN1_DISABLE ((USHORT)0x0002)
-#define SCRBAR_STATE_BTN2_DOWN ((USHORT)0x0004)
-#define SCRBAR_STATE_BTN2_DISABLE ((USHORT)0x0008)
-#define SCRBAR_STATE_PAGE1_DOWN ((USHORT)0x0010)
-#define SCRBAR_STATE_PAGE2_DOWN ((USHORT)0x0020)
-#define SCRBAR_STATE_THUMB_DOWN ((USHORT)0x0040)
+#define SCRBAR_STATE_BTN1_DOWN ((sal_uInt16)0x0001)
+#define SCRBAR_STATE_BTN1_DISABLE ((sal_uInt16)0x0002)
+#define SCRBAR_STATE_BTN2_DOWN ((sal_uInt16)0x0004)
+#define SCRBAR_STATE_BTN2_DISABLE ((sal_uInt16)0x0008)
+#define SCRBAR_STATE_PAGE1_DOWN ((sal_uInt16)0x0010)
+#define SCRBAR_STATE_PAGE2_DOWN ((sal_uInt16)0x0020)
+#define SCRBAR_STATE_THUMB_DOWN ((sal_uInt16)0x0040)
#define SCRBAR_VIEW_STYLE (WB_3DLOOK | WB_HORZ | WB_VERT)
struct ImplScrollBarData
{
AutoTimer maTimer; // Timer
- BOOL mbHide;
+ sal_Bool mbHide;
Rectangle maTrackRect; // TODO: move to ScrollBar class when binary incompatibility of ScrollBar class is no longer problematic
};
@@ -116,14 +116,14 @@ void ScrollBar::ImplInit( Window* pParent, WinBits nStyle )
mnStateFlags = 0;
meScrollType = SCROLL_DONTKNOW;
meDDScrollType = SCROLL_DONTKNOW;
- mbCalcSize = TRUE;
+ mbCalcSize = sal_True;
mbFullDrag = 0;
if( !mpData ) // TODO: remove when maTrackRect is no longer in mpData
{
mpData = new ImplScrollBarData;
mpData->maTimer.SetTimeoutHdl( LINK( this, ScrollBar, ImplAutoTimerHdl ) );
- mpData->mbHide = FALSE;
+ mpData->mbHide = sal_False;
}
ImplInitStyle( nStyle );
@@ -139,7 +139,7 @@ void ScrollBar::ImplInit( Window* pParent, WinBits nStyle )
void ScrollBar::ImplInitStyle( WinBits nStyle )
{
if ( nStyle & WB_DRAG )
- mbFullDrag = TRUE;
+ mbFullDrag = sal_True;
else
mbFullDrag = (GetSettings().GetStyleSettings().GetDragFullOptions() & DRAGFULL_OPTION_SCROLL) != 0;
}
@@ -180,12 +180,12 @@ void ScrollBar::ImplLoadRes( const ResId& rResId )
{
Control::ImplLoadRes( rResId );
- INT16 nMin = ReadShortRes();
- INT16 nMax = ReadShortRes();
- INT16 nThumbPos = ReadShortRes();
- INT16 nPage = ReadShortRes();
- INT16 nStep = ReadShortRes();
- INT16 nVisibleSize = ReadShortRes();
+ sal_Int16 nMin = ReadShortRes();
+ sal_Int16 nMax = ReadShortRes();
+ sal_Int16 nThumbPos = ReadShortRes();
+ sal_Int16 nPage = ReadShortRes();
+ sal_Int16 nStep = ReadShortRes();
+ sal_Int16 nVisibleSize = ReadShortRes();
SetRange( Range( nMin, nMax ) );
SetLineSize( nStep );
@@ -196,9 +196,9 @@ void ScrollBar::ImplLoadRes( const ResId& rResId )
// -----------------------------------------------------------------------
-void ScrollBar::ImplUpdateRects( BOOL bUpdate )
+void ScrollBar::ImplUpdateRects( sal_Bool bUpdate )
{
- USHORT nOldStateFlags = mnStateFlags;
+ sal_uInt16 nOldStateFlags = mnStateFlags;
Rectangle aOldPage1Rect = maPage1Rect;
Rectangle aOldPage2Rect = maPage2Rect;
Rectangle aOldThumbRect = maThumbRect;
@@ -281,7 +281,7 @@ void ScrollBar::ImplUpdateRects( BOOL bUpdate )
if ( bUpdate )
{
- USHORT nDraw = 0;
+ sal_uInt16 nDraw = 0;
if ( (nOldStateFlags & SCRBAR_STATE_BTN1_DISABLE) !=
(mnStateFlags & SCRBAR_STATE_BTN1_DISABLE) )
nDraw |= SCRBAR_DRAW_BTN1;
@@ -334,7 +334,7 @@ long ScrollBar::ImplCalcThumbPosPix( long nPos )
// -----------------------------------------------------------------------
-void ScrollBar::ImplCalc( BOOL bUpdate )
+void ScrollBar::ImplCalc( sal_Bool bUpdate )
{
const Size aSize = GetOutputSizePixel();
const long nMinThumbSize = GetSettings().GetStyleSettings().GetMinThumbSize();;
@@ -431,7 +431,7 @@ void ScrollBar::ImplCalc( BOOL bUpdate )
if ( !mnThumbPixRange )
maThumbRect.SetEmpty();
- mbCalcSize = FALSE;
+ mbCalcSize = sal_False;
}
if ( mnThumbPixRange )
@@ -469,14 +469,14 @@ void ScrollBar::ImplCalc( BOOL bUpdate )
if ( bUpdate && HasPaintEvent() )
{
Invalidate();
- bUpdate = FALSE;
+ bUpdate = sal_False;
}
ImplUpdateRects( bUpdate );
}
// -----------------------------------------------------------------------
-void ScrollBar::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG nFlags )
+void ScrollBar::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uIntPtr nFlags )
{
Point aPos = pDev->LogicToPixel( rPos );
Size aSize = pDev->LogicToPixel( rSize );
@@ -505,7 +505,7 @@ void ScrollBar::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
// -force recalculate
if ( mbCalcSize )
- ImplCalc( FALSE );
+ ImplCalc( sal_False );
maBtn1Rect+=aPos;
maBtn2Rect+=aPos;
@@ -517,19 +517,19 @@ void ScrollBar::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
ImplDraw( SCRBAR_DRAW_ALL, pDev );
pDev->Pop();
- mbCalcSize = TRUE;
+ mbCalcSize = sal_True;
}
// -----------------------------------------------------------------------
-BOOL ScrollBar::ImplDrawNative( USHORT nDrawFlags )
+sal_Bool ScrollBar::ImplDrawNative( sal_uInt16 nDrawFlags )
{
ImplControlValue aControlValue( BUTTONVALUE_DONTKNOW, rtl::OUString(), 0 );
- BOOL bNativeOK = IsNativeControlSupported(CTRL_SCROLLBAR, PART_ENTIRE_CONTROL);
+ sal_Bool bNativeOK = IsNativeControlSupported(CTRL_SCROLLBAR, PART_ENTIRE_CONTROL);
if( bNativeOK )
{
- BOOL bHorz = (GetStyle() & WB_HORZ ? true : false);
+ sal_Bool bHorz = (GetStyle() & WB_HORZ ? true : false);
// Draw the entire background if the control supports it
if( IsNativeControlSupported(CTRL_SCROLLBAR, bHorz ? PART_DRAW_BACKGROUND_HORZ : PART_DRAW_BACKGROUND_VERT) )
@@ -690,18 +690,18 @@ BOOL ScrollBar::ImplDrawNative( USHORT nDrawFlags )
return bNativeOK;
}
-void ScrollBar::ImplDraw( USHORT nDrawFlags, OutputDevice* pOutDev )
+void ScrollBar::ImplDraw( sal_uInt16 nDrawFlags, OutputDevice* pOutDev )
{
DecorationView aDecoView( pOutDev );
Rectangle aTempRect;
- USHORT nStyle;
+ sal_uInt16 nStyle;
const StyleSettings& rStyleSettings = pOutDev->GetSettings().GetStyleSettings();
SymbolType eSymbolType;
- BOOL bEnabled = IsEnabled();
+ sal_Bool bEnabled = IsEnabled();
// Evt. noch offene Berechnungen nachholen
if ( mbCalcSize )
- ImplCalc( FALSE );
+ ImplCalc( sal_False );
Window *pWin = NULL;
if( pOutDev->GetOutDevType() == OUTDEV_WINDOW )
@@ -864,7 +864,7 @@ void ScrollBar::ImplDraw( USHORT nDrawFlags, OutputDevice* pOutDev )
// -----------------------------------------------------------------------
-long ScrollBar::ImplScroll( long nNewPos, BOOL bCallEndScroll )
+long ScrollBar::ImplScroll( long nNewPos, sal_Bool bCallEndScroll )
{
long nOldPos = mnThumbPos;
SetThumbPos( nNewPos );
@@ -882,7 +882,7 @@ long ScrollBar::ImplScroll( long nNewPos, BOOL bCallEndScroll )
// -----------------------------------------------------------------------
-long ScrollBar::ImplDoAction( BOOL bCallEndScroll )
+long ScrollBar::ImplDoAction( sal_Bool bCallEndScroll )
{
long nDelta = 0;
@@ -912,12 +912,12 @@ long ScrollBar::ImplDoAction( BOOL bCallEndScroll )
// -----------------------------------------------------------------------
-void ScrollBar::ImplDoMouseAction( const Point& rMousePos, BOOL bCallAction )
+void ScrollBar::ImplDoMouseAction( const Point& rMousePos, sal_Bool bCallAction )
{
- USHORT nOldStateFlags = mnStateFlags;
- BOOL bAction = FALSE;
- BOOL bHorizontal = ( GetStyle() & WB_HORZ )? TRUE: FALSE;
- BOOL bIsInside = FALSE;
+ sal_uInt16 nOldStateFlags = mnStateFlags;
+ sal_Bool bAction = sal_False;
+ sal_Bool bHorizontal = ( GetStyle() & WB_HORZ )? sal_True: sal_False;
+ sal_Bool bIsInside = sal_False;
Point aPoint( 0, 0 );
Region aControlRegion( Rectangle( aPoint, GetOutputSizePixel() ) );
@@ -984,7 +984,7 @@ void ScrollBar::ImplDoMouseAction( const Point& rMousePos, BOOL bCallAction )
if ( nOldStateFlags != mnStateFlags )
ImplDraw( mnDragDraw, this );
if ( bAction )
- ImplDoAction( FALSE );
+ ImplDoAction( sal_False );
}
// -----------------------------------------------------------------------
@@ -1024,10 +1024,10 @@ void ScrollBar::MouseButtonDown( const MouseEvent& rMEvt )
if ( rMEvt.IsLeft() || rMEvt.IsMiddle() )
{
const Point& rMousePos = rMEvt.GetPosPixel();
- USHORT nTrackFlags = 0;
- BOOL bHorizontal = ( GetStyle() & WB_HORZ )? TRUE: FALSE;
- BOOL bIsInside = FALSE;
- BOOL bDragToMouse = FALSE;
+ sal_uInt16 nTrackFlags = 0;
+ sal_Bool bHorizontal = ( GetStyle() & WB_HORZ )? sal_True: sal_False;
+ sal_Bool bIsInside = sal_False;
+ sal_Bool bDragToMouse = sal_False;
Point aPoint( 0, 0 );
Region aControlRegion( Rectangle( aPoint, GetOutputSizePixel() ) );
@@ -1070,7 +1070,7 @@ void ScrollBar::MouseButtonDown( const MouseEvent& rMEvt )
{
if( mpData )
{
- mpData->mbHide = TRUE; // disable focus blinking
+ mpData->mbHide = sal_True; // disable focus blinking
if( HasFocus() )
ImplDraw( SCRBAR_DRAW_THUMB, this ); // paint without focus
}
@@ -1084,7 +1084,7 @@ void ScrollBar::MouseButtonDown( const MouseEvent& rMEvt )
// calculate mouse offset
if( rMEvt.IsMiddle() || (ImplGetSVData()->maNWFData.mbScrollbarJumpPage && !bThumbHit) )
{
- bDragToMouse = TRUE;
+ bDragToMouse = sal_True;
if ( GetStyle() & WB_HORZ )
mnMouseOff = maThumbRect.GetWidth()/2;
else
@@ -1106,7 +1106,7 @@ void ScrollBar::MouseButtonDown( const MouseEvent& rMEvt )
}
else if( HitTestNativeControl( CTRL_SCROLLBAR, bHorizontal? PART_TRACK_HORZ_AREA : PART_TRACK_VERT_AREA,
aControlRegion, rMousePos, bIsInside )?
- bIsInside : TRUE )
+ bIsInside : sal_True )
{
nTrackFlags = STARTTRACK_BUTTONREPEAT;
@@ -1151,7 +1151,7 @@ void ScrollBar::Tracking( const TrackingEvent& rTEvt )
if ( rTEvt.IsTrackingEnded() )
{
// Button und PageRect-Status wieder herstellen
- USHORT nOldStateFlags = mnStateFlags;
+ sal_uInt16 nOldStateFlags = mnStateFlags;
mnStateFlags &= ~(SCRBAR_STATE_BTN1_DOWN | SCRBAR_STATE_BTN2_DOWN |
SCRBAR_STATE_PAGE1_DOWN | SCRBAR_STATE_PAGE2_DOWN |
SCRBAR_STATE_THUMB_DOWN);
@@ -1188,7 +1188,7 @@ void ScrollBar::Tracking( const TrackingEvent& rTEvt )
meScrollType = SCROLL_DONTKNOW;
if( mpData )
- mpData->mbHide = FALSE; // re-enable focus blinking
+ mpData->mbHide = sal_False; // re-enable focus blinking
}
else
{
@@ -1262,9 +1262,9 @@ void ScrollBar::Paint( const Rectangle& )
void ScrollBar::Resize()
{
Control::Resize();
- mbCalcSize = TRUE;
+ mbCalcSize = sal_True;
if ( IsReallyVisible() )
- ImplCalc( FALSE );
+ ImplCalc( sal_False );
Invalidate();
}
@@ -1303,7 +1303,7 @@ void ScrollBar::GetFocus()
{
mpData = new ImplScrollBarData;
mpData->maTimer.SetTimeoutHdl( LINK( this, ScrollBar, ImplAutoTimerHdl ) );
- mpData->mbHide = FALSE;
+ mpData->mbHide = sal_False;
}
ImplInvert(); // react immediately
mpData->maTimer.SetTimeout( GetSettings().GetStyleSettings().GetCursorBlinkTime() );
@@ -1329,17 +1329,17 @@ void ScrollBar::StateChanged( StateChangedType nType )
Control::StateChanged( nType );
if ( nType == STATE_CHANGE_INITSHOW )
- ImplCalc( FALSE );
+ ImplCalc( sal_False );
else if ( nType == STATE_CHANGE_DATA )
{
if ( IsReallyVisible() && IsUpdateMode() )
- ImplCalc( TRUE );
+ ImplCalc( sal_True );
}
else if ( nType == STATE_CHANGE_UPDATEMODE )
{
if ( IsReallyVisible() && IsUpdateMode() )
{
- ImplCalc( FALSE );
+ ImplCalc( sal_False );
Invalidate();
}
}
@@ -1356,8 +1356,8 @@ void ScrollBar::StateChanged( StateChangedType nType )
if ( (GetPrevStyle() & SCRBAR_VIEW_STYLE) !=
(GetStyle() & SCRBAR_VIEW_STYLE) )
{
- mbCalcSize = TRUE;
- ImplCalc( FALSE );
+ mbCalcSize = sal_True;
+ ImplCalc( sal_False );
Invalidate();
}
}
@@ -1373,8 +1373,8 @@ void ScrollBar::DataChanged( const DataChangedEvent& rDCEvt )
if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE) )
{
- mbCalcSize = TRUE;
- ImplCalc( FALSE );
+ mbCalcSize = sal_True;
+ ImplCalc( sal_False );
Invalidate();
}
}
@@ -1383,8 +1383,8 @@ void ScrollBar::DataChanged( const DataChangedEvent& rDCEvt )
Rectangle* ScrollBar::ImplFindPartRect( const Point& rPt )
{
- BOOL bHorizontal = ( GetStyle() & WB_HORZ )? TRUE: FALSE;
- BOOL bIsInside = FALSE;
+ sal_Bool bHorizontal = ( GetStyle() & WB_HORZ )? sal_True: sal_False;
+ sal_Bool bIsInside = sal_False;
Point aPoint( 0, 0 );
Region aControlRegion( Rectangle( aPoint, GetOutputSizePixel() ) );
@@ -1446,7 +1446,7 @@ long ScrollBar::PreNotify( NotifyEvent& rNEvt )
aClipRegion.Union( *pLastRect );
// Support for 3-button scroll bars
- BOOL bHas3Buttons = IsNativeControlSupported( CTRL_SCROLLBAR, HAS_THREE_BUTTONS );
+ sal_Bool bHas3Buttons = IsNativeControlSupported( CTRL_SCROLLBAR, HAS_THREE_BUTTONS );
if ( bHas3Buttons && ( pRect == &maBtn1Rect || pLastRect == &maBtn1Rect ) )
{
aClipRegion.Union( maBtn2Rect );
@@ -1486,7 +1486,7 @@ long ScrollBar::DoScroll( long nNewPos )
return 0;
meScrollType = SCROLL_DRAG;
- long nDelta = ImplScroll( nNewPos, TRUE );
+ long nDelta = ImplScroll( nNewPos, sal_True );
meScrollType = SCROLL_DONTKNOW;
return nDelta;
}
@@ -1501,7 +1501,7 @@ long ScrollBar::DoScrollAction( ScrollType eScrollType )
return 0;
meScrollType = eScrollType;
- long nDelta = ImplDoAction( TRUE );
+ long nDelta = ImplDoAction( sal_True );
meScrollType = SCROLL_DONTKNOW;
return nDelta;
}
diff --git a/vcl/source/control/slider.cxx b/vcl/source/control/slider.cxx
index 2390a8e3e9a6..588ade6cf9e5 100644
--- a/vcl/source/control/slider.cxx
+++ b/vcl/source/control/slider.cxx
@@ -47,15 +47,15 @@ static long ImplMulDiv( long nNumber, long nNumerator, long nDenominator )
// =======================================================================
-#define SLIDER_DRAW_THUMB ((USHORT)0x0001)
-#define SLIDER_DRAW_CHANNEL1 ((USHORT)0x0002)
-#define SLIDER_DRAW_CHANNEL2 ((USHORT)0x0004)
+#define SLIDER_DRAW_THUMB ((sal_uInt16)0x0001)
+#define SLIDER_DRAW_CHANNEL1 ((sal_uInt16)0x0002)
+#define SLIDER_DRAW_CHANNEL2 ((sal_uInt16)0x0004)
#define SLIDER_DRAW_CHANNEL (SLIDER_DRAW_CHANNEL1 | SLIDER_DRAW_CHANNEL2)
#define SLIDER_DRAW_ALL (SLIDER_DRAW_THUMB | SLIDER_DRAW_CHANNEL)
-#define SLIDER_STATE_CHANNEL1_DOWN ((USHORT)0x0001)
-#define SLIDER_STATE_CHANNEL2_DOWN ((USHORT)0x0002)
-#define SLIDER_STATE_THUMB_DOWN ((USHORT)0x0004)
+#define SLIDER_STATE_CHANNEL1_DOWN ((sal_uInt16)0x0001)
+#define SLIDER_STATE_CHANNEL2_DOWN ((sal_uInt16)0x0002)
+#define SLIDER_STATE_THUMB_DOWN ((sal_uInt16)0x0004)
#define SLIDER_THUMB_SIZE 9
#define SLIDER_THUMB_HALFSIZE 4
@@ -88,8 +88,8 @@ void Slider::ImplInit( Window* pParent, WinBits nStyle )
mnDragDraw = 0;
mnStateFlags = 0;
meScrollType = SCROLL_DONTKNOW;
- mbCalcSize = TRUE;
- mbFullDrag = TRUE;
+ mbCalcSize = sal_True;
+ mbFullDrag = sal_True;
Control::ImplInit( pParent, nStyle, NULL );
@@ -125,12 +125,12 @@ void Slider::ImplLoadRes( const ResId& rResId )
{
Control::ImplLoadRes( rResId );
- INT16 nMin = ReadShortRes();
- INT16 nMax = ReadShortRes();
- INT16 nThumbPos = ReadShortRes();
- INT16 nPage = ReadShortRes();
- INT16 nStep = ReadShortRes();
- /* INT16 nVisibleSize = */ ReadShortRes();
+ sal_Int16 nMin = ReadShortRes();
+ sal_Int16 nMax = ReadShortRes();
+ sal_Int16 nThumbPos = ReadShortRes();
+ sal_Int16 nPage = ReadShortRes();
+ sal_Int16 nStep = ReadShortRes();
+ /* sal_Int16 nVisibleSize = */ ReadShortRes();
SetRange( Range( nMin, nMax ) );
SetLineSize( nStep );
@@ -145,16 +145,16 @@ void Slider::ImplInitSettings()
Window* pParent = GetParent();
if ( pParent->IsChildTransparentModeEnabled() && !IsControlBackground() )
{
- EnableChildTransparentMode( TRUE );
+ EnableChildTransparentMode( sal_True );
SetParentClipMode( PARENTCLIPMODE_NOCLIP );
- SetPaintTransparent( TRUE );
+ SetPaintTransparent( sal_True );
SetBackground();
}
else
{
- EnableChildTransparentMode( FALSE );
+ EnableChildTransparentMode( sal_False );
SetParentClipMode( 0 );
- SetPaintTransparent( FALSE );
+ SetPaintTransparent( sal_False );
if ( IsControlBackground() )
SetBackground( GetControlBackground() );
@@ -165,7 +165,7 @@ void Slider::ImplInitSettings()
// -----------------------------------------------------------------------
-void Slider::ImplUpdateRects( BOOL bUpdate )
+void Slider::ImplUpdateRects( sal_Bool bUpdate )
{
Rectangle aOldThumbRect = maThumbRect;
bool bInvalidateAll = false;
@@ -305,9 +305,9 @@ long Slider::ImplCalcThumbPosPix( long nPos )
// -----------------------------------------------------------------------
-void Slider::ImplCalc( BOOL bUpdate )
+void Slider::ImplCalc( sal_Bool bUpdate )
{
- BOOL bInvalidateAll = FALSE;
+ sal_Bool bInvalidateAll = sal_False;
if ( mbCalcSize )
{
@@ -358,9 +358,9 @@ void Slider::ImplCalc( BOOL bUpdate )
(nOldChannelPixRange != mnChannelPixRange) ||
(nOldChannelPixTop != mnChannelPixTop) ||
(nOldChannelPixBottom != mnChannelPixBottom) )
- bInvalidateAll = TRUE;
+ bInvalidateAll = sal_True;
- mbCalcSize = FALSE;
+ mbCalcSize = sal_False;
}
if ( mnThumbPixRange )
@@ -369,23 +369,23 @@ void Slider::ImplCalc( BOOL bUpdate )
if ( bUpdate && bInvalidateAll )
{
Invalidate();
- bUpdate = FALSE;
+ bUpdate = sal_False;
}
ImplUpdateRects( bUpdate );
}
// -----------------------------------------------------------------------
-void Slider::ImplDraw( USHORT nDrawFlags )
+void Slider::ImplDraw( sal_uInt16 nDrawFlags )
{
DecorationView aDecoView( this );
- USHORT nStyle;
+ sal_uInt16 nStyle;
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- BOOL bEnabled = IsEnabled();
+ sal_Bool bEnabled = IsEnabled();
// Evt. noch offene Berechnungen nachholen
if ( mbCalcSize )
- ImplCalc( FALSE );
+ ImplCalc( sal_False );
ControlPart nPart = (GetStyle() & WB_HORZ) ? PART_TRACK_HORZ_AREA : PART_TRACK_VERT_AREA;
ImplControlValue aControlValue( BUTTONVALUE_DONTKNOW, rtl::OUString(), 0 );
@@ -518,7 +518,7 @@ void Slider::ImplDraw( USHORT nDrawFlags )
// -----------------------------------------------------------------------
-BOOL Slider::ImplIsPageUp( const Point& rPos )
+sal_Bool Slider::ImplIsPageUp( const Point& rPos )
{
Size aSize = GetOutputSizePixel();
Rectangle aRect = maChannel1Rect;
@@ -537,7 +537,7 @@ BOOL Slider::ImplIsPageUp( const Point& rPos )
// -----------------------------------------------------------------------
-BOOL Slider::ImplIsPageDown( const Point& rPos )
+sal_Bool Slider::ImplIsPageDown( const Point& rPos )
{
Size aSize = GetOutputSizePixel();
Rectangle aRect = maChannel2Rect;
@@ -556,7 +556,7 @@ BOOL Slider::ImplIsPageDown( const Point& rPos )
// -----------------------------------------------------------------------
-long Slider::ImplSlide( long nNewPos, BOOL bCallEndSlide )
+long Slider::ImplSlide( long nNewPos, sal_Bool bCallEndSlide )
{
long nOldPos = mnThumbPos;
SetThumbPos( nNewPos );
@@ -574,7 +574,7 @@ long Slider::ImplSlide( long nNewPos, BOOL bCallEndSlide )
// -----------------------------------------------------------------------
-long Slider::ImplDoAction( BOOL bCallEndSlide )
+long Slider::ImplDoAction( sal_Bool bCallEndSlide )
{
long nDelta = 0;
@@ -608,10 +608,10 @@ long Slider::ImplDoAction( BOOL bCallEndSlide )
// -----------------------------------------------------------------------
-void Slider::ImplDoMouseAction( const Point& rMousePos, BOOL bCallAction )
+void Slider::ImplDoMouseAction( const Point& rMousePos, sal_Bool bCallAction )
{
- USHORT nOldStateFlags = mnStateFlags;
- BOOL bAction = FALSE;
+ sal_uInt16 nOldStateFlags = mnStateFlags;
+ sal_Bool bAction = sal_False;
switch ( meScrollType )
{
@@ -654,7 +654,7 @@ void Slider::ImplDoMouseAction( const Point& rMousePos, BOOL bCallAction )
if ( bAction )
{
- if ( ImplDoAction( FALSE ) )
+ if ( ImplDoAction( sal_False ) )
{
// Update the channel complete
if ( mnDragDraw & SLIDER_DRAW_CHANNEL )
@@ -676,7 +676,7 @@ long Slider::ImplDoSlide( long nNewPos )
return 0;
meScrollType = SCROLL_DRAG;
- long nDelta = ImplSlide( nNewPos, TRUE );
+ long nDelta = ImplSlide( nNewPos, sal_True );
meScrollType = SCROLL_DONTKNOW;
return nDelta;
}
@@ -691,7 +691,7 @@ long Slider::ImplDoSlideAction( ScrollType eScrollType )
return 0;
meScrollType = eScrollType;
- long nDelta = ImplDoAction( TRUE );
+ long nDelta = ImplDoAction( sal_True );
meScrollType = SCROLL_DONTKNOW;
return nDelta;
}
@@ -703,7 +703,7 @@ void Slider::MouseButtonDown( const MouseEvent& rMEvt )
if ( rMEvt.IsLeft() )
{
const Point& rMousePos = rMEvt.GetPosPixel();
- USHORT nTrackFlags = 0;
+ sal_uInt16 nTrackFlags = 0;
if ( maThumbRect.IsInside( rMousePos ) )
{
@@ -771,7 +771,7 @@ void Slider::MouseButtonUp( const MouseEvent& )
if( SCROLL_SET == meScrollType )
{
// Button und PageRect-Status wieder herstellen
- const USHORT nOldStateFlags = mnStateFlags;
+ const sal_uInt16 nOldStateFlags = mnStateFlags;
mnStateFlags &= ~( SLIDER_STATE_CHANNEL1_DOWN | SLIDER_STATE_CHANNEL2_DOWN | SLIDER_STATE_THUMB_DOWN );
@@ -779,7 +779,7 @@ void Slider::MouseButtonUp( const MouseEvent& )
ImplDraw( mnDragDraw );
mnDragDraw = 0;
- ImplDoAction( TRUE );
+ ImplDoAction( sal_True );
meScrollType = SCROLL_DONTKNOW;
}
}
@@ -791,7 +791,7 @@ void Slider::Tracking( const TrackingEvent& rTEvt )
if ( rTEvt.IsTrackingEnded() )
{
// Button und PageRect-Status wieder herstellen
- USHORT nOldStateFlags = mnStateFlags;
+ sal_uInt16 nOldStateFlags = mnStateFlags;
mnStateFlags &= ~(SLIDER_STATE_CHANNEL1_DOWN | SLIDER_STATE_CHANNEL2_DOWN |
SLIDER_STATE_THUMB_DOWN);
if ( nOldStateFlags != mnStateFlags )
@@ -928,9 +928,9 @@ void Slider::Paint( const Rectangle& )
void Slider::Resize()
{
Control::Resize();
- mbCalcSize = TRUE;
+ mbCalcSize = sal_True;
if ( IsReallyVisible() )
- ImplCalc( FALSE );
+ ImplCalc( sal_False );
Invalidate();
}
@@ -948,17 +948,17 @@ void Slider::StateChanged( StateChangedType nType )
Control::StateChanged( nType );
if ( nType == STATE_CHANGE_INITSHOW )
- ImplCalc( FALSE );
+ ImplCalc( sal_False );
else if ( nType == STATE_CHANGE_DATA )
{
if ( IsReallyVisible() && IsUpdateMode() )
- ImplCalc( TRUE );
+ ImplCalc( sal_True );
}
else if ( nType == STATE_CHANGE_UPDATEMODE )
{
if ( IsReallyVisible() && IsUpdateMode() )
{
- ImplCalc( FALSE );
+ ImplCalc( sal_False );
Invalidate();
}
}
@@ -974,8 +974,8 @@ void Slider::StateChanged( StateChangedType nType )
if ( (GetPrevStyle() & SLIDER_VIEW_STYLE) !=
(GetStyle() & SLIDER_VIEW_STYLE) )
{
- mbCalcSize = TRUE;
- ImplCalc( FALSE );
+ mbCalcSize = sal_True;
+ ImplCalc( sal_False );
Invalidate();
}
}
diff --git a/vcl/source/control/spinbtn.cxx b/vcl/source/control/spinbtn.cxx
index 921ba2a24e5a..5426412cf7f6 100644
--- a/vcl/source/control/spinbtn.cxx
+++ b/vcl/source/control/spinbtn.cxx
@@ -36,10 +36,10 @@
void SpinButton::ImplInit( Window* pParent, WinBits nStyle )
{
- mbUpperIn = FALSE;
- mbLowerIn = FALSE;
- mbInitialUp = FALSE;
- mbInitialDown = FALSE;
+ mbUpperIn = sal_False;
+ mbLowerIn = sal_False;
+ mbInitialUp = sal_False;
+ mbInitialDown = sal_False;
mnMinRange = 0;
mnMaxRange = 100;
@@ -52,9 +52,9 @@ void SpinButton::ImplInit( Window* pParent, WinBits nStyle )
mbRepeat = 0 != ( nStyle & WB_REPEAT );
if ( nStyle & WB_HSCROLL )
- mbHorz = TRUE;
+ mbHorz = sal_True;
else
- mbHorz = FALSE;
+ mbHorz = sal_False;
Control::ImplInit( pParent, nStyle, NULL );
}
@@ -63,7 +63,7 @@ void SpinButton::ImplInit( Window* pParent, WinBits nStyle )
SpinButton::SpinButton( Window* pParent, WinBits nStyle )
:Control( WINDOW_SPINBUTTON )
- ,mbUpperIsFocused( FALSE )
+ ,mbUpperIsFocused( sal_False )
{
ImplInit( pParent, nStyle );
}
@@ -72,7 +72,7 @@ SpinButton::SpinButton( Window* pParent, WinBits nStyle )
SpinButton::SpinButton( Window* pParent, const ResId& rResId )
:Control( WINDOW_SPINBUTTON )
- ,mbUpperIsFocused( FALSE )
+ ,mbUpperIsFocused( sal_False )
{
rResId.SetRT( RSC_SPINBUTTON );
ImplInit( pParent, ImplInitRes( rResId ) );
@@ -115,7 +115,7 @@ void SpinButton::Up()
mnValue += mnValueStep;
StateChanged( STATE_CHANGE_DATA );
- ImplMoveFocus( TRUE );
+ ImplMoveFocus( sal_True );
}
ImplCallEventListenersAndHandler( VCLEVENT_SPINBUTTON_UP, maUpHdlLink, this );
@@ -130,7 +130,7 @@ void SpinButton::Down()
mnValue -= mnValueStep;
StateChanged( STATE_CHANGE_DATA );
- ImplMoveFocus( FALSE );
+ ImplMoveFocus( sal_False );
}
ImplCallEventListenersAndHandler( VCLEVENT_SPINBUTTON_DOWN, maDownHdlLink, this );
@@ -163,7 +163,7 @@ void SpinButton::Resize()
// -----------------------------------------------------------------------
-void SpinButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG nFlags )
+void SpinButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uIntPtr nFlags )
{
Point aPos = pDev->LogicToPixel( rPos );
Size aSize = pDev->LogicToPixel( rSize );
@@ -200,9 +200,9 @@ void SpinButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
aUpperRect += aPos;
aLowerRect += aPos;
- ImplDrawSpinButton( pDev, aUpperRect, aLowerRect, FALSE, FALSE,
+ ImplDrawSpinButton( pDev, aUpperRect, aLowerRect, sal_False, sal_False,
IsEnabled() && ImplIsUpperEnabled(),
- IsEnabled() && ImplIsLowerEnabled(), mbHorz, TRUE );
+ IsEnabled() && ImplIsLowerEnabled(), mbHorz, sal_True );
pDev->Pop();
}
@@ -211,10 +211,10 @@ void SpinButton::Paint( const Rectangle& )
{
HideFocus();
- BOOL bEnable = IsEnabled();
+ sal_Bool bEnable = IsEnabled();
ImplDrawSpinButton( this, maUpperRect, maLowerRect, mbUpperIn, mbLowerIn,
bEnable && ImplIsUpperEnabled(),
- bEnable && ImplIsLowerEnabled(), mbHorz, TRUE );
+ bEnable && ImplIsLowerEnabled(), mbHorz, sal_True );
if ( HasFocus() )
ShowFocus( maFocusRect );
@@ -226,14 +226,14 @@ void SpinButton::MouseButtonDown( const MouseEvent& rMEvt )
{
if ( maUpperRect.IsInside( rMEvt.GetPosPixel() ) && ( ImplIsUpperEnabled() ) )
{
- mbUpperIn = TRUE;
- mbInitialUp = TRUE;
+ mbUpperIn = sal_True;
+ mbInitialUp = sal_True;
Invalidate( maUpperRect );
}
else if ( maLowerRect.IsInside( rMEvt.GetPosPixel() ) && ( ImplIsLowerEnabled() ) )
{
- mbLowerIn = TRUE;
- mbInitialDown = TRUE;
+ mbLowerIn = sal_True;
+ mbInitialDown = sal_True;
Invalidate( maLowerRect );
}
@@ -259,20 +259,20 @@ void SpinButton::MouseButtonUp( const MouseEvent& )
if ( mbUpperIn )
{
- mbUpperIn = FALSE;
+ mbUpperIn = sal_False;
Invalidate( maUpperRect );
Update();
Up();
}
else if ( mbLowerIn )
{
- mbLowerIn = FALSE;
+ mbLowerIn = sal_False;
Invalidate( maLowerRect );
Update();
Down();
}
- mbInitialUp = mbInitialDown = FALSE;
+ mbInitialUp = mbInitialDown = sal_False;
}
// -----------------------------------------------------------------------
@@ -285,7 +285,7 @@ void SpinButton::MouseMove( const MouseEvent& rMEvt )
if ( !maUpperRect.IsInside( rMEvt.GetPosPixel() ) &&
mbUpperIn && mbInitialUp )
{
- mbUpperIn = FALSE;
+ mbUpperIn = sal_False;
maRepeatTimer.Stop();
Invalidate( maUpperRect );
Update();
@@ -293,7 +293,7 @@ void SpinButton::MouseMove( const MouseEvent& rMEvt )
else if ( !maLowerRect.IsInside( rMEvt.GetPosPixel() ) &&
mbLowerIn & mbInitialDown )
{
- mbLowerIn = FALSE;
+ mbLowerIn = sal_False;
maRepeatTimer.Stop();
Invalidate( maLowerRect );
Update();
@@ -301,7 +301,7 @@ void SpinButton::MouseMove( const MouseEvent& rMEvt )
else if ( maUpperRect.IsInside( rMEvt.GetPosPixel() ) &&
!mbUpperIn && mbInitialUp )
{
- mbUpperIn = TRUE;
+ mbUpperIn = sal_True;
if ( mbRepeat )
maRepeatTimer.Start();
Invalidate( maUpperRect );
@@ -310,7 +310,7 @@ void SpinButton::MouseMove( const MouseEvent& rMEvt )
else if ( maLowerRect.IsInside( rMEvt.GetPosPixel() ) &&
!mbLowerIn && mbInitialDown )
{
- mbLowerIn = TRUE;
+ mbLowerIn = sal_True;
if ( mbRepeat )
maRepeatTimer.Start();
Invalidate( maLowerRect );
@@ -331,7 +331,7 @@ void SpinButton::KeyInput( const KeyEvent& rKEvt )
case KEY_LEFT:
case KEY_RIGHT:
{
- BOOL bUp = KEY_RIGHT == rKEvt.GetKeyCode().GetCode();
+ sal_Bool bUp = KEY_RIGHT == rKEvt.GetKeyCode().GetCode();
if ( mbHorz && !ImplMoveFocus( bUp ) )
bUp ? Up() : Down();
}
@@ -340,7 +340,7 @@ void SpinButton::KeyInput( const KeyEvent& rKEvt )
case KEY_UP:
case KEY_DOWN:
{
- BOOL bUp = KEY_UP == rKEvt.GetKeyCode().GetCode();
+ sal_Bool bUp = KEY_UP == rKEvt.GetKeyCode().GetCode();
if ( !mbHorz && !ImplMoveFocus( KEY_UP == rKEvt.GetKeyCode().GetCode() ) )
bUp ? Up() : Down();
}
@@ -372,7 +372,7 @@ void SpinButton::StateChanged( StateChangedType nType )
case STATE_CHANGE_STYLE:
{
- BOOL bNewRepeat = 0 != ( GetStyle() & WB_REPEAT );
+ sal_Bool bNewRepeat = 0 != ( GetStyle() & WB_REPEAT );
if ( bNewRepeat != mbRepeat )
{
if ( maRepeatTimer.IsActive() )
@@ -383,7 +383,7 @@ void SpinButton::StateChanged( StateChangedType nType )
mbRepeat = bNewRepeat;
}
- BOOL bNewHorz = 0 != ( GetStyle() & WB_HSCROLL );
+ sal_Bool bNewHorz = 0 != ( GetStyle() & WB_HSCROLL );
if ( bNewHorz != mbHorz )
{
mbHorz = bNewHorz;
@@ -472,21 +472,21 @@ void SpinButton::LoseFocus()
// -----------------------------------------------------------------------
-BOOL SpinButton::ImplMoveFocus( BOOL _bUpper )
+sal_Bool SpinButton::ImplMoveFocus( sal_Bool _bUpper )
{
if ( _bUpper == mbUpperIsFocused )
- return FALSE;
+ return sal_False;
HideFocus();
ImplCalcFocusRect( _bUpper );
if ( HasFocus() )
ShowFocus( maFocusRect );
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-void SpinButton::ImplCalcFocusRect( BOOL _bUpper )
+void SpinButton::ImplCalcFocusRect( sal_Bool _bUpper )
{
maFocusRect = _bUpper ? maUpperRect : maLowerRect;
// inflate by some pixels
diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx
index d18a412e31cc..522af98d4d45 100644
--- a/vcl/source/control/spinfld.cxx
+++ b/vcl/source/control/spinfld.cxx
@@ -40,8 +40,8 @@
void ImplGetSpinbuttonValue( Window *pWin, const Rectangle& rUpperRect,
const Rectangle& rLowerRect,
- BOOL bUpperIn, BOOL bLowerIn,
- BOOL bUpperEnabled, BOOL bLowerEnabled, BOOL bHorz,
+ sal_Bool bUpperIn, sal_Bool bLowerIn,
+ sal_Bool bUpperEnabled, sal_Bool bLowerEnabled, sal_Bool bHorz,
SpinbuttonValue& rValue )
{
// convert spinbutton data to a SpinbuttonValue structure for native painting
@@ -80,9 +80,9 @@ void ImplGetSpinbuttonValue( Window *pWin, const Rectangle& rUpperRect,
}
-BOOL ImplDrawNativeSpinfield( Window *pWin, const SpinbuttonValue& rSpinbuttonValue )
+sal_Bool ImplDrawNativeSpinfield( Window *pWin, const SpinbuttonValue& rSpinbuttonValue )
{
- BOOL bNativeOK = FALSE;
+ sal_Bool bNativeOK = sal_False;
if( pWin->IsNativeControlSupported(CTRL_SPINBOX, PART_ENTIRE_CONTROL) &&
// there is just no useful native support for spinfields with dropdown
@@ -133,9 +133,9 @@ BOOL ImplDrawNativeSpinfield( Window *pWin, const SpinbuttonValue& rSpinbuttonVa
return bNativeOK;
}
-BOOL ImplDrawNativeSpinbuttons( Window *pWin, const SpinbuttonValue& rSpinbuttonValue )
+sal_Bool ImplDrawNativeSpinbuttons( Window *pWin, const SpinbuttonValue& rSpinbuttonValue )
{
- BOOL bNativeOK = FALSE;
+ sal_Bool bNativeOK = sal_False;
if( pWin->IsNativeControlSupported(CTRL_SPINBUTTONS, PART_ENTIRE_CONTROL) )
{
@@ -152,13 +152,13 @@ BOOL ImplDrawNativeSpinbuttons( Window *pWin, const SpinbuttonValue& rSpinbutton
void ImplDrawSpinButton( OutputDevice* pOutDev,
const Rectangle& rUpperRect,
const Rectangle& rLowerRect,
- BOOL bUpperIn, BOOL bLowerIn,
- BOOL bUpperEnabled, BOOL bLowerEnabled, BOOL bHorz, BOOL bMirrorHorz )
+ sal_Bool bUpperIn, sal_Bool bLowerIn,
+ sal_Bool bUpperEnabled, sal_Bool bLowerEnabled, sal_Bool bHorz, sal_Bool bMirrorHorz )
{
DecorationView aDecoView( pOutDev );
- USHORT nStyle = BUTTON_DRAW_NOLEFTLIGHTBORDER;
- USHORT nSymStyle = 0;
+ sal_uInt16 nStyle = BUTTON_DRAW_NOLEFTLIGHTBORDER;
+ sal_uInt16 nSymStyle = 0;
SymbolType eType1, eType2;
@@ -192,11 +192,11 @@ void ImplDrawSpinButton( OutputDevice* pOutDev,
}
// Oberen/linken Button malen
- USHORT nTempStyle = nStyle;
+ sal_uInt16 nTempStyle = nStyle;
if ( bUpperIn )
nTempStyle |= BUTTON_DRAW_PRESSED;
- BOOL bNativeOK = FALSE;
+ sal_Bool bNativeOK = sal_False;
Rectangle aUpRect;
if( pOutDev->GetOutDevType() == OUTDEV_WINDOW )
@@ -302,14 +302,14 @@ void ImplDrawSpinButton( OutputDevice* pOutDev,
void SpinField::ImplInitSpinFieldData()
{
mpEdit = NULL;
- mbSpin = FALSE;
- mbRepeat = FALSE;
- mbUpperIn = FALSE;
- mbLowerIn = FALSE;
- mbInitialUp = FALSE;
- mbInitialDown = FALSE;
- mbNoSelect = FALSE;
- mbInDropDown = FALSE;
+ mbSpin = sal_False;
+ mbRepeat = sal_False;
+ mbUpperIn = sal_False;
+ mbLowerIn = sal_False;
+ mbInitialUp = sal_False;
+ mbInitialDown = sal_False;
+ mbNoSelect = sal_False;
+ mbInDropDown = sal_False;
}
// --------------------------------------------------------------------
@@ -320,7 +320,7 @@ void SpinField::ImplInit( Window* pParent, WinBits nWinStyle )
if ( nWinStyle & (WB_SPIN|WB_DROPDOWN) )
{
- mbSpin = TRUE;
+ mbSpin = sal_True;
// Some themes want external spin buttons, therefore the main
// spinfield should not overdraw the border between its encapsulated
@@ -334,7 +334,7 @@ void SpinField::ImplInit( Window* pParent, WinBits nWinStyle )
else
mpEdit = new Edit( this, WB_NOBORDER );
- mpEdit->EnableRTL( FALSE );
+ mpEdit->EnableRTL( sal_False );
mpEdit->SetPosPixel( Point() );
mpEdit->Show();
SetSubEdit( mpEdit );
@@ -342,9 +342,9 @@ void SpinField::ImplInit( Window* pParent, WinBits nWinStyle )
maRepeatTimer.SetTimeoutHdl( LINK( this, SpinField, ImplTimeout ) );
maRepeatTimer.SetTimeout( GetSettings().GetMouseSettings().GetButtonStartRepeat() );
if ( nWinStyle & WB_REPEAT )
- mbRepeat = TRUE;
+ mbRepeat = sal_True;
- SetCompoundControl( TRUE );
+ SetCompoundControl( sal_True );
}
}
@@ -421,7 +421,7 @@ void SpinField::MouseButtonDown( const MouseEvent& rMEvt )
{
if ( !HasFocus() && ( !mpEdit || !mpEdit->HasFocus() ) )
{
- mbNoSelect = TRUE;
+ mbNoSelect = sal_True;
GrabFocus();
}
@@ -429,20 +429,20 @@ void SpinField::MouseButtonDown( const MouseEvent& rMEvt )
{
if ( maUpperRect.IsInside( rMEvt.GetPosPixel() ) )
{
- mbUpperIn = TRUE;
- mbInitialUp = TRUE;
+ mbUpperIn = sal_True;
+ mbInitialUp = sal_True;
Invalidate( maUpperRect );
}
else if ( maLowerRect.IsInside( rMEvt.GetPosPixel() ) )
{
- mbLowerIn = TRUE;
- mbInitialDown = TRUE;
+ mbLowerIn = sal_True;
+ mbInitialDown = sal_True;
Invalidate( maLowerRect );
}
else if ( maDropDownRect.IsInside( rMEvt.GetPosPixel() ) )
{
// Rechts daneben liegt der DropDownButton:
- mbInDropDown = ShowDropDown( mbInDropDown ? FALSE : TRUE );
+ mbInDropDown = ShowDropDown( mbInDropDown ? sal_False : sal_True );
Paint( Rectangle( Point(), GetOutputSizePixel() ) );
}
@@ -464,20 +464,20 @@ void SpinField::MouseButtonDown( const MouseEvent& rMEvt )
void SpinField::MouseButtonUp( const MouseEvent& rMEvt )
{
ReleaseMouse();
- mbInitialUp = mbInitialDown = FALSE;
+ mbInitialUp = mbInitialDown = sal_False;
maRepeatTimer.Stop();
maRepeatTimer.SetTimeout( GetSettings().GetMouseSettings().GetButtonStartRepeat() );
if ( mbUpperIn )
{
- mbUpperIn = FALSE;
+ mbUpperIn = sal_False;
Invalidate( maUpperRect );
Update();
Up();
}
else if ( mbLowerIn )
{
- mbLowerIn = FALSE;
+ mbLowerIn = sal_False;
Invalidate( maLowerRect );
Update();
Down();
@@ -494,7 +494,7 @@ void SpinField::MouseMove( const MouseEvent& rMEvt )
{
if ( mbInitialUp )
{
- BOOL bNewUpperIn = maUpperRect.IsInside( rMEvt.GetPosPixel() );
+ sal_Bool bNewUpperIn = maUpperRect.IsInside( rMEvt.GetPosPixel() );
if ( bNewUpperIn != mbUpperIn )
{
if ( bNewUpperIn )
@@ -512,7 +512,7 @@ void SpinField::MouseMove( const MouseEvent& rMEvt )
}
else if ( mbInitialDown )
{
- BOOL bNewLowerIn = maLowerRect.IsInside( rMEvt.GetPosPixel() );
+ sal_Bool bNewLowerIn = maLowerRect.IsInside( rMEvt.GetPosPixel() );
if ( bNewLowerIn != mbLowerIn )
{
if ( bNewLowerIn )
@@ -543,7 +543,7 @@ long SpinField::Notify( NotifyEvent& rNEvt )
const KeyEvent& rKEvt = *rNEvt.GetKeyEvent();
if ( !IsReadOnly() )
{
- USHORT nMod = rKEvt.GetKeyCode().GetModifier();
+ sal_uInt16 nMod = rKEvt.GetKeyCode().GetModifier();
switch ( rKEvt.GetKeyCode().GetCode() )
{
case KEY_UP:
@@ -564,7 +564,7 @@ long SpinField::Notify( NotifyEvent& rNEvt )
}
else if ( ( nMod == KEY_MOD2 ) && !mbInDropDown && ( GetStyle() & WB_DROPDOWN ) )
{
- mbInDropDown = ShowDropDown( TRUE );
+ mbInDropDown = ShowDropDown( sal_True );
Paint( Rectangle( Point(), GetOutputSizePixel() ) );
nDone = 1;
}
@@ -596,7 +596,7 @@ long SpinField::Notify( NotifyEvent& rNEvt )
{
if ( ( rNEvt.GetCommandEvent()->GetCommand() == COMMAND_WHEEL ) && !IsReadOnly() )
{
- USHORT nWheelBehavior( GetSettings().GetMouseSettings().GetWheelBehavior() );
+ sal_uInt16 nWheelBehavior( GetSettings().GetMouseSettings().GetWheelBehavior() );
if ( ( nWheelBehavior == MOUSE_WHEEL_ALWAYS )
|| ( ( nWheelBehavior == MOUSE_WHEEL_FOCUS_ONLY )
&& HasChildPathFocus()
@@ -648,7 +648,7 @@ void SpinField::Paint( const Rectangle& rRect )
{
if ( mbSpin )
{
- BOOL bEnable = IsEnabled();
+ sal_Bool bEnable = IsEnabled();
ImplDrawSpinButton( this, maUpperRect, maLowerRect,
mbUpperIn, mbLowerIn, bEnable, bEnable );
}
@@ -657,7 +657,7 @@ void SpinField::Paint( const Rectangle& rRect )
{
DecorationView aView( this );
- USHORT nStyle = BUTTON_DRAW_NOLIGHTBORDER;
+ sal_uInt16 nStyle = BUTTON_DRAW_NOLIGHTBORDER;
if ( mbInDropDown )
nStyle |= BUTTON_DRAW_PRESSED;
Rectangle aInnerRect = aView.DrawButton( maDropDownRect, nStyle );
@@ -704,7 +704,7 @@ void SpinField::ImplCalcButtonAreas( OutputDevice* pDev, const Size& rOutSz, Rec
if ( !(aSize.Height() & 0x01) )
nBottom1--;
- BOOL bNativeRegionOK = FALSE;
+ sal_Bool bNativeRegionOK = sal_False;
Region aContentUp, aContentDown;
if ( (pDev->GetOutDevType() == OUTDEV_WINDOW) &&
@@ -844,9 +844,9 @@ void SpinField::StateChanged( StateChangedType nType )
else if ( nType == STATE_CHANGE_STYLE )
{
if ( GetStyle() & WB_REPEAT )
- mbRepeat = TRUE;
+ mbRepeat = sal_True;
else
- mbRepeat = FALSE;
+ mbRepeat = sal_False;
}
else if ( nType == STATE_CHANGE_ZOOM )
{
@@ -859,21 +859,21 @@ void SpinField::StateChanged( StateChangedType nType )
{
if ( mpEdit )
mpEdit->SetControlFont( GetControlFont() );
- ImplInitSettings( TRUE, FALSE, FALSE );
+ ImplInitSettings( sal_True, sal_False, sal_False );
Invalidate();
}
else if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
{
if ( mpEdit )
mpEdit->SetControlForeground( GetControlForeground() );
- ImplInitSettings( FALSE, TRUE, FALSE );
+ ImplInitSettings( sal_False, sal_True, sal_False );
Invalidate();
}
else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
{
if ( mpEdit )
mpEdit->SetControlBackground( GetControlBackground() );
- ImplInitSettings( FALSE, FALSE, TRUE );
+ ImplInitSettings( sal_False, sal_False, sal_True );
Invalidate();
}
else if( nType == STATE_CHANGE_MIRRORING )
@@ -964,15 +964,15 @@ long SpinField::PreNotify( NotifyEvent& rNEvt )
void SpinField::EndDropDown()
{
- mbInDropDown = FALSE;
+ mbInDropDown = sal_False;
Paint( Rectangle( Point(), GetOutputSizePixel() ) );
}
// -----------------------------------------------------------------------
-BOOL SpinField::ShowDropDown( BOOL )
+sal_Bool SpinField::ShowDropDown( sal_Bool )
{
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -1003,7 +1003,7 @@ Size SpinField::GetOptimalSize(WindowSizeType eType) const
// -----------------------------------------------------------------------
-Size SpinField::CalcSize( USHORT nChars ) const
+Size SpinField::CalcSize( sal_uInt16 nChars ) const
{
Size aSz = Edit::CalcSize( nChars );
@@ -1036,7 +1036,7 @@ IMPL_LINK( SpinField, ImplTimeout, Timer*, pTimer )
// -----------------------------------------------------------------------
-void SpinField::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG nFlags )
+void SpinField::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uIntPtr nFlags )
{
Edit::Draw( pDev, rPos, rSize, nFlags );
@@ -1077,7 +1077,7 @@ void SpinField::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
if ( GetStyle() & WB_DROPDOWN )
{
DecorationView aView( pDev );
- USHORT nStyle = BUTTON_DRAW_NOLIGHTBORDER;
+ sal_uInt16 nStyle = BUTTON_DRAW_NOLIGHTBORDER;
Rectangle aInnerRect = aView.DrawButton( aDD, nStyle );
SymbolType eSymbol = SYMBOL_SPIN_DOWN;
if ( GetSettings().GetStyleSettings().GetOptions() & STYLE_OPTION_SPINUPDOWN )
@@ -1089,7 +1089,7 @@ void SpinField::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
if ( GetStyle() & WB_SPIN )
{
- ImplDrawSpinButton( pDev, aUp, aDown, FALSE, FALSE, TRUE, TRUE );
+ ImplDrawSpinButton( pDev, aUp, aDown, sal_False, sal_False, sal_True, sal_True );
}
pDev->Pop();
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index 95f84626b582..7f4afb197cbe 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -53,22 +53,22 @@
struct ImplTabItem
{
- USHORT mnId;
- USHORT mnTabPageResId;
+ sal_uInt16 mnId;
+ sal_uInt16 mnTabPageResId;
TabPage* mpTabPage;
String maText;
String maFormatText;
String maHelpText;
- ULONG mnHelpId;
+ sal_uIntPtr mnHelpId;
Rectangle maRect;
- USHORT mnLine;
+ sal_uInt16 mnLine;
bool mbFullVisible;
bool mbEnabled;
Image maTabImage;
ImplTabItem()
: mnId( 0 ), mnTabPageResId( 0 ), mpTabPage( NULL ), mnHelpId( 0 ),
- mnLine( 0 ), mbFullVisible( FALSE ), mbEnabled( true )
+ mnLine( 0 ), mbFullVisible( sal_False ), mbEnabled( true )
{}
};
@@ -146,21 +146,21 @@ void TabControl::ImplInit( Window* pParent, WinBits nStyle )
mnCurPageId = 0;
mnFirstPagePos = 0;
mnLastFirstPagePos = 0;
- mbFormat = TRUE;
- mbRestoreHelpId = FALSE;
- mbRestoreUnqId = FALSE;
- mbSingleLine = FALSE;
- mbScroll = FALSE;
- mbRestoreSmartId = FALSE;
- mbSmallInvalidate = FALSE;
- mbExtraSpace = FALSE;
+ mbFormat = sal_True;
+ mbRestoreHelpId = sal_False;
+ mbRestoreUnqId = sal_False;
+ mbSingleLine = sal_False;
+ mbScroll = sal_False;
+ mbRestoreSmartId = sal_False;
+ mbSmallInvalidate = sal_False;
+ mbExtraSpace = sal_False;
mpTabCtrlData = new ImplTabCtrlData;
mpTabCtrlData->mpLeftBtn = NULL;
mpTabCtrlData->mpRightBtn = NULL;
mpTabCtrlData->mpListBox = NULL;
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
if( (nStyle & WB_DROPDOWN) )
{
@@ -173,7 +173,7 @@ void TabControl::ImplInit( Window* pParent, WinBits nStyle )
// if the tabcontrol is drawn (ie filled) by a native widget, make sure all contols will have transparent background
// otherwise they will paint with a wrong background
if( IsNativeControlSupported(CTRL_TAB_PANE, PART_ENTIRE_CONTROL) )
- EnableChildTransparentMode( TRUE );
+ EnableChildTransparentMode( sal_True );
if ( pParent->IsDialog() )
pParent->AddChildEventListener( LINK( this, TabControl, ImplWindowEventListener ) );
@@ -194,8 +194,8 @@ const Color& TabControl::GetCanonicalTextColor( const StyleSettings& _rStyle ) c
// -----------------------------------------------------------------------
-void TabControl::ImplInitSettings( BOOL bFont,
- BOOL bForeground, BOOL bBackground )
+void TabControl::ImplInitSettings( sal_Bool bFont,
+ sal_Bool bForeground, sal_Bool bBackground )
{
Control::ImplInitSettings( bFont, bForeground );
@@ -210,17 +210,17 @@ void TabControl::ImplInitSettings( BOOL bFont,
{
// set transparent mode for NWF tabcontrols to have
// the background always cleared properly
- EnableChildTransparentMode( TRUE );
+ EnableChildTransparentMode( sal_True );
SetParentClipMode( PARENTCLIPMODE_NOCLIP );
- SetPaintTransparent( TRUE );
+ SetPaintTransparent( sal_True );
SetBackground();
ImplGetWindowImpl()->mbUseNativeFocus = ImplGetSVData()->maNWFData.mbNoFocusRects;
}
else
{
- EnableChildTransparentMode( FALSE );
+ EnableChildTransparentMode( sal_False );
SetParentClipMode( 0 );
- SetPaintTransparent( FALSE );
+ SetPaintTransparent( sal_False );
if ( IsControlBackground() )
SetBackground( GetControlBackground() );
@@ -272,14 +272,14 @@ void TabControl::ImplLoadRes( const ResId& rResId )
{
Control::ImplLoadRes( rResId );
- ULONG nObjMask = ReadLongRes();
+ sal_uIntPtr nObjMask = ReadLongRes();
if ( nObjMask & RSC_TABCONTROL_ITEMLIST )
{
- ULONG nEle = ReadLongRes();
+ sal_uIntPtr nEle = ReadLongRes();
// Item hinzufuegen
- for( ULONG i = 0; i < nEle; i++ )
+ for( sal_uIntPtr i = 0; i < nEle; i++ )
{
InsertPage( ResId( (RSHEADER_TYPE *)GetClassRes(), *rResId.GetResMgr() ) );
IncrementRes( GetObjSizeRes( (RSHEADER_TYPE *)GetClassRes() ) );
@@ -311,7 +311,7 @@ TabControl::~TabControl()
// -----------------------------------------------------------------------
-ImplTabItem* TabControl::ImplGetItem( USHORT nId ) const
+ImplTabItem* TabControl::ImplGetItem( sal_uInt16 nId ) const
{
for( std::vector< ImplTabItem >::iterator it = mpTabCtrlData->maItemList.begin();
it != mpTabCtrlData->maItemList.end(); ++it )
@@ -461,7 +461,7 @@ Size TabControl::ImplGetItemSize( ImplTabItem* pItem, long nMaxWidth )
// -----------------------------------------------------------------------
-Rectangle TabControl::ImplGetTabRect( USHORT nItemPos, long nWidth, long nHeight )
+Rectangle TabControl::ImplGetTabRect( sal_uInt16 nItemPos, long nWidth, long nHeight )
{
Size aWinSize = Control::GetOutputSizePixel();
if ( nWidth == -1 )
@@ -477,7 +477,7 @@ Rectangle TabControl::ImplGetTabRect( USHORT nItemPos, long nWidth, long nHeight
if ( nItemPos == TAB_PAGERECT )
{
- USHORT nLastPos;
+ sal_uInt16 nLastPos;
if ( mnCurPageId )
nLastPos = GetPagePos( mnCurPageId );
else
@@ -499,9 +499,9 @@ Rectangle TabControl::ImplGetTabRect( USHORT nItemPos, long nWidth, long nHeight
{
Font aFont( GetFont() );
Font aLightFont = aFont;
- aFont.SetTransparent( TRUE );
+ aFont.SetTransparent( sal_True );
aFont.SetWeight( (!ImplGetSVData()->maNWFData.mbNoBoldTabFocus) ? WEIGHT_BOLD : WEIGHT_LIGHT );
- aLightFont.SetTransparent( TRUE );
+ aLightFont.SetTransparent( sal_True );
aLightFont.SetWeight( WEIGHT_LIGHT );
// If Bold and none Bold strings have the same width, we
@@ -521,18 +521,18 @@ Rectangle TabControl::ImplGetTabRect( USHORT nItemPos, long nWidth, long nHeight
long nX = nOffsetX;
long nY = nOffsetY;
long nMaxWidth = nWidth;
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
if ( (mnMaxPageWidth > 0) && (mnMaxPageWidth < nMaxWidth) )
nMaxWidth = mnMaxPageWidth;
nMaxWidth -= GetItemsOffset().X();
- mbScroll = FALSE;
+ mbScroll = sal_False;
- USHORT nLines = 0;
- USHORT nCurLine = 0;
+ sal_uInt16 nLines = 0;
+ sal_uInt16 nCurLine = 0;
long nLineWidthAry[100];
- USHORT nLinePosAry[101];
+ sal_uInt16 nLinePosAry[101];
nLineWidthAry[0] = 0;
nLinePosAry[0] = 0;
@@ -555,10 +555,10 @@ Rectangle TabControl::ImplGetTabRect( USHORT nItemPos, long nWidth, long nHeight
Rectangle aNewRect( Point( nX, nY ), aSize );
if ( mbSmallInvalidate && (it->maRect != aNewRect) )
- mbSmallInvalidate = FALSE;
+ mbSmallInvalidate = sal_False;
it->maRect = aNewRect;
it->mnLine = nLines;
- it->mbFullVisible = TRUE;
+ it->mbFullVisible = sal_True;
nLineWidthAry[nLines] += aSize.Width();
nX += aSize.Width();
@@ -574,8 +574,8 @@ Rectangle TabControl::ImplGetTabRect( USHORT nItemPos, long nWidth, long nHeight
long nDX = 0;
long nModDX = 0;
long nIDX = 0;
- USHORT i;
- USHORT n;
+ sal_uInt16 i;
+ sal_uInt16 n;
long nLineHeightAry[100];
long nIH = mpTabCtrlData->maItemList[0].maRect.Bottom()-2;
@@ -591,7 +591,7 @@ Rectangle TabControl::ImplGetTabRect( USHORT nItemPos, long nWidth, long nHeight
i = 0;
n = 0;
- nLinePosAry[nLines+1] = (USHORT)mpTabCtrlData->maItemList.size();
+ nLinePosAry[nLines+1] = (sal_uInt16)mpTabCtrlData->maItemList.size();
for( std::vector< ImplTabItem >::iterator it = mpTabCtrlData->maItemList.begin();
it != mpTabCtrlData->maItemList.end(); ++it )
{
@@ -652,7 +652,7 @@ Rectangle TabControl::ImplGetTabRect( USHORT nItemPos, long nWidth, long nHeight
mnLastWidth = nWidth;
mnLastHeight = nHeight;
- mbFormat = FALSE;
+ mbFormat = sal_False;
ImplPosScrollBtns();
}
@@ -662,7 +662,7 @@ Rectangle TabControl::ImplGetTabRect( USHORT nItemPos, long nWidth, long nHeight
// -----------------------------------------------------------------------
-void TabControl::ImplChangeTabPage( USHORT nId, USHORT nOldId )
+void TabControl::ImplChangeTabPage( sal_uInt16 nId, sal_uInt16 nOldId )
{
ImplFreeLayoutData();
@@ -674,7 +674,7 @@ void TabControl::ImplChangeTabPage( USHORT nId, USHORT nOldId )
if ( IsReallyVisible() && IsUpdateMode() )
{
- USHORT nPos = GetPagePos( nId );
+ sal_uInt16 nPos = GetPagePos( nId );
Rectangle aRect = ImplGetTabRect( nPos );
if ( !pOldItem || (pOldItem->mnLine != pItem->mnLine) )
@@ -722,17 +722,17 @@ void TabControl::ImplChangeTabPage( USHORT nId, USHORT nOldId )
// also set the help id of the parent window to that of the tab page
if ( !GetHelpId() )
{
- mbRestoreHelpId = TRUE;
+ mbRestoreHelpId = sal_True;
pCtrlParent->SetHelpId( pPage->GetHelpId() );
}
if ( !pCtrlParent->GetUniqueId() )
{
- mbRestoreUnqId = TRUE;
+ mbRestoreUnqId = sal_True;
pCtrlParent->SetUniqueId( pPage->GetUniqueId() );
}
if( ! GetSmartHelpId().HasAny() )
{
- mbRestoreSmartId = TRUE;
+ mbRestoreSmartId = sal_True;
pCtrlParent->SetSmartHelpId( pPage->GetSmartHelpId() );
}
@@ -740,7 +740,7 @@ void TabControl::ImplChangeTabPage( USHORT nId, USHORT nOldId )
if ( pOldPage && pOldPage->HasChildPathFocus() )
{
- USHORT n = 0;
+ sal_uInt16 n = 0;
Window* pFirstChild = pPage->ImplGetDlgWindow( n, DLGWINDOW_FIRST );
if ( pFirstChild )
pFirstChild->ImplControlFocus( GETFOCUS_INIT );
@@ -770,7 +770,7 @@ void TabControl::ImplChangeTabPage( USHORT nId, USHORT nOldId )
// -----------------------------------------------------------------------
-BOOL TabControl::ImplPosCurTabPage()
+sal_Bool TabControl::ImplPosCurTabPage()
{
// Aktuelle TabPage resizen/positionieren
ImplTabItem* pItem = ImplGetItem( GetCurPageId() );
@@ -778,17 +778,17 @@ BOOL TabControl::ImplPosCurTabPage()
{
Rectangle aRect = ImplGetTabRect( TAB_PAGERECT );
pItem->mpTabPage->SetPosSizePixel( aRect.TopLeft(), aRect.GetSize() );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-void TabControl::ImplActivateTabPage( BOOL bNext )
+void TabControl::ImplActivateTabPage( sal_Bool bNext )
{
- USHORT nCurPos = GetPagePos( GetCurPageId() );
+ sal_uInt16 nCurPos = GetPagePos( GetCurPageId() );
if ( bNext )
nCurPos = (nCurPos + 1) % GetPageCount();
@@ -805,7 +805,7 @@ void TabControl::ImplActivateTabPage( BOOL bNext )
// -----------------------------------------------------------------------
-void TabControl::ImplSetFirstPagePos( USHORT )
+void TabControl::ImplSetFirstPagePos( sal_uInt16 )
{
return; // was only required for single line
}
@@ -825,14 +825,14 @@ void TabControl::ImplShowFocus()
aFont.SetWeight( (!ImplGetSVData()->maNWFData.mbNoBoldTabFocus) ? WEIGHT_BOLD : WEIGHT_LIGHT );
SetFont( aFont );
- USHORT nCurPos = GetPagePos( mnCurPageId );
+ sal_uInt16 nCurPos = GetPagePos( mnCurPageId );
Rectangle aRect = ImplGetTabRect( nCurPos );
const ImplTabItem& rItem = mpTabCtrlData->maItemList[ nCurPos ];
Size aTabSize = aRect.GetSize();
Size aImageSize( 0, 0 );
long nTextHeight = GetTextHeight();
long nTextWidth = GetCtrlTextWidth( rItem.maFormatText );
- USHORT nOff;
+ sal_uInt16 nOff;
if ( !(GetSettings().GetStyleSettings().GetOptions() & STYLE_OPTION_MONO) )
nOff = 1;
@@ -894,13 +894,13 @@ void TabControl::ImplDrawItem( ImplTabItem* pItem, const Rectangle& rCurRect, bo
Rectangle aRect = pItem->maRect;
long nLeftBottom = aRect.Bottom();
long nRightBottom = aRect.Bottom();
- BOOL bLeftBorder = TRUE;
- BOOL bRightBorder = TRUE;
- USHORT nOff;
- BOOL bNativeOK = FALSE;
+ sal_Bool bLeftBorder = sal_True;
+ sal_Bool bRightBorder = sal_True;
+ sal_uInt16 nOff;
+ sal_Bool bNativeOK = sal_False;
- USHORT nOff2 = 0;
- USHORT nOff3 = 0;
+ sal_uInt16 nOff2 = 0;
+ sal_uInt16 nOff3 = 0;
if ( !(rStyleSettings.GetOptions() & STYLE_OPTION_MONO) )
nOff = 1;
@@ -922,10 +922,10 @@ void TabControl::ImplDrawItem( ImplTabItem* pItem, const Rectangle& rCurRect, bo
{
aLeftTestPos.X() -= 2;
if ( rCurRect.IsInside( aLeftTestPos ) )
- bLeftBorder = FALSE;
+ bLeftBorder = sal_False;
aRightTestPos.X() += 2;
if ( rCurRect.IsInside( aRightTestPos ) )
- bRightBorder = FALSE;
+ bRightBorder = sal_False;
}
else
{
@@ -936,7 +936,7 @@ void TabControl::ImplDrawItem( ImplTabItem* pItem, const Rectangle& rCurRect, bo
}
}
- if( !bLayout && (bNativeOK = IsNativeControlSupported(CTRL_TAB_ITEM, PART_ENTIRE_CONTROL)) == TRUE )
+ if( !bLayout && (bNativeOK = IsNativeControlSupported(CTRL_TAB_ITEM, PART_ENTIRE_CONTROL)) == sal_True )
{
ImplControlValue aControlValue;
Region aCtrlRegion( pItem->maRect );
@@ -1037,7 +1037,7 @@ void TabControl::ImplDrawItem( ImplTabItem* pItem, const Rectangle& rCurRect, bo
// set font accordingly, current item is painted bold
// we set the font attributes always before drawing to be re-entrant (DrawNativeControl may trigger additional paints)
Font aFont( GetFont() );
- aFont.SetTransparent( TRUE );
+ aFont.SetTransparent( sal_True );
aFont.SetWeight( ((bIsCurrentItem) && (!ImplGetSVData()->maNWFData.mbNoBoldTabFocus)) ? WEIGHT_BOLD : WEIGHT_LIGHT );
SetFont( aFont );
@@ -1055,7 +1055,7 @@ void TabControl::ImplDrawItem( ImplTabItem* pItem, const Rectangle& rCurRect, bo
long nYPos = aRect.Top()+((aTabSize.Height()-nTextHeight)/2)-nOff3;
if( pItem->maFormatText.Len() )
{
- USHORT nStyle = TEXT_DRAW_MNEMONIC;
+ sal_uInt16 nStyle = TEXT_DRAW_MNEMONIC;
if( ! pItem->mbEnabled )
nStyle |= TEXT_DRAW_DISABLE;
DrawCtrlText( Point( nXPos + aImageSize.Width(), nYPos ),
@@ -1084,7 +1084,7 @@ long TabControl::ImplHandleKeyEvent( const KeyEvent& rKeyEvent )
if ( GetPageCount() > 1 )
{
KeyCode aKeyCode = rKeyEvent.GetKeyCode();
- USHORT nKeyCode = aKeyCode.GetCode();
+ sal_uInt16 nKeyCode = aKeyCode.GetCode();
if ( aKeyCode.IsMod1() )
{
@@ -1092,7 +1092,7 @@ long TabControl::ImplHandleKeyEvent( const KeyEvent& rKeyEvent )
{
if ( (nKeyCode == KEY_TAB) || (nKeyCode == KEY_PAGEUP) )
{
- ImplActivateTabPage( FALSE );
+ ImplActivateTabPage( sal_False );
nRet = 1;
}
}
@@ -1100,7 +1100,7 @@ long TabControl::ImplHandleKeyEvent( const KeyEvent& rKeyEvent )
{
if ( (nKeyCode == KEY_TAB) || (nKeyCode == KEY_PAGEDOWN) )
{
- ImplActivateTabPage( TRUE );
+ ImplActivateTabPage( sal_True );
nRet = 1;
}
}
@@ -1153,7 +1153,7 @@ void TabControl::MouseButtonDown( const MouseEvent& rMEvt )
{
if( rMEvt.IsLeft() )
{
- USHORT nPageId = GetPageId( rMEvt.GetPosPixel() );
+ sal_uInt16 nPageId = GetPageId( rMEvt.GetPosPixel() );
ImplTabItem* pItem = ImplGetItem( nPageId );
if( pItem && pItem->mbEnabled )
SelectTabPage( nPageId );
@@ -1170,11 +1170,11 @@ void TabControl::KeyInput( const KeyEvent& rKEvt )
else if ( GetPageCount() > 1 )
{
KeyCode aKeyCode = rKEvt.GetKeyCode();
- USHORT nKeyCode = aKeyCode.GetCode();
+ sal_uInt16 nKeyCode = aKeyCode.GetCode();
if ( (nKeyCode == KEY_LEFT) || (nKeyCode == KEY_RIGHT) )
{
- BOOL bNext = (nKeyCode == KEY_RIGHT);
+ sal_Bool bNext = (nKeyCode == KEY_RIGHT);
ImplActivateTabPage( bNext );
}
}
@@ -1224,17 +1224,17 @@ void TabControl::ImplPaint( const Rectangle& rRect, bool bLayout )
// increased to avoid round corners that might be drawn by a theme
// in this case we're only interested in the top border of the tabpage because the tabitems are used
// standalone (eg impress)
- BOOL bNoTabPage = FALSE;
+ sal_Bool bNoTabPage = sal_False;
TabPage* pCurPage = (pCurItem) ? pCurItem->mpTabPage : NULL;
if( !pCurPage || !pCurPage->IsVisible() )
{
- bNoTabPage = TRUE;
+ bNoTabPage = sal_True;
aRect.Left()-=10;
aRect.Right()+=10;
}
- BOOL bNativeOK = FALSE;
- if( ! bLayout && (bNativeOK = IsNativeControlSupported( CTRL_TAB_PANE, PART_ENTIRE_CONTROL) ) == TRUE )
+ sal_Bool bNativeOK = sal_False;
+ if( ! bLayout && (bNativeOK = IsNativeControlSupported( CTRL_TAB_PANE, PART_ENTIRE_CONTROL) ) == sal_True )
{
const ImplControlValue aControlValue( BUTTONVALUE_DONTKNOW, rtl::OUString(), 0 );
@@ -1346,7 +1346,7 @@ void TabControl::ImplPaint( const Rectangle& rRect, bool bLayout )
if( !rRect.IsEmpty() )
aClipRgn.Intersect( rRect );
if( bLayout || !aClipRgn.IsEmpty() )
- ImplDrawItem( pItem, aCurRect, bLayout, (pItem==pFirstTab), (pItem==pLastTab), FALSE );
+ ImplDrawItem( pItem, aCurRect, bLayout, (pItem==pFirstTab), (pItem==pLastTab), sal_False );
}
if ( bDrawTabsRTL )
@@ -1362,7 +1362,7 @@ void TabControl::ImplPaint( const Rectangle& rRect, bool bLayout )
if( !rRect.IsEmpty() )
aClipRgn.Intersect( rRect );
if( bLayout || !aClipRgn.IsEmpty() )
- ImplDrawItem( pCurItem, aCurRect, bLayout, (pCurItem==pFirstTab), (pCurItem==pLastTab), TRUE );
+ ImplDrawItem( pCurItem, aCurRect, bLayout, (pCurItem==pFirstTab), (pCurItem==pLastTab), sal_True );
}
}
@@ -1370,7 +1370,7 @@ void TabControl::ImplPaint( const Rectangle& rRect, bool bLayout )
ImplShowFocus();
if( ! bLayout )
- mbSmallInvalidate = TRUE;
+ mbSmallInvalidate = sal_True;
}
// -----------------------------------------------------------------------
@@ -1394,15 +1394,15 @@ void TabControl::Resize()
mpTabCtrlData->mpListBox->SetPosSizePixel( aNewPos, aNewSize );
}
- mbFormat = TRUE;
+ mbFormat = sal_True;
// Aktuelle TabPage resizen/positionieren
- BOOL bTabPage = ImplPosCurTabPage();
+ sal_Bool bTabPage = ImplPosCurTabPage();
// Feststellen, was invalidiert werden muss
Size aNewSize = Control::GetOutputSizePixel();
long nNewWidth = aNewSize.Width();
if ( mbScroll )
- mbSmallInvalidate = FALSE;
+ mbSmallInvalidate = sal_False;
else
{
for( std::vector< ImplTabItem >::iterator it = mpTabCtrlData->maItemList.begin();
@@ -1411,7 +1411,7 @@ void TabControl::Resize()
if ( !it->mbFullVisible ||
(it->maRect.Right()-2 >= nNewWidth) )
{
- mbSmallInvalidate = FALSE;
+ mbSmallInvalidate = sal_False;
break;
}
}
@@ -1469,7 +1469,7 @@ void TabControl::LoseFocus()
void TabControl::RequestHelp( const HelpEvent& rHEvt )
{
- USHORT nItemId = rHEvt.KeyboardActivated() ? mnCurPageId : GetPageId( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ) );
+ sal_uInt16 nItemId = rHEvt.KeyboardActivated() ? mnCurPageId : GetPageId( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ) );
if ( nItemId )
{
@@ -1491,7 +1491,7 @@ void TabControl::RequestHelp( const HelpEvent& rHEvt )
}
else if ( rHEvt.GetMode() & HELPMODE_EXTENDED )
{
- ULONG nHelpId = GetHelpId( nItemId );
+ sal_uIntPtr nHelpId = GetHelpId( nItemId );
if ( nHelpId )
{
// Wenn eine Hilfe existiert, dann ausloesen
@@ -1558,7 +1558,7 @@ void TabControl::Command( const CommandEvent& rCEvt )
if( (mpTabCtrlData->mpListBox == NULL) && (rCEvt.GetCommand() == COMMAND_CONTEXTMENU) && (GetPageCount() > 1) )
{
Point aMenuPos;
- BOOL bMenu;
+ sal_Bool bMenu;
if ( rCEvt.IsMouseEvent() )
{
aMenuPos = rCEvt.GetMousePosPixel();
@@ -1567,7 +1567,7 @@ void TabControl::Command( const CommandEvent& rCEvt )
else
{
aMenuPos = ImplGetTabRect( GetPagePos( mnCurPageId ) ).Center();
- bMenu = TRUE;
+ bMenu = sal_True;
}
if ( bMenu )
@@ -1582,7 +1582,7 @@ void TabControl::Command( const CommandEvent& rCEvt )
aMenu.SetHelpId( it->mnId, it->mnHelpId );
}
- USHORT nId = aMenu.Execute( this, aMenuPos );
+ sal_uInt16 nId = aMenu.Execute( this, aMenuPos );
if ( nId && (nId != mnCurPageId) )
SelectTabPage( nId );
return;
@@ -1612,17 +1612,17 @@ void TabControl::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();
}
}
@@ -1638,7 +1638,7 @@ void TabControl::DataChanged( const DataChangedEvent& rDCEvt )
((rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE)) )
{
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
Invalidate();
}
}
@@ -1738,7 +1738,7 @@ long TabControl::DeactivatePage()
if ( maDeactivateHdl.IsSet() )
return maDeactivateHdl.Call( this );
else
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -1765,16 +1765,16 @@ Size TabControl::GetTabPageSizePixel() const
// -----------------------------------------------------------------------
-void TabControl::InsertPage( const ResId& rResId, USHORT nPos )
+void TabControl::InsertPage( const ResId& rResId, sal_uInt16 nPos )
{
GetRes( rResId.SetRT( RSC_TABCONTROLITEM ) );
- ULONG nObjMask = ReadLongRes();
- USHORT nItemId = 1;
+ sal_uIntPtr nObjMask = ReadLongRes();
+ sal_uInt16 nItemId = 1;
// ID
if ( nObjMask & RSC_TABCONTROLITEM_ID )
- nItemId = sal::static_int_cast<USHORT>(ReadLongRes());
+ nItemId = sal::static_int_cast<sal_uInt16>(ReadLongRes());
// Text
XubString aTmpStr;
@@ -1786,14 +1786,14 @@ void TabControl::InsertPage( const ResId& rResId, USHORT nPos )
if ( nObjMask & RSC_TABCONTROLITEM_PAGERESID )
{
ImplTabItem& rItem = mpTabCtrlData->maItemList[ GetPagePos( nItemId ) ];
- rItem.mnTabPageResId = sal::static_int_cast<USHORT>(ReadLongRes());
+ rItem.mnTabPageResId = sal::static_int_cast<sal_uInt16>(ReadLongRes());
}
}
// -----------------------------------------------------------------------
-void TabControl::InsertPage( USHORT nPageId, const XubString& rText,
- USHORT nPos )
+void TabControl::InsertPage( sal_uInt16 nPageId, const XubString& rText,
+ sal_uInt16 nPos )
{
DBG_ASSERT( nPageId, "TabControl::InsertPage(): PageId == 0" );
DBG_ASSERT( GetPagePos( nPageId ) == TAB_PAGE_NOTFOUND,
@@ -1833,9 +1833,9 @@ void TabControl::InsertPage( USHORT nPageId, const XubString& rText,
pItem->mnTabPageResId = 0;
pItem->mnHelpId = 0;
pItem->maText = rText;
- pItem->mbFullVisible = FALSE;
+ pItem->mbFullVisible = sal_False;
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( IsUpdateMode() )
Invalidate();
@@ -1843,14 +1843,14 @@ void TabControl::InsertPage( USHORT nPageId, const XubString& rText,
if( mpTabCtrlData->mpListBox ) // reposition/resize listbox
Resize();
- ImplCallEventListeners( VCLEVENT_TABPAGE_INSERTED, (void*) (ULONG)nPageId );
+ ImplCallEventListeners( VCLEVENT_TABPAGE_INSERTED, (void*) (sal_uIntPtr)nPageId );
}
// -----------------------------------------------------------------------
-void TabControl::RemovePage( USHORT nPageId )
+void TabControl::RemovePage( sal_uInt16 nPageId )
{
- USHORT nPos = GetPagePos( nPageId );
+ sal_uInt16 nPos = GetPagePos( nPageId );
// does the item exist ?
if ( nPos != TAB_PAGE_NOTFOUND )
@@ -1884,13 +1884,13 @@ void TabControl::RemovePage( USHORT nPageId )
}
}
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( IsUpdateMode() )
Invalidate();
ImplFreeLayoutData();
- ImplCallEventListeners( VCLEVENT_TABPAGE_REMOVED, (void*) (ULONG) nPageId );
+ ImplCallEventListeners( VCLEVENT_TABPAGE_REMOVED, (void*) (sal_uIntPtr) nPageId );
}
}
@@ -1906,7 +1906,7 @@ void TabControl::Clear()
ImplFreeLayoutData();
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( IsUpdateMode() )
Invalidate();
@@ -1915,14 +1915,14 @@ void TabControl::Clear()
// -----------------------------------------------------------------------
-void TabControl::EnablePage( USHORT i_nPageId, bool i_bEnable )
+void TabControl::EnablePage( sal_uInt16 i_nPageId, bool i_bEnable )
{
ImplTabItem* pItem = ImplGetItem( i_nPageId );
if ( pItem && pItem->mbEnabled != i_bEnable )
{
pItem->mbEnabled = i_bEnable;
- mbFormat = TRUE;
+ mbFormat = sal_True;
if( mpTabCtrlData->mpListBox )
mpTabCtrlData->mpListBox->SetEntryFlags( GetPagePos( i_nPageId ),
i_bEnable ? 0 : (LISTBOX_ENTRY_FLAG_DISABLE_SELECTION | LISTBOX_ENTRY_FLAG_DRAW_DISABLED) );
@@ -1938,14 +1938,14 @@ void TabControl::EnablePage( USHORT i_nPageId, bool i_bEnable )
// -----------------------------------------------------------------------
-USHORT TabControl::GetPageCount() const
+sal_uInt16 TabControl::GetPageCount() const
{
- return (USHORT)mpTabCtrlData->maItemList.size();
+ return (sal_uInt16)mpTabCtrlData->maItemList.size();
}
// -----------------------------------------------------------------------
-USHORT TabControl::GetPageId( USHORT nPos ) const
+sal_uInt16 TabControl::GetPageId( sal_uInt16 nPos ) const
{
if( size_t(nPos) < mpTabCtrlData->maItemList.size() )
return mpTabCtrlData->maItemList[ nPos ].mnId;
@@ -1954,13 +1954,13 @@ USHORT TabControl::GetPageId( USHORT nPos ) const
// -----------------------------------------------------------------------
-USHORT TabControl::GetPagePos( USHORT nPageId ) const
+sal_uInt16 TabControl::GetPagePos( sal_uInt16 nPageId ) const
{
for( std::vector< ImplTabItem >::const_iterator it = mpTabCtrlData->maItemList.begin();
it != mpTabCtrlData->maItemList.end(); ++it )
{
if ( it->mnId == nPageId )
- return (USHORT)(it - mpTabCtrlData->maItemList.begin());
+ return (sal_uInt16)(it - mpTabCtrlData->maItemList.begin());
}
return TAB_PAGE_NOTFOUND;
@@ -1968,11 +1968,11 @@ USHORT TabControl::GetPagePos( USHORT nPageId ) const
// -----------------------------------------------------------------------
-USHORT TabControl::GetPageId( const Point& rPos ) const
+sal_uInt16 TabControl::GetPageId( const Point& rPos ) const
{
for( size_t i = 0; i < mpTabCtrlData->maItemList.size(); ++i )
{
- if ( ((TabControl*)this)->ImplGetTabRect( static_cast<USHORT>(i) ).IsInside( rPos ) )
+ if ( ((TabControl*)this)->ImplGetTabRect( static_cast<sal_uInt16>(i) ).IsInside( rPos ) )
return mpTabCtrlData->maItemList[ i ].mnId;
}
@@ -1981,9 +1981,9 @@ USHORT TabControl::GetPageId( const Point& rPos ) const
// -----------------------------------------------------------------------
-void TabControl::SetCurPageId( USHORT nPageId )
+void TabControl::SetCurPageId( sal_uInt16 nPageId )
{
- USHORT nPos = GetPagePos( nPageId );
+ sal_uInt16 nPos = GetPagePos( nPageId );
while( nPos != TAB_PAGE_NOTFOUND &&
! mpTabCtrlData->maItemList[nPos].mbEnabled )
{
@@ -2008,8 +2008,8 @@ void TabControl::SetCurPageId( USHORT nPageId )
mnActPageId = nPageId;
else
{
- mbFormat = TRUE;
- USHORT nOldId = mnCurPageId;
+ mbFormat = sal_True;
+ sal_uInt16 nOldId = mnCurPageId;
mnCurPageId = nPageId;
ImplChangeTabPage( nPageId, nOldId );
}
@@ -2018,7 +2018,7 @@ void TabControl::SetCurPageId( USHORT nPageId )
// -----------------------------------------------------------------------
-USHORT TabControl::GetCurPageId() const
+sal_uInt16 TabControl::GetCurPageId() const
{
if ( mnActPageId )
return mnActPageId;
@@ -2028,20 +2028,20 @@ USHORT TabControl::GetCurPageId() const
// -----------------------------------------------------------------------
-void TabControl::SetFirstPageId( USHORT )
+void TabControl::SetFirstPageId( sal_uInt16 )
{
return; // was only required for single line
}
// -----------------------------------------------------------------------
-void TabControl::SelectTabPage( USHORT nPageId )
+void TabControl::SelectTabPage( sal_uInt16 nPageId )
{
if ( nPageId && (nPageId != mnCurPageId) )
{
ImplFreeLayoutData();
- ImplCallEventListeners( VCLEVENT_TABPAGE_DEACTIVATE, (void*) (ULONG) mnCurPageId );
+ ImplCallEventListeners( VCLEVENT_TABPAGE_DEACTIVATE, (void*) (sal_uIntPtr) mnCurPageId );
if ( DeactivatePage() )
{
mnActPageId = nPageId;
@@ -2052,14 +2052,14 @@ void TabControl::SelectTabPage( USHORT nPageId )
SetCurPageId( nPageId );
if( mpTabCtrlData->mpListBox )
mpTabCtrlData->mpListBox->SelectEntryPos( GetPagePos( nPageId ) );
- ImplCallEventListeners( VCLEVENT_TABPAGE_ACTIVATE, (void*) (ULONG) nPageId );
+ ImplCallEventListeners( VCLEVENT_TABPAGE_ACTIVATE, (void*) (sal_uIntPtr) nPageId );
}
}
}
// -----------------------------------------------------------------------
-void TabControl::SetTabPage( USHORT nPageId, TabPage* pTabPage )
+void TabControl::SetTabPage( sal_uInt16 nPageId, TabPage* pTabPage )
{
ImplTabItem* pItem = ImplGetItem( nPageId );
@@ -2084,7 +2084,7 @@ void TabControl::SetTabPage( USHORT nPageId, TabPage* pTabPage )
// -----------------------------------------------------------------------
-TabPage* TabControl::GetTabPage( USHORT nPageId ) const
+TabPage* TabControl::GetTabPage( sal_uInt16 nPageId ) const
{
ImplTabItem* pItem = ImplGetItem( nPageId );
@@ -2096,7 +2096,7 @@ TabPage* TabControl::GetTabPage( USHORT nPageId ) const
// -----------------------------------------------------------------------
-USHORT TabControl::GetTabPageResId( USHORT nPageId ) const
+sal_uInt16 TabControl::GetTabPageResId( sal_uInt16 nPageId ) const
{
ImplTabItem* pItem = ImplGetItem( nPageId );
@@ -2108,30 +2108,30 @@ USHORT TabControl::GetTabPageResId( USHORT nPageId ) const
// -----------------------------------------------------------------------
-void TabControl::SetPageText( USHORT nPageId, const XubString& rText )
+void TabControl::SetPageText( sal_uInt16 nPageId, const XubString& rText )
{
ImplTabItem* pItem = ImplGetItem( nPageId );
if ( pItem && pItem->maText != rText )
{
pItem->maText = rText;
- mbFormat = TRUE;
+ mbFormat = sal_True;
if( mpTabCtrlData->mpListBox )
{
- USHORT nPos = GetPagePos( nPageId );
+ sal_uInt16 nPos = GetPagePos( nPageId );
mpTabCtrlData->mpListBox->RemoveEntry( nPos );
mpTabCtrlData->mpListBox->InsertEntry( rText, nPos );
}
if ( IsUpdateMode() )
Invalidate();
ImplFreeLayoutData();
- ImplCallEventListeners( VCLEVENT_TABPAGE_PAGETEXTCHANGED, (void*) (ULONG) nPageId );
+ ImplCallEventListeners( VCLEVENT_TABPAGE_PAGETEXTCHANGED, (void*) (sal_uIntPtr) nPageId );
}
}
// -----------------------------------------------------------------------
-XubString TabControl::GetPageText( USHORT nPageId ) const
+XubString TabControl::GetPageText( sal_uInt16 nPageId ) const
{
ImplTabItem* pItem = ImplGetItem( nPageId );
@@ -2143,7 +2143,7 @@ XubString TabControl::GetPageText( USHORT nPageId ) const
// -----------------------------------------------------------------------
-void TabControl::SetHelpText( USHORT nPageId, const XubString& rText )
+void TabControl::SetHelpText( sal_uInt16 nPageId, const XubString& rText )
{
ImplTabItem* pItem = ImplGetItem( nPageId );
@@ -2153,7 +2153,7 @@ void TabControl::SetHelpText( USHORT nPageId, const XubString& rText )
// -----------------------------------------------------------------------
-const XubString& TabControl::GetHelpText( USHORT nPageId ) const
+const XubString& TabControl::GetHelpText( sal_uInt16 nPageId ) const
{
ImplTabItem* pItem = ImplGetItem( nPageId );
@@ -2174,7 +2174,7 @@ const XubString& TabControl::GetHelpText( USHORT nPageId ) const
// -----------------------------------------------------------------------
-void TabControl::SetHelpId( USHORT nPageId, ULONG nHelpId )
+void TabControl::SetHelpId( sal_uInt16 nPageId, sal_uIntPtr nHelpId )
{
ImplTabItem* pItem = ImplGetItem( nPageId );
@@ -2184,7 +2184,7 @@ void TabControl::SetHelpId( USHORT nPageId, ULONG nHelpId )
// -----------------------------------------------------------------------
-ULONG TabControl::GetHelpId( USHORT nPageId ) const
+sal_uIntPtr TabControl::GetHelpId( sal_uInt16 nPageId ) const
{
ImplTabItem* pItem = ImplGetItem( nPageId );
@@ -2196,14 +2196,14 @@ ULONG TabControl::GetHelpId( USHORT nPageId ) const
// -----------------------------------------------------------------------
-void TabControl::SetPageImage( USHORT i_nPageId, const Image& i_rImage )
+void TabControl::SetPageImage( sal_uInt16 i_nPageId, const Image& i_rImage )
{
ImplTabItem* pItem = ImplGetItem( i_nPageId );
if ( pItem )
{
pItem->maTabImage = i_rImage;
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( IsUpdateMode() )
Invalidate();
}
@@ -2211,7 +2211,7 @@ void TabControl::SetPageImage( USHORT i_nPageId, const Image& i_rImage )
// -----------------------------------------------------------------------
-const Image* TabControl::GetPageImage( USHORT i_nPageId ) const
+const Image* TabControl::GetPageImage( sal_uInt16 i_nPageId ) const
{
const ImplTabItem* pItem = ImplGetItem( i_nPageId );
return pItem ? &pItem->maTabImage : NULL;
@@ -2219,7 +2219,7 @@ const Image* TabControl::GetPageImage( USHORT i_nPageId ) const
// -----------------------------------------------------------------------
-Rectangle TabControl::GetCharacterBounds( USHORT nPageId, long nIndex ) const
+Rectangle TabControl::GetCharacterBounds( sal_uInt16 nPageId, long nIndex ) const
{
Rectangle aRet;
@@ -2242,7 +2242,7 @@ Rectangle TabControl::GetCharacterBounds( USHORT nPageId, long nIndex ) const
// -----------------------------------------------------------------------
-long TabControl::GetIndexForPoint( const Point& rPoint, USHORT& rPageId ) const
+long TabControl::GetIndexForPoint( const Point& rPoint, sal_uInt16& rPageId ) const
{
long nRet = -1;
@@ -2263,7 +2263,7 @@ long TabControl::GetIndexForPoint( const Point& rPoint, USHORT& rPageId ) const
if( aPair.A() <= nIndex && aPair.B() >= nIndex )
{
nRet = nIndex - aPair.A();
- rPageId = (USHORT)mpTabCtrlData->maLayoutLineToPageId[ nLine ];
+ rPageId = (sal_uInt16)mpTabCtrlData->maLayoutLineToPageId[ nLine ];
break;
}
}
@@ -2284,7 +2284,7 @@ void TabControl::FillLayoutData() const
// -----------------------------------------------------------------------
-Rectangle TabControl::GetTabPageBounds( USHORT nPage ) const
+Rectangle TabControl::GetTabPageBounds( sal_uInt16 nPage ) const
{
Rectangle aRet;
@@ -2309,7 +2309,7 @@ Rectangle TabControl::GetTabPageBounds( USHORT nPage ) const
// -----------------------------------------------------------------------
-Rectangle TabControl::GetTabBounds( USHORT nPageId ) const
+Rectangle TabControl::GetTabBounds( sal_uInt16 nPageId ) const
{
Rectangle aRet;
diff --git a/vcl/source/fontsubset/gsub.cxx b/vcl/source/fontsubset/gsub.cxx
index 37650003eefa..4b18af165f74 100644
--- a/vcl/source/fontsubset/gsub.cxx
+++ b/vcl/source/fontsubset/gsub.cxx
@@ -41,12 +41,12 @@
namespace vcl
{
-typedef sal_uInt32 ULONG;
-typedef sal_uInt32 UINT32;
-typedef sal_uInt16 USHORT;
+typedef sal_uInt32 sal_uIntPtr;
+typedef sal_uInt32 sal_uInt32;
+typedef sal_uInt16 sal_uInt16;
typedef sal_uInt8 FT_Byte;
-typedef std::map<USHORT,USHORT> GlyphSubstitution;
+typedef std::map<sal_uInt16,sal_uInt16> GlyphSubstitution;
inline long NEXT_Long( const unsigned char* &p )
@@ -56,9 +56,9 @@ inline long NEXT_Long( const unsigned char* &p )
return nVal;
}
-inline USHORT NEXT_UShort( const unsigned char* &p )
+inline sal_uInt16 NEXT_UShort( const unsigned char* &p )
{
- USHORT nVal = (p[0]<<8) + p[1];
+ sal_uInt16 nVal = (p[0]<<8) + p[1];
p += 2;
return nVal;
}
@@ -77,50 +77,50 @@ int ReadGSUB( struct _TrueTypeFont* pTTFile,
// parse GSUB header
const FT_Byte* pGsubHeader = pGsubBase;
- const ULONG nVersion = NEXT_Long( pGsubHeader );
- const USHORT nOfsScriptList = NEXT_UShort( pGsubHeader );
- const USHORT nOfsFeatureTable = NEXT_UShort( pGsubHeader );
- const USHORT nOfsLookupList = NEXT_UShort( pGsubHeader );
+ const sal_uIntPtr nVersion = NEXT_Long( pGsubHeader );
+ const sal_uInt16 nOfsScriptList = NEXT_UShort( pGsubHeader );
+ const sal_uInt16 nOfsFeatureTable = NEXT_UShort( pGsubHeader );
+ const sal_uInt16 nOfsLookupList = NEXT_UShort( pGsubHeader );
// sanity check the GSUB header
if( nVersion != 0x00010000 )
if( nVersion != 0x00001000 ) // workaround for SunBatang etc.
return -1; // unknown format or broken
- typedef std::vector<ULONG> ReqFeatureTagList;
+ typedef std::vector<sal_uIntPtr> ReqFeatureTagList;
ReqFeatureTagList aReqFeatureTagList;
aReqFeatureTagList.push_back( MKTAG("vert") );
- typedef std::vector<USHORT> UshortList;
+ typedef std::vector<sal_uInt16> UshortList;
UshortList aFeatureIndexList;
UshortList aFeatureOffsetList;
// parse Script Table
const FT_Byte* pScriptHeader = pGsubBase + nOfsScriptList;
- const USHORT nCntScript = NEXT_UShort( pScriptHeader );
+ const sal_uInt16 nCntScript = NEXT_UShort( pScriptHeader );
if( pGsubLimit < pScriptHeader + 6 * nCntScript )
return false;
- for( USHORT nScriptIndex = 0; nScriptIndex < nCntScript; ++nScriptIndex )
+ for( sal_uInt16 nScriptIndex = 0; nScriptIndex < nCntScript; ++nScriptIndex )
{
- const ULONG nTag = NEXT_Long( pScriptHeader ); // e.g. hani/arab/kana/hang
- const USHORT nOfsScriptTable= NEXT_UShort( pScriptHeader );
- if( (nTag != (USHORT)nRequestedScript) && (nRequestedScript != 0) )
+ const sal_uIntPtr nTag = NEXT_Long( pScriptHeader ); // e.g. hani/arab/kana/hang
+ const sal_uInt16 nOfsScriptTable= NEXT_UShort( pScriptHeader );
+ if( (nTag != (sal_uInt16)nRequestedScript) && (nRequestedScript != 0) )
continue;
const FT_Byte* pScriptTable = pGsubBase + nOfsScriptList + nOfsScriptTable;
if( pGsubLimit < pScriptTable + 4 )
return false;
- const USHORT nDefaultLangsysOfs = NEXT_UShort( pScriptTable );
- const USHORT nCntLangSystem = NEXT_UShort( pScriptTable );
- USHORT nLangsysOffset = 0;
+ const sal_uInt16 nDefaultLangsysOfs = NEXT_UShort( pScriptTable );
+ const sal_uInt16 nCntLangSystem = NEXT_UShort( pScriptTable );
+ sal_uInt16 nLangsysOffset = 0;
if( pGsubLimit < pScriptTable + 6 * nCntLangSystem )
return false;
- for( USHORT nLangsysIndex = 0; nLangsysIndex < nCntLangSystem; ++nLangsysIndex )
+ for( sal_uInt16 nLangsysIndex = 0; nLangsysIndex < nCntLangSystem; ++nLangsysIndex )
{
- const ULONG nInnerTag = NEXT_Long( pScriptTable ); // e.g. KOR/ZHS/ZHT/JAN
- const USHORT nOffset= NEXT_UShort( pScriptTable );
- if( (nInnerTag != (USHORT)nRequestedLangsys) && (nRequestedLangsys != 0) )
+ const sal_uIntPtr nInnerTag = NEXT_Long( pScriptTable ); // e.g. KOR/ZHS/ZHT/JAN
+ const sal_uInt16 nOffset= NEXT_UShort( pScriptTable );
+ if( (nInnerTag != (sal_uInt16)nRequestedLangsys) && (nRequestedLangsys != 0) )
continue;
nLangsysOffset = nOffset;
break;
@@ -131,15 +131,15 @@ int ReadGSUB( struct _TrueTypeFont* pTTFile,
const FT_Byte* pLangSys = pGsubBase + nOfsScriptList + nOfsScriptTable + nDefaultLangsysOfs;
if( pGsubLimit < pLangSys + 6 )
return false;
- /*const USHORT nLookupOrder =*/ NEXT_UShort( pLangSys );
- const USHORT nReqFeatureIdx = NEXT_UShort( pLangSys );
- const USHORT nCntFeature = NEXT_UShort( pLangSys );
+ /*const sal_uInt16 nLookupOrder =*/ NEXT_UShort( pLangSys );
+ const sal_uInt16 nReqFeatureIdx = NEXT_UShort( pLangSys );
+ const sal_uInt16 nCntFeature = NEXT_UShort( pLangSys );
if( pGsubLimit < pLangSys + 2 * nCntFeature )
return false;
aFeatureIndexList.push_back( nReqFeatureIdx );
- for( USHORT i = 0; i < nCntFeature; ++i )
+ for( sal_uInt16 i = 0; i < nCntFeature; ++i )
{
- const USHORT nFeatureIndex = NEXT_UShort( pLangSys );
+ const sal_uInt16 nFeatureIndex = NEXT_UShort( pLangSys );
aFeatureIndexList.push_back( nFeatureIndex );
}
}
@@ -149,15 +149,15 @@ int ReadGSUB( struct _TrueTypeFont* pTTFile,
const FT_Byte* pLangSys = pGsubBase + nOfsScriptList + nOfsScriptTable + nLangsysOffset;
if( pGsubLimit < pLangSys + 6 )
return false;
- /*const USHORT nLookupOrder =*/ NEXT_UShort( pLangSys );
- const USHORT nReqFeatureIdx = NEXT_UShort( pLangSys );
- const USHORT nCntFeature = NEXT_UShort( pLangSys );
+ /*const sal_uInt16 nLookupOrder =*/ NEXT_UShort( pLangSys );
+ const sal_uInt16 nReqFeatureIdx = NEXT_UShort( pLangSys );
+ const sal_uInt16 nCntFeature = NEXT_UShort( pLangSys );
if( pGsubLimit < pLangSys + 2 * nCntFeature )
return false;
aFeatureIndexList.push_back( nReqFeatureIdx );
- for( USHORT i = 0; i < nCntFeature; ++i )
+ for( sal_uInt16 i = 0; i < nCntFeature; ++i )
{
- const USHORT nFeatureIndex = NEXT_UShort( pLangSys );
+ const sal_uInt16 nFeatureIndex = NEXT_UShort( pLangSys );
aFeatureIndexList.push_back( nFeatureIndex );
}
}
@@ -173,13 +173,13 @@ int ReadGSUB( struct _TrueTypeFont* pTTFile,
const FT_Byte* pFeatureHeader = pGsubBase + nOfsFeatureTable;
if( pGsubLimit < pFeatureHeader + 2 )
return false;
- const USHORT nCntFeature = NEXT_UShort( pFeatureHeader );
+ const sal_uInt16 nCntFeature = NEXT_UShort( pFeatureHeader );
if( pGsubLimit < pFeatureHeader + 6 * nCntFeature )
return false;
- for( USHORT nFeatureIndex = 0; nFeatureIndex < nCntFeature; ++nFeatureIndex )
+ for( sal_uInt16 nFeatureIndex = 0; nFeatureIndex < nCntFeature; ++nFeatureIndex )
{
- const ULONG nTag = NEXT_Long( pFeatureHeader ); // e.g. locl/vert/trad/smpl/liga/fina/...
- const USHORT nOffset= NEXT_UShort( pFeatureHeader );
+ const sal_uIntPtr nTag = NEXT_Long( pFeatureHeader ); // e.g. locl/vert/trad/smpl/liga/fina/...
+ const sal_uInt16 nOffset= NEXT_UShort( pFeatureHeader );
// ignore unneeded feature lookups
if( aFeatureIndexList[0] != nFeatureIndex ) // do not ignore the required feature
@@ -195,12 +195,12 @@ int ReadGSUB( struct _TrueTypeFont* pTTFile,
const FT_Byte* pFeatureTable = pGsubBase + nOfsFeatureTable + nOffset;
if( pGsubLimit < pFeatureTable + 2 )
return false;
- const USHORT nCntLookups = NEXT_UShort( pFeatureTable );
+ const sal_uInt16 nCntLookups = NEXT_UShort( pFeatureTable );
if( pGsubLimit < pFeatureTable + 2 * nCntLookups )
return false;
- for( USHORT i = 0; i < nCntLookups; ++i )
+ for( sal_uInt16 i = 0; i < nCntLookups; ++i )
{
- const USHORT nLookupIndex = NEXT_UShort( pFeatureTable );
+ const sal_uInt16 nLookupIndex = NEXT_UShort( pFeatureTable );
aLookupIndexList.push_back( nLookupIndex );
}
if( nCntLookups == 0 ) //### hack needed by Mincho/Gothic/Mingliu/Simsun/...
@@ -211,12 +211,12 @@ int ReadGSUB( struct _TrueTypeFont* pTTFile,
const FT_Byte* pLookupHeader = pGsubBase + nOfsLookupList;
if( pGsubLimit < pLookupHeader + 2 )
return false;
- const USHORT nCntLookupTable = NEXT_UShort( pLookupHeader );
+ const sal_uInt16 nCntLookupTable = NEXT_UShort( pLookupHeader );
if( pGsubLimit < pLookupHeader + 2 * nCntLookupTable )
return false;
- for( USHORT nLookupIdx = 0; nLookupIdx < nCntLookupTable; ++nLookupIdx )
+ for( sal_uInt16 nLookupIdx = 0; nLookupIdx < nCntLookupTable; ++nLookupIdx )
{
- const USHORT nOffset = NEXT_UShort( pLookupHeader );
+ const sal_uInt16 nOffset = NEXT_UShort( pLookupHeader );
if( std::count( aLookupIndexList.begin(), aLookupIndexList.end(), nLookupIdx ) )
aLookupOffsetList.push_back( nOffset );
}
@@ -224,13 +224,13 @@ int ReadGSUB( struct _TrueTypeFont* pTTFile,
UshortList::const_iterator it = aLookupOffsetList.begin();
for(; it != aLookupOffsetList.end(); ++it )
{
- const USHORT nOfsLookupTable = *it;
+ const sal_uInt16 nOfsLookupTable = *it;
const FT_Byte* pLookupTable = pGsubBase + nOfsLookupList + nOfsLookupTable;
if( pGsubLimit < pLookupTable + 6 )
return false;
- const USHORT eLookupType = NEXT_UShort( pLookupTable );
- /*const USHORT eLookupFlag =*/ NEXT_UShort( pLookupTable );
- const USHORT nCntLookupSubtable = NEXT_UShort( pLookupTable );
+ const sal_uInt16 eLookupType = NEXT_UShort( pLookupTable );
+ /*const sal_uInt16 eLookupFlag =*/ NEXT_UShort( pLookupTable );
+ const sal_uInt16 nCntLookupSubtable = NEXT_UShort( pLookupTable );
// TODO: switch( eLookupType )
if( eLookupType != 1 ) // TODO: once we go beyond SingleSubst
@@ -238,16 +238,16 @@ int ReadGSUB( struct _TrueTypeFont* pTTFile,
if( pGsubLimit < pLookupTable + 2 * nCntLookupSubtable )
return false;
- for( USHORT nSubTableIdx = 0; nSubTableIdx < nCntLookupSubtable; ++nSubTableIdx )
+ for( sal_uInt16 nSubTableIdx = 0; nSubTableIdx < nCntLookupSubtable; ++nSubTableIdx )
{
- const USHORT nOfsSubLookupTable = NEXT_UShort( pLookupTable );
+ const sal_uInt16 nOfsSubLookupTable = NEXT_UShort( pLookupTable );
const FT_Byte* pSubLookup = pGsubBase + nOfsLookupList + nOfsLookupTable + nOfsSubLookupTable;
if( pGsubLimit < pSubLookup + 6 )
return false;
- const USHORT nFmtSubstitution = NEXT_UShort( pSubLookup );
- const USHORT nOfsCoverage = NEXT_UShort( pSubLookup );
+ const sal_uInt16 nFmtSubstitution = NEXT_UShort( pSubLookup );
+ const sal_uInt16 nOfsCoverage = NEXT_UShort( pSubLookup );
- typedef std::pair<USHORT,USHORT> GlyphSubst;
+ typedef std::pair<sal_uInt16,sal_uInt16> GlyphSubst;
typedef std::vector<GlyphSubst> SubstVector;
SubstVector aSubstVector;
@@ -255,19 +255,19 @@ int ReadGSUB( struct _TrueTypeFont* pTTFile,
+ nOfsLookupList + nOfsLookupTable + nOfsSubLookupTable + nOfsCoverage;
if( pGsubLimit < pCoverage + 4 )
return false;
- const USHORT nFmtCoverage = NEXT_UShort( pCoverage );
+ const sal_uInt16 nFmtCoverage = NEXT_UShort( pCoverage );
switch( nFmtCoverage )
{
case 1: // Coverage Format 1
{
- const USHORT nCntGlyph = NEXT_UShort( pCoverage );
+ const sal_uInt16 nCntGlyph = NEXT_UShort( pCoverage );
if( pGsubLimit < pCoverage + 2 * nCntGlyph )
// TODO? nCntGlyph = (pGsubLimit - pCoverage) / 2;
return false;
aSubstVector.reserve( nCntGlyph );
- for( USHORT i = 0; i < nCntGlyph; ++i )
+ for( sal_uInt16 i = 0; i < nCntGlyph; ++i )
{
- const USHORT nGlyphId = NEXT_UShort( pCoverage );
+ const sal_uInt16 nGlyphId = NEXT_UShort( pCoverage );
aSubstVector.push_back( GlyphSubst( nGlyphId, 0 ) );
}
}
@@ -275,17 +275,17 @@ int ReadGSUB( struct _TrueTypeFont* pTTFile,
case 2: // Coverage Format 2
{
- const USHORT nCntRange = NEXT_UShort( pCoverage );
+ const sal_uInt16 nCntRange = NEXT_UShort( pCoverage );
if( pGsubLimit < pCoverage + 6 * nCntRange )
// TODO? nCntGlyph = (pGsubLimit - pCoverage) / 6;
return false;
for( int i = nCntRange; --i >= 0; )
{
- const UINT32 nGlyph0 = NEXT_UShort( pCoverage );
- const UINT32 nGlyph1 = NEXT_UShort( pCoverage );
- const USHORT nCovIdx = NEXT_UShort( pCoverage );
- for( UINT32 j = nGlyph0; j <= nGlyph1; ++j )
- aSubstVector.push_back( GlyphSubst( static_cast<USHORT>(j + nCovIdx), 0 ) );
+ const sal_uInt32 nGlyph0 = NEXT_UShort( pCoverage );
+ const sal_uInt32 nGlyph1 = NEXT_UShort( pCoverage );
+ const sal_uInt16 nCovIdx = NEXT_UShort( pCoverage );
+ for( sal_uInt32 j = nGlyph0; j <= nGlyph1; ++j )
+ aSubstVector.push_back( GlyphSubst( static_cast<sal_uInt16>(j + nCovIdx), 0 ) );
}
}
break;
@@ -297,7 +297,7 @@ int ReadGSUB( struct _TrueTypeFont* pTTFile,
{
case 1: // Single Substitution Format 1
{
- const USHORT nDeltaGlyphId = NEXT_UShort( pSubLookup );
+ const sal_uInt16 nDeltaGlyphId = NEXT_UShort( pSubLookup );
for(; subst_it != aSubstVector.end(); ++subst_it )
(*subst_it).second = (*subst_it).first + nDeltaGlyphId;
@@ -306,12 +306,12 @@ int ReadGSUB( struct _TrueTypeFont* pTTFile,
case 2: // Single Substitution Format 2
{
- const USHORT nCntGlyph = NEXT_UShort( pSubLookup );
+ const sal_uInt16 nCntGlyph = NEXT_UShort( pSubLookup );
for( int i = nCntGlyph; (subst_it != aSubstVector.end()) && (--i>=0); ++subst_it )
{
if( pGsubLimit < pSubLookup + 2 )
return false;
- const USHORT nGlyphId = NEXT_UShort( pSubLookup );
+ const sal_uInt16 nGlyphId = NEXT_UShort( pSubLookup );
(*subst_it).second = nGlyphId;
}
}
@@ -343,7 +343,7 @@ int UseGSUB( struct _TrueTypeFont* pTTFile, int nGlyph, int /*wmode*/ )
GlyphSubstitution* pGlyphSubstitution = (GlyphSubstitution*)pTTFile->pGSubstitution;
if( pGlyphSubstitution != 0 )
{
- GlyphSubstitution::const_iterator it( pGlyphSubstitution->find( sal::static_int_cast<USHORT>(nGlyph) ) );
+ GlyphSubstitution::const_iterator it( pGlyphSubstitution->find( sal::static_int_cast<sal_uInt16>(nGlyph) ) );
if( it != pGlyphSubstitution->end() )
nGlyph = (*it).second;
}
diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index 468d4be36b0a..04e53960b6fa 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -1493,7 +1493,7 @@ static void GetKern(TrueTypeFont *ttf)
if( !table )
goto badtable;
- if (GetUInt16(table, 0, 1) == 0) { /* Traditional Microsoft style table with USHORT version and nTables fields */
+ if (GetUInt16(table, 0, 1) == 0) { /* Traditional Microsoft style table with sal_uInt16 version and nTables fields */
ttf->nkern = GetUInt16(table, 2, 1);
ttf->kerntables = (const sal_uInt8**)calloc(ttf->nkern, sizeof(sal_uInt8 *));
assert(ttf->kerntables != 0);
diff --git a/vcl/source/gdi/alpha.cxx b/vcl/source/gdi/alpha.cxx
index 9d93a540750a..d1feee2b1443 100644
--- a/vcl/source/gdi/alpha.cxx
+++ b/vcl/source/gdi/alpha.cxx
@@ -58,7 +58,7 @@ AlphaMask::AlphaMask( const AlphaMask& rAlphaMask ) :
// -----------------------------------------------------------------------------
-AlphaMask::AlphaMask( const Size& rSizePixel, BYTE* pEraseTransparency ) :
+AlphaMask::AlphaMask( const Size& rSizePixel, sal_uInt8* pEraseTransparency ) :
Bitmap( rSizePixel, 8, &Bitmap::GetGreyPalette( 256 ) )
{
if( pEraseTransparency )
@@ -107,14 +107,14 @@ Bitmap AlphaMask::GetBitmap() const
// -----------------------------------------------------------------------------
-BOOL AlphaMask::Crop( const Rectangle& rRectPixel )
+sal_Bool AlphaMask::Crop( const Rectangle& rRectPixel )
{
return Bitmap::Crop( rRectPixel );
}
// -----------------------------------------------------------------------------
-BOOL AlphaMask::Expand( ULONG nDX, ULONG nDY, BYTE* pInitTransparency )
+sal_Bool AlphaMask::Expand( sal_uIntPtr nDX, sal_uIntPtr nDY, sal_uInt8* pInitTransparency )
{
Color aColor;
@@ -126,7 +126,7 @@ BOOL AlphaMask::Expand( ULONG nDX, ULONG nDY, BYTE* pInitTransparency )
// -----------------------------------------------------------------------------
-BOOL AlphaMask::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectSrc,
+sal_Bool AlphaMask::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectSrc,
const AlphaMask* pAlphaSrc )
{
// Note: this code is copied from Bitmap::CopyPixel but avoids any palette lookups
@@ -134,7 +134,7 @@ BOOL AlphaMask::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectSrc,
const Size aSizePix( GetSizePixel() );
Rectangle aRectDst( rRectDst );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
aRectDst.Intersection( Rectangle( Point(), aSizePix ) );
@@ -225,7 +225,7 @@ BOOL AlphaMask::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectSrc,
}
ReleaseAccess( pWriteAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -237,26 +237,26 @@ BOOL AlphaMask::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectSrc,
// -----------------------------------------------------------------------------
-BOOL AlphaMask::Erase( BYTE cTransparency )
+sal_Bool AlphaMask::Erase( sal_uInt8 cTransparency )
{
return Bitmap::Erase( Color( cTransparency, cTransparency, cTransparency ) );
}
// -----------------------------------------------------------------------------
-BOOL AlphaMask::Invert()
+sal_Bool AlphaMask::Invert()
{
BitmapWriteAccess* pAcc = AcquireWriteAccess();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pAcc && pAcc->GetBitCount() == 8 )
{
BitmapColor aCol( 0 );
const long nWidth = pAcc->Width(), nHeight = pAcc->Height();
- BYTE* pMap = new BYTE[ 256 ];
+ sal_uInt8* pMap = new sal_uInt8[ 256 ];
for( long i = 0; i < 256; i++ )
- pMap[ i ] = ~(BYTE) i;
+ pMap[ i ] = ~(sal_uInt8) i;
for( long nY = 0L; nY < nHeight; nY++ )
{
@@ -268,7 +268,7 @@ BOOL AlphaMask::Invert()
}
delete[] pMap;
- bRet = TRUE;
+ bRet = sal_True;
}
if( pAcc )
@@ -279,16 +279,16 @@ BOOL AlphaMask::Invert()
// -----------------------------------------------------------------------------
-BOOL AlphaMask::Mirror( ULONG nMirrorFlags )
+sal_Bool AlphaMask::Mirror( sal_uIntPtr nMirrorFlags )
{
return Bitmap::Mirror( nMirrorFlags );
}
// -----------------------------------------------------------------------------
-BOOL AlphaMask::Scale( const Size& rNewSize, ULONG nScaleFlag )
+sal_Bool AlphaMask::Scale( const Size& rNewSize, sal_uIntPtr nScaleFlag )
{
- BOOL bRet = Bitmap::Scale( rNewSize, nScaleFlag );
+ sal_Bool bRet = Bitmap::Scale( rNewSize, nScaleFlag );
if( bRet && ( nScaleFlag == BMP_SCALE_INTERPOLATE ) )
Bitmap::Convert( BMP_CONVERSION_8BIT_GREYS );
@@ -298,9 +298,9 @@ BOOL AlphaMask::Scale( const Size& rNewSize, ULONG nScaleFlag )
// -----------------------------------------------------------------------------
-BOOL AlphaMask::Scale( const double& rScaleX, const double& rScaleY, ULONG nScaleFlag )
+sal_Bool AlphaMask::Scale( const double& rScaleX, const double& rScaleY, sal_uIntPtr nScaleFlag )
{
- BOOL bRet = Bitmap::Scale( rScaleX, rScaleY, nScaleFlag );
+ sal_Bool bRet = Bitmap::Scale( rScaleX, rScaleY, nScaleFlag );
if( bRet && ( nScaleFlag == BMP_SCALE_INTERPOLATE ) )
Bitmap::Convert( BMP_CONVERSION_8BIT_GREYS );
@@ -310,18 +310,18 @@ BOOL AlphaMask::Scale( const double& rScaleX, const double& rScaleY, ULONG nScal
// -----------------------------------------------------------------------------
-BOOL AlphaMask::Rotate( long nAngle10, BYTE cFillTransparency )
+sal_Bool AlphaMask::Rotate( long nAngle10, sal_uInt8 cFillTransparency )
{
return Bitmap::Rotate( nAngle10, Color( cFillTransparency, cFillTransparency, cFillTransparency ) );
}
// -----------------------------------------------------------------------------
-BOOL AlphaMask::Replace( const Bitmap& rMask, BYTE cReplaceTransparency )
+sal_Bool AlphaMask::Replace( const Bitmap& rMask, sal_uInt8 cReplaceTransparency )
{
BitmapReadAccess* pMaskAcc = ( (Bitmap&) rMask ).AcquireReadAccess();
BitmapWriteAccess* pAcc = AcquireWriteAccess();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pMaskAcc && pAcc )
{
@@ -344,14 +344,14 @@ BOOL AlphaMask::Replace( const Bitmap& rMask, BYTE cReplaceTransparency )
// -----------------------------------------------------------------------------
-BOOL AlphaMask::Replace( BYTE cSearchTransparency, BYTE cReplaceTransparency, ULONG
+sal_Bool AlphaMask::Replace( sal_uInt8 cSearchTransparency, sal_uInt8 cReplaceTransparency, sal_uIntPtr
#ifdef DBG_UTIL
nTol
#endif
)
{
BitmapWriteAccess* pAcc = AcquireWriteAccess();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
DBG_ASSERT( !nTol, "AlphaMask::Replace: nTol not used yet" );
@@ -386,7 +386,7 @@ nTol
}
}
- bRet = TRUE;
+ bRet = sal_True;
}
if( pAcc )
@@ -397,17 +397,17 @@ nTol
// -----------------------------------------------------------------------------
-BOOL AlphaMask::Replace( BYTE* pSearchTransparencies, BYTE* pReplaceTransparencies,
- ULONG nColorCount, ULONG* pTols )
+sal_Bool AlphaMask::Replace( sal_uInt8* pSearchTransparencies, sal_uInt8* pReplaceTransparencies,
+ sal_uIntPtr nColorCount, sal_uIntPtr* pTols )
{
Color* pSearchColors = new Color[ nColorCount ];
Color* pReplaceColors = new Color[ nColorCount ];
- BOOL bRet;
+ sal_Bool bRet;
- for( ULONG i = 0; i < nColorCount; i++ )
+ for( sal_uIntPtr i = 0; i < nColorCount; i++ )
{
- const BYTE cSearchTransparency = pSearchTransparencies[ i ];
- const BYTE cReplaceTransparency = pReplaceTransparencies[ i ];
+ const sal_uInt8 cSearchTransparency = pSearchTransparencies[ i ];
+ const sal_uInt8 cReplaceTransparency = pReplaceTransparencies[ i ];
pSearchColors[ i ] = Color( cSearchTransparency, cSearchTransparency, cSearchTransparency );
pReplaceColors[ i ] = Color( cReplaceTransparency, cReplaceTransparency, cReplaceTransparency );
diff --git a/vcl/source/gdi/animate.cxx b/vcl/source/gdi/animate.cxx
index b0fb3b3de513..e19bc47ed02c 100644
--- a/vcl/source/gdi/animate.cxx
+++ b/vcl/source/gdi/animate.cxx
@@ -49,13 +49,13 @@ DBG_NAME( Animation )
// - statics -
// -----------
-ULONG Animation::mnAnimCount = 0UL;
+sal_uIntPtr Animation::mnAnimCount = 0UL;
// -------------------
// - AnimationBitmap -
// -------------------
-ULONG AnimationBitmap::GetChecksum() const
+sal_uIntPtr AnimationBitmap::GetChecksum() const
{
sal_uInt32 nCrc = aBmpEx.GetChecksum();
SVBT32 aBT32;
@@ -93,9 +93,9 @@ Animation::Animation() :
mnLoops ( 0 ),
mnPos ( 0 ),
meCycleMode ( CYCLE_NORMAL ),
- mbIsInAnimation ( FALSE ),
- mbLoopTerminated ( FALSE ),
- mbIsWaiting ( FALSE )
+ mbIsInAnimation ( sal_False ),
+ mbLoopTerminated ( sal_False ),
+ mbIsWaiting ( sal_False )
{
DBG_CTOR( Animation, NULL );
maTimer.SetTimeoutHdl( LINK( this, Animation, ImplTimeoutHdl ) );
@@ -110,7 +110,7 @@ Animation::Animation( const Animation& rAnimation ) :
mnLoopCount ( rAnimation.mnLoopCount ),
mnPos ( rAnimation.mnPos ),
meCycleMode ( rAnimation.meCycleMode ),
- mbIsInAnimation ( FALSE ),
+ mbIsInAnimation ( sal_False ),
mbLoopTerminated ( rAnimation.mbLoopTerminated ),
mbIsWaiting ( rAnimation.mbIsWaiting )
{
@@ -165,24 +165,24 @@ Animation& Animation::operator=( const Animation& rAnimation )
// -----------------------------------------------------------------------
-BOOL Animation::operator==( const Animation& rAnimation ) const
+sal_Bool Animation::operator==( const Animation& rAnimation ) const
{
- const ULONG nCount = maList.Count();
- BOOL bRet = FALSE;
+ const sal_uIntPtr nCount = maList.Count();
+ sal_Bool bRet = sal_False;
if( rAnimation.maList.Count() == nCount &&
rAnimation.maBitmapEx == maBitmapEx &&
rAnimation.maGlobalSize == maGlobalSize &&
rAnimation.meCycleMode == meCycleMode )
{
- bRet = TRUE;
+ bRet = sal_True;
- for( ULONG n = 0; n < nCount; n++ )
+ for( sal_uIntPtr n = 0; n < nCount; n++ )
{
if( ( *(AnimationBitmap*) maList.GetObject( n ) ) !=
( *(AnimationBitmap*) rAnimation.maList.GetObject( n ) ) )
{
- bRet = FALSE;
+ bRet = sal_False;
break;
}
}
@@ -193,19 +193,19 @@ BOOL Animation::operator==( const Animation& rAnimation ) const
// ------------------------------------------------------------------
-BOOL Animation::IsEqual( const Animation& rAnimation ) const
+sal_Bool Animation::IsEqual( const Animation& rAnimation ) const
{
- const ULONG nCount = maList.Count();
- BOOL bRet = FALSE;
+ const sal_uIntPtr nCount = maList.Count();
+ sal_Bool bRet = sal_False;
if( rAnimation.maList.Count() == nCount &&
rAnimation.maBitmapEx.IsEqual( maBitmapEx ) &&
rAnimation.maGlobalSize == maGlobalSize &&
rAnimation.meCycleMode == meCycleMode )
{
- for( ULONG n = 0; ( n < nCount ) && !bRet; n++ )
+ for( sal_uIntPtr n = 0; ( n < nCount ) && !bRet; n++ )
if( ( (AnimationBitmap*) maList.GetObject( n ) )->IsEqual( *(AnimationBitmap*) rAnimation.maList.GetObject( n ) ) )
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -213,7 +213,7 @@ BOOL Animation::IsEqual( const Animation& rAnimation ) const
// ------------------------------------------------------------------
-BOOL Animation::IsEmpty() const
+sal_Bool Animation::IsEmpty() const
{
return( maBitmapEx.IsEmpty() && !maList.Count() );
}
@@ -223,7 +223,7 @@ BOOL Animation::IsEmpty() const
void Animation::SetEmpty()
{
maTimer.Stop();
- mbIsInAnimation = FALSE;
+ mbIsInAnimation = sal_False;
maGlobalSize = Size();
maBitmapEx.SetEmpty();
@@ -245,11 +245,11 @@ void Animation::Clear()
// -----------------------------------------------------------------------
-BOOL Animation::IsTransparent() const
+sal_Bool Animation::IsTransparent() const
{
Point aPoint;
Rectangle aRect( aPoint, maGlobalSize );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
// Falls irgendein 'kleines' Bildchen durch den Hintergrund
// ersetzt werden soll, muessen wir 'transparent' sein, um
@@ -261,7 +261,7 @@ BOOL Animation::IsTransparent() const
if( DISPOSE_BACK == pAnimBmp->eDisposal && Rectangle( pAnimBmp->aPosPix, pAnimBmp->aSizePix ) != aRect )
{
- bRet = TRUE;
+ bRet = sal_True;
break;
}
}
@@ -274,9 +274,9 @@ BOOL Animation::IsTransparent() const
// -----------------------------------------------------------------------
-ULONG Animation::GetSizeBytes() const
+sal_uIntPtr Animation::GetSizeBytes() const
{
- ULONG nSizeBytes = GetBitmapEx().GetSizeBytes();
+ sal_uIntPtr nSizeBytes = GetBitmapEx().GetSizeBytes();
for( long i = 0, nCount = maList.Count(); i < nCount; i++ )
{
@@ -289,7 +289,7 @@ ULONG Animation::GetSizeBytes() const
// -----------------------------------------------------------------------
-ULONG Animation::GetChecksum() const
+sal_uIntPtr Animation::GetChecksum() const
{
SVBT32 aBT32;
sal_uInt32 nCrc = GetBitmapEx().GetChecksum();
@@ -317,7 +317,7 @@ ULONG Animation::GetChecksum() const
// -----------------------------------------------------------------------
-BOOL Animation::Start( OutputDevice* pOut, const Point& rDestPt, long nExtraData,
+sal_Bool Animation::Start( OutputDevice* pOut, const Point& rDestPt, long nExtraData,
OutputDevice* pFirstFrameOutDev )
{
return Start( pOut, rDestPt, pOut->PixelToLogic( maGlobalSize ), nExtraData, pFirstFrameOutDev );
@@ -325,10 +325,10 @@ BOOL Animation::Start( OutputDevice* pOut, const Point& rDestPt, long nExtraData
// -----------------------------------------------------------------------
-BOOL Animation::Start( OutputDevice* pOut, const Point& rDestPt, const Size& rDestSz, long nExtraData,
+sal_Bool Animation::Start( OutputDevice* pOut, const Point& rDestPt, const Size& rDestSz, long nExtraData,
OutputDevice* pFirstFrameOutDev )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( maList.Count() )
{
@@ -361,7 +361,7 @@ BOOL Animation::Start( OutputDevice* pOut, const Point& rDestPt, const Size& rDe
if( !mpViewList->Count() )
{
maTimer.Stop();
- mbIsInAnimation = FALSE;
+ mbIsInAnimation = sal_False;
mnPos = 0UL;
}
@@ -371,13 +371,13 @@ BOOL Animation::Start( OutputDevice* pOut, const Point& rDestPt, const Size& rDe
if( !mbIsInAnimation )
{
ImplRestartTimer( ( (AnimationBitmap*) maList.GetObject( mnPos ) )->nWait );
- mbIsInAnimation = TRUE;
+ mbIsInAnimation = sal_True;
}
}
else
Draw( pOut, rDestPt, rDestSz );
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -403,7 +403,7 @@ void Animation::Stop( OutputDevice* pOut, long nExtraData )
if( !mpViewList->Count() )
{
maTimer.Stop();
- mbIsInAnimation = FALSE;
+ mbIsInAnimation = sal_False;
}
}
@@ -418,7 +418,7 @@ void Animation::Draw( OutputDevice* pOut, const Point& rDestPt ) const
void Animation::Draw( OutputDevice* pOut, const Point& rDestPt, const Size& rDestSz ) const
{
- const ULONG nCount = maList.Count();
+ const sal_uIntPtr nCount = maList.Count();
if( nCount )
{
@@ -430,7 +430,7 @@ void Animation::Draw( OutputDevice* pOut, const Point& rDestPt, const Size& rDes
pObj->aBmpEx.Draw( pOut, rDestPt, rDestSz );
else
{
- const ULONG nOldPos = mnPos;
+ const sal_uIntPtr nOldPos = mnPos;
( (Animation*) this )->mnPos = mbLoopTerminated ? ( nCount - 1UL ) : mnPos;
delete new ImplAnimView( (Animation*) this, pOut, rDestPt, rDestSz, 0 );
( (Animation*) this )->mnPos = nOldPos;
@@ -440,9 +440,9 @@ void Animation::Draw( OutputDevice* pOut, const Point& rDestPt, const Size& rDes
// -----------------------------------------------------------------------
-void Animation::ImplRestartTimer( ULONG nTimeout )
+void Animation::ImplRestartTimer( sal_uIntPtr nTimeout )
{
- maTimer.SetTimeout( Max( nTimeout, (ULONG)(MIN_TIMEOUT + ( mnAnimCount - 1 ) * INC_TIMEOUT) ) * 10L );
+ maTimer.SetTimeout( Max( nTimeout, (sal_uIntPtr)(MIN_TIMEOUT + ( mnAnimCount - 1 ) * INC_TIMEOUT) ) * 10L );
maTimer.Start();
}
@@ -450,12 +450,12 @@ void Animation::ImplRestartTimer( ULONG nTimeout )
IMPL_LINK( Animation, ImplTimeoutHdl, Timer*, EMPTYARG )
{
- const ULONG nAnimCount = maList.Count();
+ const sal_uIntPtr nAnimCount = maList.Count();
if( nAnimCount )
{
ImplAnimView* pView;
- BOOL bGlobalPause = TRUE;
+ sal_Bool bGlobalPause = sal_True;
if( maNotifyLink.IsSet() )
{
@@ -481,7 +481,7 @@ IMPL_LINK( Animation, ImplTimeoutHdl, Timer*, EMPTYARG )
pView = (ImplAnimView*) pAInfo->pViewData;
pView->ImplPause( pAInfo->bPause );
- pView->ImplSetMarked( TRUE );
+ pView->ImplSetMarked( sal_True );
}
// delete AInfo structures
@@ -501,15 +501,15 @@ IMPL_LINK( Animation, ImplTimeoutHdl, Timer*, EMPTYARG )
else
{
if( !pView->ImplIsPause() )
- bGlobalPause = FALSE;
+ bGlobalPause = sal_False;
- pView->ImplSetMarked( FALSE );
+ pView->ImplSetMarked( sal_False );
pView = (ImplAnimView*) mpViewList->Next();
}
}
}
else
- bGlobalPause = FALSE;
+ bGlobalPause = sal_False;
if( !mpViewList->Count() )
Stop();
@@ -524,7 +524,7 @@ IMPL_LINK( Animation, ImplTimeoutHdl, Timer*, EMPTYARG )
if( mnLoops == 1 )
{
Stop();
- mbLoopTerminated = TRUE;
+ mbLoopTerminated = sal_True;
mnPos = nAnimCount - 1UL;
maBitmapEx = ( (AnimationBitmap*) maList.GetObject( mnPos ) )->aBmpEx;
return 0L;
@@ -572,9 +572,9 @@ IMPL_LINK( Animation, ImplTimeoutHdl, Timer*, EMPTYARG )
// -----------------------------------------------------------------------
-BOOL Animation::Insert( const AnimationBitmap& rStepBmp )
+sal_Bool Animation::Insert( const AnimationBitmap& rStepBmp )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !IsInAnimation() )
{
@@ -588,7 +588,7 @@ BOOL Animation::Insert( const AnimationBitmap& rStepBmp )
if( maList.Count() == 1 )
maBitmapEx = rStepBmp.aBmpEx;
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -596,7 +596,7 @@ BOOL Animation::Insert( const AnimationBitmap& rStepBmp )
// -----------------------------------------------------------------------
-const AnimationBitmap& Animation::Get( USHORT nAnimation ) const
+const AnimationBitmap& Animation::Get( sal_uInt16 nAnimation ) const
{
DBG_ASSERT( ( nAnimation < maList.Count() ), "No object at this position" );
return *(AnimationBitmap*) maList.GetObject( nAnimation );
@@ -604,7 +604,7 @@ const AnimationBitmap& Animation::Get( USHORT nAnimation ) const
// -----------------------------------------------------------------------
-void Animation::Replace( const AnimationBitmap& rNewAnimationBitmap, USHORT nAnimation )
+void Animation::Replace( const AnimationBitmap& rNewAnimationBitmap, sal_uInt16 nAnimation )
{
DBG_ASSERT( ( nAnimation < maList.Count() ), "No object at this position" );
@@ -623,7 +623,7 @@ void Animation::Replace( const AnimationBitmap& rNewAnimationBitmap, USHORT nAni
// -----------------------------------------------------------------------
-void Animation::SetLoopCount( const ULONG nLoopCount )
+void Animation::SetLoopCount( const sal_uIntPtr nLoopCount )
{
mnLoopCount = nLoopCount;
ResetLoopCount();
@@ -634,20 +634,20 @@ void Animation::SetLoopCount( const ULONG nLoopCount )
void Animation::ResetLoopCount()
{
mnLoops = mnLoopCount;
- mbLoopTerminated = FALSE;
+ mbLoopTerminated = sal_False;
}
// -----------------------------------------------------------------------
-BOOL Animation::Convert( BmpConversion eConversion )
+sal_Bool Animation::Convert( BmpConversion eConversion )
{
DBG_ASSERT( !IsInAnimation(), "Animation modified while it is animated" );
- BOOL bRet;
+ sal_Bool bRet;
if( !IsInAnimation() && maList.Count() )
{
- bRet = TRUE;
+ bRet = sal_True;
for( void* pStepBmp = maList.First(); pStepBmp && bRet; pStepBmp = maList.Next() )
bRet = ( ( AnimationBitmap*) pStepBmp )->aBmpEx.Convert( eConversion );
@@ -655,22 +655,22 @@ BOOL Animation::Convert( BmpConversion eConversion )
maBitmapEx.Convert( eConversion );
}
else
- bRet = FALSE;
+ bRet = sal_False;
return bRet;
}
// -----------------------------------------------------------------------
-BOOL Animation::ReduceColors( USHORT nNewColorCount, BmpReduce eReduce )
+sal_Bool Animation::ReduceColors( sal_uInt16 nNewColorCount, BmpReduce eReduce )
{
DBG_ASSERT( !IsInAnimation(), "Animation modified while it is animated" );
- BOOL bRet;
+ sal_Bool bRet;
if( !IsInAnimation() && maList.Count() )
{
- bRet = TRUE;
+ bRet = sal_True;
for( void* pStepBmp = maList.First(); pStepBmp && bRet; pStepBmp = maList.Next() )
bRet = ( ( AnimationBitmap*) pStepBmp )->aBmpEx.ReduceColors( nNewColorCount, eReduce );
@@ -678,22 +678,22 @@ BOOL Animation::ReduceColors( USHORT nNewColorCount, BmpReduce eReduce )
maBitmapEx.ReduceColors( nNewColorCount, eReduce );
}
else
- bRet = FALSE;
+ bRet = sal_False;
return bRet;
}
// -----------------------------------------------------------------------
-BOOL Animation::Invert()
+sal_Bool Animation::Invert()
{
DBG_ASSERT( !IsInAnimation(), "Animation modified while it is animated" );
- BOOL bRet;
+ sal_Bool bRet;
if( !IsInAnimation() && maList.Count() )
{
- bRet = TRUE;
+ bRet = sal_True;
for( void* pStepBmp = maList.First(); pStepBmp && bRet; pStepBmp = maList.Next() )
bRet = ( ( AnimationBitmap*) pStepBmp )->aBmpEx.Invert();
@@ -701,22 +701,22 @@ BOOL Animation::Invert()
maBitmapEx.Invert();
}
else
- bRet = FALSE;
+ bRet = sal_False;
return bRet;
}
// -----------------------------------------------------------------------
-BOOL Animation::Mirror( ULONG nMirrorFlags )
+sal_Bool Animation::Mirror( sal_uIntPtr nMirrorFlags )
{
DBG_ASSERT( !IsInAnimation(), "Animation modified while it is animated" );
- BOOL bRet;
+ sal_Bool bRet;
if( !IsInAnimation() && maList.Count() )
{
- bRet = TRUE;
+ bRet = sal_True;
if( nMirrorFlags )
{
@@ -724,7 +724,7 @@ BOOL Animation::Mirror( ULONG nMirrorFlags )
pStepBmp && bRet;
pStepBmp = (AnimationBitmap*) maList.Next() )
{
- if( ( bRet = pStepBmp->aBmpEx.Mirror( nMirrorFlags ) ) == TRUE )
+ if( ( bRet = pStepBmp->aBmpEx.Mirror( nMirrorFlags ) ) == sal_True )
{
if( nMirrorFlags & BMP_MIRROR_HORZ )
pStepBmp->aPosPix.X() = maGlobalSize.Width() - pStepBmp->aPosPix.X() - pStepBmp->aSizePix.Width();
@@ -738,22 +738,22 @@ BOOL Animation::Mirror( ULONG nMirrorFlags )
}
}
else
- bRet = FALSE;
+ bRet = sal_False;
return bRet;
}
// -----------------------------------------------------------------------
-BOOL Animation::Dither( ULONG nDitherFlags )
+sal_Bool Animation::Dither( sal_uIntPtr nDitherFlags )
{
DBG_ASSERT( !IsInAnimation(), "Animation modified while it is animated" );
- BOOL bRet;
+ sal_Bool bRet;
if( !IsInAnimation() && maList.Count() )
{
- bRet = TRUE;
+ bRet = sal_True;
for( void* pStepBmp = maList.First(); pStepBmp && bRet; pStepBmp = maList.Next() )
bRet = ( ( AnimationBitmap*) pStepBmp )->aBmpEx.Dither( nDitherFlags );
@@ -761,24 +761,24 @@ BOOL Animation::Dither( ULONG nDitherFlags )
maBitmapEx.Dither( nDitherFlags );
}
else
- bRet = FALSE;
+ bRet = sal_False;
return bRet;
}
// -----------------------------------------------------------------------
-BOOL Animation::Adjust( short nLuminancePercent, short nContrastPercent,
+sal_Bool Animation::Adjust( short nLuminancePercent, short nContrastPercent,
short nChannelRPercent, short nChannelGPercent, short nChannelBPercent,
- double fGamma, BOOL bInvert )
+ double fGamma, sal_Bool bInvert )
{
DBG_ASSERT( !IsInAnimation(), "Animation modified while it is animated" );
- BOOL bRet;
+ sal_Bool bRet;
if( !IsInAnimation() && maList.Count() )
{
- bRet = TRUE;
+ bRet = sal_True;
for( void* pStepBmp = maList.First(); pStepBmp && bRet; pStepBmp = maList.Next() )
{
@@ -792,22 +792,22 @@ BOOL Animation::Adjust( short nLuminancePercent, short nContrastPercent,
fGamma, bInvert );
}
else
- bRet = FALSE;
+ bRet = sal_False;
return bRet;
}
// -----------------------------------------------------------------------
-BOOL Animation::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam, const Link* pProgress )
+sal_Bool Animation::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam, const Link* pProgress )
{
DBG_ASSERT( !IsInAnimation(), "Animation modified while it is animated" );
- BOOL bRet;
+ sal_Bool bRet;
if( !IsInAnimation() && maList.Count() )
{
- bRet = TRUE;
+ bRet = sal_True;
for( void* pStepBmp = maList.First(); pStepBmp && bRet; pStepBmp = maList.Next() )
bRet = ( ( AnimationBitmap*) pStepBmp )->aBmpEx.Filter( eFilter, pFilterParam, pProgress );
@@ -815,7 +815,7 @@ BOOL Animation::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam, c
maBitmapEx.Filter( eFilter, pFilterParam, pProgress );
}
else
- bRet = FALSE;
+ bRet = sal_False;
return bRet;
}
@@ -824,12 +824,12 @@ BOOL Animation::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam, c
SvStream& operator<<( SvStream& rOStm, const Animation& rAnimation )
{
- const USHORT nCount = rAnimation.Count();
+ const sal_uInt16 nCount = rAnimation.Count();
if( nCount )
{
const ByteString aDummyStr;
- const UINT32 nDummy32 = 0UL;
+ const sal_uInt32 nDummy32 = 0UL;
// Falls keine BitmapEx gesetzt wurde, schreiben wir
// einfach die erste Bitmap der Animation
@@ -839,22 +839,22 @@ SvStream& operator<<( SvStream& rOStm, const Animation& rAnimation )
rOStm << rAnimation.GetBitmapEx();
// Kennung schreiben ( SDANIMA1 )
- rOStm << (UINT32) 0x5344414e << (UINT32) 0x494d4931;
+ rOStm << (sal_uInt32) 0x5344414e << (sal_uInt32) 0x494d4931;
- for( USHORT i = 0; i < nCount; i++ )
+ for( sal_uInt16 i = 0; i < nCount; i++ )
{
const AnimationBitmap& rAnimBmp = rAnimation.Get( i );
- const UINT16 nRest = nCount - i - 1;
+ const sal_uInt16 nRest = nCount - i - 1;
// AnimationBitmap schreiben
rOStm << rAnimBmp.aBmpEx;
rOStm << rAnimBmp.aPosPix;
rOStm << rAnimBmp.aSizePix;
rOStm << rAnimation.maGlobalSize;
- rOStm << (UINT16) ( ( ANIMATION_TIMEOUT_ON_CLICK == rAnimBmp.nWait ) ? 65535 : rAnimBmp.nWait );
- rOStm << (UINT16) rAnimBmp.eDisposal;
- rOStm << (BYTE) rAnimBmp.bUserInput;
- rOStm << (UINT32) rAnimation.mnLoopCount;
+ rOStm << (sal_uInt16) ( ( ANIMATION_TIMEOUT_ON_CLICK == rAnimBmp.nWait ) ? 65535 : rAnimBmp.nWait );
+ rOStm << (sal_uInt16) rAnimBmp.eDisposal;
+ rOStm << (sal_uInt8) rAnimBmp.bUserInput;
+ rOStm << (sal_uInt32) rAnimation.mnLoopCount;
rOStm << nDummy32; // unbenutzt
rOStm << nDummy32; // unbenutzt
rOStm << nDummy32; // unbenutzt
@@ -871,10 +871,10 @@ SvStream& operator<<( SvStream& rOStm, const Animation& rAnimation )
SvStream& operator>>( SvStream& rIStm, Animation& rAnimation )
{
Bitmap aBmp;
- ULONG nStmPos = rIStm.Tell();
- UINT32 nAnimMagic1, nAnimMagic2;
- USHORT nOldFormat = rIStm.GetNumberFormatInt();
- BOOL bReadAnimations = FALSE;
+ sal_uIntPtr nStmPos = rIStm.Tell();
+ sal_uInt32 nAnimMagic1, nAnimMagic2;
+ sal_uInt16 nOldFormat = rIStm.GetNumberFormatInt();
+ sal_Bool bReadAnimations = sal_False;
rIStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
nStmPos = rIStm.Tell();
@@ -885,7 +885,7 @@ SvStream& operator>>( SvStream& rIStm, Animation& rAnimation )
// Wenn die BitmapEx am Anfang schon gelesen
// wurde ( von Graphic ), koennen wir direkt die Animationsbitmaps einlesen
if( ( nAnimMagic1 == 0x5344414e ) && ( nAnimMagic2 == 0x494d4931 ) && !rIStm.GetError() )
- bReadAnimations = TRUE;
+ bReadAnimations = sal_True;
// ansonsten versuchen wir erstmal die Bitmap(-Ex) zu lesen
else
{
@@ -895,7 +895,7 @@ SvStream& operator>>( SvStream& rIStm, Animation& rAnimation )
rIStm >> nAnimMagic1 >> nAnimMagic2;
if( ( nAnimMagic1 == 0x5344414e ) && ( nAnimMagic2 == 0x494d4931 ) && !rIStm.GetError() )
- bReadAnimations = TRUE;
+ bReadAnimations = sal_True;
else
rIStm.Seek( nStmPos );
}
@@ -906,9 +906,9 @@ SvStream& operator>>( SvStream& rIStm, Animation& rAnimation )
AnimationBitmap aAnimBmp;
BitmapEx aBmpEx;
ByteString aDummyStr;
- UINT32 nTmp32;
- UINT16 nTmp16;
- BYTE cTmp;
+ sal_uInt32 nTmp32;
+ sal_uInt16 nTmp16;
+ sal_uInt8 cTmp;
do
{
@@ -918,8 +918,8 @@ SvStream& operator>>( SvStream& rIStm, Animation& rAnimation )
rIStm >> rAnimation.maGlobalSize;
rIStm >> nTmp16; aAnimBmp.nWait = ( ( 65535 == nTmp16 ) ? ANIMATION_TIMEOUT_ON_CLICK : nTmp16 );
rIStm >> nTmp16; aAnimBmp.eDisposal = ( Disposal) nTmp16;
- rIStm >> cTmp; aAnimBmp.bUserInput = (BOOL) cTmp;
- rIStm >> nTmp32; rAnimation.mnLoopCount = (USHORT) nTmp32;
+ rIStm >> cTmp; aAnimBmp.bUserInput = (sal_Bool) cTmp;
+ rIStm >> nTmp32; rAnimation.mnLoopCount = (sal_uInt16) nTmp32;
rIStm >> nTmp32; // unbenutzt
rIStm >> nTmp32; // unbenutzt
rIStm >> nTmp32; // unbenutzt
diff --git a/vcl/source/gdi/bitmap.cxx b/vcl/source/gdi/bitmap.cxx
index 074935086b0b..c1572fd6d462 100644
--- a/vcl/source/gdi/bitmap.cxx
+++ b/vcl/source/gdi/bitmap.cxx
@@ -87,7 +87,7 @@ Bitmap::Bitmap( SalBitmap* pSalBitmap )
// ------------------------------------------------------------------
-Bitmap::Bitmap( const Size& rSizePixel, USHORT nBitCount, const BitmapPalette* pPal )
+Bitmap::Bitmap( const Size& rSizePixel, sal_uInt16 nBitCount, const BitmapPalette* pPal )
{
if( rSizePixel.Width() && rSizePixel.Height() )
{
@@ -127,12 +127,12 @@ Bitmap::Bitmap( const Size& rSizePixel, USHORT nBitCount, const BitmapPalette* p
// Dither-Palette erzeugen
if( 8 == nBitCount )
{
- USHORT nActCol = 16;
+ sal_uInt16 nActCol = 16;
- for( USHORT nB = 0; nB < 256; nB += 51 )
- for( USHORT nG = 0; nG < 256; nG += 51 )
- for( USHORT nR = 0; nR < 256; nR += 51 )
- aPal[ nActCol++ ] = BitmapColor( (BYTE) nR, (BYTE) nG, (BYTE) nB );
+ for( sal_uInt16 nB = 0; nB < 256; nB += 51 )
+ for( sal_uInt16 nG = 0; nG < 256; nG += 51 )
+ for( sal_uInt16 nR = 0; nR < 256; nR += 51 )
+ aPal[ nActCol++ ] = BitmapColor( (sal_uInt8) nR, (sal_uInt8) nG, (sal_uInt8) nB );
// Standard-Office-Farbe setzen
aPal[ nActCol++ ] = BitmapColor( 0, 184, 255 );
@@ -197,11 +197,11 @@ const BitmapPalette& Bitmap::GetGreyPalette( int nEntries )
{
if( !aGreyPalette16.GetEntryCount() )
{
- BYTE cGrey = 0, cGreyInc = 17;
+ sal_uInt8 cGrey = 0, cGreyInc = 17;
aGreyPalette16.SetEntryCount( 16 );
- for( USHORT i = 0; i < 16; i++, cGrey = sal::static_int_cast<BYTE>(cGrey + cGreyInc) )
+ for( sal_uInt16 i = 0; i < 16; i++, cGrey = sal::static_int_cast<sal_uInt8>(cGrey + cGreyInc) )
aGreyPalette16[ i ] = BitmapColor( cGrey, cGrey, cGrey );
}
@@ -213,8 +213,8 @@ const BitmapPalette& Bitmap::GetGreyPalette( int nEntries )
{
aGreyPalette256.SetEntryCount( 256 );
- for( USHORT i = 0; i < 256; i++ )
- aGreyPalette256[ i ] = BitmapColor( (BYTE) i, (BYTE) i, (BYTE) i );
+ for( sal_uInt16 i = 0; i < 256; i++ )
+ aGreyPalette256[ i ] = BitmapColor( (sal_uInt8) i, (sal_uInt8) i, (sal_uInt8) i );
}
return aGreyPalette256;
@@ -261,7 +261,7 @@ Bitmap& Bitmap::operator=( const Bitmap& rBitmap )
// ------------------------------------------------------------------
-BOOL Bitmap::IsEqual( const Bitmap& rBmp ) const
+sal_Bool Bitmap::IsEqual( const Bitmap& rBmp ) const
{
return( IsSameInstance( rBmp ) ||
( rBmp.GetSizePixel() == GetSizePixel() &&
@@ -310,17 +310,17 @@ void Bitmap::SetSourceSizePixel( const Size& rSize)
// ------------------------------------------------------------------
-USHORT Bitmap::GetBitCount() const
+sal_uInt16 Bitmap::GetBitCount() const
{
return( mpImpBmp ? mpImpBmp->ImplGetBitCount() : 0 );
}
// ------------------------------------------------------------------
-BOOL Bitmap::HasGreyPalette() const
+sal_Bool Bitmap::HasGreyPalette() const
{
- const USHORT nBitCount = GetBitCount();
- BOOL bRet = FALSE;
+ const sal_uInt16 nBitCount = GetBitCount();
+ sal_Bool bRet = sal_False;
if( 1 == nBitCount )
{
@@ -333,12 +333,12 @@ BOOL Bitmap::HasGreyPalette() const
if( rCol0.GetRed() == rCol0.GetGreen() && rCol0.GetRed() == rCol0.GetBlue() &&
rCol1.GetRed() == rCol1.GetGreen() && rCol1.GetRed() == rCol1.GetBlue() )
{
- bRet = TRUE;
+ bRet = sal_True;
}
( (Bitmap*) this )->ReleaseAccess( pRAcc );
}
else
- bRet = TRUE;
+ bRet = sal_True;
}
else if( 4 == nBitCount || 8 == nBitCount )
{
@@ -347,7 +347,7 @@ BOOL Bitmap::HasGreyPalette() const
if( pRAcc )
{
if( pRAcc->HasPalette() && ( (BitmapPalette&) pRAcc->GetPalette() == GetGreyPalette( 1 << nBitCount ) ) )
- bRet = TRUE;
+ bRet = sal_True;
( (Bitmap*) this )->ReleaseAccess( pRAcc );
}
@@ -358,9 +358,9 @@ BOOL Bitmap::HasGreyPalette() const
// ------------------------------------------------------------------
-ULONG Bitmap::GetChecksum() const
+sal_uIntPtr Bitmap::GetChecksum() const
{
- ULONG nRet = 0UL;
+ sal_uIntPtr nRet = 0UL;
if( mpImpBmp )
{
@@ -524,44 +524,44 @@ void Bitmap::ReleaseAccess( BitmapReadAccess* pBitmapAccess )
// ------------------------------------------------------------------
-BOOL Bitmap::Erase( const Color& rFillColor )
+sal_Bool Bitmap::Erase( const Color& rFillColor )
{
if( !(*this) )
- return TRUE;
+ return sal_True;
BitmapWriteAccess* pWriteAcc = AcquireWriteAccess();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pWriteAcc )
{
- const ULONG nFormat = pWriteAcc->GetScanlineFormat();
- BYTE cIndex = 0;
- BOOL bFast = FALSE;
+ const sal_uIntPtr nFormat = pWriteAcc->GetScanlineFormat();
+ sal_uInt8 cIndex = 0;
+ sal_Bool bFast = sal_False;
switch( nFormat )
{
case( BMP_FORMAT_1BIT_MSB_PAL ):
case( BMP_FORMAT_1BIT_LSB_PAL ):
{
- cIndex = (BYTE) pWriteAcc->GetBestPaletteIndex( rFillColor );
+ cIndex = (sal_uInt8) pWriteAcc->GetBestPaletteIndex( rFillColor );
cIndex = ( cIndex ? 255 : 0 );
- bFast = TRUE;
+ bFast = sal_True;
}
break;
case( BMP_FORMAT_4BIT_MSN_PAL ):
case( BMP_FORMAT_4BIT_LSN_PAL ):
{
- cIndex = (BYTE) pWriteAcc->GetBestPaletteIndex( rFillColor );
+ cIndex = (sal_uInt8) pWriteAcc->GetBestPaletteIndex( rFillColor );
cIndex = cIndex | ( cIndex << 4 );
- bFast = TRUE;
+ bFast = sal_True;
}
break;
case( BMP_FORMAT_8BIT_PAL ):
{
- cIndex = (BYTE) pWriteAcc->GetBestPaletteIndex( rFillColor );
- bFast = TRUE;
+ cIndex = (sal_uInt8) pWriteAcc->GetBestPaletteIndex( rFillColor );
+ bFast = sal_True;
}
break;
@@ -572,21 +572,21 @@ BOOL Bitmap::Erase( const Color& rFillColor )
( rFillColor.GetRed() == rFillColor.GetBlue() ) )
{
cIndex = rFillColor.GetRed();
- bFast = TRUE;
+ bFast = sal_True;
}
else
- bFast = FALSE;
+ bFast = sal_False;
}
break;
default:
- bFast = FALSE;
+ bFast = sal_False;
break;
}
if( bFast )
{
- const ULONG nBufSize = pWriteAcc->GetScanlineSize() * pWriteAcc->Height();
+ const sal_uIntPtr nBufSize = pWriteAcc->GetScanlineSize() * pWriteAcc->Height();
memset( pWriteAcc->GetBuffer(), cIndex, nBufSize );
}
else
@@ -598,7 +598,7 @@ BOOL Bitmap::Erase( const Color& rFillColor )
}
ReleaseAccess( pWriteAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -606,19 +606,19 @@ BOOL Bitmap::Erase( const Color& rFillColor )
// ------------------------------------------------------------------
-BOOL Bitmap::Invert()
+sal_Bool Bitmap::Invert()
{
BitmapWriteAccess* pAcc = AcquireWriteAccess();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pAcc )
{
if( pAcc->HasPalette() )
{
BitmapPalette aBmpPal( pAcc->GetPalette() );
- const USHORT nCount = aBmpPal.GetEntryCount();
+ const sal_uInt16 nCount = aBmpPal.GetEntryCount();
- for( USHORT i = 0; i < nCount; i++ )
+ for( sal_uInt16 i = 0; i < nCount; i++ )
aBmpPal[ i ].Invert();
pAcc->SetPalette( aBmpPal );
@@ -634,7 +634,7 @@ BOOL Bitmap::Invert()
}
ReleaseAccess( pAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -642,11 +642,11 @@ BOOL Bitmap::Invert()
// ------------------------------------------------------------------
-BOOL Bitmap::Mirror( ULONG nMirrorFlags )
+sal_Bool Bitmap::Mirror( sal_uIntPtr nMirrorFlags )
{
- BOOL bHorz = ( ( nMirrorFlags & BMP_MIRROR_HORZ ) == BMP_MIRROR_HORZ );
- BOOL bVert = ( ( nMirrorFlags & BMP_MIRROR_VERT ) == BMP_MIRROR_VERT );
- BOOL bRet = FALSE;
+ sal_Bool bHorz = ( ( nMirrorFlags & BMP_MIRROR_HORZ ) == BMP_MIRROR_HORZ );
+ sal_Bool bVert = ( ( nMirrorFlags & BMP_MIRROR_VERT ) == BMP_MIRROR_VERT );
+ sal_Bool bRet = sal_False;
if( bHorz && !bVert )
{
@@ -671,7 +671,7 @@ BOOL Bitmap::Mirror( ULONG nMirrorFlags )
}
ReleaseAccess( pAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
}
else if( bVert && !bHorz )
@@ -681,7 +681,7 @@ BOOL Bitmap::Mirror( ULONG nMirrorFlags )
if( pAcc )
{
const long nScanSize = pAcc->GetScanlineSize();
- BYTE* pBuffer = new BYTE[ nScanSize ];
+ sal_uInt8* pBuffer = new sal_uInt8[ nScanSize ];
const long nHeight = pAcc->Height();
const long nHeight1 = nHeight - 1L;
const long nHeight_2 = nHeight >> 1L;
@@ -695,7 +695,7 @@ BOOL Bitmap::Mirror( ULONG nMirrorFlags )
delete[] pBuffer;
ReleaseAccess( pAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
}
else if( bHorz && bVert )
@@ -732,26 +732,26 @@ BOOL Bitmap::Mirror( ULONG nMirrorFlags )
}
ReleaseAccess( pAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
}
else
- bRet = TRUE;
+ bRet = sal_True;
return bRet;
}
// ------------------------------------------------------------------
-BOOL Bitmap::Rotate( long nAngle10, const Color& rFillColor )
+sal_Bool Bitmap::Rotate( long nAngle10, const Color& rFillColor )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
nAngle10 %= 3600L;
nAngle10 = ( nAngle10 < 0L ) ? ( 3599L + nAngle10 ) : nAngle10;
if( !nAngle10 )
- bRet = TRUE;
+ bRet = sal_True;
else if( 1800L == nAngle10 )
bRet = Mirror( BMP_MIRROR_HORZ | BMP_MIRROR_VERT );
else
@@ -801,7 +801,7 @@ BOOL Bitmap::Rotate( long nAngle10, const Color& rFillColor )
Point aTmpPoint;
Rectangle aTmpRectangle( aTmpPoint, aSizePix );
Polygon aPoly( aTmpRectangle );
- aPoly.Rotate( aTmpPoint, (USHORT) nAngle10 );
+ aPoly.Rotate( aTmpPoint, (sal_uInt16) nAngle10 );
Rectangle aNewBound( aPoly.GetBoundRect() );
const Size aNewSizePix( aNewBound.GetSize() );
@@ -877,7 +877,7 @@ BOOL Bitmap::Rotate( long nAngle10, const Color& rFillColor )
ReleaseAccess( pReadAcc );
}
- if( ( bRet = !!aRotatedBmp ) == TRUE )
+ if( ( bRet = !!aRotatedBmp ) == sal_True )
ImplAssignWithSize( aRotatedBmp );
}
@@ -886,11 +886,11 @@ BOOL Bitmap::Rotate( long nAngle10, const Color& rFillColor )
// ------------------------------------------------------------------
-BOOL Bitmap::Crop( const Rectangle& rRectPixel )
+sal_Bool Bitmap::Crop( const Rectangle& rRectPixel )
{
const Size aSizePix( GetSizePixel() );
Rectangle aRect( rRectPixel );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
aRect.Intersection( Rectangle( Point(), aSizePix ) );
@@ -917,7 +917,7 @@ BOOL Bitmap::Crop( const Rectangle& rRectPixel )
pWriteAcc->SetPixel( nY, nX, pReadAcc->GetPixel( nY2, nX2 ) );
aNewBmp.ReleaseAccess( pWriteAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
ReleaseAccess( pReadAcc );
@@ -932,12 +932,12 @@ BOOL Bitmap::Crop( const Rectangle& rRectPixel )
// ------------------------------------------------------------------
-BOOL Bitmap::CopyPixel( const Rectangle& rRectDst,
+sal_Bool Bitmap::CopyPixel( const Rectangle& rRectDst,
const Rectangle& rRectSrc, const Bitmap* pBmpSrc )
{
const Size aSizePix( GetSizePixel() );
Rectangle aRectDst( rRectDst );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
aRectDst.Intersection( Rectangle( Point(), aSizePix ) );
@@ -948,8 +948,8 @@ BOOL Bitmap::CopyPixel( const Rectangle& rRectDst,
Bitmap* pSrc = (Bitmap*) pBmpSrc;
const Size aCopySizePix( pSrc->GetSizePixel() );
Rectangle aRectSrc( rRectSrc );
- const USHORT nSrcBitCount = pBmpSrc->GetBitCount();
- const USHORT nDstBitCount = GetBitCount();
+ const sal_uInt16 nSrcBitCount = pBmpSrc->GetBitCount();
+ const sal_uInt16 nDstBitCount = GetBitCount();
if( nSrcBitCount > nDstBitCount )
{
@@ -977,25 +977,25 @@ BOOL Bitmap::CopyPixel( const Rectangle& rRectDst,
{
const long nSrcCount = pDstAcc->GetPaletteEntryCount();
const long nDstCount = 1 << nDstBitCount;
- BOOL bFound;
+ sal_Bool bFound;
for( long i = 0L; ( i < nSrcCount ) && ( nNextIndex < nSrcCount ); i++ )
{
- const BitmapColor& rSrcCol = pSrcAcc->GetPaletteColor( (USHORT) i );
+ const BitmapColor& rSrcCol = pSrcAcc->GetPaletteColor( (sal_uInt16) i );
- bFound = FALSE;
+ bFound = sal_False;
for( long j = 0L; j < nDstCount; j++ )
{
- if( rSrcCol == pDstAcc->GetPaletteColor( (USHORT) j ) )
+ if( rSrcCol == pDstAcc->GetPaletteColor( (sal_uInt16) j ) )
{
- bFound = TRUE;
+ bFound = sal_True;
break;
}
}
if( !bFound )
- pDstAcc->SetPaletteColor( (USHORT) nNextIndex++, rSrcCol );
+ pDstAcc->SetPaletteColor( (sal_uInt16) nNextIndex++, rSrcCol );
}
}
@@ -1027,14 +1027,14 @@ BOOL Bitmap::CopyPixel( const Rectangle& rRectDst,
if( pReadAcc->HasPalette() && pWriteAcc->HasPalette() )
{
- const USHORT nCount = pReadAcc->GetPaletteEntryCount();
- BYTE* pMap = new BYTE[ nCount ];
+ const sal_uInt16 nCount = pReadAcc->GetPaletteEntryCount();
+ sal_uInt8* pMap = new sal_uInt8[ nCount ];
// Index-Map fuer Farbtabelle
// aufbauen, da das Bild ja (relativ) farbgenau
// kopiert werden soll
- for( USHORT i = 0; i < nCount; i++ )
- pMap[ i ] = (BYTE) pWriteAcc->GetBestPaletteIndex( pReadAcc->GetPaletteColor( i ) );
+ for( sal_uInt16 i = 0; i < nCount; i++ )
+ pMap[ i ] = (sal_uInt8) pWriteAcc->GetBestPaletteIndex( pReadAcc->GetPaletteColor( i ) );
for( long nSrcY = aRectSrc.Top(); nSrcY < nSrcEndY; nSrcY++, nDstY++ )
for( long nSrcX = aRectSrc.Left(), nDstX = aRectDst.Left(); nSrcX < nSrcEndX; nSrcX++, nDstX++ )
@@ -1110,7 +1110,7 @@ BOOL Bitmap::CopyPixel( const Rectangle& rRectDst,
}
ReleaseAccess( pWriteAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -1121,9 +1121,9 @@ BOOL Bitmap::CopyPixel( const Rectangle& rRectDst,
// ------------------------------------------------------------------
-BOOL Bitmap::Expand( ULONG nDX, ULONG nDY, const Color* pInitColor )
+sal_Bool Bitmap::Expand( sal_uIntPtr nDX, sal_uIntPtr nDY, const Color* pInitColor )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( nDX || nDY )
{
@@ -1167,7 +1167,7 @@ BOOL Bitmap::Expand( ULONG nDX, ULONG nDY, const Color* pInitColor )
pWriteAcc->SetPixel( nY, nX, aColor );
aNewBmp.ReleaseAccess( pWriteAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
ReleaseAccess( pReadAcc );
@@ -1182,11 +1182,11 @@ BOOL Bitmap::Expand( ULONG nDX, ULONG nDY, const Color* pInitColor )
// ------------------------------------------------------------------
-Bitmap Bitmap::CreateMask( const Color& rTransColor, ULONG nTol ) const
+Bitmap Bitmap::CreateMask( const Color& rTransColor, sal_uIntPtr nTol ) const
{
Bitmap aNewBmp( GetSizePixel(), 1 );
BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pWriteAcc )
{
@@ -1208,7 +1208,7 @@ Bitmap Bitmap::CreateMask( const Color& rTransColor, ULONG nTol ) const
pReadAcc->GetScanlineFormat() == BMP_FORMAT_4BIT_LSN_PAL )
{
// optimized for 4Bit-MSN/LSN source palette
- const BYTE cTest = aTest.GetIndex();
+ const sal_uInt8 cTest = aTest.GetIndex();
const long nShiftInit = ( ( pReadAcc->GetScanlineFormat() == BMP_FORMAT_4BIT_MSN_PAL ) ? 4 : 0 );
if( pWriteAcc->GetScanlineFormat() == BMP_FORMAT_1BIT_MSB_PAL &&
@@ -1246,7 +1246,7 @@ Bitmap Bitmap::CreateMask( const Color& rTransColor, ULONG nTol ) const
else if( pReadAcc->GetScanlineFormat() == BMP_FORMAT_8BIT_PAL )
{
// optimized for 8Bit source palette
- const BYTE cTest = aTest.GetIndex();
+ const sal_uInt8 cTest = aTest.GetIndex();
if( pWriteAcc->GetScanlineFormat() == BMP_FORMAT_1BIT_MSB_PAL &&
aWhite.GetIndex() == 1 )
@@ -1353,7 +1353,7 @@ Bitmap Bitmap::CreateMask( const Color& rTransColor, ULONG nTol ) const
}
( (Bitmap*) this )->ReleaseAccess( pReadAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
aNewBmp.ReleaseAccess( pWriteAcc );
@@ -1425,11 +1425,11 @@ Region Bitmap::CreateRegion( const Color& rColor, const Rectangle& rRect ) const
// ------------------------------------------------------------------
-BOOL Bitmap::Replace( const Bitmap& rMask, const Color& rReplaceColor )
+sal_Bool Bitmap::Replace( const Bitmap& rMask, const Color& rReplaceColor )
{
BitmapReadAccess* pMaskAcc = ( (Bitmap&) rMask ).AcquireReadAccess();
BitmapWriteAccess* pAcc = AcquireWriteAccess();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pMaskAcc && pAcc )
{
@@ -1440,15 +1440,15 @@ BOOL Bitmap::Replace( const Bitmap& rMask, const Color& rReplaceColor )
if( pAcc->HasPalette() )
{
- const USHORT nActColors = pAcc->GetPaletteEntryCount();
- const USHORT nMaxColors = 1 << pAcc->GetBitCount();
+ const sal_uInt16 nActColors = pAcc->GetPaletteEntryCount();
+ const sal_uInt16 nMaxColors = 1 << pAcc->GetBitCount();
// erst einmal naechste Farbe nehmen
aReplace = pAcc->GetBestMatchingColor( rReplaceColor );
// falls Palettenbild, und die zu setzende Farbe ist nicht
// in der Palette, suchen wir nach freien Eintraegen (teuer)
- if( pAcc->GetPaletteColor( (BYTE) aReplace ) != BitmapColor( rReplaceColor ) )
+ if( pAcc->GetPaletteColor( (sal_uInt8) aReplace ) != BitmapColor( rReplaceColor ) )
{
// erst einmal nachsehen, ob wir unsere ReplaceColor
// nicht auf einen freien Platz am Ende der Palette
@@ -1457,26 +1457,26 @@ BOOL Bitmap::Replace( const Bitmap& rMask, const Color& rReplaceColor )
{
pAcc->SetPaletteEntryCount( nActColors + 1 );
pAcc->SetPaletteColor( nActColors, rReplaceColor );
- aReplace = BitmapColor( (BYTE) nActColors );
+ aReplace = BitmapColor( (sal_uInt8) nActColors );
}
else
{
- BOOL* pFlags = new BOOL[ nMaxColors ];
+ sal_Bool* pFlags = new sal_Bool[ nMaxColors ];
// alle Eintraege auf 0 setzen
memset( pFlags, 0, nMaxColors );
for( long nY = 0L; nY < nHeight; nY++ )
for( long nX = 0L; nX < nWidth; nX++ )
- pFlags[ (BYTE) pAcc->GetPixel( nY, nX ) ] = TRUE;
+ pFlags[ (sal_uInt8) pAcc->GetPixel( nY, nX ) ] = sal_True;
- for( USHORT i = 0UL; i < nMaxColors; i++ )
+ for( sal_uInt16 i = 0UL; i < nMaxColors; i++ )
{
// Hurra, wir haben einen unbenutzten Eintrag
if( !pFlags[ i ] )
{
- pAcc->SetPaletteColor( (USHORT) i, rReplaceColor );
- aReplace = BitmapColor( (BYTE) i );
+ pAcc->SetPaletteColor( (sal_uInt16) i, rReplaceColor );
+ aReplace = BitmapColor( (sal_uInt8) i );
}
}
@@ -1492,7 +1492,7 @@ BOOL Bitmap::Replace( const Bitmap& rMask, const Color& rReplaceColor )
if( pMaskAcc->GetPixel( nY, nX ) == aMaskWhite )
pAcc->SetPixel( nY, nX, aReplace );
- bRet = TRUE;
+ bRet = sal_True;
}
( (Bitmap&) rMask ).ReleaseAccess( pMaskAcc );
@@ -1503,13 +1503,13 @@ BOOL Bitmap::Replace( const Bitmap& rMask, const Color& rReplaceColor )
// ------------------------------------------------------------------
-BOOL Bitmap::Replace( const AlphaMask& rAlpha, const Color& rMergeColor )
+sal_Bool Bitmap::Replace( const AlphaMask& rAlpha, const Color& rMergeColor )
{
Bitmap aNewBmp( GetSizePixel(), 24 );
BitmapReadAccess* pAcc = AcquireReadAccess();
BitmapReadAccess* pAlphaAcc = ( (AlphaMask&) rAlpha ).AcquireReadAccess();
BitmapWriteAccess* pNewAcc = aNewBmp.AcquireWriteAccess();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pAcc && pAlphaAcc && pNewAcc )
{
@@ -1522,11 +1522,11 @@ BOOL Bitmap::Replace( const AlphaMask& rAlpha, const Color& rMergeColor )
for( long nX = 0L; nX < nWidth; nX++ )
{
aCol = pAcc->GetColor( nY, nX );
- pNewAcc->SetPixel( nY, nX, aCol.Merge( rMergeColor, 255 - (BYTE) pAlphaAcc->GetPixel( nY, nX ) ) );
+ pNewAcc->SetPixel( nY, nX, aCol.Merge( rMergeColor, 255 - (sal_uInt8) pAlphaAcc->GetPixel( nY, nX ) ) );
}
}
- bRet = TRUE;
+ bRet = sal_True;
}
ReleaseAccess( pAcc );
@@ -1549,7 +1549,7 @@ BOOL Bitmap::Replace( const AlphaMask& rAlpha, const Color& rMergeColor )
// ------------------------------------------------------------------
-BOOL Bitmap::Replace( const Color& rSearchColor, const Color& rReplaceColor, ULONG nTol )
+sal_Bool Bitmap::Replace( const Color& rSearchColor, const Color& rReplaceColor, sal_uIntPtr nTol )
{
// Bitmaps with 1 bit color depth can cause problems
// if they have other entries than black/white in their palette
@@ -1557,7 +1557,7 @@ BOOL Bitmap::Replace( const Color& rSearchColor, const Color& rReplaceColor, ULO
Convert( BMP_CONVERSION_4BIT_COLORS );
BitmapWriteAccess* pAcc = AcquireWriteAccess();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pAcc )
{
@@ -1570,7 +1570,7 @@ BOOL Bitmap::Replace( const Color& rSearchColor, const Color& rReplaceColor, ULO
if( pAcc->HasPalette() )
{
- for( USHORT i = 0, nPalCount = pAcc->GetPaletteEntryCount(); i < nPalCount; i++ )
+ for( sal_uInt16 i = 0, nPalCount = pAcc->GetPaletteEntryCount(); i < nPalCount; i++ )
{
const BitmapColor& rCol = pAcc->GetPaletteColor( i );
@@ -1604,7 +1604,7 @@ BOOL Bitmap::Replace( const Color& rSearchColor, const Color& rReplaceColor, ULO
}
ReleaseAccess( pAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -1612,8 +1612,8 @@ BOOL Bitmap::Replace( const Color& rSearchColor, const Color& rReplaceColor, ULO
// ------------------------------------------------------------------
-BOOL Bitmap::Replace( const Color* pSearchColors, const Color* pReplaceColors,
- ULONG nColorCount, ULONG* _pTols )
+sal_Bool Bitmap::Replace( const Color* pSearchColors, const Color* pReplaceColors,
+ sal_uIntPtr nColorCount, sal_uIntPtr* _pTols )
{
// Bitmaps with 1 bit color depth can cause problems
// if they have other entries than black/white in their palette
@@ -1621,7 +1621,7 @@ BOOL Bitmap::Replace( const Color* pSearchColors, const Color* pReplaceColors,
Convert( BMP_CONVERSION_4BIT_COLORS );
BitmapWriteAccess* pAcc = AcquireWriteAccess();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pAcc )
{
@@ -1632,7 +1632,7 @@ BOOL Bitmap::Replace( const Color* pSearchColors, const Color* pReplaceColors,
long* pMinB = new long[ nColorCount ];
long* pMaxB = new long[ nColorCount ];
long* pTols;
- ULONG i;
+ sal_uIntPtr i;
if( !_pTols )
{
@@ -1657,7 +1657,7 @@ BOOL Bitmap::Replace( const Color* pSearchColors, const Color* pReplaceColors,
if( pAcc->HasPalette() )
{
- for( USHORT nEntry = 0, nPalCount = pAcc->GetPaletteEntryCount(); nEntry < nPalCount; nEntry++ )
+ for( sal_uInt16 nEntry = 0, nPalCount = pAcc->GetPaletteEntryCount(); nEntry < nPalCount; nEntry++ )
{
const BitmapColor& rCol = pAcc->GetPaletteColor( nEntry );
@@ -1667,7 +1667,7 @@ BOOL Bitmap::Replace( const Color* pSearchColors, const Color* pReplaceColors,
pMinG[ i ] <= rCol.GetGreen() && pMaxG[ i ] >= rCol.GetGreen() &&
pMinB[ i ] <= rCol.GetBlue() && pMaxB[ i ] >= rCol.GetBlue() )
{
- pAcc->SetPaletteColor( (USHORT)nEntry, pReplaceColors[ i ] );
+ pAcc->SetPaletteColor( (sal_uInt16)nEntry, pReplaceColors[ i ] );
break;
}
}
@@ -1713,7 +1713,7 @@ BOOL Bitmap::Replace( const Color* pSearchColors, const Color* pReplaceColors,
delete[] pMinB;
delete[] pMaxB;
ReleaseAccess( pAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -1748,7 +1748,7 @@ Bitmap Bitmap::GetColorTransformedBitmap( BmpColorMode eColorMode ) const
{
Color* pSrcColors = NULL;
Color* pDstColors = NULL;
- ULONG nColorCount = 0;
+ sal_uIntPtr nColorCount = 0;
aRet = *this;
@@ -1772,11 +1772,11 @@ Bitmap Bitmap::GetColorTransformedBitmap( BmpColorMode eColorMode ) const
// ------------------------------------------------------------------
-BOOL Bitmap::CombineSimple( const Bitmap& rMask, BmpCombine eCombine )
+sal_Bool Bitmap::CombineSimple( const Bitmap& rMask, BmpCombine eCombine )
{
BitmapReadAccess* pMaskAcc = ( (Bitmap&) rMask ).AcquireReadAccess();
BitmapWriteAccess* pAcc = AcquireWriteAccess();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pMaskAcc && pAcc )
{
@@ -1900,7 +1900,7 @@ BOOL Bitmap::CombineSimple( const Bitmap& rMask, BmpCombine eCombine )
break;
}
- bRet = TRUE;
+ bRet = sal_True;
}
( (Bitmap&) rMask ).ReleaseAccess( pMaskAcc );
@@ -1911,7 +1911,7 @@ BOOL Bitmap::CombineSimple( const Bitmap& rMask, BmpCombine eCombine )
// ------------------------------------------------------------------
-BOOL Bitmap::Blend( const AlphaMask& rAlpha, const Color& rBackgroundColor )
+sal_Bool Bitmap::Blend( const AlphaMask& rAlpha, const Color& rBackgroundColor )
{
// TODO: Have a look at OutputDevice::ImplDrawAlpha() for some
// optimizations. Might even consolidate the code here and there.
@@ -1923,7 +1923,7 @@ BOOL Bitmap::Blend( const AlphaMask& rAlpha, const Color& rBackgroundColor )
BitmapReadAccess* pAlphaAcc = const_cast<AlphaMask&>(rAlpha).AcquireReadAccess();
BitmapWriteAccess* pAcc = AcquireWriteAccess();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pAlphaAcc && pAcc )
{
@@ -1936,7 +1936,7 @@ BOOL Bitmap::Blend( const AlphaMask& rAlpha, const Color& rBackgroundColor )
pAcc->GetPixel( nY, nX ).Merge( rBackgroundColor,
255 - pAlphaAcc->GetPixel( nY, nX ) ) );
- bRet = TRUE;
+ bRet = sal_True;
}
const_cast<AlphaMask&>(rAlpha).ReleaseAccess( pAlphaAcc );
@@ -1947,7 +1947,7 @@ BOOL Bitmap::Blend( const AlphaMask& rAlpha, const Color& rBackgroundColor )
// ------------------------------------------------------------------
-BOOL Bitmap::MakeMono( BYTE cThreshold )
+sal_Bool Bitmap::MakeMono( sal_uInt8 cThreshold )
{
return ImplMakeMono( cThreshold );
}
diff --git a/vcl/source/gdi/bitmap2.cxx b/vcl/source/gdi/bitmap2.cxx
index de926a0446ca..bcf159c4242f 100644
--- a/vcl/source/gdi/bitmap2.cxx
+++ b/vcl/source/gdi/bitmap2.cxx
@@ -95,14 +95,14 @@ struct DIBInfoHeader
namespace
{
- inline USHORT discretizeBitcount( UINT16 nInputCount )
+ inline sal_uInt16 discretizeBitcount( sal_uInt16 nInputCount )
{
return ( nInputCount <= 1 ) ? 1 :
( nInputCount <= 4 ) ? 4 :
( nInputCount <= 8 ) ? 8 : 24;
}
- inline bool isBitfieldCompression( ULONG nScanlineFormat )
+ inline bool isBitfieldCompression( sal_uIntPtr nScanlineFormat )
{
return nScanlineFormat == BMP_FORMAT_16BIT_TC_LSB_MASK ||
nScanlineFormat == BMP_FORMAT_32BIT_TC_MASK;
@@ -115,7 +115,7 @@ namespace
SvStream& operator>>( SvStream& rIStm, Bitmap& rBitmap )
{
- rBitmap.Read( rIStm, TRUE );
+ rBitmap.Read( rIStm, sal_True );
return rIStm;
}
@@ -123,18 +123,18 @@ SvStream& operator>>( SvStream& rIStm, Bitmap& rBitmap )
SvStream& operator<<( SvStream& rOStm, const Bitmap& rBitmap )
{
- rBitmap.Write( rOStm, FALSE, TRUE );
+ rBitmap.Write( rOStm, sal_False, sal_True );
return rOStm;
}
// ------------------------------------------------------------------
-BOOL Bitmap::Read( SvStream& rIStm, BOOL bFileHeader )
+sal_Bool Bitmap::Read( SvStream& rIStm, sal_Bool bFileHeader )
{
- const USHORT nOldFormat = rIStm.GetNumberFormatInt();
- const ULONG nOldPos = rIStm.Tell();
- ULONG nOffset = 0UL;
- BOOL bRet = FALSE;
+ const sal_uInt16 nOldFormat = rIStm.GetNumberFormatInt();
+ const sal_uIntPtr nOldPos = rIStm.Tell();
+ sal_uIntPtr nOffset = 0UL;
+ sal_Bool bRet = sal_False;
rIStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
@@ -161,16 +161,16 @@ BOOL Bitmap::Read( SvStream& rIStm, BOOL bFileHeader )
// ------------------------------------------------------------------
-BOOL Bitmap::ImplReadDIB( SvStream& rIStm, Bitmap& rBmp, ULONG nOffset )
+sal_Bool Bitmap::ImplReadDIB( SvStream& rIStm, Bitmap& rBmp, sal_uIntPtr nOffset )
{
DIBInfoHeader aHeader;
- const ULONG nStmPos = rIStm.Tell();
- BOOL bRet = FALSE;
+ const sal_uIntPtr nStmPos = rIStm.Tell();
+ sal_Bool bRet = sal_False;
sal_Bool bTopDown = sal_False;
if( ImplReadDIBInfoHeader( rIStm, aHeader, bTopDown ) && aHeader.nWidth && aHeader.nHeight && aHeader.nBitCount )
{
- const USHORT nBitCount( discretizeBitcount(aHeader.nBitCount) );
+ const sal_uInt16 nBitCount( discretizeBitcount(aHeader.nBitCount) );
const Size aSizePixel( aHeader.nWidth, aHeader.nHeight );
BitmapPalette aDummyPal;
@@ -179,15 +179,15 @@ BOOL Bitmap::ImplReadDIB( SvStream& rIStm, Bitmap& rBmp, ULONG nOffset )
if( pAcc )
{
- USHORT nColors;
+ sal_uInt16 nColors;
SvStream* pIStm;
SvMemoryStream* pMemStm = NULL;
- BYTE* pData = NULL;
+ sal_uInt8* pData = NULL;
if( nBitCount <= 8 )
{
if( aHeader.nColsUsed )
- nColors = (USHORT) aHeader.nColsUsed;
+ nColors = (sal_uInt16) aHeader.nColsUsed;
else
nColors = ( 1 << aHeader.nBitCount );
}
@@ -198,11 +198,11 @@ BOOL Bitmap::ImplReadDIB( SvStream& rIStm, Bitmap& rBmp, ULONG nOffset )
{
ZCodec aCodec;
sal_uInt32 nCodedSize, nUncodedSize;
- ULONG nCodedPos;
+ sal_uIntPtr nCodedPos;
// read coding information
rIStm >> nCodedSize >> nUncodedSize >> aHeader.nCompression;
- pData = (BYTE*) rtl_allocateMemory( nUncodedSize );
+ pData = (sal_uInt8*) rtl_allocateMemory( nUncodedSize );
// decode buffer
nCodedPos = rIStm.Tell();
@@ -216,7 +216,7 @@ BOOL Bitmap::ImplReadDIB( SvStream& rIStm, Bitmap& rBmp, ULONG nOffset )
// set decoded bytes to memory stream,
// from which we will read the bitmap data
pIStm = pMemStm = new SvMemoryStream;
- pMemStm->SetBuffer( (char*) pData, nUncodedSize, FALSE, nUncodedSize );
+ pMemStm->SetBuffer( (char*) pData, nUncodedSize, sal_False, nUncodedSize );
nOffset = 0;
}
else
@@ -264,11 +264,11 @@ BOOL Bitmap::ImplReadDIB( SvStream& rIStm, Bitmap& rBmp, ULONG nOffset )
// ------------------------------------------------------------------
-BOOL Bitmap::ImplReadDIBFileHeader( SvStream& rIStm, ULONG& rOffset )
+sal_Bool Bitmap::ImplReadDIBFileHeader( SvStream& rIStm, sal_uIntPtr& rOffset )
{
- UINT32 nTmp32;
- UINT16 nTmp16 = 0;
- BOOL bRet = FALSE;
+ sal_uInt32 nTmp32;
+ sal_uInt16 nTmp16 = 0;
+ sal_Bool bRet = sal_False;
rIStm >> nTmp16;
@@ -299,7 +299,7 @@ BOOL Bitmap::ImplReadDIBFileHeader( SvStream& rIStm, ULONG& rOffset )
// ------------------------------------------------------------------
-BOOL Bitmap::ImplReadDIBInfoHeader( SvStream& rIStm, DIBInfoHeader& rHeader, sal_Bool& bTopDown )
+sal_Bool Bitmap::ImplReadDIBInfoHeader( SvStream& rIStm, DIBInfoHeader& rHeader, sal_Bool& bTopDown )
{
// BITMAPINFOHEADER or BITMAPCOREHEADER
rIStm >> rHeader.nSize;
@@ -319,7 +319,7 @@ BOOL Bitmap::ImplReadDIBInfoHeader( SvStream& rIStm, DIBInfoHeader& rHeader, sal
// unknown Header
if( rHeader.nSize < DIBINFOHEADERSIZE )
{
- ULONG nUnknownSize = sizeof( rHeader.nSize );
+ sal_uIntPtr nUnknownSize = sizeof( rHeader.nSize );
rIStm >> rHeader.nWidth; nUnknownSize += sizeof( rHeader.nWidth );
rIStm >> rHeader.nHeight; nUnknownSize += sizeof( rHeader.nHeight );
@@ -400,17 +400,17 @@ BOOL Bitmap::ImplReadDIBInfoHeader( SvStream& rIStm, DIBInfoHeader& rHeader, sal
// ------------------------------------------------------------------
-BOOL Bitmap::ImplReadDIBPalette( SvStream& rIStm, BitmapWriteAccess& rAcc, BOOL bQuad )
+sal_Bool Bitmap::ImplReadDIBPalette( SvStream& rIStm, BitmapWriteAccess& rAcc, sal_Bool bQuad )
{
- const USHORT nColors = rAcc.GetPaletteEntryCount();
- const ULONG nPalSize = nColors * ( bQuad ? 4UL : 3UL );
+ const sal_uInt16 nColors = rAcc.GetPaletteEntryCount();
+ const sal_uIntPtr nPalSize = nColors * ( bQuad ? 4UL : 3UL );
BitmapColor aPalColor;
- BYTE* pEntries = new BYTE[ nPalSize ];
+ sal_uInt8* pEntries = new sal_uInt8[ nPalSize ];
rIStm.Read( pEntries, nPalSize );
- BYTE* pTmpEntry = pEntries;
- for( USHORT i = 0; i < nColors; i++ )
+ sal_uInt8* pTmpEntry = pEntries;
+ for( sal_uInt16 i = 0; i < nColors; i++ )
{
aPalColor.SetBlue( *pTmpEntry++ );
aPalColor.SetGreen( *pTmpEntry++ );
@@ -429,15 +429,15 @@ BOOL Bitmap::ImplReadDIBPalette( SvStream& rIStm, BitmapWriteAccess& rAcc, BOOL
// ------------------------------------------------------------------
-BOOL Bitmap::ImplReadDIBBits( SvStream& rIStm, DIBInfoHeader& rHeader, BitmapWriteAccess& rAcc, sal_Bool bTopDown )
+sal_Bool Bitmap::ImplReadDIBBits( SvStream& rIStm, DIBInfoHeader& rHeader, BitmapWriteAccess& rAcc, sal_Bool bTopDown )
{
- const ULONG nAlignedWidth = AlignedWidth4Bytes( rHeader.nWidth * rHeader.nBitCount );
- UINT32 nRMask = 0;
- UINT32 nGMask = 0;
- UINT32 nBMask = 0;
- BOOL bNative;
- BOOL bTCMask = ( rHeader.nBitCount == 16 ) || ( rHeader.nBitCount == 32 );
- BOOL bRLE = ( RLE_8 == rHeader.nCompression && rHeader.nBitCount == 8 ) ||
+ const sal_uIntPtr nAlignedWidth = AlignedWidth4Bytes( rHeader.nWidth * rHeader.nBitCount );
+ sal_uInt32 nRMask = 0;
+ sal_uInt32 nGMask = 0;
+ sal_uInt32 nBMask = 0;
+ sal_Bool bNative;
+ sal_Bool bTCMask = ( rHeader.nBitCount == 16 ) || ( rHeader.nBitCount == 32 );
+ sal_Bool bRLE = ( RLE_8 == rHeader.nCompression && rHeader.nBitCount == 8 ) ||
( RLE_4 == rHeader.nCompression && rHeader.nBitCount == 4 );
// Is native format?
@@ -451,7 +451,7 @@ BOOL Bitmap::ImplReadDIBBits( SvStream& rIStm, DIBInfoHeader& rHeader, BitmapWri
break;
default:
- bNative = FALSE;
+ bNative = sal_False;
break;
}
// Read data
@@ -487,14 +487,14 @@ BOOL Bitmap::ImplReadDIBBits( SvStream& rIStm, DIBInfoHeader& rHeader, BitmapWri
{
if ( !rHeader.nSizeImage )
{
- const ULONG nOldPos = rIStm.Tell();
+ const sal_uIntPtr nOldPos = rIStm.Tell();
rIStm.Seek( STREAM_SEEK_TO_END );
rHeader.nSizeImage = rIStm.Tell() - nOldPos;
rIStm.Seek( nOldPos );
}
- BYTE* pBuffer = (BYTE*) rtl_allocateMemory( rHeader.nSizeImage );
+ sal_uInt8* pBuffer = (sal_uInt8*) rtl_allocateMemory( rHeader.nSizeImage );
rIStm.Read( (char*) pBuffer, rHeader.nSizeImage );
ImplDecodeRLE( pBuffer, rHeader, rAcc, RLE_4 == rHeader.nCompression );
@@ -505,7 +505,7 @@ BOOL Bitmap::ImplReadDIBBits( SvStream& rIStm, DIBInfoHeader& rHeader, BitmapWri
{
const long nWidth = rHeader.nWidth;
const long nHeight = rHeader.nHeight;
- BYTE* pBuf = new BYTE[ nAlignedWidth ];
+ sal_uInt8* pBuf = new sal_uInt8[ nAlignedWidth ];
// true color DIB's can have a (optimization) palette
if( rHeader.nColsUsed && rHeader.nBitCount > 8 )
@@ -519,8 +519,8 @@ BOOL Bitmap::ImplReadDIBBits( SvStream& rIStm, DIBInfoHeader& rHeader, BitmapWri
{
case( 1 ):
{
- BYTE* pTmp;
- BYTE cTmp;
+ sal_uInt8* pTmp;
+ sal_uInt8 cTmp;
for( ; nCount--; nY += nI )
{
@@ -535,7 +535,7 @@ BOOL Bitmap::ImplReadDIBBits( SvStream& rIStm, DIBInfoHeader& rHeader, BitmapWri
cTmp = *pTmp++;
}
- rAcc.SetPixel( nY, nX, sal::static_int_cast<BYTE>(( cTmp >> --nShift ) & 1) );
+ rAcc.SetPixel( nY, nX, sal::static_int_cast<sal_uInt8>(( cTmp >> --nShift ) & 1) );
}
}
}
@@ -543,8 +543,8 @@ BOOL Bitmap::ImplReadDIBBits( SvStream& rIStm, DIBInfoHeader& rHeader, BitmapWri
case( 4 ):
{
- BYTE* pTmp;
- BYTE cTmp;
+ sal_uInt8* pTmp;
+ sal_uInt8 cTmp;
for( ; nCount--; nY += nI )
{
@@ -559,7 +559,7 @@ BOOL Bitmap::ImplReadDIBBits( SvStream& rIStm, DIBInfoHeader& rHeader, BitmapWri
cTmp = *pTmp++;
}
- rAcc.SetPixel( nY, nX, sal::static_int_cast<BYTE>(( cTmp >> ( --nShift << 2UL ) ) & 0x0f) );
+ rAcc.SetPixel( nY, nX, sal::static_int_cast<sal_uInt8>(( cTmp >> ( --nShift << 2UL ) ) & 0x0f) );
}
}
}
@@ -567,7 +567,7 @@ BOOL Bitmap::ImplReadDIBBits( SvStream& rIStm, DIBInfoHeader& rHeader, BitmapWri
case( 8 ):
{
- BYTE* pTmp;
+ sal_uInt8* pTmp;
for( ; nCount--; nY += nI )
{
@@ -583,15 +583,15 @@ BOOL Bitmap::ImplReadDIBBits( SvStream& rIStm, DIBInfoHeader& rHeader, BitmapWri
{
ColorMask aMask( nRMask, nGMask, nBMask );
BitmapColor aColor;
- UINT16* pTmp16;
+ sal_uInt16* pTmp16;
for( ; nCount--; nY += nI )
{
- rIStm.Read( (char*)( pTmp16 = (UINT16*) pBuf ), nAlignedWidth );
+ rIStm.Read( (char*)( pTmp16 = (sal_uInt16*) pBuf ), nAlignedWidth );
for( long nX = 0L; nX < nWidth; nX++ )
{
- aMask.GetColorFor16BitLSB( aColor, (BYTE*) pTmp16++ );
+ aMask.GetColorFor16BitLSB( aColor, (sal_uInt8*) pTmp16++ );
rAcc.SetPixel( nY, nX, aColor );
}
}
@@ -601,7 +601,7 @@ BOOL Bitmap::ImplReadDIBBits( SvStream& rIStm, DIBInfoHeader& rHeader, BitmapWri
case( 24 ):
{
BitmapColor aPixelColor;
- BYTE* pTmp;
+ sal_uInt8* pTmp;
for( ; nCount--; nY += nI )
{
@@ -622,15 +622,15 @@ BOOL Bitmap::ImplReadDIBBits( SvStream& rIStm, DIBInfoHeader& rHeader, BitmapWri
{
ColorMask aMask( nRMask, nGMask, nBMask );
BitmapColor aColor;
- UINT32* pTmp32;
+ sal_uInt32* pTmp32;
for( ; nCount--; nY += nI )
{
- rIStm.Read( (char*)( pTmp32 = (UINT32*) pBuf ), nAlignedWidth );
+ rIStm.Read( (char*)( pTmp32 = (sal_uInt32*) pBuf ), nAlignedWidth );
for( long nX = 0L; nX < nWidth; nX++ )
{
- aMask.GetColorFor32Bit( aColor, (BYTE*) pTmp32++ );
+ aMask.GetColorFor32Bit( aColor, (sal_uInt8*) pTmp32++ );
rAcc.SetPixel( nY, nX, aColor );
}
}
@@ -646,18 +646,18 @@ BOOL Bitmap::ImplReadDIBBits( SvStream& rIStm, DIBInfoHeader& rHeader, BitmapWri
// ------------------------------------------------------------------
-BOOL Bitmap::Write( SvStream& rOStm, BOOL bCompressed, BOOL bFileHeader ) const
+sal_Bool Bitmap::Write( SvStream& rOStm, sal_Bool bCompressed, sal_Bool bFileHeader ) const
{
DBG_ASSERT( mpImpBmp, "Empty Bitmaps can't be saved" );
const Size aSizePix( GetSizePixel() );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( mpImpBmp && aSizePix.Width() && aSizePix.Height() )
{
BitmapReadAccess* pAcc = ( (Bitmap*) this)->AcquireReadAccess();
- const USHORT nOldFormat = rOStm.GetNumberFormatInt();
- const ULONG nOldPos = rOStm.Tell();
+ const sal_uInt16 nOldFormat = rOStm.GetNumberFormatInt();
+ const sal_uIntPtr nOldPos = rOStm.Tell();
rOStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
@@ -688,14 +688,14 @@ BOOL Bitmap::Write( SvStream& rOStm, BOOL bCompressed, BOOL bFileHeader ) const
// ------------------------------------------------------------------
-BOOL Bitmap::ImplWriteDIB( SvStream& rOStm, BitmapReadAccess& rAcc, BOOL bCompressed ) const
+sal_Bool Bitmap::ImplWriteDIB( SvStream& rOStm, BitmapReadAccess& rAcc, sal_Bool bCompressed ) const
{
const MapMode aMapPixel( MAP_PIXEL );
DIBInfoHeader aHeader;
- ULONG nImageSizePos;
- ULONG nEndPos;
+ sal_uIntPtr nImageSizePos;
+ sal_uIntPtr nEndPos;
sal_uInt32 nCompression = 0;
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
aHeader.nSize = DIBINFOHEADERSIZE;
aHeader.nWidth = rAcc.Width();
@@ -720,7 +720,7 @@ BOOL Bitmap::ImplWriteDIB( SvStream& rOStm, BitmapReadAccess& rAcc, BOOL bCompre
// recent.
// #i59239# discretize bitcount to 1,4,8,24 (other cases
// are not written below)
- const UINT16 nBitCount( sal::static_int_cast<UINT16>(rAcc.GetBitCount()) );
+ const sal_uInt16 nBitCount( sal::static_int_cast<sal_uInt16>(rAcc.GetBitCount()) );
aHeader.nBitCount = discretizeBitcount( nBitCount );
aHeader.nSizeImage = rAcc.Height() *
@@ -763,8 +763,8 @@ BOOL Bitmap::ImplWriteDIB( SvStream& rOStm, BitmapReadAccess& rAcc, BOOL bCompre
if( fabs(fBmpWidthM) > 0.000000001 &&
fabs(fBmpHeightM) > 0.000000001 )
{
- aHeader.nXPelsPerMeter = (UINT32)(rAcc.Width() / fBmpWidthM + .5);
- aHeader.nYPelsPerMeter = (UINT32)(rAcc.Height() / fBmpHeightM + .5);
+ aHeader.nXPelsPerMeter = (sal_uInt32)(rAcc.Width() / fBmpWidthM + .5);
+ aHeader.nYPelsPerMeter = (sal_uInt32)(rAcc.Height() / fBmpHeightM + .5);
}
}
@@ -790,7 +790,7 @@ BOOL Bitmap::ImplWriteDIB( SvStream& rOStm, BitmapReadAccess& rAcc, BOOL bCompre
{
ZCodec aCodec;
SvMemoryStream aMemStm( aHeader.nSizeImage + 4096, 65535 );
- ULONG nCodedPos = rOStm.Tell(), nLastPos;
+ sal_uIntPtr nCodedPos = rOStm.Tell(), nLastPos;
sal_uInt32 nCodedSize, nUncodedSize;
// write uncoded data palette
@@ -808,7 +808,7 @@ BOOL Bitmap::ImplWriteDIB( SvStream& rOStm, BitmapReadAccess& rAcc, BOOL bCompre
// write compressed data
aCodec.BeginCompression( 3 );
- aCodec.Write( rOStm, (BYTE*) aMemStm.GetData(), nUncodedSize );
+ aCodec.Write( rOStm, (sal_uInt8*) aMemStm.GetData(), nUncodedSize );
aCodec.EndCompression();
// update compress info ( coded size, uncoded size, uncoded compression )
@@ -838,16 +838,16 @@ BOOL Bitmap::ImplWriteDIB( SvStream& rOStm, BitmapReadAccess& rAcc, BOOL bCompre
// ------------------------------------------------------------------
-BOOL Bitmap::ImplWriteDIBFileHeader( SvStream& rOStm, BitmapReadAccess& rAcc )
+sal_Bool Bitmap::ImplWriteDIBFileHeader( SvStream& rOStm, BitmapReadAccess& rAcc )
{
- UINT32 nPalCount = ( rAcc.HasPalette() ? rAcc.GetPaletteEntryCount() :
+ sal_uInt32 nPalCount = ( rAcc.HasPalette() ? rAcc.GetPaletteEntryCount() :
isBitfieldCompression( rAcc.GetScanlineFormat() ) ? 3UL : 0UL );
- UINT32 nOffset = 14 + DIBINFOHEADERSIZE + nPalCount * 4UL;
+ sal_uInt32 nOffset = 14 + DIBINFOHEADERSIZE + nPalCount * 4UL;
- rOStm << (UINT16) 0x4D42;
- rOStm << (UINT32) ( nOffset + ( rAcc.Height() * rAcc.GetScanlineSize() ) );
- rOStm << (UINT16) 0;
- rOStm << (UINT16) 0;
+ rOStm << (sal_uInt16) 0x4D42;
+ rOStm << (sal_uInt32) ( nOffset + ( rAcc.Height() * rAcc.GetScanlineSize() ) );
+ rOStm << (sal_uInt16) 0;
+ rOStm << (sal_uInt16) 0;
rOStm << nOffset;
return( rOStm.GetError() == 0UL );
@@ -855,15 +855,15 @@ BOOL Bitmap::ImplWriteDIBFileHeader( SvStream& rOStm, BitmapReadAccess& rAcc )
// ------------------------------------------------------------------
-BOOL Bitmap::ImplWriteDIBPalette( SvStream& rOStm, BitmapReadAccess& rAcc )
+sal_Bool Bitmap::ImplWriteDIBPalette( SvStream& rOStm, BitmapReadAccess& rAcc )
{
- const USHORT nColors = rAcc.GetPaletteEntryCount();
- const ULONG nPalSize = nColors * 4UL;
- BYTE* pEntries = new BYTE[ nPalSize ];
- BYTE* pTmpEntry = pEntries;
+ const sal_uInt16 nColors = rAcc.GetPaletteEntryCount();
+ const sal_uIntPtr nPalSize = nColors * 4UL;
+ sal_uInt8* pEntries = new sal_uInt8[ nPalSize ];
+ sal_uInt8* pTmpEntry = pEntries;
BitmapColor aPalColor;
- for( USHORT i = 0; i < nColors; i++ )
+ for( sal_uInt16 i = 0; i < nColors; i++ )
{
const BitmapColor& rPalColor = rAcc.GetPaletteColor( i );
@@ -881,8 +881,8 @@ BOOL Bitmap::ImplWriteDIBPalette( SvStream& rOStm, BitmapReadAccess& rAcc )
// ------------------------------------------------------------------
-BOOL Bitmap::ImplWriteDIBBits( SvStream& rOStm, BitmapReadAccess& rAcc,
- ULONG nCompression, sal_uInt32& rImageSize )
+sal_Bool Bitmap::ImplWriteDIBBits( SvStream& rOStm, BitmapReadAccess& rAcc,
+ sal_uIntPtr nCompression, sal_uInt32& rImageSize )
{
if( BITFIELDS == nCompression )
{
@@ -890,13 +890,13 @@ BOOL Bitmap::ImplWriteDIBBits( SvStream& rOStm, BitmapReadAccess& rAcc,
SVBT32 aVal32;
UInt32ToSVBT32( rMask.GetRedMask(), aVal32 );
- rOStm.Write( (BYTE*) aVal32, 4UL );
+ rOStm.Write( (sal_uInt8*) aVal32, 4UL );
UInt32ToSVBT32( rMask.GetGreenMask(), aVal32 );
- rOStm.Write( (BYTE*) aVal32, 4UL );
+ rOStm.Write( (sal_uInt8*) aVal32, 4UL );
UInt32ToSVBT32( rMask.GetBlueMask(), aVal32 );
- rOStm.Write( (BYTE*) aVal32, 4UL );
+ rOStm.Write( (sal_uInt8*) aVal32, 4UL );
rImageSize = rOStm.Tell();
@@ -923,10 +923,10 @@ BOOL Bitmap::ImplWriteDIBBits( SvStream& rOStm, BitmapReadAccess& rAcc,
// bitmaps is relatively recent.
// #i59239# discretize bitcount for aligned width to 1,4,8,24
// (other cases are not written below)
- const USHORT nBitCount( sal::static_int_cast<USHORT>(rAcc.GetBitCount()) );
- const ULONG nAlignedWidth = AlignedWidth4Bytes( rAcc.Width() *
+ const sal_uInt16 nBitCount( sal::static_int_cast<sal_uInt16>(rAcc.GetBitCount()) );
+ const sal_uIntPtr nAlignedWidth = AlignedWidth4Bytes( rAcc.Width() *
discretizeBitcount(nBitCount));
- BOOL bNative = FALSE;
+ sal_Bool bNative = sal_False;
switch( rAcc.GetScanlineFormat() )
{
@@ -936,7 +936,7 @@ BOOL Bitmap::ImplWriteDIBBits( SvStream& rOStm, BitmapReadAccess& rAcc,
case( BMP_FORMAT_24BIT_TC_BGR ):
{
if( rAcc.IsBottomUp() && ( rAcc.GetScanlineSize() == nAlignedWidth ) )
- bNative = TRUE;
+ bNative = sal_True;
}
break;
@@ -952,9 +952,9 @@ BOOL Bitmap::ImplWriteDIBBits( SvStream& rOStm, BitmapReadAccess& rAcc,
{
const long nWidth = rAcc.Width();
const long nHeight = rAcc.Height();
- BYTE* pBuf = new BYTE[ nAlignedWidth ];
- BYTE* pTmp;
- BYTE cTmp;
+ sal_uInt8* pBuf = new sal_uInt8[ nAlignedWidth ];
+ sal_uInt8* pTmp;
+ sal_uInt8 cTmp;
switch( nBitCount )
{
@@ -974,7 +974,7 @@ BOOL Bitmap::ImplWriteDIBBits( SvStream& rOStm, BitmapReadAccess& rAcc,
cTmp = 0;
}
- cTmp |= ( (BYTE) rAcc.GetPixel( nY, nX ) << --nShift );
+ cTmp |= ( (sal_uInt8) rAcc.GetPixel( nY, nX ) << --nShift );
}
*pTmp = cTmp;
@@ -999,7 +999,7 @@ BOOL Bitmap::ImplWriteDIBBits( SvStream& rOStm, BitmapReadAccess& rAcc,
cTmp = 0;
}
- cTmp |= ( (BYTE) rAcc.GetPixel( nY, nX ) << ( --nShift << 2L ) );
+ cTmp |= ( (sal_uInt8) rAcc.GetPixel( nY, nX ) << ( --nShift << 2L ) );
}
*pTmp = cTmp;
rOStm.Write( pBuf, nAlignedWidth );
@@ -1057,17 +1057,17 @@ BOOL Bitmap::ImplWriteDIBBits( SvStream& rOStm, BitmapReadAccess& rAcc,
// ------------------------------------------------------------------
-void Bitmap::ImplDecodeRLE( BYTE* pBuffer, DIBInfoHeader& rHeader,
- BitmapWriteAccess& rAcc, BOOL bRLE4 )
+void Bitmap::ImplDecodeRLE( sal_uInt8* pBuffer, DIBInfoHeader& rHeader,
+ BitmapWriteAccess& rAcc, sal_Bool bRLE4 )
{
Scanline pRLE = pBuffer;
long nY = rHeader.nHeight - 1L;
- const ULONG nWidth = rAcc.Width();
- ULONG nCountByte;
- ULONG nRunByte;
- ULONG nX = 0UL;
- BYTE cTmp;
- BOOL bEndDecoding = FALSE;
+ const sal_uIntPtr nWidth = rAcc.Width();
+ sal_uIntPtr nCountByte;
+ sal_uIntPtr nRunByte;
+ sal_uIntPtr nX = 0UL;
+ sal_uInt8 cTmp;
+ sal_Bool bEndDecoding = sal_False;
do
{
@@ -1081,7 +1081,7 @@ void Bitmap::ImplDecodeRLE( BYTE* pBuffer, DIBInfoHeader& rHeader,
{
nCountByte = nRunByte >> 1;
- for( ULONG i = 0UL; i < nCountByte; i++ )
+ for( sal_uIntPtr i = 0UL; i < nCountByte; i++ )
{
cTmp = *pRLE++;
@@ -1105,7 +1105,7 @@ void Bitmap::ImplDecodeRLE( BYTE* pBuffer, DIBInfoHeader& rHeader,
}
else
{
- for( ULONG i = 0UL; i < nRunByte; i++ )
+ for( sal_uIntPtr i = 0UL; i < nRunByte; i++ )
{
if( nX < nWidth )
rAcc.SetPixel( nY, nX++, *pRLE );
@@ -1123,7 +1123,7 @@ void Bitmap::ImplDecodeRLE( BYTE* pBuffer, DIBInfoHeader& rHeader,
nX = 0UL;
}
else if( nRunByte == 1 )
- bEndDecoding = TRUE;
+ bEndDecoding = sal_True;
else
{
nX += *pRLE++;
@@ -1138,7 +1138,7 @@ void Bitmap::ImplDecodeRLE( BYTE* pBuffer, DIBInfoHeader& rHeader,
{
nRunByte = nCountByte >> 1;
- for( ULONG i = 0UL; i < nRunByte; i++ )
+ for( sal_uIntPtr i = 0UL; i < nRunByte; i++ )
{
if( nX < nWidth )
rAcc.SetPixel( nY, nX++, cTmp >> 4 );
@@ -1152,7 +1152,7 @@ void Bitmap::ImplDecodeRLE( BYTE* pBuffer, DIBInfoHeader& rHeader,
}
else
{
- for( ULONG i = 0UL; ( i < nCountByte ) && ( nX < nWidth ); i++ )
+ for( sal_uIntPtr i = 0UL; ( i < nCountByte ) && ( nX < nWidth ); i++ )
rAcc.SetPixel( nY, nX++, cTmp );
}
}
@@ -1162,19 +1162,19 @@ void Bitmap::ImplDecodeRLE( BYTE* pBuffer, DIBInfoHeader& rHeader,
// ------------------------------------------------------------------
-BOOL Bitmap::ImplWriteRLE( SvStream& rOStm, BitmapReadAccess& rAcc, BOOL bRLE4 )
+sal_Bool Bitmap::ImplWriteRLE( SvStream& rOStm, BitmapReadAccess& rAcc, sal_Bool bRLE4 )
{
- const ULONG nWidth = rAcc.Width();
- const ULONG nHeight = rAcc.Height();
- ULONG nX;
- ULONG nSaveIndex;
- ULONG nCount;
- ULONG nBufCount;
- BYTE* pBuf = new BYTE[ ( nWidth << 1 ) + 2 ];
- BYTE* pTmp;
- BYTE cPix;
- BYTE cLast;
- BOOL bFound;
+ const sal_uIntPtr nWidth = rAcc.Width();
+ const sal_uIntPtr nHeight = rAcc.Height();
+ sal_uIntPtr nX;
+ sal_uIntPtr nSaveIndex;
+ sal_uIntPtr nCount;
+ sal_uIntPtr nBufCount;
+ sal_uInt8* pBuf = new sal_uInt8[ ( nWidth << 1 ) + 2 ];
+ sal_uInt8* pTmp;
+ sal_uInt8 cPix;
+ sal_uInt8 cLast;
+ sal_Bool bFound;
for ( long nY = nHeight - 1L; nY >= 0L; nY-- )
{
@@ -1194,7 +1194,7 @@ BOOL Bitmap::ImplWriteRLE( SvStream& rOStm, BitmapReadAccess& rAcc, BOOL bRLE4 )
if ( nCount > 1 )
{
- *pTmp++ = (BYTE) nCount;
+ *pTmp++ = (sal_uInt8) nCount;
*pTmp++ = ( bRLE4 ? ( ( cPix << 4 ) | cPix ) : cPix );
nBufCount += 2;
}
@@ -1202,13 +1202,13 @@ BOOL Bitmap::ImplWriteRLE( SvStream& rOStm, BitmapReadAccess& rAcc, BOOL bRLE4 )
{
cLast = cPix;
nSaveIndex = nX - 1UL;
- bFound = FALSE;
+ bFound = sal_False;
while( ( nX < nWidth ) && ( nCount < 256L ) && ( cPix = rAcc.GetPixel( nY, nX ) ) != cLast )
{
nX++; nCount++;
cLast = cPix;
- bFound = TRUE;
+ bFound = sal_True;
}
if ( bFound )
@@ -1217,13 +1217,13 @@ BOOL Bitmap::ImplWriteRLE( SvStream& rOStm, BitmapReadAccess& rAcc, BOOL bRLE4 )
if ( nCount > 3 )
{
*pTmp++ = 0;
- *pTmp++ = (BYTE) --nCount;
+ *pTmp++ = (sal_uInt8) --nCount;
if( bRLE4 )
{
- for ( ULONG i = 0; i < nCount; i++, pTmp++ )
+ for ( sal_uIntPtr i = 0; i < nCount; i++, pTmp++ )
{
- *pTmp = (BYTE) rAcc.GetPixel( nY, nSaveIndex++ ) << 4;
+ *pTmp = (sal_uInt8) rAcc.GetPixel( nY, nSaveIndex++ ) << 4;
if ( ++i < nCount )
*pTmp |= rAcc.GetPixel( nY, nSaveIndex++ );
@@ -1233,7 +1233,7 @@ BOOL Bitmap::ImplWriteRLE( SvStream& rOStm, BitmapReadAccess& rAcc, BOOL bRLE4 )
}
else
{
- for( ULONG i = 0UL; i < nCount; i++ )
+ for( sal_uIntPtr i = 0UL; i < nCount; i++ )
*pTmp++ = rAcc.GetPixel( nY, nSaveIndex++ );
}
@@ -1248,12 +1248,12 @@ BOOL Bitmap::ImplWriteRLE( SvStream& rOStm, BitmapReadAccess& rAcc, BOOL bRLE4 )
else
{
*pTmp++ = 1;
- *pTmp++ = (BYTE) rAcc.GetPixel( nY, nSaveIndex ) << ( bRLE4 ? 4 : 0 );
+ *pTmp++ = (sal_uInt8) rAcc.GetPixel( nY, nSaveIndex ) << ( bRLE4 ? 4 : 0 );
if ( nCount == 3 )
{
*pTmp++ = 1;
- *pTmp++ = (BYTE) rAcc.GetPixel( nY, ++nSaveIndex ) << ( bRLE4 ? 4 : 0 );
+ *pTmp++ = (sal_uInt8) rAcc.GetPixel( nY, ++nSaveIndex ) << ( bRLE4 ? 4 : 0 );
nBufCount += 4;
}
else
@@ -1268,8 +1268,8 @@ BOOL Bitmap::ImplWriteRLE( SvStream& rOStm, BitmapReadAccess& rAcc, BOOL bRLE4 )
rOStm.Write( pBuf, nBufCount );
}
- rOStm << (BYTE) 0;
- rOStm << (BYTE) 1;
+ rOStm << (sal_uInt8) 0;
+ rOStm << (sal_uInt8) 1;
delete[] pBuf;
diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx
index 9e2a21b43e37..26380c63ccc2 100644
--- a/vcl/source/gdi/bitmap3.cxx
+++ b/vcl/source/gdi/bitmap3.cxx
@@ -40,8 +40,8 @@
// - Defines -
// -----------
-#define RGB15( _def_cR, _def_cG, _def_cB ) (((ULONG)(_def_cR)<<10UL)|((ULONG)(_def_cG)<<5UL)|(ULONG)(_def_cB))
-#define GAMMA( _def_cVal, _def_InvGamma ) ((BYTE)MinMax(FRound(pow( _def_cVal/255.0,_def_InvGamma)*255.0),0L,255L))
+#define RGB15( _def_cR, _def_cG, _def_cB ) (((sal_uIntPtr)(_def_cR)<<10UL)|((sal_uIntPtr)(_def_cG)<<5UL)|(sal_uIntPtr)(_def_cB))
+#define GAMMA( _def_cVal, _def_InvGamma ) ((sal_uInt8)MinMax(FRound(pow( _def_cVal/255.0,_def_InvGamma)*255.0),0L,255L))
#define CALC_ERRORS \
nTemp = p1T[nX++] >> 12; \
@@ -76,13 +76,13 @@
// - Statics -
// -----------
-ULONG nVCLRLut[ 6 ] = { 16, 17, 18, 19, 20, 21 };
-ULONG nVCLGLut[ 6 ] = { 0, 6, 12, 18, 24, 30 };
-ULONG nVCLBLut[ 6 ] = { 0, 36, 72, 108, 144, 180 };
+sal_uIntPtr nVCLRLut[ 6 ] = { 16, 17, 18, 19, 20, 21 };
+sal_uIntPtr nVCLGLut[ 6 ] = { 0, 6, 12, 18, 24, 30 };
+sal_uIntPtr nVCLBLut[ 6 ] = { 0, 36, 72, 108, 144, 180 };
// ------------------------------------------------------------------------
-ULONG nVCLDitherLut[ 256 ] =
+sal_uIntPtr nVCLDitherLut[ 256 ] =
{
0, 49152, 12288, 61440, 3072, 52224, 15360, 64512, 768, 49920, 13056,
62208, 3840, 52992, 16128, 65280, 32768, 16384, 45056, 28672, 35840, 19456,
@@ -112,7 +112,7 @@ ULONG nVCLDitherLut[ 256 ] =
// ------------------------------------------------------------------------
-ULONG nVCLLut[ 256 ] =
+sal_uIntPtr nVCLLut[ 256 ] =
{
0, 1286, 2572, 3858, 5144, 6430, 7716, 9002,
10288, 11574, 12860, 14146, 15432, 16718, 18004, 19290,
@@ -242,14 +242,14 @@ long FloydIndexMap[6] =
// - ImplCreateDitherMatrix -
// --------------------------
-void ImplCreateDitherMatrix( BYTE (*pDitherMatrix)[16][16] )
+void ImplCreateDitherMatrix( sal_uInt8 (*pDitherMatrix)[16][16] )
{
double fVal = 3.125;
const double fVal16 = fVal / 16.;
long i, j, k, l;
- USHORT pMtx[ 16 ][ 16 ];
- USHORT nMax = 0;
- static BYTE pMagic[4][4] = { { 0, 14, 3, 13, },
+ sal_uInt16 pMtx[ 16 ][ 16 ];
+ sal_uInt16 nMax = 0;
+ static sal_uInt8 pMagic[4][4] = { { 0, 14, 3, 13, },
{11, 5, 8, 6, },
{12, 2, 15, 1, },
{7, 9, 4, 10 } };
@@ -260,22 +260,22 @@ void ImplCreateDitherMatrix( BYTE (*pDitherMatrix)[16][16] )
for ( k = 0; k < 4; k++ )
for ( l = 0; l < 4; l++ )
nMax = Max ( pMtx[ (k<<2) + i][(l<<2 ) + j] =
- (USHORT) ( 0.5 + pMagic[i][j]*fVal + pMagic[k][l]*fVal16 ), nMax );
+ (sal_uInt16) ( 0.5 + pMagic[i][j]*fVal + pMagic[k][l]*fVal16 ), nMax );
// auf Intervall [0;254] skalieren
for ( i = 0, fVal = 254. / nMax; i < 16; i++ )
for( j = 0; j < 16; j++ )
- (*pDitherMatrix)[i][j] = (BYTE) ( fVal * pMtx[i][j] );
+ (*pDitherMatrix)[i][j] = (sal_uInt8) ( fVal * pMtx[i][j] );
}
// ----------
// - Bitmap -
// ----------
-BOOL Bitmap::Convert( BmpConversion eConversion )
+sal_Bool Bitmap::Convert( BmpConversion eConversion )
{
- const USHORT nBitCount = GetBitCount();
- BOOL bRet = FALSE;
+ const sal_uInt16 nBitCount = GetBitCount();
+ sal_Bool bRet = sal_False;
switch( eConversion )
{
@@ -298,7 +298,7 @@ BOOL Bitmap::Convert( BmpConversion eConversion )
else if( nBitCount > 4 )
bRet = ImplConvertDown( 4, NULL );
else
- bRet = TRUE;
+ bRet = sal_True;
}
break;
@@ -324,7 +324,7 @@ BOOL Bitmap::Convert( BmpConversion eConversion )
else if( nBitCount > 8 )
bRet = ImplConvertDown( 8 );
else
- bRet = TRUE;
+ bRet = sal_True;
}
break;
@@ -342,9 +342,9 @@ BOOL Bitmap::Convert( BmpConversion eConversion )
case( BMP_CONVERSION_24BIT ):
{
if( nBitCount < 24 )
- bRet = ImplConvertUp( 24, FALSE );
+ bRet = ImplConvertUp( 24, sal_False );
else
- bRet = TRUE;
+ bRet = sal_True;
}
break;
@@ -362,10 +362,10 @@ BOOL Bitmap::Convert( BmpConversion eConversion )
// ------------------------------------------------------------------------
-BOOL Bitmap::ImplMakeMono( BYTE cThreshold )
+sal_Bool Bitmap::ImplMakeMono( sal_uInt8 cThreshold )
{
BitmapReadAccess* pReadAcc = AcquireReadAccess();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pReadAcc )
{
@@ -413,7 +413,7 @@ BOOL Bitmap::ImplMakeMono( BYTE cThreshold )
}
aNewBmp.ReleaseAccess( pWriteAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
ReleaseAccess( pReadAcc );
@@ -435,10 +435,10 @@ BOOL Bitmap::ImplMakeMono( BYTE cThreshold )
// ------------------------------------------------------------------------
-BOOL Bitmap::ImplMakeMonoDither()
+sal_Bool Bitmap::ImplMakeMonoDither()
{
BitmapReadAccess* pReadAcc = AcquireReadAccess();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pReadAcc )
{
@@ -451,7 +451,7 @@ BOOL Bitmap::ImplMakeMonoDither()
const BitmapColor aWhite( pWriteAcc->GetBestMatchingColor( Color( COL_WHITE ) ) );
const long nWidth = pWriteAcc->Width();
const long nHeight = pWriteAcc->Height();
- BYTE pDitherMatrix[ 16 ][ 16 ];
+ sal_uInt8 pDitherMatrix[ 16 ][ 16 ];
ImplCreateDitherMatrix( &pDitherMatrix );
@@ -489,7 +489,7 @@ BOOL Bitmap::ImplMakeMonoDither()
}
aNewBmp.ReleaseAccess( pWriteAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
ReleaseAccess( pReadAcc );
@@ -511,18 +511,18 @@ BOOL Bitmap::ImplMakeMonoDither()
// ------------------------------------------------------------------------
-BOOL Bitmap::ImplMakeGreyscales( USHORT nGreys )
+sal_Bool Bitmap::ImplMakeGreyscales( sal_uInt16 nGreys )
{
DBG_ASSERT( nGreys == 16 || nGreys == 256, "Only 16 or 256 greyscales are supported!" );
BitmapReadAccess* pReadAcc = AcquireReadAccess();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pReadAcc )
{
const BitmapPalette& rPal = GetGreyPalette( nGreys );
- ULONG nShift = ( ( nGreys == 16 ) ? 4UL : 0UL );
- BOOL bPalDiffers = !pReadAcc->HasPalette() || ( rPal.GetEntryCount() != pReadAcc->GetPaletteEntryCount() );
+ sal_uIntPtr nShift = ( ( nGreys == 16 ) ? 4UL : 0UL );
+ sal_Bool bPalDiffers = !pReadAcc->HasPalette() || ( rPal.GetEntryCount() != pReadAcc->GetPaletteEntryCount() );
if( !bPalDiffers )
bPalDiffers = ( (BitmapPalette&) rPal != pReadAcc->GetPalette() );
@@ -544,7 +544,7 @@ BOOL Bitmap::ImplMakeGreyscales( USHORT nGreys )
for( long nX = 0L; nX < nWidth; nX++ )
{
pWriteAcc->SetPixel( nY, nX,
- (BYTE) ( pReadAcc->GetPaletteColor(
+ (sal_uInt8) ( pReadAcc->GetPaletteColor(
pReadAcc->GetPixel( nY, nX ) ).GetLuminance() >> nShift ) );
}
}
@@ -561,11 +561,11 @@ BOOL Bitmap::ImplMakeGreyscales( USHORT nGreys )
for( long nX = 0L; nX < nWidth; nX++ )
{
- const ULONG nB = *pReadScan++;
- const ULONG nG = *pReadScan++;
- const ULONG nR = *pReadScan++;
+ const sal_uIntPtr nB = *pReadScan++;
+ const sal_uIntPtr nG = *pReadScan++;
+ const sal_uIntPtr nR = *pReadScan++;
- *pWriteScan++ = (BYTE) ( ( nB * 28UL + nG * 151UL + nR * 77UL ) >> nShift );
+ *pWriteScan++ = (sal_uInt8) ( ( nB * 28UL + nG * 151UL + nR * 77UL ) >> nShift );
}
}
}
@@ -581,11 +581,11 @@ BOOL Bitmap::ImplMakeGreyscales( USHORT nGreys )
for( long nX = 0L; nX < nWidth; nX++ )
{
- const ULONG nR = *pReadScan++;
- const ULONG nG = *pReadScan++;
- const ULONG nB = *pReadScan++;
+ const sal_uIntPtr nR = *pReadScan++;
+ const sal_uIntPtr nG = *pReadScan++;
+ const sal_uIntPtr nB = *pReadScan++;
- *pWriteScan++ = (BYTE) ( ( nB * 28UL + nG * 151UL + nR * 77UL ) >> nShift );
+ *pWriteScan++ = (sal_uInt8) ( ( nB * 28UL + nG * 151UL + nR * 77UL ) >> nShift );
}
}
}
@@ -593,11 +593,11 @@ BOOL Bitmap::ImplMakeGreyscales( USHORT nGreys )
{
for( long nY = 0L; nY < nHeight; nY++ )
for( long nX = 0L; nX < nWidth; nX++ )
- pWriteAcc->SetPixel( nY, nX, sal::static_int_cast<BYTE>(( pReadAcc->GetPixel( nY, nX ) ).GetLuminance() >> nShift) );
+ pWriteAcc->SetPixel( nY, nX, sal::static_int_cast<sal_uInt8>(( pReadAcc->GetPixel( nY, nX ) ).GetLuminance() >> nShift) );
}
aNewBmp.ReleaseAccess( pWriteAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
ReleaseAccess( pReadAcc );
@@ -616,7 +616,7 @@ BOOL Bitmap::ImplMakeGreyscales( USHORT nGreys )
else
{
ReleaseAccess( pReadAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
}
@@ -625,12 +625,12 @@ BOOL Bitmap::ImplMakeGreyscales( USHORT nGreys )
// ------------------------------------------------------------------------
-BOOL Bitmap::ImplConvertUp( USHORT nBitCount, Color* pExtColor )
+sal_Bool Bitmap::ImplConvertUp( sal_uInt16 nBitCount, Color* pExtColor )
{
DBG_ASSERT( nBitCount > GetBitCount(), "New BitCount must be greater!" );
BitmapReadAccess* pReadAcc = AcquireReadAccess();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pReadAcc )
{
@@ -645,12 +645,12 @@ BOOL Bitmap::ImplConvertUp( USHORT nBitCount, Color* pExtColor )
if( pWriteAcc->HasPalette() )
{
- const USHORT nOldCount = 1 << GetBitCount();
+ const sal_uInt16 nOldCount = 1 << GetBitCount();
const BitmapPalette& rOldPal = pReadAcc->GetPalette();
aPal.SetEntryCount( 1 << nBitCount );
- for( USHORT i = 0; i < nOldCount; i++ )
+ for( sal_uInt16 i = 0; i < nOldCount; i++ )
aPal[ i ] = rOldPal[ i ];
if( pExtColor )
@@ -679,7 +679,7 @@ BOOL Bitmap::ImplConvertUp( USHORT nBitCount, Color* pExtColor )
}
aNewBmp.ReleaseAccess( pWriteAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
ReleaseAccess( pReadAcc );
@@ -701,12 +701,12 @@ BOOL Bitmap::ImplConvertUp( USHORT nBitCount, Color* pExtColor )
// ------------------------------------------------------------------------
-BOOL Bitmap::ImplConvertDown( USHORT nBitCount, Color* pExtColor )
+sal_Bool Bitmap::ImplConvertDown( sal_uInt16 nBitCount, Color* pExtColor )
{
DBG_ASSERT( nBitCount <= GetBitCount(), "New BitCount must be lower ( or equal when pExtColor is set )!" );
BitmapReadAccess* pReadAcc = AcquireReadAccess();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pReadAcc )
{
@@ -716,7 +716,7 @@ BOOL Bitmap::ImplConvertDown( USHORT nBitCount, Color* pExtColor )
if( pWriteAcc )
{
- const USHORT nCount = 1 << nBitCount;
+ const sal_uInt16 nCount = 1 << nBitCount;
const long nWidth = pWriteAcc->Width();
const long nWidth1 = nWidth - 1L;
const long nHeight = pWriteAcc->Height();
@@ -730,8 +730,8 @@ BOOL Bitmap::ImplConvertDown( USHORT nBitCount, Color* pExtColor )
ImpErrorQuad* pQLine2 = 0;
long nX, nY;
long nYTmp = 0L;
- BYTE cIndex;
- BOOL bQ1 = TRUE;
+ sal_uInt8 cIndex;
+ sal_Bool bQ1 = sal_True;
if( pExtColor )
{
@@ -763,12 +763,12 @@ BOOL Bitmap::ImplConvertDown( USHORT nBitCount, Color* pExtColor )
for( nY = 0L; nY < nHeight; nY++, nYTmp++ )
{
// erstes ZeilenPixel
- cIndex = (BYTE) aColorMap.GetBestPaletteIndex( pQLine1[ 0 ].ImplGetColor() );
+ cIndex = (sal_uInt8) aColorMap.GetBestPaletteIndex( pQLine1[ 0 ].ImplGetColor() );
pWriteAcc->SetPixel( nY, 0, cIndex );
for( nX = 1L; nX < nWidth1; nX++ )
{
- cIndex = (BYTE) aColorMap.GetBestPaletteIndex( aColor = pQLine1[ nX ].ImplGetColor() );
+ cIndex = (sal_uInt8) aColorMap.GetBestPaletteIndex( aColor = pQLine1[ nX ].ImplGetColor() );
aErrQuad = ( ImpErrorQuad( aColor ) -= pWriteAcc->GetPaletteColor( cIndex ) );
pQLine1[ ++nX ].ImplAddColorError7( aErrQuad );
pQLine2[ nX-- ].ImplAddColorError1( aErrQuad );
@@ -780,13 +780,13 @@ BOOL Bitmap::ImplConvertDown( USHORT nBitCount, Color* pExtColor )
// letztes ZeilenPixel
if( nX < nWidth )
{
- cIndex = (BYTE) aColorMap.GetBestPaletteIndex( pQLine1[ nWidth1 ].ImplGetColor() );
+ cIndex = (sal_uInt8) aColorMap.GetBestPaletteIndex( pQLine1[ nWidth1 ].ImplGetColor() );
pWriteAcc->SetPixel( nY, nX, cIndex );
}
// Zeilenpuffer neu fuellen/kopieren
pQLine1 = pQLine2;
- pQLine2 = ( bQ1 = !bQ1 ) != FALSE ? pErrQuad2 : pErrQuad1;
+ pQLine2 = ( bQ1 = !bQ1 ) != sal_False ? pErrQuad2 : pErrQuad1;
if( nYTmp < nHeight )
{
@@ -805,7 +805,7 @@ BOOL Bitmap::ImplConvertDown( USHORT nBitCount, Color* pExtColor )
delete[] pErrQuad2;
aNewBmp.ReleaseAccess( pWriteAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
ReleaseAccess( pReadAcc );
@@ -827,11 +827,11 @@ BOOL Bitmap::ImplConvertDown( USHORT nBitCount, Color* pExtColor )
// ------------------------------------------------------------------------
-BOOL Bitmap::ImplConvertGhosted()
+sal_Bool Bitmap::ImplConvertGhosted()
{
Bitmap aNewBmp;
BitmapReadAccess* pR = AcquireReadAccess();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pR )
{
@@ -841,8 +841,8 @@ BOOL Bitmap::ImplConvertGhosted()
for( long i = 0, nCount = aNewPal.GetEntryCount(); i < nCount; i++ )
{
- const BitmapColor& rOld = pR->GetPaletteColor( (USHORT) i );
- aNewPal[ (USHORT) i ] = BitmapColor( ( rOld.GetRed() >> 1 ) | 0x80,
+ const BitmapColor& rOld = pR->GetPaletteColor( (sal_uInt16) i );
+ aNewPal[ (sal_uInt16) i ] = BitmapColor( ( rOld.GetRed() >> 1 ) | 0x80,
( rOld.GetGreen() >> 1 ) | 0x80,
( rOld.GetBlue() >> 1 ) | 0x80 );
}
@@ -854,7 +854,7 @@ BOOL Bitmap::ImplConvertGhosted()
{
pW->CopyBuffer( *pR );
aNewBmp.ReleaseAccess( pW );
- bRet = TRUE;
+ bRet = sal_True;
}
}
else
@@ -880,7 +880,7 @@ BOOL Bitmap::ImplConvertGhosted()
}
aNewBmp.ReleaseAccess( pW );
- bRet = TRUE;
+ bRet = sal_True;
}
}
@@ -903,9 +903,9 @@ BOOL Bitmap::ImplConvertGhosted()
// ------------------------------------------------------------------------
-BOOL Bitmap::Scale( const double& rScaleX, const double& rScaleY, ULONG nScaleFlag )
+sal_Bool Bitmap::Scale( const double& rScaleX, const double& rScaleY, sal_uIntPtr nScaleFlag )
{
- BOOL bRet;
+ sal_Bool bRet;
if( ( rScaleX != 1.0 ) || ( rScaleY != 1.0 ) )
{
@@ -914,20 +914,20 @@ BOOL Bitmap::Scale( const double& rScaleX, const double& rScaleY, ULONG nScaleFl
else if( BMP_SCALE_INTERPOLATE == nScaleFlag )
bRet = ImplScaleInterpolate( rScaleX, rScaleY );
else
- bRet = FALSE;
+ bRet = sal_False;
}
else
- bRet = TRUE;
+ bRet = sal_True;
return bRet;
}
// ------------------------------------------------------------------------
-BOOL Bitmap::Scale( const Size& rNewSize, ULONG nScaleFlag )
+sal_Bool Bitmap::Scale( const Size& rNewSize, sal_uIntPtr nScaleFlag )
{
const Size aSize( GetSizePixel() );
- BOOL bRet;
+ sal_Bool bRet;
if( aSize.Width() && aSize.Height() )
{
@@ -936,19 +936,19 @@ BOOL Bitmap::Scale( const Size& rNewSize, ULONG nScaleFlag )
nScaleFlag );
}
else
- bRet = TRUE;
+ bRet = sal_True;
return bRet;
}
// ------------------------------------------------------------------------
-BOOL Bitmap::ImplScaleFast( const double& rScaleX, const double& rScaleY )
+sal_Bool Bitmap::ImplScaleFast( const double& rScaleX, const double& rScaleY )
{
const Size aSizePix( GetSizePixel() );
const long nNewWidth = FRound( aSizePix.Width() * rScaleX );
const long nNewHeight = FRound( aSizePix.Height() * rScaleY );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( nNewWidth && nNewHeight )
{
@@ -992,7 +992,7 @@ BOOL Bitmap::ImplScaleFast( const double& rScaleX, const double& rScaleY )
nActY++;
}
- bRet = TRUE;
+ bRet = sal_True;
}
delete[] pLutX;
@@ -1011,12 +1011,12 @@ BOOL Bitmap::ImplScaleFast( const double& rScaleX, const double& rScaleY )
// ------------------------------------------------------------------------
-BOOL Bitmap::ImplScaleInterpolate( const double& rScaleX, const double& rScaleY )
+sal_Bool Bitmap::ImplScaleInterpolate( const double& rScaleX, const double& rScaleY )
{
const Size aSizePix( GetSizePixel() );
const long nNewWidth = FRound( aSizePix.Width() * rScaleX );
const long nNewHeight = FRound( aSizePix.Height() * rScaleY );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( ( nNewWidth > 1L ) && ( nNewHeight > 1L ) )
{
@@ -1077,9 +1077,9 @@ BOOL Bitmap::ImplScaleInterpolate( const double& rScaleX, const double& rScaleY
lXG1 = aCol1.GetGreen() - ( lXG0 = aCol0.GetGreen() );
lXB1 = aCol1.GetBlue() - ( lXB0 = aCol0.GetBlue() );
- aCol0.SetRed( (BYTE) ( ( lXR1 * nTemp + ( lXR0 << 10 ) ) >> 10 ) );
- aCol0.SetGreen( (BYTE) ( ( lXG1 * nTemp + ( lXG0 << 10 ) ) >> 10 ) );
- aCol0.SetBlue( (BYTE) ( ( lXB1 * nTemp + ( lXB0 << 10 ) ) >> 10 ) );
+ aCol0.SetRed( (sal_uInt8) ( ( lXR1 * nTemp + ( lXR0 << 10 ) ) >> 10 ) );
+ aCol0.SetGreen( (sal_uInt8) ( ( lXG1 * nTemp + ( lXG0 << 10 ) ) >> 10 ) );
+ aCol0.SetBlue( (sal_uInt8) ( ( lXB1 * nTemp + ( lXB0 << 10 ) ) >> 10 ) );
pWriteAcc->SetPixel( nY, nX, aCol0 );
}
@@ -1112,9 +1112,9 @@ BOOL Bitmap::ImplScaleInterpolate( const double& rScaleX, const double& rScaleY
lXG1 = aCol1.GetGreen() - ( lXG0 = aCol0.GetGreen() );
lXB1 = aCol1.GetBlue() - ( lXB0 = aCol0.GetBlue() );
- aCol0.SetRed( (BYTE) ( ( lXR1 * nTemp + ( lXR0 << 10 ) ) >> 10 ) );
- aCol0.SetGreen( (BYTE) ( ( lXG1 * nTemp + ( lXG0 << 10 ) ) >> 10 ) );
- aCol0.SetBlue( (BYTE) ( ( lXB1 * nTemp + ( lXB0 << 10 ) ) >> 10 ) );
+ aCol0.SetRed( (sal_uInt8) ( ( lXR1 * nTemp + ( lXR0 << 10 ) ) >> 10 ) );
+ aCol0.SetGreen( (sal_uInt8) ( ( lXG1 * nTemp + ( lXG0 << 10 ) ) >> 10 ) );
+ aCol0.SetBlue( (sal_uInt8) ( ( lXB1 * nTemp + ( lXB0 << 10 ) ) >> 10 ) );
pWriteAcc->SetPixel( nY, nX, aCol0 );
}
@@ -1124,7 +1124,7 @@ BOOL Bitmap::ImplScaleInterpolate( const double& rScaleX, const double& rScaleY
delete[] pLutInt;
delete[] pLutFrac;
- bRet = TRUE;
+ bRet = sal_True;
}
ReleaseAccess( pReadAcc );
@@ -1132,7 +1132,7 @@ BOOL Bitmap::ImplScaleInterpolate( const double& rScaleX, const double& rScaleY
if( bRet )
{
- bRet = FALSE;
+ bRet = sal_False;
ImplAssignWithSize( aNewBmp );
pReadAcc = AcquireReadAccess();
aNewBmp = Bitmap( Size( nNewWidth, nNewHeight ), 24 );
@@ -1181,9 +1181,9 @@ BOOL Bitmap::ImplScaleInterpolate( const double& rScaleX, const double& rScaleY
lXG1 = aCol1.GetGreen() - ( lXG0 = aCol0.GetGreen() );
lXB1 = aCol1.GetBlue() - ( lXB0 = aCol0.GetBlue() );
- aCol0.SetRed( (BYTE) ( ( lXR1 * nTemp + ( lXR0 << 10 ) ) >> 10 ) );
- aCol0.SetGreen( (BYTE) ( ( lXG1 * nTemp + ( lXG0 << 10 ) ) >> 10 ) );
- aCol0.SetBlue( (BYTE) ( ( lXB1 * nTemp + ( lXB0 << 10 ) ) >> 10 ) );
+ aCol0.SetRed( (sal_uInt8) ( ( lXR1 * nTemp + ( lXR0 << 10 ) ) >> 10 ) );
+ aCol0.SetGreen( (sal_uInt8) ( ( lXG1 * nTemp + ( lXG0 << 10 ) ) >> 10 ) );
+ aCol0.SetBlue( (sal_uInt8) ( ( lXB1 * nTemp + ( lXB0 << 10 ) ) >> 10 ) );
pWriteAcc->SetPixel( nY, nX, aCol0 );
}
@@ -1216,9 +1216,9 @@ BOOL Bitmap::ImplScaleInterpolate( const double& rScaleX, const double& rScaleY
lXG1 = aCol1.GetGreen() - ( lXG0 = aCol0.GetGreen() );
lXB1 = aCol1.GetBlue() - ( lXB0 = aCol0.GetBlue() );
- aCol0.SetRed( (BYTE) ( ( lXR1 * nTemp + ( lXR0 << 10 ) ) >> 10 ) );
- aCol0.SetGreen( (BYTE) ( ( lXG1 * nTemp + ( lXG0 << 10 ) ) >> 10 ) );
- aCol0.SetBlue( (BYTE) ( ( lXB1 * nTemp + ( lXB0 << 10 ) ) >> 10 ) );
+ aCol0.SetRed( (sal_uInt8) ( ( lXR1 * nTemp + ( lXR0 << 10 ) ) >> 10 ) );
+ aCol0.SetGreen( (sal_uInt8) ( ( lXG1 * nTemp + ( lXG0 << 10 ) ) >> 10 ) );
+ aCol0.SetBlue( (sal_uInt8) ( ( lXB1 * nTemp + ( lXB0 << 10 ) ) >> 10 ) );
pWriteAcc->SetPixel( nY, nX, aCol0 );
}
@@ -1228,7 +1228,7 @@ BOOL Bitmap::ImplScaleInterpolate( const double& rScaleX, const double& rScaleY
delete[] pLutInt;
delete[] pLutFrac;
- bRet = TRUE;
+ bRet = sal_True;
}
ReleaseAccess( pReadAcc );
@@ -1247,14 +1247,14 @@ BOOL Bitmap::ImplScaleInterpolate( const double& rScaleX, const double& rScaleY
// ------------------------------------------------------------------------
-BOOL Bitmap::Dither( ULONG nDitherFlags )
+sal_Bool Bitmap::Dither( sal_uIntPtr nDitherFlags )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const Size aSizePix( GetSizePixel() );
if( aSizePix.Width() == 1 || aSizePix.Height() == 1 )
- bRet = TRUE;
+ bRet = sal_True;
else if( nDitherFlags & BMP_DITHER_MATRIX )
bRet = ImplDitherMatrix();
else if( nDitherFlags & BMP_DITHER_FLOYD )
@@ -1267,55 +1267,55 @@ BOOL Bitmap::Dither( ULONG nDitherFlags )
// ------------------------------------------------------------------------
-BOOL Bitmap::ImplDitherMatrix()
+sal_Bool Bitmap::ImplDitherMatrix()
{
BitmapReadAccess* pReadAcc = AcquireReadAccess();
Bitmap aNewBmp( GetSizePixel(), 8 );
BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pReadAcc && pWriteAcc )
{
- const ULONG nWidth = pReadAcc->Width();
- const ULONG nHeight = pReadAcc->Height();
- BitmapColor aIndex( (BYTE) 0 );
+ const sal_uIntPtr nWidth = pReadAcc->Width();
+ const sal_uIntPtr nHeight = pReadAcc->Height();
+ BitmapColor aIndex( (sal_uInt8) 0 );
if( pReadAcc->HasPalette() )
{
- for( ULONG nY = 0UL; nY < nHeight; nY++ )
+ for( sal_uIntPtr nY = 0UL; nY < nHeight; nY++ )
{
- for( ULONG nX = 0UL, nModY = ( nY & 0x0FUL ) << 4UL; nX < nWidth; nX++ )
+ for( sal_uIntPtr nX = 0UL, nModY = ( nY & 0x0FUL ) << 4UL; nX < nWidth; nX++ )
{
const BitmapColor aCol( pReadAcc->GetPaletteColor( pReadAcc->GetPixel( nY, nX ) ) );
- const ULONG nD = nVCLDitherLut[ nModY + ( nX & 0x0FUL ) ];
- const ULONG nR = ( nVCLLut[ aCol.GetRed() ] + nD ) >> 16UL;
- const ULONG nG = ( nVCLLut[ aCol.GetGreen() ] + nD ) >> 16UL;
- const ULONG nB = ( nVCLLut[ aCol.GetBlue() ] + nD ) >> 16UL;
+ const sal_uIntPtr nD = nVCLDitherLut[ nModY + ( nX & 0x0FUL ) ];
+ const sal_uIntPtr nR = ( nVCLLut[ aCol.GetRed() ] + nD ) >> 16UL;
+ const sal_uIntPtr nG = ( nVCLLut[ aCol.GetGreen() ] + nD ) >> 16UL;
+ const sal_uIntPtr nB = ( nVCLLut[ aCol.GetBlue() ] + nD ) >> 16UL;
- aIndex.SetIndex( (BYTE) ( nVCLRLut[ nR ] + nVCLGLut[ nG ] + nVCLBLut[ nB ] ) );
+ aIndex.SetIndex( (sal_uInt8) ( nVCLRLut[ nR ] + nVCLGLut[ nG ] + nVCLBLut[ nB ] ) );
pWriteAcc->SetPixel( nY, nX, aIndex );
}
}
}
else
{
- for( ULONG nY = 0UL; nY < nHeight; nY++ )
+ for( sal_uIntPtr nY = 0UL; nY < nHeight; nY++ )
{
- for( ULONG nX = 0UL, nModY = ( nY & 0x0FUL ) << 4UL; nX < nWidth; nX++ )
+ for( sal_uIntPtr nX = 0UL, nModY = ( nY & 0x0FUL ) << 4UL; nX < nWidth; nX++ )
{
const BitmapColor aCol( pReadAcc->GetPixel( nY, nX ) );
- const ULONG nD = nVCLDitherLut[ nModY + ( nX & 0x0FUL ) ];
- const ULONG nR = ( nVCLLut[ aCol.GetRed() ] + nD ) >> 16UL;
- const ULONG nG = ( nVCLLut[ aCol.GetGreen() ] + nD ) >> 16UL;
- const ULONG nB = ( nVCLLut[ aCol.GetBlue() ] + nD ) >> 16UL;
+ const sal_uIntPtr nD = nVCLDitherLut[ nModY + ( nX & 0x0FUL ) ];
+ const sal_uIntPtr nR = ( nVCLLut[ aCol.GetRed() ] + nD ) >> 16UL;
+ const sal_uIntPtr nG = ( nVCLLut[ aCol.GetGreen() ] + nD ) >> 16UL;
+ const sal_uIntPtr nB = ( nVCLLut[ aCol.GetBlue() ] + nD ) >> 16UL;
- aIndex.SetIndex( (BYTE) ( nVCLRLut[ nR ] + nVCLGLut[ nG ] + nVCLBLut[ nB ] ) );
+ aIndex.SetIndex( (sal_uInt8) ( nVCLRLut[ nR ] + nVCLGLut[ nG ] + nVCLBLut[ nB ] ) );
pWriteAcc->SetPixel( nY, nX, aIndex );
}
}
}
- bRet = TRUE;
+ bRet = sal_True;
}
ReleaseAccess( pReadAcc );
@@ -1337,10 +1337,10 @@ BOOL Bitmap::ImplDitherMatrix()
// ------------------------------------------------------------------------
-BOOL Bitmap::ImplDitherFloyd()
+sal_Bool Bitmap::ImplDitherFloyd()
{
const Size aSize( GetSizePixel() );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( ( aSize.Width() > 3 ) && ( aSize.Height() > 2 ) )
{
@@ -1366,7 +1366,7 @@ BOOL Bitmap::ImplDitherFloyd()
long* p1T = p1;
long* p2T = p2;
long* pTmp;
- BOOL bPal = pReadAcc->HasPalette();
+ sal_Bool bPal = pReadAcc->HasPalette();
pTmp = p2T;
@@ -1431,7 +1431,7 @@ BOOL Bitmap::ImplDitherFloyd()
CALC_TABLES7;
nX -= 5;
CALC_TABLES5;
- pWriteAcc->SetPixel( nYAcc, 0, BitmapColor( (BYTE) ( nVCLBLut[ nBC ] + nVCLGLut[nGC ] + nVCLRLut[nRC ] ) ) );
+ pWriteAcc->SetPixel( nYAcc, 0, BitmapColor( (sal_uInt8) ( nVCLBLut[ nBC ] + nVCLGLut[nGC ] + nVCLRLut[nRC ] ) ) );
// mittlere Pixel ueber Schleife
long nXAcc;
@@ -1442,7 +1442,7 @@ BOOL Bitmap::ImplDitherFloyd()
nX -= 8;
CALC_TABLES3;
CALC_TABLES5;
- pWriteAcc->SetPixel( nYAcc, nXAcc, BitmapColor( (BYTE) ( nVCLBLut[ nBC ] + nVCLGLut[nGC ] + nVCLRLut[nRC ] ) ) );
+ pWriteAcc->SetPixel( nYAcc, nXAcc, BitmapColor( (sal_uInt8) ( nVCLBLut[ nBC ] + nVCLGLut[nGC ] + nVCLRLut[nRC ] ) ) );
}
// letztes Pixel gesondert betrachten
@@ -1450,12 +1450,12 @@ BOOL Bitmap::ImplDitherFloyd()
nX -= 5;
CALC_TABLES3;
CALC_TABLES5;
- pWriteAcc->SetPixel( nYAcc, nWidth1, BitmapColor( (BYTE) ( nVCLBLut[ nBC ] + nVCLGLut[nGC ] + nVCLRLut[nRC ] ) ) );
+ pWriteAcc->SetPixel( nYAcc, nWidth1, BitmapColor( (sal_uInt8) ( nVCLBLut[ nBC ] + nVCLGLut[nGC ] + nVCLRLut[nRC ] ) ) );
}
delete[] p1;
delete[] p2;
- bRet = TRUE;
+ bRet = sal_True;
}
ReleaseAccess( pReadAcc );
@@ -1478,12 +1478,12 @@ BOOL Bitmap::ImplDitherFloyd()
// ------------------------------------------------------------------------
-BOOL Bitmap::ImplDitherFloyd16()
+sal_Bool Bitmap::ImplDitherFloyd16()
{
BitmapReadAccess* pReadAcc = AcquireReadAccess();
Bitmap aNewBmp( GetSizePixel(), 24 );
BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pReadAcc && pWriteAcc )
{
@@ -1499,7 +1499,7 @@ BOOL Bitmap::ImplDitherFloyd16()
ImpErrorQuad* pQLine2 = 0;
long nX, nY;
long nYTmp = 0L;
- BOOL bQ1 = TRUE;
+ sal_Bool bQ1 = sal_True;
for( nY = 0L; nY < Min( nHeight, 2L ); nY++, nYTmp++ )
for( nX = 0L, pQLine2 = !nY ? pErrQuad1 : pErrQuad2; nX < nWidth; nX++ )
@@ -1537,7 +1537,7 @@ BOOL Bitmap::ImplDitherFloyd16()
// Zeilenpuffer neu fuellen/kopieren
pQLine1 = pQLine2;
- pQLine2 = ( bQ1 = !bQ1 ) != FALSE ? pErrQuad2 : pErrQuad1;
+ pQLine2 = ( bQ1 = !bQ1 ) != sal_False ? pErrQuad2 : pErrQuad1;
if( nYTmp < nHeight )
for( nX = 0L; nX < nWidth; nX++ )
@@ -1547,7 +1547,7 @@ BOOL Bitmap::ImplDitherFloyd16()
// Zeilenpuffer zerstoeren
delete[] pErrQuad1;
delete[] pErrQuad2;
- bRet = TRUE;
+ bRet = sal_True;
}
ReleaseAccess( pReadAcc );
@@ -1569,12 +1569,12 @@ BOOL Bitmap::ImplDitherFloyd16()
// ------------------------------------------------------------------------
-BOOL Bitmap::ReduceColors( USHORT nColorCount, BmpReduce eReduce )
+sal_Bool Bitmap::ReduceColors( sal_uInt16 nColorCount, BmpReduce eReduce )
{
- BOOL bRet;
+ sal_Bool bRet;
- if( GetColorCount() <= (ULONG) nColorCount )
- bRet = TRUE;
+ if( GetColorCount() <= (sal_uIntPtr) nColorCount )
+ bRet = sal_True;
else if( nColorCount )
{
if( BMP_REDUCE_SIMPLE == eReduce )
@@ -1585,20 +1585,20 @@ BOOL Bitmap::ReduceColors( USHORT nColorCount, BmpReduce eReduce )
bRet = ImplReduceMedian( nColorCount );
}
else
- bRet = FALSE;
+ bRet = sal_False;
return bRet;
}
// ------------------------------------------------------------------------
-BOOL Bitmap::ImplReduceSimple( USHORT nColorCount )
+sal_Bool Bitmap::ImplReduceSimple( sal_uInt16 nColorCount )
{
Bitmap aNewBmp;
BitmapReadAccess* pRAcc = AcquireReadAccess();
- const USHORT nColCount = Min( nColorCount, (USHORT) 256 );
- USHORT nBitCount;
- BOOL bRet = FALSE;
+ const sal_uInt16 nColCount = Min( nColorCount, (sal_uInt16) 256 );
+ sal_uInt16 nBitCount;
+ sal_Bool bRet = sal_False;
if( nColCount <= 2 )
nBitCount = 1;
@@ -1625,17 +1625,17 @@ BOOL Bitmap::ImplReduceSimple( USHORT nColorCount )
{
for( long nY = 0L; nY < nHeight; nY++ )
for( long nX =0L; nX < nWidth; nX++ )
- pWAcc->SetPixel( nY, nX, (BYTE) aOct.GetBestPaletteIndex( pRAcc->GetPaletteColor( pRAcc->GetPixel( nY, nX ) ) ) );
+ pWAcc->SetPixel( nY, nX, (sal_uInt8) aOct.GetBestPaletteIndex( pRAcc->GetPaletteColor( pRAcc->GetPixel( nY, nX ) ) ) );
}
else
{
for( long nY = 0L; nY < nHeight; nY++ )
for( long nX =0L; nX < nWidth; nX++ )
- pWAcc->SetPixel( nY, nX, (BYTE) aOct.GetBestPaletteIndex( pRAcc->GetPixel( nY, nX ) ) );
+ pWAcc->SetPixel( nY, nX, (sal_uInt8) aOct.GetBestPaletteIndex( pRAcc->GetPixel( nY, nX ) ) );
}
aNewBmp.ReleaseAccess( pWAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
ReleaseAccess( pRAcc );
@@ -1680,11 +1680,11 @@ extern "C" int __LOADONCALLAPI ImplPopularCmpFnc( const void* p1, const void* p2
// ------------------------------------------------------------------------
-BOOL Bitmap::ImplReducePopular( USHORT nColCount )
+sal_Bool Bitmap::ImplReducePopular( sal_uInt16 nColCount )
{
BitmapReadAccess* pRAcc = AcquireReadAccess();
- USHORT nBitCount;
- BOOL bRet = FALSE;
+ sal_uInt16 nBitCount;
+ sal_Bool bRet = sal_False;
if( nColCount > 256 )
nColCount = 256;
@@ -1753,12 +1753,12 @@ BOOL Bitmap::ImplReducePopular( USHORT nColCount )
qsort( pCountTable, nTotalColors, sizeof( PopularColorCount ), ImplPopularCmpFnc );
- for( USHORT n = 0; n < nColCount; n++ )
+ for( sal_uInt16 n = 0; n < nColCount; n++ )
{
const PopularColorCount& rPop = pCountTable[ n ];
- aNewPal[ n ] = BitmapColor( (BYTE) ( ( rPop.mnIndex >> nLeftShiftBits2 ) << nRightShiftBits ),
- (BYTE) ( ( ( rPop.mnIndex >> nLeftShiftBits1 ) & ( nColorsPerComponent - 1 ) ) << nRightShiftBits ),
- (BYTE) ( ( rPop.mnIndex & ( nColorsPerComponent - 1 ) ) << nRightShiftBits ) );
+ aNewPal[ n ] = BitmapColor( (sal_uInt8) ( ( rPop.mnIndex >> nLeftShiftBits2 ) << nRightShiftBits ),
+ (sal_uInt8) ( ( ( rPop.mnIndex >> nLeftShiftBits1 ) & ( nColorsPerComponent - 1 ) ) << nRightShiftBits ),
+ (sal_uInt8) ( ( rPop.mnIndex & ( nColorsPerComponent - 1 ) ) << nRightShiftBits ) );
}
Bitmap aNewBmp( GetSizePixel(), nBitCount, &aNewPal );
@@ -1766,13 +1766,13 @@ BOOL Bitmap::ImplReducePopular( USHORT nColCount )
if( pWAcc )
{
- BitmapColor aDstCol( (BYTE) 0 );
- BYTE* pIndexMap = new BYTE[ nTotalColors ];
+ BitmapColor aDstCol( (sal_uInt8) 0 );
+ sal_uInt8* pIndexMap = new sal_uInt8[ nTotalColors ];
for( nR = 0, nIndex = 0; nR < 256; nR += nColorOffset )
for( nG = 0; nG < 256; nG += nColorOffset )
for( nB = 0; nB < 256; nB += nColorOffset )
- pIndexMap[ nIndex++ ] = (BYTE) aNewPal.GetBestIndex( BitmapColor( (BYTE) nR, (BYTE) nG, (BYTE) nB ) );
+ pIndexMap[ nIndex++ ] = (sal_uInt8) aNewPal.GetBestIndex( BitmapColor( (sal_uInt8) nR, (sal_uInt8) nG, (sal_uInt8) nB ) );
if( pRAcc->HasPalette() )
{
@@ -1805,7 +1805,7 @@ BOOL Bitmap::ImplReducePopular( USHORT nColCount )
delete[] pIndexMap;
aNewBmp.ReleaseAccess( pWAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
delete[] pCountTable;
@@ -1827,11 +1827,11 @@ BOOL Bitmap::ImplReducePopular( USHORT nColCount )
// ------------------------------------------------------------------------
-BOOL Bitmap::ImplReduceMedian( USHORT nColCount )
+sal_Bool Bitmap::ImplReduceMedian( sal_uInt16 nColCount )
{
BitmapReadAccess* pRAcc = AcquireReadAccess();
- USHORT nBitCount;
- BOOL bRet = FALSE;
+ sal_uInt16 nBitCount;
+ sal_Bool bRet = sal_False;
if( nColCount < 17 )
nBitCount = 4;
@@ -1851,8 +1851,8 @@ BOOL Bitmap::ImplReduceMedian( USHORT nColCount )
if( pWAcc )
{
- const ULONG nSize = 32768UL * sizeof( ULONG );
- ULONG* pColBuf = (ULONG*) rtl_allocateMemory( nSize );
+ const sal_uIntPtr nSize = 32768UL * sizeof( sal_uIntPtr );
+ sal_uIntPtr* pColBuf = (sal_uIntPtr*) rtl_allocateMemory( nSize );
const long nWidth = pWAcc->Width();
const long nHeight = pWAcc->Height();
long nIndex = 0L;
@@ -1893,11 +1893,11 @@ BOOL Bitmap::ImplReduceMedian( USHORT nColCount )
pWAcc->SetPalette( aPal );
for( long nY = 0L; nY < nHeight; nY++ )
for( long nX = 0L; nX < nWidth; nX++ )
- pWAcc->SetPixel( nY, nX, (BYTE) aMap.GetBestPaletteIndex( pRAcc->GetColor( nY, nX ) ) );
+ pWAcc->SetPixel( nY, nX, (sal_uInt8) aMap.GetBestPaletteIndex( pRAcc->GetColor( nY, nX ) ) );
rtl_freeMemory( pColBuf );
aNewBmp.ReleaseAccess( pWAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
ReleaseAccess( pRAcc );
@@ -1918,7 +1918,7 @@ BOOL Bitmap::ImplReduceMedian( USHORT nColCount )
// ------------------------------------------------------------------------
-void Bitmap::ImplMedianCut( ULONG* pColBuf, BitmapPalette& rPal,
+void Bitmap::ImplMedianCut( sal_uIntPtr* pColBuf, BitmapPalette& rPal,
long nR1, long nR2, long nG1, long nG2, long nB1, long nB2,
long nColors, long nPixels, long& rIndex )
{
@@ -1930,16 +1930,16 @@ void Bitmap::ImplMedianCut( ULONG* pColBuf, BitmapPalette& rPal,
const long nGLen = nG2 - nG1;
const long nBLen = nB2 - nB1;
long nR, nG, nB;
- ULONG* pBuf = pColBuf;
+ sal_uIntPtr* pBuf = pColBuf;
if( !nRLen && !nGLen && !nBLen )
{
if( pBuf[ RGB15( nR1, nG1, nB1 ) ] )
{
- aCol.SetRed( (BYTE) ( nR1 << 3 ) );
- aCol.SetGreen( (BYTE) ( nG1 << 3 ) );
- aCol.SetBlue( (BYTE) ( nB1 << 3 ) );
- rPal[ (USHORT) rIndex++ ] = aCol;
+ aCol.SetRed( (sal_uInt8) ( nR1 << 3 ) );
+ aCol.SetGreen( (sal_uInt8) ( nG1 << 3 ) );
+ aCol.SetBlue( (sal_uInt8) ( nB1 << 3 ) );
+ rPal[ (sal_uInt16) rIndex++ ] = aCol;
}
}
else
@@ -1966,10 +1966,10 @@ void Bitmap::ImplMedianCut( ULONG* pColBuf, BitmapPalette& rPal,
}
}
- aCol.SetRed( (BYTE) ( ( nRSum / nPixels ) << 3 ) );
- aCol.SetGreen( (BYTE) ( ( nGSum / nPixels ) << 3 ) );
- aCol.SetBlue( (BYTE) ( ( nBSum / nPixels ) << 3 ) );
- rPal[ (USHORT) rIndex++ ] = aCol;
+ aCol.SetRed( (sal_uInt8) ( ( nRSum / nPixels ) << 3 ) );
+ aCol.SetGreen( (sal_uInt8) ( ( nGSum / nPixels ) << 3 ) );
+ aCol.SetBlue( (sal_uInt8) ( ( nBSum / nPixels ) << 3 ) );
+ rPal[ (sal_uInt16) rIndex++ ] = aCol;
}
else
{
@@ -2052,32 +2052,32 @@ void Bitmap::ImplMedianCut( ULONG* pColBuf, BitmapPalette& rPal,
// ------------------------------------------------------------------------
-BOOL Bitmap::Vectorize( PolyPolygon& rPolyPoly, ULONG nFlags, const Link* pProgress )
+sal_Bool Bitmap::Vectorize( PolyPolygon& rPolyPoly, sal_uIntPtr nFlags, const Link* pProgress )
{
return ImplVectorizer().ImplVectorize( *this, rPolyPoly, nFlags, pProgress );
}
// ------------------------------------------------------------------------
-BOOL Bitmap::Vectorize( GDIMetaFile& rMtf, BYTE cReduce, ULONG nFlags, const Link* pProgress )
+sal_Bool Bitmap::Vectorize( GDIMetaFile& rMtf, sal_uInt8 cReduce, sal_uIntPtr nFlags, const Link* pProgress )
{
return ImplVectorizer().ImplVectorize( *this, rMtf, cReduce, nFlags, pProgress );
}
// ------------------------------------------------------------------------
-BOOL Bitmap::Adjust( short nLuminancePercent, short nContrastPercent,
+sal_Bool Bitmap::Adjust( short nLuminancePercent, short nContrastPercent,
short nChannelRPercent, short nChannelGPercent, short nChannelBPercent,
- double fGamma, BOOL bInvert )
+ double fGamma, sal_Bool bInvert )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
// nothing to do => return quickly
if( !nLuminancePercent && !nContrastPercent &&
!nChannelRPercent && !nChannelGPercent && !nChannelBPercent &&
( fGamma == 1.0 ) && !bInvert )
{
- bRet = TRUE;
+ bRet = sal_True;
}
else
{
@@ -2088,9 +2088,9 @@ BOOL Bitmap::Adjust( short nLuminancePercent, short nContrastPercent,
BitmapColor aCol;
const long nW = pAcc->Width();
const long nH = pAcc->Height();
- BYTE* cMapR = new BYTE[ 256 ];
- BYTE* cMapG = new BYTE[ 256 ];
- BYTE* cMapB = new BYTE[ 256 ];
+ sal_uInt8* cMapR = new sal_uInt8[ 256 ];
+ sal_uInt8* cMapG = new sal_uInt8[ 256 ];
+ sal_uInt8* cMapB = new sal_uInt8[ 256 ];
long nX, nY;
double fM, fROff, fGOff, fBOff, fOff;
@@ -2110,14 +2110,14 @@ BOOL Bitmap::Adjust( short nLuminancePercent, short nContrastPercent,
// calculate gamma value
fGamma = ( fGamma <= 0.0 || fGamma > 10.0 ) ? 1.0 : ( 1.0 / fGamma );
- const BOOL bGamma = ( fGamma != 1.0 );
+ const sal_Bool bGamma = ( fGamma != 1.0 );
// create mapping table
for( nX = 0L; nX < 256L; nX++ )
{
- cMapR[ nX ] = (BYTE) MinMax( FRound( nX * fM + fROff ), 0L, 255L );
- cMapG[ nX ] = (BYTE) MinMax( FRound( nX * fM + fGOff ), 0L, 255L );
- cMapB[ nX ] = (BYTE) MinMax( FRound( nX * fM + fBOff ), 0L, 255L );
+ cMapR[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fROff ), 0L, 255L );
+ cMapG[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fGOff ), 0L, 255L );
+ cMapB[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fBOff ), 0L, 255L );
if( bGamma )
{
@@ -2139,7 +2139,7 @@ BOOL Bitmap::Adjust( short nLuminancePercent, short nContrastPercent,
{
BitmapColor aNewCol;
- for( USHORT i = 0, nCount = pAcc->GetPaletteEntryCount(); i < nCount; i++ )
+ for( sal_uInt16 i = 0, nCount = pAcc->GetPaletteEntryCount(); i < nCount; i++ )
{
const BitmapColor& rCol = pAcc->GetPaletteColor( i );
aNewCol.SetRed( cMapR[ rCol.GetRed() ] );
@@ -2195,7 +2195,7 @@ BOOL Bitmap::Adjust( short nLuminancePercent, short nContrastPercent,
delete[] cMapG;
delete[] cMapB;
ReleaseAccess( pAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
}
diff --git a/vcl/source/gdi/bitmap4.cxx b/vcl/source/gdi/bitmap4.cxx
index b64bcd8fe540..aee54d7540fd 100644
--- a/vcl/source/gdi/bitmap4.cxx
+++ b/vcl/source/gdi/bitmap4.cxx
@@ -49,9 +49,9 @@
// - Bitmap -
// ----------
-BOOL Bitmap::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam, const Link* pProgress )
+sal_Bool Bitmap::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam, const Link* pProgress )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
switch( eFilter )
{
@@ -107,11 +107,11 @@ BOOL Bitmap::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam, cons
// -----------------------------------------------------------------------------
-BOOL Bitmap::ImplConvolute3( const long* pMatrix, long nDivisor,
+sal_Bool Bitmap::ImplConvolute3( const long* pMatrix, long nDivisor,
const BmpFilterParam* /*pFilterParam*/, const Link* /*pProgress*/ )
{
BitmapReadAccess* pReadAcc = AcquireReadAccess();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pReadAcc )
{
@@ -124,9 +124,9 @@ BOOL Bitmap::ImplConvolute3( const long* pMatrix, long nDivisor,
const long nHeight = pWriteAcc->Height(), nHeight2 = nHeight + 2;
long* pColm = new long[ nWidth2 ];
long* pRows = new long[ nHeight2 ];
- BitmapColor* pColRow1 = (BitmapColor*) new BYTE[ sizeof( BitmapColor ) * nWidth2 ];
- BitmapColor* pColRow2 = (BitmapColor*) new BYTE[ sizeof( BitmapColor ) * nWidth2 ];
- BitmapColor* pColRow3 = (BitmapColor*) new BYTE[ sizeof( BitmapColor ) * nWidth2 ];
+ BitmapColor* pColRow1 = (BitmapColor*) new sal_uInt8[ sizeof( BitmapColor ) * nWidth2 ];
+ BitmapColor* pColRow2 = (BitmapColor*) new sal_uInt8[ sizeof( BitmapColor ) * nWidth2 ];
+ BitmapColor* pColRow3 = (BitmapColor*) new sal_uInt8[ sizeof( BitmapColor ) * nWidth2 ];
BitmapColor* pRowTmp1 = pColRow1;
BitmapColor* pRowTmp2 = pColRow2;
BitmapColor* pRowTmp3 = pColRow3;
@@ -205,9 +205,9 @@ BOOL Bitmap::ImplConvolute3( const long* pMatrix, long nDivisor,
nSumB += pTmp[ pColor->GetBlue() ];
// calculate destination color
- pWriteAcc->SetPixel( nY, nX, BitmapColor( (BYTE) MinMax( nSumR / nDivisor, 0, 255 ),
- (BYTE) MinMax( nSumG / nDivisor, 0, 255 ),
- (BYTE) MinMax( nSumB / nDivisor, 0, 255 ) ) );
+ pWriteAcc->SetPixel( nY, nX, BitmapColor( (sal_uInt8) MinMax( nSumR / nDivisor, 0, 255 ),
+ (sal_uInt8) MinMax( nSumG / nDivisor, 0, 255 ),
+ (sal_uInt8) MinMax( nSumB / nDivisor, 0, 255 ) ) );
}
if( ++nY < nHeight )
@@ -225,15 +225,15 @@ BOOL Bitmap::ImplConvolute3( const long* pMatrix, long nDivisor,
}
delete[] pKoeff;
- delete[] (BYTE*) pColRow1;
- delete[] (BYTE*) pColRow2;
- delete[] (BYTE*) pColRow3;
+ delete[] (sal_uInt8*) pColRow1;
+ delete[] (sal_uInt8*) pColRow2;
+ delete[] (sal_uInt8*) pColRow3;
delete[] pColm;
delete[] pRows;
aNewBmp.ReleaseAccess( pWriteAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
ReleaseAccess( pReadAcc );
@@ -255,10 +255,10 @@ BOOL Bitmap::ImplConvolute3( const long* pMatrix, long nDivisor,
// -----------------------------------------------------------------------------
-BOOL Bitmap::ImplMedianFilter( const BmpFilterParam* /*pFilterParam*/, const Link* /*pProgress*/ )
+sal_Bool Bitmap::ImplMedianFilter( const BmpFilterParam* /*pFilterParam*/, const Link* /*pProgress*/ )
{
BitmapReadAccess* pReadAcc = AcquireReadAccess();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pReadAcc )
{
@@ -271,9 +271,9 @@ BOOL Bitmap::ImplMedianFilter( const BmpFilterParam* /*pFilterParam*/, const Lin
const long nHeight = pWriteAcc->Height(), nHeight2 = nHeight + 2;
long* pColm = new long[ nWidth2 ];
long* pRows = new long[ nHeight2 ];
- BitmapColor* pColRow1 = (BitmapColor*) new BYTE[ sizeof( BitmapColor ) * nWidth2 ];
- BitmapColor* pColRow2 = (BitmapColor*) new BYTE[ sizeof( BitmapColor ) * nWidth2 ];
- BitmapColor* pColRow3 = (BitmapColor*) new BYTE[ sizeof( BitmapColor ) * nWidth2 ];
+ BitmapColor* pColRow1 = (BitmapColor*) new sal_uInt8[ sizeof( BitmapColor ) * nWidth2 ];
+ BitmapColor* pColRow2 = (BitmapColor*) new sal_uInt8[ sizeof( BitmapColor ) * nWidth2 ];
+ BitmapColor* pColRow3 = (BitmapColor*) new sal_uInt8[ sizeof( BitmapColor ) * nWidth2 ];
BitmapColor* pRowTmp1 = pColRow1;
BitmapColor* pRowTmp2 = pColRow2;
BitmapColor* pRowTmp3 = pColRow3;
@@ -339,7 +339,7 @@ BOOL Bitmap::ImplMedianFilter( const BmpFilterParam* /*pFilterParam*/, const Lin
MNMX3( nB9, nB2, nB3 );
// set destination color
- pWriteAcc->SetPixel( nY, nX, BitmapColor( (BYTE) nR2, (BYTE) nG2, (BYTE) nB2 ) );
+ pWriteAcc->SetPixel( nY, nX, BitmapColor( (sal_uInt8) nR2, (sal_uInt8) nG2, (sal_uInt8) nB2 ) );
}
if( ++nY < nHeight )
@@ -356,15 +356,15 @@ BOOL Bitmap::ImplMedianFilter( const BmpFilterParam* /*pFilterParam*/, const Lin
}
}
- delete[] (BYTE*) pColRow1;
- delete[] (BYTE*) pColRow2;
- delete[] (BYTE*) pColRow3;
+ delete[] (sal_uInt8*) pColRow1;
+ delete[] (sal_uInt8*) pColRow2;
+ delete[] (sal_uInt8*) pColRow3;
delete[] pColm;
delete[] pRows;
aNewBmp.ReleaseAccess( pWriteAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
ReleaseAccess( pReadAcc );
@@ -386,13 +386,13 @@ BOOL Bitmap::ImplMedianFilter( const BmpFilterParam* /*pFilterParam*/, const Lin
// -----------------------------------------------------------------------------
-BOOL Bitmap::ImplSobelGrey( const BmpFilterParam* /*pFilterParam*/, const Link* /*pProgress*/ )
+sal_Bool Bitmap::ImplSobelGrey( const BmpFilterParam* /*pFilterParam*/, const Link* /*pProgress*/ )
{
- BOOL bRet = ImplMakeGreyscales( 256 );
+ sal_Bool bRet = ImplMakeGreyscales( 256 );
if( bRet )
{
- bRet = FALSE;
+ bRet = sal_False;
BitmapReadAccess* pReadAcc = AcquireReadAccess();
@@ -403,7 +403,7 @@ BOOL Bitmap::ImplSobelGrey( const BmpFilterParam* /*pFilterParam*/, const Link*
if( pWriteAcc )
{
- BitmapColor aGrey( (BYTE) 0 );
+ BitmapColor aGrey( (sal_uInt8) 0 );
const long nWidth = pWriteAcc->Width();
const long nHeight = pWriteAcc->Height();
const long nMask111 = -1, nMask121 = 0, nMask131 = 1;
@@ -474,7 +474,7 @@ BOOL Bitmap::ImplSobelGrey( const BmpFilterParam* /*pFilterParam*/, const Link*
nSum2 += nMask332 * nGrey33;
nSum1 = (long) sqrt( (double)( nSum1 * nSum1 + nSum2 * nSum2 ) );
- aGrey.SetIndex( ~(BYTE) VOS_BOUND( nSum1, 0, 255 ) );
+ aGrey.SetIndex( ~(sal_uInt8) VOS_BOUND( nSum1, 0, 255 ) );
pWriteAcc->SetPixel( nY, nX, aGrey );
if( nX < ( nWidth - 1 ) )
@@ -491,7 +491,7 @@ BOOL Bitmap::ImplSobelGrey( const BmpFilterParam* /*pFilterParam*/, const Link*
delete[] pHMap;
delete[] pVMap;
aNewBmp.ReleaseAccess( pWriteAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
ReleaseAccess( pReadAcc );
@@ -514,13 +514,13 @@ BOOL Bitmap::ImplSobelGrey( const BmpFilterParam* /*pFilterParam*/, const Link*
// -----------------------------------------------------------------------------
-BOOL Bitmap::ImplEmbossGrey( const BmpFilterParam* pFilterParam, const Link* /*pProgress*/ )
+sal_Bool Bitmap::ImplEmbossGrey( const BmpFilterParam* pFilterParam, const Link* /*pProgress*/ )
{
- BOOL bRet = ImplMakeGreyscales( 256 );
+ sal_Bool bRet = ImplMakeGreyscales( 256 );
if( bRet )
{
- bRet = FALSE;
+ bRet = sal_False;
BitmapReadAccess* pReadAcc = AcquireReadAccess();
@@ -531,7 +531,7 @@ BOOL Bitmap::ImplEmbossGrey( const BmpFilterParam* pFilterParam, const Link* /*p
if( pWriteAcc )
{
- BitmapColor aGrey( (BYTE) 0 );
+ BitmapColor aGrey( (sal_uInt8) 0 );
const long nWidth = pWriteAcc->Width();
const long nHeight = pWriteAcc->Height();
long nGrey11, nGrey12, nGrey13;
@@ -549,7 +549,7 @@ BOOL Bitmap::ImplEmbossGrey( const BmpFilterParam* pFilterParam, const Link* /*p
const long nLz = FRound( sin( fElev ) * 255.0 );
const long nZ2 = ( ( 6 * 255 ) / 4 ) * ( ( 6 * 255 ) / 4 );
const long nNzLz = ( ( 6 * 255 ) / 4 ) * nLz;
- const BYTE cLz = (BYTE) VOS_BOUND( nLz, 0, 255 );
+ const sal_uInt8 cLz = (sal_uInt8) VOS_BOUND( nLz, 0, 255 );
// fill mapping tables
pHMap[ 0 ] = 0;
@@ -586,7 +586,7 @@ BOOL Bitmap::ImplEmbossGrey( const BmpFilterParam* pFilterParam, const Link* /*p
else
{
const double fGrey = nDotL / sqrt( (double)(nNx * nNx + nNy * nNy + nZ2) );
- aGrey.SetIndex( (BYTE) VOS_BOUND( fGrey, 0, 255 ) );
+ aGrey.SetIndex( (sal_uInt8) VOS_BOUND( fGrey, 0, 255 ) );
}
pWriteAcc->SetPixel( nY, nX, aGrey );
@@ -605,7 +605,7 @@ BOOL Bitmap::ImplEmbossGrey( const BmpFilterParam* pFilterParam, const Link* /*p
delete[] pHMap;
delete[] pVMap;
aNewBmp.ReleaseAccess( pWriteAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
ReleaseAccess( pReadAcc );
@@ -628,21 +628,21 @@ BOOL Bitmap::ImplEmbossGrey( const BmpFilterParam* pFilterParam, const Link* /*p
// -----------------------------------------------------------------------------
-BOOL Bitmap::ImplSolarize( const BmpFilterParam* pFilterParam, const Link* /*pProgress*/ )
+sal_Bool Bitmap::ImplSolarize( const BmpFilterParam* pFilterParam, const Link* /*pProgress*/ )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
BitmapWriteAccess* pWriteAcc = AcquireWriteAccess();
if( pWriteAcc )
{
- const BYTE cThreshold = ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_SOLARIZE ) ?
+ const sal_uInt8 cThreshold = ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_SOLARIZE ) ?
pFilterParam->mcSolarGreyThreshold : 128;
if( pWriteAcc->HasPalette() )
{
const BitmapPalette& rPal = pWriteAcc->GetPalette();
- for( USHORT i = 0, nCount = rPal.GetEntryCount(); i < nCount; i++ )
+ for( sal_uInt16 i = 0, nCount = rPal.GetEntryCount(); i < nCount; i++ )
{
if( rPal[ i ].GetLuminance() >= cThreshold )
{
@@ -670,7 +670,7 @@ BOOL Bitmap::ImplSolarize( const BmpFilterParam* pFilterParam, const Link* /*pPr
}
ReleaseAccess( pWriteAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -678,10 +678,10 @@ BOOL Bitmap::ImplSolarize( const BmpFilterParam* pFilterParam, const Link* /*pPr
// -----------------------------------------------------------------------------
-BOOL Bitmap::ImplSepia( const BmpFilterParam* pFilterParam, const Link* /*pProgress*/ )
+sal_Bool Bitmap::ImplSepia( const BmpFilterParam* pFilterParam, const Link* /*pProgress*/ )
{
BitmapReadAccess* pReadAcc = AcquireReadAccess();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pReadAcc )
{
@@ -692,12 +692,12 @@ BOOL Bitmap::ImplSepia( const BmpFilterParam* pFilterParam, const Link* /*pProgr
DBG_ASSERT( nSepiaPercent <= 100, "Bitmap::ImplSepia(): sepia value out of range; defaulting to 100%" );
- for( USHORT i = 0; i < 256; i++ )
+ for( sal_uInt16 i = 0; i < 256; i++ )
{
BitmapColor& rCol = aSepiaPal[ i ];
- const BYTE cSepiaValue = (BYTE) ( ( nSepia * i ) / 10000 );
+ const sal_uInt8 cSepiaValue = (sal_uInt8) ( ( nSepia * i ) / 10000 );
- rCol.SetRed( (BYTE) i );
+ rCol.SetRed( (sal_uInt8) i );
rCol.SetGreen( cSepiaValue );
rCol.SetBlue( cSepiaValue );
}
@@ -707,7 +707,7 @@ BOOL Bitmap::ImplSepia( const BmpFilterParam* pFilterParam, const Link* /*pProgr
if( pWriteAcc )
{
- BitmapColor aCol( (BYTE) 0 );
+ BitmapColor aCol( (sal_uInt8) 0 );
const long nWidth = pWriteAcc->Width();
const long nHeight = pWriteAcc->Height();
@@ -715,10 +715,10 @@ BOOL Bitmap::ImplSepia( const BmpFilterParam* pFilterParam, const Link* /*pProgr
{
for( long nY = 0; nY < nHeight ; nY++ )
{
- const USHORT nPalCount = pReadAcc->GetPaletteEntryCount();
- BYTE* pIndexMap = new BYTE[ nPalCount ];
+ const sal_uInt16 nPalCount = pReadAcc->GetPaletteEntryCount();
+ sal_uInt8* pIndexMap = new sal_uInt8[ nPalCount ];
- for( USHORT i = 0; i < nPalCount; i++ )
+ for( sal_uInt16 i = 0; i < nPalCount; i++ )
pIndexMap[ i ] = pReadAcc->GetPaletteColor( i ).GetLuminance();
for( long nX = 0; nX < nWidth; nX++ )
@@ -743,7 +743,7 @@ BOOL Bitmap::ImplSepia( const BmpFilterParam* pFilterParam, const Link* /*pProgr
}
aNewBmp.ReleaseAccess( pWriteAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
ReleaseAccess( pReadAcc );
@@ -765,13 +765,13 @@ BOOL Bitmap::ImplSepia( const BmpFilterParam* pFilterParam, const Link* /*pProgr
// -----------------------------------------------------------------------------
-BOOL Bitmap::ImplMosaic( const BmpFilterParam* pFilterParam, const Link* /*pProgress*/ )
+sal_Bool Bitmap::ImplMosaic( const BmpFilterParam* pFilterParam, const Link* /*pProgress*/ )
{
- ULONG nTileWidth = ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_MOSAIC ) ?
+ sal_uIntPtr nTileWidth = ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_MOSAIC ) ?
pFilterParam->maMosaicTileSize.mnTileWidth : 4;
- ULONG nTileHeight = ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_MOSAIC ) ?
+ sal_uIntPtr nTileHeight = ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_MOSAIC ) ?
pFilterParam->maMosaicTileSize.mnTileHeight : 4;
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !nTileWidth )
nTileWidth = 1;
@@ -834,9 +834,9 @@ BOOL Bitmap::ImplMosaic( const BmpFilterParam* pFilterParam, const Link* /*pProg
}
}
- aCol.SetRed( (BYTE) ( nSumR * fArea_1 ) );
- aCol.SetGreen( (BYTE) ( nSumG * fArea_1 ) );
- aCol.SetBlue( (BYTE) ( nSumB * fArea_1 ) );
+ aCol.SetRed( (sal_uInt8) ( nSumR * fArea_1 ) );
+ aCol.SetGreen( (sal_uInt8) ( nSumG * fArea_1 ) );
+ aCol.SetBlue( (sal_uInt8) ( nSumB * fArea_1 ) );
for( nY = nY1; nY <= nY2; nY++ )
for( nX = nX1; nX <= nX2; nX++ )
@@ -860,16 +860,16 @@ BOOL Bitmap::ImplMosaic( const BmpFilterParam* pFilterParam, const Link* /*pProg
{
for( nX = nX1; nX <= nX2; nX++ )
{
- const BitmapColor& rCol = pReadAcc->GetPaletteColor( (BYTE) pReadAcc->GetPixel( nY, nX ) );
+ const BitmapColor& rCol = pReadAcc->GetPaletteColor( (sal_uInt8) pReadAcc->GetPixel( nY, nX ) );
nSumR += rCol.GetRed();
nSumG += rCol.GetGreen();
nSumB += rCol.GetBlue();
}
}
- aCol.SetRed( (BYTE) ( nSumR * fArea_1 ) );
- aCol.SetGreen( (BYTE) ( nSumG * fArea_1 ) );
- aCol.SetBlue( (BYTE) ( nSumB * fArea_1 ) );
+ aCol.SetRed( (sal_uInt8) ( nSumR * fArea_1 ) );
+ aCol.SetGreen( (sal_uInt8) ( nSumG * fArea_1 ) );
+ aCol.SetBlue( (sal_uInt8) ( nSumB * fArea_1 ) );
for( nY = nY1; nY <= nY2; nY++ )
for( nX = nX1; nX <= nX2; nX++ )
@@ -893,7 +893,7 @@ BOOL Bitmap::ImplMosaic( const BmpFilterParam* pFilterParam, const Link* /*pProg
}
while( nY1 < nHeight );
- bRet = TRUE;
+ bRet = sal_True;
}
ReleaseAccess( pReadAcc );
@@ -917,7 +917,7 @@ BOOL Bitmap::ImplMosaic( const BmpFilterParam* pFilterParam, const Link* /*pProg
}
}
else
- bRet = TRUE;
+ bRet = sal_True;
return bRet;
}
@@ -948,13 +948,13 @@ extern "C" int __LOADONCALLAPI ImplPopArtCmpFnc( const void* p1, const void* p2
// ------------------------------------------------------------------------
-BOOL Bitmap::ImplPopArt( const BmpFilterParam* /*pFilterParam*/, const Link* /*pProgress*/ )
+sal_Bool Bitmap::ImplPopArt( const BmpFilterParam* /*pFilterParam*/, const Link* /*pProgress*/ )
{
- BOOL bRet = ( GetBitCount() > 8 ) ? Convert( BMP_CONVERSION_8BIT_COLORS ) : TRUE;
+ sal_Bool bRet = ( GetBitCount() > 8 ) ? Convert( BMP_CONVERSION_8BIT_COLORS ) : sal_True;
if( bRet )
{
- bRet = FALSE;
+ bRet = sal_False;
BitmapWriteAccess* pWriteAcc = AcquireWriteAccess();
@@ -962,8 +962,8 @@ BOOL Bitmap::ImplPopArt( const BmpFilterParam* /*pFilterParam*/, const Link* /*p
{
const long nWidth = pWriteAcc->Width();
const long nHeight = pWriteAcc->Height();
- const ULONG nEntryCount = 1 << pWriteAcc->GetBitCount();
- ULONG n;
+ const sal_uIntPtr nEntryCount = 1 << pWriteAcc->GetBitCount();
+ sal_uIntPtr n;
PopArtEntry* pPopArtTable = new PopArtEntry[ nEntryCount ];
for( n = 0; n < nEntryCount; n++ )
@@ -982,26 +982,26 @@ BOOL Bitmap::ImplPopArt( const BmpFilterParam* /*pFilterParam*/, const Link* /*p
qsort( pPopArtTable, nEntryCount, sizeof( PopArtEntry ), ImplPopArtCmpFnc );
// get last used entry
- ULONG nFirstEntry;
- ULONG nLastEntry = 0;
+ sal_uIntPtr nFirstEntry;
+ sal_uIntPtr nLastEntry = 0;
for( n = 0; n < nEntryCount; n++ )
if( pPopArtTable[ n ].mnCount )
nLastEntry = n;
// rotate palette (one entry)
- const BitmapColor aFirstCol( pWriteAcc->GetPaletteColor( sal::static_int_cast<USHORT>(pPopArtTable[ 0 ].mnIndex) ) );
+ const BitmapColor aFirstCol( pWriteAcc->GetPaletteColor( sal::static_int_cast<sal_uInt16>(pPopArtTable[ 0 ].mnIndex) ) );
for( nFirstEntry = 0; nFirstEntry < nLastEntry; nFirstEntry++ )
{
- pWriteAcc->SetPaletteColor( sal::static_int_cast<USHORT>(pPopArtTable[ nFirstEntry ].mnIndex),
- pWriteAcc->GetPaletteColor( sal::static_int_cast<USHORT>(pPopArtTable[ nFirstEntry + 1 ].mnIndex) ) );
+ pWriteAcc->SetPaletteColor( sal::static_int_cast<sal_uInt16>(pPopArtTable[ nFirstEntry ].mnIndex),
+ pWriteAcc->GetPaletteColor( sal::static_int_cast<sal_uInt16>(pPopArtTable[ nFirstEntry + 1 ].mnIndex) ) );
}
- pWriteAcc->SetPaletteColor( sal::static_int_cast<USHORT>(pPopArtTable[ nLastEntry ].mnIndex), aFirstCol );
+ pWriteAcc->SetPaletteColor( sal::static_int_cast<sal_uInt16>(pPopArtTable[ nLastEntry ].mnIndex), aFirstCol );
// cleanup
delete[] pPopArtTable;
ReleaseAccess( pWriteAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
}
diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx
index 38402af626c2..efcfb46c6dc8 100644
--- a/vcl/source/gdi/bitmapex.cxx
+++ b/vcl/source/gdi/bitmapex.cxx
@@ -52,7 +52,7 @@
BitmapEx::BitmapEx() :
eTransparent( TRANSPARENT_NONE ),
- bAlpha ( FALSE )
+ bAlpha ( sal_False )
{
}
@@ -70,7 +70,7 @@ BitmapEx::BitmapEx( const BitmapEx& rBitmapEx ) :
BitmapEx::BitmapEx( const BitmapEx& rBitmapEx, Point aSrc, Size aSize ) :
eTransparent( TRANSPARENT_NONE ),
- bAlpha ( FALSE )
+ bAlpha ( sal_False )
{
if( rBitmapEx.IsEmpty() )
return;
@@ -79,7 +79,7 @@ BitmapEx::BitmapEx( const BitmapEx& rBitmapEx, Point aSrc, Size aSize ) :
aBitmapSize = aSize;
if( rBitmapEx.IsAlpha() )
{
- bAlpha = TRUE;
+ bAlpha = sal_True;
aMask = AlphaMask( aSize ).ImplGetBitmap();
}
else if( rBitmapEx.IsTransparent() )
@@ -94,7 +94,7 @@ BitmapEx::BitmapEx( const BitmapEx& rBitmapEx, Point aSrc, Size aSize ) :
BitmapEx::BitmapEx( const ResId& rResId ) :
eTransparent( TRANSPARENT_NONE ),
- bAlpha ( FALSE )
+ bAlpha ( sal_False )
{
static ImplImageTreeSingletonRef aImageTree;
ResMgr* pResMgr = NULL;
@@ -121,7 +121,7 @@ BitmapEx::BitmapEx( const Bitmap& rBmp ) :
aBitmap ( rBmp ),
aBitmapSize ( aBitmap.GetSizePixel() ),
eTransparent( TRANSPARENT_NONE ),
- bAlpha ( FALSE )
+ bAlpha ( sal_False )
{
}
@@ -132,7 +132,7 @@ BitmapEx::BitmapEx( const Bitmap& rBmp, const Bitmap& rMask ) :
aMask ( rMask ),
aBitmapSize ( aBitmap.GetSizePixel() ),
eTransparent ( !rMask ? TRANSPARENT_NONE : TRANSPARENT_BITMAP ),
- bAlpha ( FALSE )
+ bAlpha ( sal_False )
{
DBG_ASSERT( !rMask || rBmp.GetSizePixel() == rMask.GetSizePixel(),
"BitmapEx::BitmapEx(): size mismatch for bitmap and mask." );
@@ -152,7 +152,7 @@ BitmapEx::BitmapEx( const Bitmap& rBmp, const AlphaMask& rAlphaMask ) :
aMask ( rAlphaMask.ImplGetBitmap() ),
aBitmapSize ( aBitmap.GetSizePixel() ),
eTransparent ( !rAlphaMask ? TRANSPARENT_NONE : TRANSPARENT_BITMAP ),
- bAlpha ( !rAlphaMask ? FALSE : TRUE )
+ bAlpha ( !rAlphaMask ? sal_False : sal_True )
{
DBG_ASSERT( !rAlphaMask || rBmp.GetSizePixel() == rAlphaMask.GetSizePixel(),
"BitmapEx::BitmapEx(): size mismatch for bitmap and alpha mask." );
@@ -171,7 +171,7 @@ BitmapEx::BitmapEx( const Bitmap& rBmp, const Color& rTransparentColor ) :
aBitmapSize ( aBitmap.GetSizePixel() ),
aTransparentColor ( rTransparentColor ),
eTransparent ( TRANSPARENT_BITMAP ),
- bAlpha ( FALSE )
+ bAlpha ( sal_False )
{
aMask = aBitmap.CreateMask( aTransparentColor );
@@ -206,19 +206,19 @@ BitmapEx& BitmapEx::operator=( const BitmapEx& rBitmapEx )
// ------------------------------------------------------------------
-BOOL BitmapEx::operator==( const BitmapEx& rBitmapEx ) const
+sal_Bool BitmapEx::operator==( const BitmapEx& rBitmapEx ) const
{
if( eTransparent != rBitmapEx.eTransparent )
- return FALSE;
+ return sal_False;
if( aBitmap != rBitmapEx.aBitmap )
- return FALSE;
+ return sal_False;
if( aBitmapSize != rBitmapEx.aBitmapSize )
- return FALSE;
+ return sal_False;
if( eTransparent == TRANSPARENT_NONE )
- return TRUE;
+ return sal_True;
if( eTransparent == TRANSPARENT_COLOR )
return aTransparentColor == rBitmapEx.aTransparentColor;
@@ -228,7 +228,7 @@ BOOL BitmapEx::operator==( const BitmapEx& rBitmapEx ) const
// ------------------------------------------------------------------
-BOOL BitmapEx::IsEqual( const BitmapEx& rBmpEx ) const
+sal_Bool BitmapEx::IsEqual( const BitmapEx& rBmpEx ) const
{
return( rBmpEx.eTransparent == eTransparent &&
rBmpEx.bAlpha == bAlpha &&
@@ -238,7 +238,7 @@ BOOL BitmapEx::IsEqual( const BitmapEx& rBmpEx ) const
// ------------------------------------------------------------------
-BOOL BitmapEx::IsEmpty() const
+sal_Bool BitmapEx::IsEmpty() const
{
return( aBitmap.IsEmpty() && aMask.IsEmpty() );
}
@@ -250,7 +250,7 @@ void BitmapEx::SetEmpty()
aBitmap.SetEmpty();
aMask.SetEmpty();
eTransparent = TRANSPARENT_NONE;
- bAlpha = FALSE;
+ bAlpha = sal_False;
}
// ------------------------------------------------------------------
@@ -262,14 +262,14 @@ void BitmapEx::Clear()
// ------------------------------------------------------------------
-BOOL BitmapEx::IsTransparent() const
+sal_Bool BitmapEx::IsTransparent() const
{
return( eTransparent != TRANSPARENT_NONE );
}
// ------------------------------------------------------------------
-BOOL BitmapEx::IsAlpha() const
+sal_Bool BitmapEx::IsAlpha() const
{
return( IsTransparent() && bAlpha );
}
@@ -356,9 +356,9 @@ AlphaMask BitmapEx::GetAlpha() const
// ------------------------------------------------------------------
-ULONG BitmapEx::GetSizeBytes() const
+sal_uIntPtr BitmapEx::GetSizeBytes() const
{
- ULONG nSizeBytes = aBitmap.GetSizeBytes();
+ sal_uIntPtr nSizeBytes = aBitmap.GetSizeBytes();
if( eTransparent == TRANSPARENT_BITMAP )
nSizeBytes += aMask.GetSizeBytes();
@@ -368,7 +368,7 @@ ULONG BitmapEx::GetSizeBytes() const
// ------------------------------------------------------------------
-ULONG BitmapEx::GetChecksum() const
+sal_uIntPtr BitmapEx::GetChecksum() const
{
sal_uInt32 nCrc = aBitmap.GetChecksum();
SVBT32 aBT32;
@@ -397,9 +397,9 @@ void BitmapEx::SetSizePixel( const Size& rNewSize )
// ------------------------------------------------------------------
-BOOL BitmapEx::Invert()
+sal_Bool BitmapEx::Invert()
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !!aBitmap )
{
@@ -414,9 +414,9 @@ BOOL BitmapEx::Invert()
// ------------------------------------------------------------------
-BOOL BitmapEx::Mirror( ULONG nMirrorFlags )
+sal_Bool BitmapEx::Mirror( sal_uIntPtr nMirrorFlags )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !!aBitmap )
{
@@ -431,9 +431,9 @@ BOOL BitmapEx::Mirror( ULONG nMirrorFlags )
// ------------------------------------------------------------------
-BOOL BitmapEx::Scale( const double& rScaleX, const double& rScaleY, ULONG nScaleFlag )
+sal_Bool BitmapEx::Scale( const double& rScaleX, const double& rScaleY, sal_uIntPtr nScaleFlag )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !!aBitmap )
{
@@ -453,9 +453,9 @@ BOOL BitmapEx::Scale( const double& rScaleX, const double& rScaleY, ULONG nScale
// ------------------------------------------------------------------------
-BOOL BitmapEx::Scale( const Size& rNewSize, ULONG nScaleFlag )
+sal_Bool BitmapEx::Scale( const Size& rNewSize, sal_uIntPtr nScaleFlag )
{
- BOOL bRet;
+ sal_Bool bRet;
if( aBitmapSize.Width() && aBitmapSize.Height() )
{
@@ -464,20 +464,20 @@ BOOL BitmapEx::Scale( const Size& rNewSize, ULONG nScaleFlag )
nScaleFlag );
}
else
- bRet = TRUE;
+ bRet = sal_True;
return bRet;
}
// ------------------------------------------------------------------
-BOOL BitmapEx::Rotate( long nAngle10, const Color& rFillColor )
+sal_Bool BitmapEx::Rotate( long nAngle10, const Color& rFillColor )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !!aBitmap )
{
- const BOOL bTransRotate = ( Color( COL_TRANSPARENT ) == rFillColor );
+ const sal_Bool bTransRotate = ( Color( COL_TRANSPARENT ) == rFillColor );
if( bTransRotate )
{
@@ -517,9 +517,9 @@ BOOL BitmapEx::Rotate( long nAngle10, const Color& rFillColor )
// ------------------------------------------------------------------
-BOOL BitmapEx::Crop( const Rectangle& rRectPixel )
+sal_Bool BitmapEx::Crop( const Rectangle& rRectPixel )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !!aBitmap )
{
@@ -539,23 +539,23 @@ BOOL BitmapEx::Crop( const Rectangle& rRectPixel )
// ------------------------------------------------------------------
-BOOL BitmapEx::Convert( BmpConversion eConversion )
+sal_Bool BitmapEx::Convert( BmpConversion eConversion )
{
- return( !!aBitmap ? aBitmap.Convert( eConversion ) : FALSE );
+ return( !!aBitmap ? aBitmap.Convert( eConversion ) : sal_False );
}
// ------------------------------------------------------------------
-BOOL BitmapEx::ReduceColors( USHORT nNewColorCount, BmpReduce eReduce )
+sal_Bool BitmapEx::ReduceColors( sal_uInt16 nNewColorCount, BmpReduce eReduce )
{
- return( !!aBitmap ? aBitmap.ReduceColors( nNewColorCount, eReduce ) : FALSE );
+ return( !!aBitmap ? aBitmap.ReduceColors( nNewColorCount, eReduce ) : sal_False );
}
// ------------------------------------------------------------------
-BOOL BitmapEx::Expand( ULONG nDX, ULONG nDY, const Color* pInitColor, BOOL bExpandTransparent )
+sal_Bool BitmapEx::Expand( sal_uIntPtr nDX, sal_uIntPtr nDY, const Color* pInitColor, sal_Bool bExpandTransparent )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !!aBitmap )
{
@@ -578,10 +578,10 @@ BOOL BitmapEx::Expand( ULONG nDX, ULONG nDY, const Color* pInitColor, BOOL bExpa
// ------------------------------------------------------------------
-BOOL BitmapEx::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectSrc,
+sal_Bool BitmapEx::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectSrc,
const BitmapEx* pBmpExSrc )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !pBmpExSrc || pBmpExSrc->IsEmpty() )
{
@@ -612,7 +612,7 @@ BOOL BitmapEx::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectSrc,
aMask = pAlpha->ImplGetBitmap();
delete pAlpha;
- bAlpha = TRUE;
+ bAlpha = sal_True;
aMask.CopyPixel( rRectDst, rRectSrc, &pBmpExSrc->aMask );
}
else
@@ -623,7 +623,7 @@ BOOL BitmapEx::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectSrc,
aMask = pAlpha->ImplGetBitmap();
delete pAlpha;
eTransparent = TRANSPARENT_BITMAP;
- bAlpha = TRUE;
+ bAlpha = sal_True;
aMask.CopyPixel( rRectDst, rRectSrc, &pBmpExSrc->aMask );
}
}
@@ -667,9 +667,9 @@ BOOL BitmapEx::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectSrc,
// ------------------------------------------------------------------
-BOOL BitmapEx::Erase( const Color& rFillColor )
+sal_Bool BitmapEx::Erase( const Color& rFillColor )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !!aBitmap )
{
@@ -696,41 +696,41 @@ BOOL BitmapEx::Erase( const Color& rFillColor )
// ------------------------------------------------------------------
-BOOL BitmapEx::Dither( ULONG nDitherFlags )
+sal_Bool BitmapEx::Dither( sal_uIntPtr nDitherFlags )
{
- return( !!aBitmap ? aBitmap.Dither( nDitherFlags ) : FALSE );
+ return( !!aBitmap ? aBitmap.Dither( nDitherFlags ) : sal_False );
}
// ------------------------------------------------------------------
-BOOL BitmapEx::Replace( const Color& rSearchColor, const Color& rReplaceColor, ULONG nTol )
+sal_Bool BitmapEx::Replace( const Color& rSearchColor, const Color& rReplaceColor, sal_uIntPtr nTol )
{
- return( !!aBitmap ? aBitmap.Replace( rSearchColor, rReplaceColor, nTol ) : FALSE );
+ return( !!aBitmap ? aBitmap.Replace( rSearchColor, rReplaceColor, nTol ) : sal_False );
}
// ------------------------------------------------------------------
-BOOL BitmapEx::Replace( const Color* pSearchColors, const Color* pReplaceColors, ULONG nColorCount, const ULONG* pTols )
+sal_Bool BitmapEx::Replace( const Color* pSearchColors, const Color* pReplaceColors, sal_uIntPtr nColorCount, const sal_uIntPtr* pTols )
{
- return( !!aBitmap ? aBitmap.Replace( pSearchColors, pReplaceColors, nColorCount, (ULONG*) pTols ) : FALSE );
+ return( !!aBitmap ? aBitmap.Replace( pSearchColors, pReplaceColors, nColorCount, (sal_uIntPtr*) pTols ) : sal_False );
}
// ------------------------------------------------------------------
-BOOL BitmapEx::Adjust( short nLuminancePercent, short nContrastPercent,
+sal_Bool BitmapEx::Adjust( short nLuminancePercent, short nContrastPercent,
short nChannelRPercent, short nChannelGPercent, short nChannelBPercent,
- double fGamma, BOOL bInvert )
+ double fGamma, sal_Bool bInvert )
{
return( !!aBitmap ? aBitmap.Adjust( nLuminancePercent, nContrastPercent,
nChannelRPercent, nChannelGPercent, nChannelBPercent,
- fGamma, bInvert ) : FALSE );
+ fGamma, bInvert ) : sal_False );
}
// ------------------------------------------------------------------
-BOOL BitmapEx::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam, const Link* pProgress )
+sal_Bool BitmapEx::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam, const Link* pProgress )
{
- return( !!aBitmap ? aBitmap.Filter( eFilter, pFilterParam, pProgress ) : FALSE );
+ return( !!aBitmap ? aBitmap.Filter( eFilter, pFilterParam, pProgress ) : sal_False );
}
// ------------------------------------------------------------------
@@ -835,9 +835,9 @@ SvStream& operator<<( SvStream& rOStm, const BitmapEx& rBitmapEx )
{
rBitmapEx.aBitmap.Write( rOStm );
- rOStm << (UINT32) 0x25091962;
- rOStm << (UINT32) 0xACB20201;
- rOStm << (BYTE) rBitmapEx.eTransparent;
+ rOStm << (sal_uInt32) 0x25091962;
+ rOStm << (sal_uInt32) 0xACB20201;
+ rOStm << (sal_uInt8) rBitmapEx.eTransparent;
if( rBitmapEx.eTransparent == TRANSPARENT_BITMAP )
rBitmapEx.aMask.Write( rOStm );
@@ -857,9 +857,9 @@ SvStream& operator>>( SvStream& rIStm, BitmapEx& rBitmapEx )
if( !rIStm.GetError() )
{
- const ULONG nStmPos = rIStm.Tell();
- UINT32 nMagic1 = 0;
- UINT32 nMagic2 = 0;
+ const sal_uIntPtr nStmPos = rIStm.Tell();
+ sal_uInt32 nMagic1 = 0;
+ sal_uInt32 nMagic2 = 0;
rIStm >> nMagic1 >> nMagic2;
@@ -871,11 +871,11 @@ SvStream& operator>>( SvStream& rIStm, BitmapEx& rBitmapEx )
}
else
{
- BYTE bTransparent = false;
+ sal_uInt8 bTransparent = false;
rIStm >> bTransparent;
- if( bTransparent == (BYTE) TRANSPARENT_BITMAP )
+ if( bTransparent == (sal_uInt8) TRANSPARENT_BITMAP )
{
Bitmap aMask;
@@ -898,7 +898,7 @@ SvStream& operator>>( SvStream& rIStm, BitmapEx& rBitmapEx )
else
rBitmapEx = aBmp;
}
- else if( bTransparent == (BYTE) TRANSPARENT_COLOR )
+ else if( bTransparent == (sal_uInt8) TRANSPARENT_COLOR )
{
Color aTransparentColor;
diff --git a/vcl/source/gdi/bmpacc.cxx b/vcl/source/gdi/bmpacc.cxx
index c963ea32542e..94613d6264b2 100644
--- a/vcl/source/gdi/bmpacc.cxx
+++ b/vcl/source/gdi/bmpacc.cxx
@@ -37,7 +37,7 @@
// - BitmapReadAccess -
// --------------------
-BitmapReadAccess::BitmapReadAccess( Bitmap& rBitmap, BOOL bModify ) :
+BitmapReadAccess::BitmapReadAccess( Bitmap& rBitmap, sal_Bool bModify ) :
mpBuffer ( NULL ),
mpScanBuf ( NULL ),
mFncGetPixel ( NULL ),
@@ -54,7 +54,7 @@ BitmapReadAccess::BitmapReadAccess( Bitmap& rBitmap ) :
mpScanBuf ( NULL ),
mFncGetPixel ( NULL ),
mFncSetPixel ( NULL ),
- mbModify ( FALSE )
+ mbModify ( sal_False )
{
ImplCreate( rBitmap );
}
@@ -154,9 +154,9 @@ void BitmapReadAccess::ImplDestroy()
// ------------------------------------------------------------------
-BOOL BitmapReadAccess::ImplSetAccessPointers( ULONG nFormat )
+sal_Bool BitmapReadAccess::ImplSetAccessPointers( sal_uIntPtr nFormat )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
switch( nFormat )
{
@@ -178,7 +178,7 @@ BOOL BitmapReadAccess::ImplSetAccessPointers( ULONG nFormat )
CASE_FORMAT( _32BIT_TC_MASK )
default:
- bRet = FALSE;
+ bRet = sal_False;
break;
}
@@ -196,7 +196,7 @@ void BitmapReadAccess::ImplZeroInitUnusedBits()
sal_uInt32 nBits;
bool bMsb;
- const ULONG nScanlineFormat = GetScanlineFormat();
+ const sal_uIntPtr nScanlineFormat = GetScanlineFormat();
switch( nScanlineFormat )
{
case( BMP_FORMAT_1BIT_MSB_PAL ):
@@ -272,7 +272,7 @@ void BitmapReadAccess::ImplZeroInitUnusedBits()
else
nMask = static_cast<sal_uInt8>(0xffU >> (nLeftOverBits & 3UL));
- BYTE* pLastBytes = (BYTE*)GetBuffer() + ( nScanSize - nBytes );
+ sal_uInt8* pLastBytes = (sal_uInt8*)GetBuffer() + ( nScanSize - nBytes );
for( sal_uInt32 i = 0; i < nHeight; i++, pLastBytes += nScanSize )
{
*pLastBytes &= nMask;
@@ -284,7 +284,7 @@ void BitmapReadAccess::ImplZeroInitUnusedBits()
else if( nBits & 0x1f )
{
sal_uInt32 nMask = 0xffffffff << ( ( nScanSize << 3 ) - nBits );
- BYTE* pLast4Bytes = (BYTE*) GetBuffer() + ( nScanSize - 4 );
+ sal_uInt8* pLast4Bytes = (sal_uInt8*) GetBuffer() + ( nScanSize - 4 );
#ifdef OSL_LITENDIAN
nMask = SWAPLONG( nMask );
@@ -304,7 +304,7 @@ void BitmapReadAccess::Flush()
// ------------------------------------------------------------------
-void BitmapReadAccess::ReAccess( BOOL bModify )
+void BitmapReadAccess::ReAccess( sal_Bool bModify )
{
const ImpBitmap* pImpBmp = maBitmap.ImplGetImpBitmap();
@@ -320,7 +320,7 @@ void BitmapReadAccess::ReAccess( BOOL bModify )
// ------------------------------------------------------------------
-USHORT BitmapReadAccess::GetBestPaletteIndex( const BitmapColor& rBitmapColor ) const
+sal_uInt16 BitmapReadAccess::GetBestPaletteIndex( const BitmapColor& rBitmapColor ) const
{
return( HasPalette() ? mpBuffer->maPalette.GetBestIndex( rBitmapColor ) : 0 );
}
@@ -330,7 +330,7 @@ USHORT BitmapReadAccess::GetBestPaletteIndex( const BitmapColor& rBitmapColor )
// ---------------------
BitmapWriteAccess::BitmapWriteAccess( Bitmap& rBitmap ) :
- BitmapReadAccess( rBitmap, TRUE ),
+ BitmapReadAccess( rBitmap, sal_True ),
mpLineColor ( NULL ),
mpFillColor ( NULL )
{
@@ -366,16 +366,16 @@ void BitmapWriteAccess::CopyScanline( long nY, const BitmapReadAccess& rReadAcc
// ------------------------------------------------------------------
void BitmapWriteAccess::CopyScanline( long nY, ConstScanline aSrcScanline,
- ULONG nSrcScanlineFormat, ULONG nSrcScanlineSize )
+ sal_uIntPtr nSrcScanlineFormat, sal_uIntPtr nSrcScanlineSize )
{
- const ULONG nFormat = BMP_SCANLINE_FORMAT( nSrcScanlineFormat );
+ const sal_uIntPtr nFormat = BMP_SCANLINE_FORMAT( nSrcScanlineFormat );
DBG_ASSERT( ( nY >= 0 ) && ( nY < mpBuffer->mnHeight ), "y-coordinate in destination out of range!" );
DBG_ASSERT( ( HasPalette() && nFormat <= BMP_FORMAT_8BIT_PAL ) ||
( !HasPalette() && nFormat > BMP_FORMAT_8BIT_PAL ),
"No copying possible between palette and non palette scanlines!" );
- const ULONG nCount = Min( GetScanlineSize(), nSrcScanlineSize );
+ const sal_uIntPtr nCount = Min( GetScanlineSize(), nSrcScanlineSize );
if( nCount )
{
@@ -437,7 +437,7 @@ void BitmapWriteAccess::CopyBuffer( const BitmapReadAccess& rReadAcc )
( GetScanlineSize() == rReadAcc.GetScanlineSize() ) )
{
const long nHeight = Min( mpBuffer->mnHeight, rReadAcc.Height() );
- const ULONG nCount = nHeight * mpBuffer->mnScanlineSize;
+ const sal_uIntPtr nCount = nHeight * mpBuffer->mnScanlineSize;
memcpy( mpBuffer->mpBits, rReadAcc.GetBuffer(), nCount );
}
diff --git a/vcl/source/gdi/bmpacc2.cxx b/vcl/source/gdi/bmpacc2.cxx
index 436c165d3bb5..ae0eade2381b 100644
--- a/vcl/source/gdi/bmpacc2.cxx
+++ b/vcl/source/gdi/bmpacc2.cxx
@@ -43,7 +43,7 @@ IMPL_FORMAT_GETPIXEL_NOMASK( _1BIT_MSB_PAL )
IMPL_FORMAT_SETPIXEL_NOMASK( _1BIT_MSB_PAL )
{
- BYTE& rByte = pScanline[ nX >> 3 ];
+ sal_uInt8& rByte = pScanline[ nX >> 3 ];
( rBitmapColor.GetIndex() & 1 ) ? ( rByte |= 1 << ( 7 - ( nX & 7 ) ) ) :
( rByte &= ~( 1 << ( 7 - ( nX & 7 ) ) ) );
@@ -60,7 +60,7 @@ IMPL_FORMAT_GETPIXEL_NOMASK( _1BIT_LSB_PAL )
IMPL_FORMAT_SETPIXEL_NOMASK( _1BIT_LSB_PAL )
{
- BYTE& rByte = pScanline[ nX >> 3 ];
+ sal_uInt8& rByte = pScanline[ nX >> 3 ];
( rBitmapColor.GetIndex() & 1 ) ? ( rByte |= 1 << ( nX & 7 ) ) :
( rByte &= ~( 1 << ( nX & 7 ) ) );
@@ -77,7 +77,7 @@ IMPL_FORMAT_GETPIXEL_NOMASK( _4BIT_MSN_PAL )
IMPL_FORMAT_SETPIXEL_NOMASK( _4BIT_MSN_PAL )
{
- BYTE& rByte = pScanline[ nX >> 1 ];
+ sal_uInt8& rByte = pScanline[ nX >> 1 ];
( nX & 1 ) ? ( rByte &= 0xf0, rByte |= ( rBitmapColor.GetIndex() & 0x0f ) ) :
( rByte &= 0x0f, rByte |= ( rBitmapColor.GetIndex() << 4 ) );
@@ -94,7 +94,7 @@ IMPL_FORMAT_GETPIXEL_NOMASK( _4BIT_LSN_PAL )
IMPL_FORMAT_SETPIXEL_NOMASK( _4BIT_LSN_PAL )
{
- BYTE& rByte = pScanline[ nX >> 1 ];
+ sal_uInt8& rByte = pScanline[ nX >> 1 ];
( nX & 1 ) ? ( rByte &= 0x0f, rByte |= ( rBitmapColor.GetIndex() << 4 ) ) :
( rByte &= 0xf0, rByte |= ( rBitmapColor.GetIndex() & 0x0f ) );
diff --git a/vcl/source/gdi/bmpacc3.cxx b/vcl/source/gdi/bmpacc3.cxx
index a89015d12351..ac2e09df832f 100644
--- a/vcl/source/gdi/bmpacc3.cxx
+++ b/vcl/source/gdi/bmpacc3.cxx
@@ -53,7 +53,7 @@ void BitmapWriteAccess::SetLineColor( const Color& rColor )
if( rColor.GetTransparency() == 255 )
mpLineColor = NULL;
else
- mpLineColor = ( HasPalette() ? new BitmapColor( (BYTE) GetBestPaletteIndex( rColor ) ) : new BitmapColor( rColor ) );
+ mpLineColor = ( HasPalette() ? new BitmapColor( (sal_uInt8) GetBestPaletteIndex( rColor ) ) : new BitmapColor( rColor ) );
}
// ------------------------------------------------------------------
@@ -87,7 +87,7 @@ void BitmapWriteAccess::SetFillColor( const Color& rColor )
if( rColor.GetTransparency() == 255 )
mpFillColor = NULL;
else
- mpFillColor = ( HasPalette() ? new BitmapColor( (BYTE) GetBestPaletteIndex( rColor ) ) : new BitmapColor( rColor ) );
+ mpFillColor = ( HasPalette() ? new BitmapColor( (sal_uInt8) GetBestPaletteIndex( rColor ) ) : new BitmapColor( rColor ) );
}
// ------------------------------------------------------------------
@@ -112,7 +112,7 @@ void BitmapWriteAccess::Erase( const Color& rColor )
// TODO: provide and use Erase( BitmapColor& method)
BitmapColor aColor = rColor;
if( HasPalette() )
- aColor = BitmapColor( (BYTE)GetBestPaletteIndex( rColor) );
+ aColor = BitmapColor( (sal_uInt8)GetBestPaletteIndex( rColor) );
// try fast bitmap method first
if( ImplFastEraseBitmap( *mpBuffer, aColor ) )
return;
@@ -204,7 +204,7 @@ void BitmapWriteAccess::DrawLine( const Point& rStart, const Point& rEnd )
const long nDYX = ( nDY - nDX ) << 1;
const long nDY2 = nDY << 1;
long nD = nDY2 - nDX;
- BOOL bPos = nY1 < nY2;
+ sal_Bool bPos = nY1 < nY2;
for ( nX = nX1, nY = nY1; nX <= nX2; nX++ )
{
@@ -243,7 +243,7 @@ void BitmapWriteAccess::DrawLine( const Point& rStart, const Point& rEnd )
const long nDYX = ( nDX - nDY ) << 1;
const long nDY2 = nDX << 1;
long nD = nDY2 - nDY;
- BOOL bPos = nX1 < nX2;
+ sal_Bool bPos = nX1 < nX2;
for ( nX = nX1, nY = nY1; nY <= nY2; nY++ )
{
@@ -312,7 +312,7 @@ void BitmapWriteAccess::DrawRect( const Rectangle& rRect )
void BitmapWriteAccess::FillPolygon( const Polygon& rPoly )
{
- const USHORT nSize = rPoly.GetSize();
+ const sal_uInt16 nSize = rPoly.GetSize();
if( nSize && mpFillColor )
{
@@ -345,9 +345,9 @@ void BitmapWriteAccess::DrawPolygon( const Polygon& rPoly )
if( mpLineColor && ( !mpFillColor || ( *mpFillColor != *mpLineColor ) ) )
{
- const USHORT nSize = rPoly.GetSize();
+ const sal_uInt16 nSize = rPoly.GetSize();
- for( USHORT i = 0, nSize1 = nSize - 1; i < nSize1; i++ )
+ for( sal_uInt16 i = 0, nSize1 = nSize - 1; i < nSize1; i++ )
DrawLine( rPoly[ i ], rPoly[ i + 1 ] );
if( rPoly[ nSize - 1 ] != rPoly[ 0 ] )
@@ -359,7 +359,7 @@ void BitmapWriteAccess::DrawPolygon( const Polygon& rPoly )
void BitmapWriteAccess::FillPolyPolygon( const PolyPolygon& rPolyPoly )
{
- const USHORT nCount = rPolyPoly.Count();
+ const sal_uInt16 nCount = rPolyPoly.Count();
if( nCount && mpFillColor )
{
@@ -392,14 +392,14 @@ void BitmapWriteAccess::DrawPolyPolygon( const PolyPolygon& rPolyPoly )
if( mpLineColor && ( !mpFillColor || ( *mpFillColor != *mpLineColor ) ) )
{
- for( USHORT n = 0, nCount = rPolyPoly.Count(); n < nCount; )
+ for( sal_uInt16 n = 0, nCount = rPolyPoly.Count(); n < nCount; )
{
const Polygon& rPoly = rPolyPoly[ n++ ];
- const USHORT nSize = rPoly.GetSize();
+ const sal_uInt16 nSize = rPoly.GetSize();
if( nSize )
{
- for( USHORT i = 0, nSize1 = nSize - 1; i < nSize1; i++ )
+ for( sal_uInt16 i = 0, nSize1 = nSize - 1; i < nSize1; i++ )
DrawLine( rPoly[ i ], rPoly[ i + 1 ] );
if( rPoly[ nSize - 1 ] != rPoly[ 0 ] )
diff --git a/vcl/source/gdi/bmpconv.cxx b/vcl/source/gdi/bmpconv.cxx
index d949f519d197..1f0dc7993a27 100644
--- a/vcl/source/gdi/bmpconv.cxx
+++ b/vcl/source/gdi/bmpconv.cxx
@@ -153,7 +153,7 @@ Any SAL_CALL BmpConverter::invoke(
SvMemoryStream aStream( aDIB.getArray(), aDIB.getLength(), STREAM_READ | STREAM_WRITE );
Bitmap aBM;
- aBM.Read( aStream, TRUE );
+ aBM.Read( aStream, sal_True );
if( nTargetDepth < 4 )
nTargetDepth = 1;
else if( nTargetDepth < 8 )
@@ -188,7 +188,7 @@ BmpTransporter::BmpTransporter( const Bitmap& rBM )
m_aSize.Width = rBM.GetSizePixel().Width();
m_aSize.Height = rBM.GetSizePixel().Height();
SvMemoryStream aStream;
- rBM.Write( aStream, FALSE, TRUE );
+ rBM.Write( aStream, sal_False, sal_True );
m_aBM = Sequence<sal_Int8>(static_cast<const sal_Int8*>(aStream.GetData()),
aStream.GetEndOfData());
}
diff --git a/vcl/source/gdi/bmpfast.cxx b/vcl/source/gdi/bmpfast.cxx
index e6c94ba0475e..83b631c1371a 100644
--- a/vcl/source/gdi/bmpfast.cxx
+++ b/vcl/source/gdi/bmpfast.cxx
@@ -55,7 +55,7 @@ protected:
PIXBYTE* mpPixel;
};
-template <ULONG PIXFMT>
+template <sal_uIntPtr PIXFMT>
class TrueColorPixelPtr : public BasePixelPtr
{
public:
@@ -311,7 +311,7 @@ public:
// =======================================================================
// converting truecolor formats
-template <ULONG SRCFMT, ULONG DSTFMT>
+template <sal_uIntPtr SRCFMT, sal_uIntPtr DSTFMT>
inline void ImplConvertPixel( const TrueColorPixelPtr<DSTFMT>& rDst,
const TrueColorPixelPtr<SRCFMT>& rSrc )
{
@@ -335,7 +335,7 @@ inline void ImplConvertPixel<BMP_FORMAT_16BIT_TC_LSB_MASK, BMP_FORMAT_16BIT_TC_M
// -----------------------------------------------------------------------
-template <ULONG SRCFMT, ULONG DSTFMT>
+template <sal_uIntPtr SRCFMT, sal_uIntPtr DSTFMT>
inline void ImplConvertLine( const TrueColorPixelPtr<DSTFMT>& rDst,
const TrueColorPixelPtr<SRCFMT>& rSrc, int nPixelCount )
{
@@ -352,7 +352,7 @@ inline void ImplConvertLine( const TrueColorPixelPtr<DSTFMT>& rDst,
// =======================================================================
// alpha blending truecolor pixels
-template <unsigned ALPHABITS, ULONG SRCFMT, ULONG DSTFMT>
+template <unsigned ALPHABITS, sal_uIntPtr SRCFMT, sal_uIntPtr DSTFMT>
inline void ImplBlendPixels( const TrueColorPixelPtr<DSTFMT>& rDst,
const TrueColorPixelPtr<SRCFMT>& rSrc, unsigned nAlphaVal )
{
@@ -384,7 +384,7 @@ inline void ImplBlendPixels( const TrueColorPixelPtr<DSTFMT>& rDst,
// -----------------------------------------------------------------------
-template <unsigned ALPHABITS, ULONG MASKFMT, ULONG SRCFMT, ULONG DSTFMT>
+template <unsigned ALPHABITS, sal_uIntPtr MASKFMT, sal_uIntPtr SRCFMT, sal_uIntPtr DSTFMT>
inline void ImplBlendLines( const TrueColorPixelPtr<DSTFMT>& rDst,
const TrueColorPixelPtr<SRCFMT>& rSrc, const TrueColorPixelPtr<MASKFMT>& rMsk,
int nPixelCount )
@@ -403,7 +403,7 @@ inline void ImplBlendLines( const TrueColorPixelPtr<DSTFMT>& rDst,
// -----------------------------------------------------------------------
-template <unsigned ALPHABITS, ULONG SRCFMT, ULONG DSTFMT>
+template <unsigned ALPHABITS, sal_uIntPtr SRCFMT, sal_uIntPtr DSTFMT>
inline void ImplBlendLines( const TrueColorPixelPtr<DSTFMT>& rDst,
const TrueColorPixelPtr<SRCFMT>& rSrc, unsigned nAlphaVal,
int nPixelCount )
@@ -461,7 +461,7 @@ static bool ImplCopyImage( BitmapBuffer& rDstBuffer, const BitmapBuffer& rSrcBuf
// -----------------------------------------------------------------------
-template <ULONG DSTFMT,ULONG SRCFMT>
+template <sal_uIntPtr DSTFMT,sal_uIntPtr SRCFMT>
bool ImplConvertToBitmap( TrueColorPixelPtr<SRCFMT>& rSrcLine,
BitmapBuffer& rDstBuffer, const BitmapBuffer& rSrcBuffer )
{
@@ -494,7 +494,7 @@ bool ImplConvertToBitmap( TrueColorPixelPtr<SRCFMT>& rSrcLine,
// -----------------------------------------------------------------------
-template <ULONG SRCFMT>
+template <sal_uIntPtr SRCFMT>
inline bool ImplConvertFromBitmap( BitmapBuffer& rDst, const BitmapBuffer& rSrc )
{
TrueColorPixelPtr<SRCFMT> aSrcType; aSrcType.SetRawPtr( rSrc.mpBits );
@@ -595,8 +595,8 @@ bool ImplFastBitmapConversion( BitmapBuffer& rDst, const BitmapBuffer& rSrc,
if( rDst.mnHeight < rTR.mnDestY + rTR.mnDestHeight )
return false;
- const ULONG nSrcFormat = rSrc.mnFormat & ~BMP_FORMAT_TOP_DOWN;
- const ULONG nDstFormat = rDst.mnFormat & ~BMP_FORMAT_TOP_DOWN;
+ const sal_uIntPtr nSrcFormat = rSrc.mnFormat & ~BMP_FORMAT_TOP_DOWN;
+ const sal_uIntPtr nDstFormat = rDst.mnFormat & ~BMP_FORMAT_TOP_DOWN;
// TODO: also implement conversions for 16bit colormasks with non-565 format
if( nSrcFormat & (BMP_FORMAT_16BIT_TC_LSB_MASK | BMP_FORMAT_16BIT_TC_MSB_MASK) )
@@ -676,7 +676,7 @@ bool ImplFastBitmapConversion( BitmapBuffer& rDst, const BitmapBuffer& rSrc,
// =======================================================================
-template <ULONG DSTFMT,ULONG SRCFMT> //,ULONG MSKFMT>
+template <sal_uIntPtr DSTFMT,sal_uIntPtr SRCFMT> //,sal_uIntPtr MSKFMT>
bool ImplBlendToBitmap( TrueColorPixelPtr<SRCFMT>& rSrcLine,
BitmapBuffer& rDstBuffer, const BitmapBuffer& rSrcBuffer,
const BitmapBuffer& rMskBuffer )
@@ -753,7 +753,7 @@ inline bool ImplBlendToBitmap<BMP_FORMAT_32BIT_TC_BGRA,BMP_FORMAT_32BIT_TC_BGRA>
// -----------------------------------------------------------------------
-template <ULONG SRCFMT>
+template <sal_uIntPtr SRCFMT>
bool ImplBlendFromBitmap( BitmapBuffer& rDst, const BitmapBuffer& rSrc, const BitmapBuffer& rMsk )
{
TrueColorPixelPtr<SRCFMT> aSrcType; aSrcType.SetRawPtr( rSrc.mpBits );
@@ -871,8 +871,8 @@ bool ImplFastBitmapBlending( BitmapWriteAccess& rDstWA,
const BitmapBuffer& rSrc = *rSrcRA.ImplGetBitmapBuffer();
const BitmapBuffer& rMsk = *rMskRA.ImplGetBitmapBuffer();
- const ULONG nSrcFormat = rSrc.mnFormat & ~BMP_FORMAT_TOP_DOWN;
- const ULONG nDstFormat = rDst.mnFormat & ~BMP_FORMAT_TOP_DOWN;
+ const sal_uIntPtr nSrcFormat = rSrc.mnFormat & ~BMP_FORMAT_TOP_DOWN;
+ const sal_uIntPtr nDstFormat = rDst.mnFormat & ~BMP_FORMAT_TOP_DOWN;
// accelerated conversions for 16bit colormasks with non-565 format are not yet implemented
if( nSrcFormat & (BMP_FORMAT_16BIT_TC_LSB_MASK | BMP_FORMAT_16BIT_TC_MSB_MASK) )
@@ -945,18 +945,18 @@ bool ImplFastEraseBitmap( BitmapBuffer& rDst, const BitmapColor& rColor )
if( bDisableFastBitops )
return false;
- const ULONG nDstFormat = rDst.mnFormat & ~BMP_FORMAT_TOP_DOWN;
+ const sal_uIntPtr nDstFormat = rDst.mnFormat & ~BMP_FORMAT_TOP_DOWN;
// erasing a bitmap is often just a byte-wise memory fill
bool bByteFill = true;
- BYTE nFillByte;
+ sal_uInt8 nFillByte;
switch( nDstFormat )
{
case BMP_FORMAT_1BIT_MSB_PAL:
case BMP_FORMAT_1BIT_LSB_PAL:
nFillByte = rColor.GetIndex();
- nFillByte = static_cast<BYTE>( -(nFillByte & 1) ); // 0x00 or 0xFF
+ nFillByte = static_cast<sal_uInt8>( -(nFillByte & 1) ); // 0x00 or 0xFF
break;
case BMP_FORMAT_4BIT_MSN_PAL:
case BMP_FORMAT_4BIT_LSN_PAL:
diff --git a/vcl/source/gdi/cvtgrf.cxx b/vcl/source/gdi/cvtgrf.cxx
index 8ba963bc4718..85e5a8c28f63 100644
--- a/vcl/source/gdi/cvtgrf.cxx
+++ b/vcl/source/gdi/cvtgrf.cxx
@@ -57,10 +57,10 @@ GraphicConverter::~GraphicConverter()
// ------------------------------------------------------------------------
-ULONG GraphicConverter::ImplConvert( ULONG nInFormat, void* pInBuffer, ULONG nInBufSize,
- void** ppOutBuffer, ULONG nOutFormat )
+sal_uIntPtr GraphicConverter::ImplConvert( sal_uIntPtr nInFormat, void* pInBuffer, sal_uIntPtr nInBufSize,
+ void** ppOutBuffer, sal_uIntPtr nOutFormat )
{
- ULONG nRetBufSize = 0UL;
+ sal_uIntPtr nRetBufSize = 0UL;
if( ( nInFormat != nOutFormat ) && pInBuffer )
{
@@ -69,7 +69,7 @@ ULONG GraphicConverter::ImplConvert( ULONG nInFormat, void* pInBuffer, ULONG nIn
SvMemoryStream aIStm;
Graphic aGraphic;
- aIStm.SetBuffer( (char*) pInBuffer, nInBufSize, FALSE, nInBufSize );
+ aIStm.SetBuffer( (char*) pInBuffer, nInBufSize, sal_False, nInBufSize );
aIStm >> aGraphic;
if( !aIStm.GetError() )
@@ -82,7 +82,7 @@ ULONG GraphicConverter::ImplConvert( ULONG nInFormat, void* pInBuffer, ULONG nIn
{
nRetBufSize = aOStm.Seek( STREAM_SEEK_TO_END );
*ppOutBuffer = (void*) aOStm.GetData();
- aOStm.ObjectOwnsMemory( FALSE );
+ aOStm.ObjectOwnsMemory( sal_False );
}
delete mpConvertData;
@@ -93,7 +93,7 @@ ULONG GraphicConverter::ImplConvert( ULONG nInFormat, void* pInBuffer, ULONG nIn
{
SvMemoryStream aIStm;
- aIStm.SetBuffer( (char*) pInBuffer, nInBufSize, FALSE, nInBufSize );
+ aIStm.SetBuffer( (char*) pInBuffer, nInBufSize, sal_False, nInBufSize );
mpConvertData = new ConvertData( Graphic(), aIStm, nInFormat );
if( maFilterHdl.IsSet() && maFilterHdl.Call( mpConvertData ) )
@@ -119,7 +119,7 @@ ULONG GraphicConverter::ImplConvert( ULONG nInFormat, void* pInBuffer, ULONG nIn
{
nRetBufSize = aOStm.Seek( STREAM_SEEK_TO_END );
*ppOutBuffer = (void*) aOStm.GetData();
- aOStm.ObjectOwnsMemory( FALSE );
+ aOStm.ObjectOwnsMemory( sal_False );
}
}
@@ -133,10 +133,10 @@ ULONG GraphicConverter::ImplConvert( ULONG nInFormat, void* pInBuffer, ULONG nIn
// ------------------------------------------------------------------------
-ULONG GraphicConverter::Import( SvStream& rIStm, Graphic& rGraphic, ULONG nFormat )
+sal_uIntPtr GraphicConverter::Import( SvStream& rIStm, Graphic& rGraphic, sal_uIntPtr nFormat )
{
GraphicConverter* pCvt = ImplGetSVData()->maGDIData.mpGrfConverter;
- ULONG nRet = ERRCODE_IO_GENERAL;
+ sal_uIntPtr nRet = ERRCODE_IO_GENERAL;
if( pCvt && pCvt->GetFilterHdl().IsSet() )
{
@@ -156,10 +156,10 @@ ULONG GraphicConverter::Import( SvStream& rIStm, Graphic& rGraphic, ULONG nForma
// ------------------------------------------------------------------------
-ULONG GraphicConverter::Export( SvStream& rOStm, const Graphic& rGraphic, ULONG nFormat )
+sal_uIntPtr GraphicConverter::Export( SvStream& rOStm, const Graphic& rGraphic, sal_uIntPtr nFormat )
{
GraphicConverter* pCvt = ImplGetSVData()->maGDIData.mpGrfConverter;
- ULONG nRet = ERRCODE_IO_GENERAL;
+ sal_uIntPtr nRet = ERRCODE_IO_GENERAL;
if( pCvt && pCvt->GetFilterHdl().IsSet() )
{
diff --git a/vcl/source/gdi/cvtsvm.cxx b/vcl/source/gdi/cvtsvm.cxx
index af98e402f158..c678f9a28692 100644
--- a/vcl/source/gdi/cvtsvm.cxx
+++ b/vcl/source/gdi/cvtsvm.cxx
@@ -74,12 +74,12 @@ void ImplWriteRect( SvStream& rOStm, const Rectangle& rRect )
void ImplReadPoly( SvStream& rIStm, Polygon& rPoly )
{
- INT32 nSize;
+ sal_Int32 nSize;
rIStm >> nSize;
- rPoly = Polygon( (USHORT) nSize );
+ rPoly = Polygon( (sal_uInt16) nSize );
- for( USHORT i = 0; i < (USHORT) nSize; i++ )
+ for( sal_uInt16 i = 0; i < (sal_uInt16) nSize; i++ )
rIStm >> rPoly[ i ];
}
@@ -88,11 +88,11 @@ void ImplReadPoly( SvStream& rIStm, Polygon& rPoly )
void ImplReadPolyPoly( SvStream& rIStm, PolyPolygon& rPolyPoly )
{
Polygon aPoly;
- INT32 nPolyCount;
+ sal_Int32 nPolyCount;
rIStm >> nPolyCount;
- for( USHORT i = 0; i < (USHORT) nPolyCount; i++ )
+ for( sal_uInt16 i = 0; i < (sal_uInt16) nPolyCount; i++ )
{
ImplReadPoly( rIStm, aPoly );
rPolyPoly.Insert( aPoly );
@@ -103,16 +103,16 @@ void ImplReadPolyPoly( SvStream& rIStm, PolyPolygon& rPolyPoly )
void ImplWritePolyPolyAction( SvStream& rOStm, const PolyPolygon& rPolyPoly )
{
- const USHORT nPoly = rPolyPoly.Count();
- USHORT nPoints = 0;
- USHORT n;
+ const sal_uInt16 nPoly = rPolyPoly.Count();
+ sal_uInt16 nPoints = 0;
+ sal_uInt16 n;
for( n = 0; n < nPoly; n++ )
- nPoints = sal::static_int_cast<USHORT>(nPoints + rPolyPoly[ n ].GetSize());
+ nPoints = sal::static_int_cast<sal_uInt16>(nPoints + rPolyPoly[ n ].GetSize());
- rOStm << (INT16) GDI_POLYPOLYGON_ACTION;
- rOStm << (INT32) ( 8 + ( nPoly << 2 ) + ( nPoints << 3 ) );
- rOStm << (INT32) nPoly;
+ rOStm << (sal_Int16) GDI_POLYPOLYGON_ACTION;
+ rOStm << (sal_Int32) ( 8 + ( nPoly << 2 ) + ( nPoints << 3 ) );
+ rOStm << (sal_Int32) nPoly;
for( n = 0; n < nPoly; n++ )
{
@@ -121,11 +121,11 @@ void ImplWritePolyPolyAction( SvStream& rOStm, const PolyPolygon& rPolyPoly )
// a polygon representing the curve as good as possible
Polygon aSimplePoly;
rPolyPoly[n].AdaptiveSubdivide(aSimplePoly);
- const USHORT nSize(aSimplePoly.GetSize());
+ const sal_uInt16 nSize(aSimplePoly.GetSize());
- rOStm << (INT32) nSize;
+ rOStm << (sal_Int32) nSize;
- for( USHORT j = 0; j < nSize; j++ )
+ for( sal_uInt16 j = 0; j < nSize; j++ )
rOStm << aSimplePoly[ j ];
}
}
@@ -134,26 +134,26 @@ void ImplWritePolyPolyAction( SvStream& rOStm, const PolyPolygon& rPolyPoly )
void ImplReadColor( SvStream& rIStm, Color& rColor )
{
- INT16 nVal;
+ sal_Int16 nVal;
- rIStm >> nVal; rColor.SetRed( sal::static_int_cast<UINT8>((USHORT)nVal >> 8) );
- rIStm >> nVal; rColor.SetGreen( sal::static_int_cast<UINT8>((USHORT)nVal >> 8) );
- rIStm >> nVal; rColor.SetBlue( sal::static_int_cast<UINT8>((USHORT)nVal >> 8) );
+ rIStm >> nVal; rColor.SetRed( sal::static_int_cast<sal_uInt8>((sal_uInt16)nVal >> 8) );
+ rIStm >> nVal; rColor.SetGreen( sal::static_int_cast<sal_uInt8>((sal_uInt16)nVal >> 8) );
+ rIStm >> nVal; rColor.SetBlue( sal::static_int_cast<sal_uInt8>((sal_uInt16)nVal >> 8) );
}
// ------------------------------------------------------------------------
void ImplWriteColor( SvStream& rOStm, const Color& rColor )
{
- INT16 nVal;
+ sal_Int16 nVal;
- nVal = ( (INT16) rColor.GetRed() << 8 ) | rColor.GetRed();
+ nVal = ( (sal_Int16) rColor.GetRed() << 8 ) | rColor.GetRed();
rOStm << nVal;
- nVal = ( (INT16) rColor.GetGreen() << 8 ) | rColor.GetGreen();
+ nVal = ( (sal_Int16) rColor.GetGreen() << 8 ) | rColor.GetGreen();
rOStm << nVal;
- nVal = ( (INT16) rColor.GetBlue() << 8 ) | rColor.GetBlue();
+ nVal = ( (sal_Int16) rColor.GetBlue() << 8 ) | rColor.GetBlue();
rOStm << nVal;
}
@@ -162,11 +162,11 @@ void ImplWriteColor( SvStream& rOStm, const Color& rColor )
void ImplReadMapMode( SvStream& rIStm, MapMode& rMapMode )
{
Point aOrg;
- INT32 nXNum;
- INT32 nXDenom;
- INT32 nYNum;
- INT32 nYDenom;
- INT16 nUnit;
+ sal_Int32 nXNum;
+ sal_Int32 nXDenom;
+ sal_Int32 nYNum;
+ sal_Int32 nYDenom;
+ sal_Int16 nUnit;
rIStm >> nUnit >> aOrg >> nXNum >> nXDenom >> nYNum >> nYDenom;
rMapMode = MapMode( (MapUnit) nUnit, aOrg, Fraction( nXNum, nXDenom ), Fraction( nYNum, nYDenom ) );
@@ -176,39 +176,39 @@ void ImplReadMapMode( SvStream& rIStm, MapMode& rMapMode )
void ImplWriteMapMode( SvStream& rOStm, const MapMode& rMapMode )
{
- rOStm << (INT16) rMapMode.GetMapUnit();
+ rOStm << (sal_Int16) rMapMode.GetMapUnit();
rOStm << rMapMode.GetOrigin();
- rOStm << (INT32) rMapMode.GetScaleX().GetNumerator();
- rOStm << (INT32) rMapMode.GetScaleX().GetDenominator();
- rOStm << (INT32) rMapMode.GetScaleY().GetNumerator();
- rOStm << (INT32) rMapMode.GetScaleY().GetDenominator();
+ rOStm << (sal_Int32) rMapMode.GetScaleX().GetNumerator();
+ rOStm << (sal_Int32) rMapMode.GetScaleX().GetDenominator();
+ rOStm << (sal_Int32) rMapMode.GetScaleY().GetNumerator();
+ rOStm << (sal_Int32) rMapMode.GetScaleY().GetDenominator();
}
// ------------------------------------------------------------------------
void ImplWritePushAction( SvStream& rOStm )
{
- rOStm << (INT16) GDI_PUSH_ACTION;
- rOStm << (INT32) 4;
+ rOStm << (sal_Int16) GDI_PUSH_ACTION;
+ rOStm << (sal_Int32) 4;
}
// ------------------------------------------------------------------------
void ImplWritePopAction( SvStream& rOStm )
{
- rOStm << (INT16) GDI_POP_ACTION;
- rOStm << (INT32) 4;
+ rOStm << (sal_Int16) GDI_POP_ACTION;
+ rOStm << (sal_Int32) 4;
}
// ------------------------------------------------------------------------
-void ImplWriteLineColor( SvStream& rOStm, const Color& rColor, INT16 nStyle, INT32 nWidth = 0L )
+void ImplWriteLineColor( SvStream& rOStm, const Color& rColor, sal_Int16 nStyle, sal_Int32 nWidth = 0L )
{
if( rColor.GetTransparency() > 127 )
nStyle = 0;
- rOStm << (INT16) GDI_PEN_ACTION;
- rOStm << (INT32) 16;
+ rOStm << (sal_Int16) GDI_PEN_ACTION;
+ rOStm << (sal_Int32) 16;
ImplWriteColor( rOStm, rColor );
rOStm << nWidth;
rOStm << nStyle;
@@ -216,10 +216,10 @@ void ImplWriteLineColor( SvStream& rOStm, const Color& rColor, INT16 nStyle, INT
// ------------------------------------------------------------------------
-void ImplWriteFillColor( SvStream& rOStm, const Color& rColor, INT16 nStyle )
+void ImplWriteFillColor( SvStream& rOStm, const Color& rColor, sal_Int16 nStyle )
{
- rOStm << (INT16) GDI_FILLBRUSH_ACTION;
- rOStm << (INT32) 20;
+ rOStm << (sal_Int16) GDI_FILLBRUSH_ACTION;
+ rOStm << (sal_Int32) 20;
ImplWriteColor( rOStm, rColor );
if( rColor.GetTransparency() > 127 )
@@ -229,13 +229,13 @@ void ImplWriteFillColor( SvStream& rOStm, const Color& rColor, INT16 nStyle )
{
ImplWriteColor( rOStm, COL_WHITE );
rOStm << nStyle;
- rOStm << (INT16) 1;
+ rOStm << (sal_Int16) 1;
}
else
{
ImplWriteColor( rOStm, COL_BLACK );
rOStm << nStyle;
- rOStm << (INT16) 0;
+ rOStm << (sal_Int16) 0;
}
}
@@ -274,24 +274,24 @@ void ImplWriteFont( SvStream& rOStm, const Font& rFont,
break;
}
- rOStm << (INT16) GDI_FONT_ACTION;
- rOStm << (INT32) 78;
+ rOStm << (sal_Int16) GDI_FONT_ACTION;
+ rOStm << (sal_Int32) 78;
rActualCharSet = GetStoreCharSet( rFont.GetCharSet() );
ImplWriteColor( rOStm, rFont.GetColor() );
ImplWriteColor( rOStm, rFont.GetFillColor() );
rOStm.Write( aName, 32 );
rOStm << rFont.GetSize();
- rOStm << (INT16) 0; // no character orientation anymore
- rOStm << (INT16) rFont.GetOrientation();
- rOStm << (INT16) rActualCharSet;
- rOStm << (INT16) rFont.GetFamily();
- rOStm << (INT16) rFont.GetPitch();
- rOStm << (INT16) rFont.GetAlign();
- rOStm << (INT16) nWeight;
- rOStm << (INT16) rFont.GetUnderline();
- rOStm << (INT16) rFont.GetStrikeout();
- rOStm << (BOOL) ( rFont.GetItalic() != ITALIC_NONE );
+ rOStm << (sal_Int16) 0; // no character orientation anymore
+ rOStm << (sal_Int16) rFont.GetOrientation();
+ rOStm << (sal_Int16) rActualCharSet;
+ rOStm << (sal_Int16) rFont.GetFamily();
+ rOStm << (sal_Int16) rFont.GetPitch();
+ rOStm << (sal_Int16) rFont.GetAlign();
+ rOStm << (sal_Int16) nWeight;
+ rOStm << (sal_Int16) rFont.GetUnderline();
+ rOStm << (sal_Int16) rFont.GetStrikeout();
+ rOStm << (sal_Bool) ( rFont.GetItalic() != ITALIC_NONE );
rOStm << rFont.IsOutline();
rOStm << rFont.IsShadow();
rOStm << rFont.IsTransparent();
@@ -301,9 +301,9 @@ void ImplWriteFont( SvStream& rOStm, const Font& rFont,
// ------------------------------------------------------------------------
-void ImplWriteRasterOpAction( SvStream& rOStm, INT16 nRasterOp )
+void ImplWriteRasterOpAction( SvStream& rOStm, sal_Int16 nRasterOp )
{
- rOStm << (INT16) GDI_RASTEROP_ACTION << (INT32) 6 << nRasterOp;
+ rOStm << (sal_Int16) GDI_RASTEROP_ACTION << (sal_Int32) 6 << nRasterOp;
}
// ------------------------------------------------------------------------
@@ -355,12 +355,12 @@ void ImplReadUnicodeComment( sal_uInt32 nStrmPos, SvStream& rIStm, String& rStri
// ------------------------------------------------------------------------
-void ImplSkipActions( SvStream& rIStm, ULONG nSkipCount )
+void ImplSkipActions( SvStream& rIStm, sal_uIntPtr nSkipCount )
{
- INT32 nActionSize;
- INT16 nType;
+ sal_Int32 nActionSize;
+ sal_Int16 nType;
- for( ULONG i = 0UL; i < nSkipCount; i++ )
+ for( sal_uIntPtr i = 0UL; i < nSkipCount; i++ )
{
rIStm >> nType >> nActionSize;
rIStm.SeekRel( nActionSize - 4L );
@@ -399,7 +399,7 @@ bool ImplWriteExtendedPolyPolygonAction(SvStream& rOStm, const PolyPolygon& rPol
if((bOnlyWhenCurve && nAllFlagCount) || (!bOnlyWhenCurve && nAllPointCount))
{
- rOStm << (INT16) GDI_EXTENDEDPOLYGON_ACTION;
+ rOStm << (sal_Int16) GDI_EXTENDEDPOLYGON_ACTION;
const sal_Int32 nActionSize(
4 + // Action size
@@ -428,16 +428,16 @@ bool ImplWriteExtendedPolyPolygonAction(SvStream& rOStm, const PolyPolygon& rPol
if(rCandidate.HasFlags())
{
- rOStm << (BYTE)true;
+ rOStm << (sal_uInt8)true;
for(sal_uInt16 c(0); c < nPointCount; c++)
{
- rOStm << (BYTE)rCandidate.GetFlags(c);
+ rOStm << (sal_uInt8)rCandidate.GetFlags(c);
}
}
else
{
- rOStm << (BYTE)false;
+ rOStm << (sal_uInt8)false;
}
}
}
@@ -470,12 +470,12 @@ void ImplReadExtendedPolyPolygonAction(SvStream& rIStm, PolyPolygon& rPolyPoly)
rIStm >> aCandidate[b];
}
- BYTE bHasFlags(false);
+ sal_uInt8 bHasFlags(false);
rIStm >> bHasFlags;
if(bHasFlags)
{
- BYTE aPolyFlags(0);
+ sal_uInt8 aPolyFlags(0);
for(sal_uInt16 c(0); c < nPointCount; c++)
{
@@ -493,7 +493,7 @@ void ImplReadExtendedPolyPolygonAction(SvStream& rIStm, PolyPolygon& rPolyPoly)
// - SVMConverter -
// ----------------
-SVMConverter::SVMConverter( SvStream& rStm, GDIMetaFile& rMtf, ULONG nConvertMode )
+SVMConverter::SVMConverter( SvStream& rStm, GDIMetaFile& rMtf, sal_uIntPtr nConvertMode )
{
if( !rStm.GetError() )
{
@@ -508,15 +508,15 @@ SVMConverter::SVMConverter( SvStream& rStm, GDIMetaFile& rMtf, ULONG nConvertMod
void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
{
- const ULONG nPos = rIStm.Tell();
- const USHORT nOldFormat = rIStm.GetNumberFormatInt();
+ const sal_uIntPtr nPos = rIStm.Tell();
+ const sal_uInt16 nOldFormat = rIStm.GetNumberFormatInt();
rIStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
char aCode[ 5 ];
Size aPrefSz;
- INT16 nSize;
- INT16 nVersion;
+ sal_Int16 nSize;
+ sal_Int16 nVersion;
// read header
rIStm.Read( (char*) &aCode, sizeof( aCode ) ); // Kennung
@@ -540,7 +540,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
Stack aLIStack;
VirtualDevice aFontVDev;
rtl_TextEncoding eActualCharSet = gsl_getSystemTextEncoding();
- BOOL bFatLine = FALSE;
+ sal_Bool bFatLine = sal_False;
// TODO: fix reindentation below if you can accept being blamed by the SCM
MapMode aMapMode;
@@ -549,12 +549,12 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
Point aPt, aPt1;
Size aSz;
Color aActionColor;
- INT32 nTmp, nTmp1, nActionSize;
- INT32 nActions;
- INT16 nType;
+ sal_Int32 nTmp, nTmp1, nActionSize;
+ sal_Int32 nActions;
+ sal_Int16 nType;
sal_uInt32 nUnicodeCommentStreamPos = 0;
- INT32 nUnicodeCommentActionNumber = 0;
+ sal_Int32 nUnicodeCommentActionNumber = 0;
ImplReadMapMode( rIStm, aMapMode ); // MapMode
rIStm >> nActions; // Action count
@@ -563,7 +563,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
rMtf.SetPrefMapMode( aMapMode );
sal_uInt32 nLastPolygonAction(0);
- for( INT32 i = 0L; i < nActions; i++ )
+ for( sal_Int32 i = 0L; i < nActions; i++ )
{
rIStm >> nType;
sal_Int32 nActBegin = rIStm.Tell();
@@ -597,7 +597,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case (GDI_LINEJOIN_ACTION) :
{
- INT16 nLineJoin(0);
+ sal_Int16 nLineJoin(0);
rIStm >> nLineJoin;
aLineInfo.SetLineJoin((basegfx::B2DLineJoin)nLineJoin);
}
@@ -605,8 +605,8 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case (GDI_LINEDASHDOT_ACTION) :
{
- INT16 a(0);
- INT32 b(0);
+ sal_Int16 a(0);
+ sal_Int32 b(0);
rIStm >> a; aLineInfo.SetDashCount(a);
rIStm >> b; aLineInfo.SetDashLen(b);
@@ -714,7 +714,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
const Polygon aPoly( aRect.Center(), aRect.GetWidth() >> 1, aRect.GetHeight() >> 1 );
rMtf.AddAction( new MetaPushAction( PUSH_LINECOLOR ) );
- rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, FALSE ) );
+ rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, sal_False ) );
rMtf.AddAction( new MetaPolygonAction( aPoly ) );
rMtf.AddAction( new MetaPopAction() );
rMtf.AddAction( new MetaPolyLineAction( aPoly, aLineInfo ) );
@@ -734,7 +734,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
const Polygon aPoly( aRect, aPt, aPt1, POLY_ARC );
rMtf.AddAction( new MetaPushAction( PUSH_LINECOLOR ) );
- rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, FALSE ) );
+ rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, sal_False ) );
rMtf.AddAction( new MetaPolygonAction( aPoly ) );
rMtf.AddAction( new MetaPopAction() );
rMtf.AddAction( new MetaPolyLineAction( aPoly, aLineInfo ) );
@@ -754,7 +754,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
const Polygon aPoly( aRect, aPt, aPt1, POLY_PIE );
rMtf.AddAction( new MetaPushAction( PUSH_LINECOLOR ) );
- rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, FALSE ) );
+ rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, sal_False ) );
rMtf.AddAction( new MetaPolygonAction( aPoly ) );
rMtf.AddAction( new MetaPopAction() );
rMtf.AddAction( new MetaPolyLineAction( aPoly, aLineInfo ) );
@@ -794,7 +794,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
if( bFatLine )
{
rMtf.AddAction( new MetaPushAction( PUSH_LINECOLOR ) );
- rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, FALSE ) );
+ rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, sal_False ) );
rMtf.AddAction( new MetaPolygonAction( aActionPoly ) );
rMtf.AddAction( new MetaPopAction() );
rMtf.AddAction( new MetaPolyLineAction( aActionPoly, aLineInfo ) );
@@ -816,11 +816,11 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
if( bFatLine )
{
rMtf.AddAction( new MetaPushAction( PUSH_LINECOLOR ) );
- rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, FALSE ) );
+ rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, sal_False ) );
rMtf.AddAction( new MetaPolyPolygonAction( aPolyPoly ) );
rMtf.AddAction( new MetaPopAction() );
- for( USHORT nPoly = 0, nCount = aPolyPoly.Count(); nPoly < nCount; nPoly++ )
+ for( sal_uInt16 nPoly = 0, nCount = aPolyPoly.Count(); nPoly < nCount; nPoly++ )
rMtf.AddAction( new MetaPolyLineAction( aPolyPoly[ nPoly ], aLineInfo ) );
}
else
@@ -835,10 +835,10 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
{
Font aFont;
char aName[ 32 ];
- INT32 nWidth, nHeight;
- INT16 nCharSet, nFamily, nPitch, nAlign, nWeight, nUnderline, nStrikeout;
- INT16 nCharOrient, nLineOrient;
- BOOL bItalic, bOutline, bShadow, bTransparent;
+ sal_Int32 nWidth, nHeight;
+ sal_Int16 nCharSet, nFamily, nPitch, nAlign, nWeight, nUnderline, nStrikeout;
+ sal_Int16 nCharOrient, nLineOrient;
+ sal_Bool bItalic, bOutline, bShadow, bTransparent;
ImplReadColor( rIStm, aActionColor ); aFont.SetColor( aActionColor );
ImplReadColor( rIStm, aActionColor ); aFont.SetFillColor( aActionColor );
@@ -881,16 +881,16 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_TEXT_ACTION ):
{
ByteString aByteStr;
- INT32 nIndex, nLen;
+ sal_Int32 nIndex, nLen;
rIStm >> aPt >> nIndex >> nLen >> nTmp;
if ( nTmp && ( static_cast< sal_uInt32 >( nTmp ) < ( SAL_MAX_UINT16 - 1 ) ) )
{
- rIStm.Read( aByteStr.AllocBuffer( (USHORT)nTmp ), nTmp + 1 );
+ rIStm.Read( aByteStr.AllocBuffer( (sal_uInt16)nTmp ), nTmp + 1 );
UniString aStr( aByteStr, eActualCharSet );
if ( nUnicodeCommentActionNumber == i )
ImplReadUnicodeComment( nUnicodeCommentStreamPos, rIStm, aStr );
- rMtf.AddAction( new MetaTextAction( aPt, aStr, (USHORT) nIndex, (USHORT) nLen ) );
+ rMtf.AddAction( new MetaTextAction( aPt, aStr, (sal_uInt16) nIndex, (sal_uInt16) nLen ) );
}
rIStm.Seek( nActBegin + nActionSize );
}
@@ -900,17 +900,17 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
{
ByteString aByteStr;
sal_Int32* pDXAry = NULL;
- INT32 nIndex, nLen, nAryLen;
+ sal_Int32 nIndex, nLen, nAryLen;
rIStm >> aPt >> nIndex >> nLen >> nTmp >> nAryLen;
if ( nTmp && ( static_cast< sal_uInt32 >( nTmp ) < ( SAL_MAX_UINT16 - 1 ) ) )
{
- rIStm.Read( aByteStr.AllocBuffer( (USHORT)nTmp ), nTmp + 1 );
+ rIStm.Read( aByteStr.AllocBuffer( (sal_uInt16)nTmp ), nTmp + 1 );
UniString aStr( aByteStr, eActualCharSet );
if( nAryLen > 0L )
{
- INT32 nStrLen( aStr.Len() );
+ sal_Int32 nStrLen( aStr.Len() );
pDXAry = new sal_Int32[ Max( nAryLen, nStrLen ) ];
@@ -924,7 +924,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
{
sal_Int32* pTmpAry = new sal_Int32[nStrLen];
- aFontVDev.GetTextArray( aStr, pTmpAry, (USHORT) nIndex, (USHORT) nLen );
+ aFontVDev.GetTextArray( aStr, pTmpAry, (sal_uInt16) nIndex, (sal_uInt16) nLen );
// now, the difference between the
// last and the second last DX array
@@ -948,7 +948,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
}
if ( nUnicodeCommentActionNumber == i )
ImplReadUnicodeComment( nUnicodeCommentStreamPos, rIStm, aStr );
- rMtf.AddAction( new MetaTextArrayAction( aPt, aStr, pDXAry, (USHORT) nIndex, (USHORT) nLen ) );
+ rMtf.AddAction( new MetaTextArrayAction( aPt, aStr, pDXAry, (sal_uInt16) nIndex, (sal_uInt16) nLen ) );
if( pDXAry )
delete[] pDXAry;
@@ -960,16 +960,16 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_STRETCHTEXT_ACTION ):
{
ByteString aByteStr;
- INT32 nIndex, nLen, nWidth;
+ sal_Int32 nIndex, nLen, nWidth;
rIStm >> aPt >> nIndex >> nLen >> nTmp >> nWidth;
if ( nTmp && ( static_cast< sal_uInt32 >( nTmp ) < ( SAL_MAX_INT16 - 1 ) ) )
{
- rIStm.Read( aByteStr.AllocBuffer( (USHORT)nTmp ), nTmp + 1 );
+ rIStm.Read( aByteStr.AllocBuffer( (sal_uInt16)nTmp ), nTmp + 1 );
UniString aStr( aByteStr, eActualCharSet );
if ( nUnicodeCommentActionNumber == i )
ImplReadUnicodeComment( nUnicodeCommentStreamPos, rIStm, aStr );
- rMtf.AddAction( new MetaStretchTextAction( aPt, nWidth, aStr, (USHORT) nIndex, (USHORT) nLen ) );
+ rMtf.AddAction( new MetaStretchTextAction( aPt, nWidth, aStr, (sal_uInt16) nIndex, (sal_uInt16) nLen ) );
}
rIStm.Seek( nActBegin + nActionSize );
}
@@ -1005,8 +1005,8 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_PEN_ACTION ):
{
- INT32 nPenWidth;
- INT16 nPenStyle;
+ sal_Int32 nPenWidth;
+ sal_Int16 nPenStyle;
ImplReadColor( rIStm, aActionColor );
rIStm >> nPenWidth >> nPenStyle;
@@ -1021,7 +1021,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_FILLBRUSH_ACTION ):
{
- INT16 nBrushStyle;
+ sal_Int16 nBrushStyle;
ImplReadColor( rIStm, aActionColor );
rIStm.SeekRel( 6L );
@@ -1044,9 +1044,9 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_CLIPREGION_ACTION ):
{
Region aRegion;
- INT16 nRegType;
- INT16 bIntersect;
- BOOL bClip = FALSE;
+ sal_Int16 nRegType;
+ sal_Int16 bIntersect;
+ sal_Bool bClip = sal_False;
rIStm >> nRegType >> bIntersect;
ImplReadRect( rIStm, aRect );
@@ -1062,7 +1062,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
ImplReadRect( rIStm, aRegRect );
aRegion = Region( aRegRect );
- bClip = TRUE;
+ bClip = sal_True;
}
break;
@@ -1070,25 +1070,25 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
{
ImplReadPoly( rIStm, aActionPoly );
aRegion = Region( aActionPoly );
- bClip = TRUE;
+ bClip = sal_True;
}
break;
case( 3 ):
{
PolyPolygon aPolyPoly;
- INT32 nPolyCount;
+ sal_Int32 nPolyCount;
rIStm >> nPolyCount;
- for( USHORT j = 0; j < (USHORT) nPolyCount; j++ )
+ for( sal_uInt16 j = 0; j < (sal_uInt16) nPolyCount; j++ )
{
ImplReadPoly( rIStm, aActionPoly );
aPolyPoly.Insert( aActionPoly );
}
aRegion = Region( aPolyPoly );
- bClip = TRUE;
+ bClip = sal_True;
}
break;
}
@@ -1117,7 +1117,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_RASTEROP_ACTION ):
{
RasterOp eRasterOp;
- INT16 nRasterOp;
+ sal_Int16 nRasterOp;
rIStm >> nRasterOp;
@@ -1175,13 +1175,13 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
{
Color aStartCol;
Color aEndCol;
- INT16 nStyle;
- INT16 nAngle;
- INT16 nBorder;
- INT16 nOfsX;
- INT16 nOfsY;
- INT16 nIntensityStart;
- INT16 nIntensityEnd;
+ sal_Int16 nStyle;
+ sal_Int16 nAngle;
+ sal_Int16 nBorder;
+ sal_Int16 nOfsX;
+ sal_Int16 nOfsY;
+ sal_Int16 nIntensityStart;
+ sal_Int16 nIntensityEnd;
ImplReadRect( rIStm, aRect );
rIStm >> nStyle;
@@ -1204,8 +1204,8 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_TRANSPARENT_COMMENT ):
{
PolyPolygon aPolyPoly;
- INT32 nFollowingActionCount;
- INT16 nTrans;
+ sal_Int32 nFollowingActionCount;
+ sal_Int16 nTrans;
rIStm >> aPolyPoly >> nTrans >> nFollowingActionCount;
ImplSkipActions( rIStm, nFollowingActionCount );
@@ -1223,7 +1223,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
Point aPos;
Size aSize;
Gradient aGradient;
- INT32 nFollowingActionCount;
+ sal_Int32 nFollowingActionCount;
rIStm >> aMtf >> aPos >> aSize >> aGradient >> nFollowingActionCount;
ImplSkipActions( rIStm, nFollowingActionCount );
@@ -1239,7 +1239,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
{
PolyPolygon aPolyPoly;
Hatch aHatch;
- INT32 nFollowingActionCount;
+ sal_Int32 nFollowingActionCount;
rIStm >> aPolyPoly >> aHatch >> nFollowingActionCount;
ImplSkipActions( rIStm, nFollowingActionCount );
@@ -1254,8 +1254,8 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_REFPOINT_COMMENT ):
{
Point aRefPoint;
- BOOL bSet;
- INT32 nFollowingActionCount;
+ sal_Bool bSet;
+ sal_Int32 nFollowingActionCount;
rIStm >> aRefPoint >> bSet >> nFollowingActionCount;
ImplSkipActions( rIStm, nFollowingActionCount );
@@ -1276,8 +1276,8 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_TEXTLINECOLOR_COMMENT ):
{
Color aColor;
- BOOL bSet;
- INT32 nFollowingActionCount;
+ sal_Bool bSet;
+ sal_Int32 nFollowingActionCount;
rIStm >> aColor >> bSet >> nFollowingActionCount;
ImplSkipActions( rIStm, nFollowingActionCount );
@@ -1295,7 +1295,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
long nWidth;
sal_uInt32 nStrikeout;
sal_uInt32 nUnderline;
- INT32 nFollowingActionCount;
+ sal_Int32 nFollowingActionCount;
rIStm >> aStartPt >> nWidth >> nStrikeout >> nUnderline >> nFollowingActionCount;
ImplSkipActions( rIStm, nFollowingActionCount );
@@ -1314,7 +1314,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
{
PolyPolygon aPolyPoly;
Gradient aGradient;
- INT32 nFollowingActionCount;
+ sal_Int32 nFollowingActionCount;
rIStm >> aPolyPoly >> aGradient >> nFollowingActionCount;
ImplSkipActions( rIStm, nFollowingActionCount );
@@ -1331,14 +1331,14 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
ByteString aComment;
sal_Int32 nValue;
sal_uInt32 nDataSize;
- BYTE* pData;
- INT32 nFollowingActionCount;
+ sal_uInt8* pData;
+ sal_Int32 nFollowingActionCount;
rIStm >> aComment >> nValue >> nDataSize;
if( nDataSize )
{
- pData = new BYTE[ nDataSize ];
+ pData = new sal_uInt8[ nDataSize ];
rIStm.Read( pData, nDataSize );
}
else
@@ -1379,13 +1379,13 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
void SVMConverter::ImplConvertToSVM1( SvStream& rOStm, GDIMetaFile& rMtf )
{
- ULONG nPos;
- ULONG nCountPos;
+ sal_uIntPtr nPos;
+ sal_uIntPtr nCountPos;
Font aSaveFont;
- const USHORT nOldFormat = rOStm.GetNumberFormatInt();
+ const sal_uInt16 nOldFormat = rOStm.GetNumberFormatInt();
rtl_TextEncoding eActualCharSet = gsl_getSystemTextEncoding();
const Size aPrefSize( rMtf.GetPrefSize() );
- BOOL bRop_0_1 = FALSE;
+ sal_Bool bRop_0_1 = sal_False;
VirtualDevice aSaveVDev;
Color aLineCol( COL_BLACK );
Stack aLineColStack;
@@ -1395,18 +1395,18 @@ void SVMConverter::ImplConvertToSVM1( SvStream& rOStm, GDIMetaFile& rMtf )
//MagicCode schreiben
rOStm << "SVGDI"; // Kennung
nPos = rOStm.Tell();
- rOStm << (INT16) 42; // HeaderSize
- rOStm << (INT16) 200; // VERSION
- rOStm << (INT32) aPrefSize.Width();
- rOStm << (INT32) aPrefSize.Height();
+ rOStm << (sal_Int16) 42; // HeaderSize
+ rOStm << (sal_Int16) 200; // VERSION
+ rOStm << (sal_Int32) aPrefSize.Width();
+ rOStm << (sal_Int32) aPrefSize.Height();
ImplWriteMapMode( rOStm, rMtf.GetPrefMapMode() );
// ActionCount wird spaeter geschrieben
nCountPos = rOStm.Tell();
rOStm.SeekRel( 4L );
- const INT32 nActCount = ImplWriteActions( rOStm, rMtf, aSaveVDev, bRop_0_1, aLineCol, aLineColStack, eActualCharSet );
- const ULONG nActPos = rOStm.Tell();
+ const sal_Int32 nActCount = ImplWriteActions( rOStm, rMtf, aSaveVDev, bRop_0_1, aLineCol, aLineColStack, eActualCharSet );
+ const sal_uIntPtr nActPos = rOStm.Tell();
rOStm.Seek( nCountPos );
rOStm << nActCount;
@@ -1420,13 +1420,13 @@ void SVMConverter::ImplConvertToSVM1( SvStream& rOStm, GDIMetaFile& rMtf )
// ------------------------------------------------------------------------
-ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
- VirtualDevice& rSaveVDev, BOOL& rRop_0_1,
+sal_uIntPtr SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
+ VirtualDevice& rSaveVDev, sal_Bool& rRop_0_1,
Color& rLineCol, Stack& rLineColStack,
rtl_TextEncoding& rActualCharSet )
{
- ULONG nCount = 0;
- for( ULONG i = 0, nActionCount = rMtf.GetActionCount(); i < nActionCount; i++ )
+ sal_uIntPtr nCount = 0;
+ for( sal_uIntPtr i = 0, nActionCount = rMtf.GetActionCount(); i < nActionCount; i++ )
{
const MetaAction* pAction = rMtf.GetAction( i );
@@ -1436,8 +1436,8 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
{
MetaPixelAction* pAct = (MetaPixelAction*) pAction;
- rOStm << (INT16) GDI_PIXEL_ACTION;
- rOStm << (INT32) 18;
+ rOStm << (sal_Int16) GDI_PIXEL_ACTION;
+ rOStm << (sal_Int32) 18;
rOStm << pAct->GetPoint();
ImplWriteColor( rOStm, pAct->GetColor() );
nCount++;
@@ -1448,8 +1448,8 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
{
MetaPointAction* pAct = (MetaPointAction*) pAction;
- rOStm << (INT16) GDI_POINT_ACTION;
- rOStm << (INT32) 12;
+ rOStm << (sal_Int16) GDI_POINT_ACTION;
+ rOStm << (sal_Int32) 12;
rOStm << pAct->GetPoint();
nCount++;
}
@@ -1470,25 +1470,25 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
if(bLineJoin)
{
- rOStm << (INT16) GDI_LINEJOIN_ACTION;
- rOStm << (INT32) 6;
- rOStm << (INT16) rInfo.GetLineJoin();
+ rOStm << (sal_Int16) GDI_LINEJOIN_ACTION;
+ rOStm << (sal_Int32) 6;
+ rOStm << (sal_Int16) rInfo.GetLineJoin();
}
if(bLineDashDot)
{
- rOStm << (INT16) GDI_LINEDASHDOT_ACTION;
- rOStm << (INT32) 4 + 16;
- rOStm << (INT16)rInfo.GetDashCount();
- rOStm << (INT32)rInfo.GetDashLen();
- rOStm << (INT16)rInfo.GetDotCount();
- rOStm << (INT32)rInfo.GetDotLen();
- rOStm << (INT32)rInfo.GetDistance();
+ rOStm << (sal_Int16) GDI_LINEDASHDOT_ACTION;
+ rOStm << (sal_Int32) 4 + 16;
+ rOStm << (sal_Int16)rInfo.GetDashCount();
+ rOStm << (sal_Int32)rInfo.GetDashLen();
+ rOStm << (sal_Int16)rInfo.GetDotCount();
+ rOStm << (sal_Int32)rInfo.GetDotLen();
+ rOStm << (sal_Int32)rInfo.GetDistance();
}
}
- rOStm << (INT16) GDI_LINE_ACTION;
- rOStm << (INT32) 20;
+ rOStm << (sal_Int16) GDI_LINE_ACTION;
+ rOStm << (sal_Int32) 20;
rOStm << pAct->GetStartPoint();
rOStm << pAct->GetEndPoint();
nCount++;
@@ -1515,11 +1515,11 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
{
MetaRectAction* pAct = (MetaRectAction*) pAction;
- rOStm << (INT16) GDI_RECT_ACTION;
- rOStm << (INT32) 28;
+ rOStm << (sal_Int16) GDI_RECT_ACTION;
+ rOStm << (sal_Int32) 28;
ImplWriteRect( rOStm, pAct->GetRect() );
- rOStm << (INT32) 0;
- rOStm << (INT32) 0;
+ rOStm << (sal_Int32) 0;
+ rOStm << (sal_Int32) 0;
nCount++;
}
break;
@@ -1528,11 +1528,11 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
{
MetaRoundRectAction* pAct = (MetaRoundRectAction*) pAction;
- rOStm << (INT16) GDI_RECT_ACTION;
- rOStm << (INT32) 28;
+ rOStm << (sal_Int16) GDI_RECT_ACTION;
+ rOStm << (sal_Int32) 28;
ImplWriteRect( rOStm, pAct->GetRect() );
- rOStm << (INT32) pAct->GetHorzRound();
- rOStm << (INT32) pAct->GetVertRound();
+ rOStm << (sal_Int32) pAct->GetHorzRound();
+ rOStm << (sal_Int32) pAct->GetVertRound();
nCount++;
}
break;
@@ -1541,8 +1541,8 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
{
MetaEllipseAction* pAct = (MetaEllipseAction*) pAction;
- rOStm << (INT16) GDI_ELLIPSE_ACTION;
- rOStm << (INT32) 20;
+ rOStm << (sal_Int16) GDI_ELLIPSE_ACTION;
+ rOStm << (sal_Int32) 20;
ImplWriteRect( rOStm, pAct->GetRect() );
nCount++;
}
@@ -1552,8 +1552,8 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
{
MetaArcAction* pAct = (MetaArcAction*) pAction;
- rOStm << (INT16) GDI_ARC_ACTION;
- rOStm << (INT32) 36;
+ rOStm << (sal_Int16) GDI_ARC_ACTION;
+ rOStm << (sal_Int32) 36;
ImplWriteRect( rOStm, pAct->GetRect() );
rOStm << pAct->GetStartPoint();
rOStm << pAct->GetEndPoint();
@@ -1565,8 +1565,8 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
{
MetaPieAction* pAct = (MetaPieAction*) pAction;
- rOStm << (INT16) GDI_PIE_ACTION;
- rOStm << (INT32) 36;
+ rOStm << (sal_Int16) GDI_PIE_ACTION;
+ rOStm << (sal_Int32) 36;
ImplWriteRect( rOStm, pAct->GetRect() );
rOStm << pAct->GetStartPoint();
rOStm << pAct->GetEndPoint();
@@ -1579,13 +1579,13 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
MetaChordAction* pAct = (MetaChordAction*) pAction;
Polygon aChordPoly( pAct->GetRect(), pAct->GetStartPoint(),
pAct->GetEndPoint(), POLY_CHORD );
- const USHORT nPoints = aChordPoly.GetSize();
+ const sal_uInt16 nPoints = aChordPoly.GetSize();
- rOStm << (INT16) GDI_POLYGON_ACTION;
- rOStm << (INT32) ( 8 + ( nPoints << 3 ) );
- rOStm << (INT32) nPoints;
+ rOStm << (sal_Int16) GDI_POLYGON_ACTION;
+ rOStm << (sal_Int32) ( 8 + ( nPoints << 3 ) );
+ rOStm << (sal_Int32) nPoints;
- for( USHORT n = 0; n < nPoints; n++ )
+ for( sal_uInt16 n = 0; n < nPoints; n++ )
rOStm << aChordPoly[ n ];
nCount++;
}
@@ -1601,7 +1601,7 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
Polygon aSimplePoly;
pAct->GetPolygon().AdaptiveSubdivide(aSimplePoly);
const LineInfo& rInfo = pAct->GetLineInfo();
- const USHORT nPoints(aSimplePoly.GetSize());
+ const sal_uInt16 nPoints(aSimplePoly.GetSize());
const bool bFatLine(!rInfo.IsDefault() && (LINE_NONE != rInfo.GetStyle()));
const bool bLineJoin(bFatLine && basegfx::B2DLINEJOIN_ROUND != rInfo.GetLineJoin());
const bool bLineDashDot(LINE_DASH == rInfo.GetStyle());
@@ -1613,28 +1613,28 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
if(bLineJoin)
{
- rOStm << (INT16) GDI_LINEJOIN_ACTION;
- rOStm << (INT32) 6;
- rOStm << (INT16) rInfo.GetLineJoin();
+ rOStm << (sal_Int16) GDI_LINEJOIN_ACTION;
+ rOStm << (sal_Int32) 6;
+ rOStm << (sal_Int16) rInfo.GetLineJoin();
}
}
if(bLineDashDot)
{
- rOStm << (INT16) GDI_LINEDASHDOT_ACTION;
- rOStm << (INT32) 4 + 16;
- rOStm << (INT16)rInfo.GetDashCount();
- rOStm << (INT32)rInfo.GetDashLen();
- rOStm << (INT16)rInfo.GetDotCount();
- rOStm << (INT32)rInfo.GetDotLen();
- rOStm << (INT32)rInfo.GetDistance();
+ rOStm << (sal_Int16) GDI_LINEDASHDOT_ACTION;
+ rOStm << (sal_Int32) 4 + 16;
+ rOStm << (sal_Int16)rInfo.GetDashCount();
+ rOStm << (sal_Int32)rInfo.GetDashLen();
+ rOStm << (sal_Int16)rInfo.GetDotCount();
+ rOStm << (sal_Int32)rInfo.GetDotLen();
+ rOStm << (sal_Int32)rInfo.GetDistance();
}
- rOStm << (INT16) GDI_POLYLINE_ACTION;
- rOStm << (INT32) ( 8 + ( nPoints << 3 ) );
- rOStm << (INT32) nPoints;
+ rOStm << (sal_Int16) GDI_POLYLINE_ACTION;
+ rOStm << (sal_Int32) ( 8 + ( nPoints << 3 ) );
+ rOStm << (sal_Int32) nPoints;
- for( USHORT n = 0; n < nPoints; n++ )
+ for( sal_uInt16 n = 0; n < nPoints; n++ )
{
rOStm << aSimplePoly[ n ];
}
@@ -1673,13 +1673,13 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
// a polygon representing the curve as good as possible
Polygon aSimplePoly;
pAct->GetPolygon().AdaptiveSubdivide(aSimplePoly);
- const USHORT nPoints(aSimplePoly.GetSize());
+ const sal_uInt16 nPoints(aSimplePoly.GetSize());
- rOStm << (INT16) GDI_POLYGON_ACTION;
- rOStm << (INT32) ( 8 + ( nPoints << 3 ) );
- rOStm << (INT32) nPoints;
+ rOStm << (sal_Int16) GDI_POLYGON_ACTION;
+ rOStm << (sal_Int32) ( 8 + ( nPoints << 3 ) );
+ rOStm << (sal_Int32) nPoints;
- for( USHORT n = 0; n < nPoints; n++ )
+ for( sal_uInt16 n = 0; n < nPoints; n++ )
rOStm << aSimplePoly[ n ];
nCount++;
@@ -1710,17 +1710,17 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
MetaTextAction* pAct = (MetaTextAction*) pAction;
String aUniText( pAct->GetText() );
ByteString aText( aUniText, rActualCharSet );
- const ULONG nStrLen = aText.Len();
+ const sal_uIntPtr nStrLen = aText.Len();
if ( ImplWriteUnicodeComment( rOStm, aUniText ) )
nCount++;
- rOStm << (INT16) GDI_TEXT_ACTION;
- rOStm << (INT32) ( 24 + ( nStrLen + 1 ) );
+ rOStm << (sal_Int16) GDI_TEXT_ACTION;
+ rOStm << (sal_Int32) ( 24 + ( nStrLen + 1 ) );
rOStm << pAct->GetPoint();
- rOStm << (INT32) pAct->GetIndex();
- rOStm << (INT32) pAct->GetLen();
- rOStm << (INT32) nStrLen;
+ rOStm << (sal_Int32) pAct->GetIndex();
+ rOStm << (sal_Int32) pAct->GetLen();
+ rOStm << (sal_Int32) nStrLen;
rOStm.Write( aText.GetBuffer(), nStrLen + 1 );
nCount++;
}
@@ -1731,9 +1731,9 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
MetaTextArrayAction* pAct = (MetaTextArrayAction*)pAction;
ByteString aText( pAct->GetText(), rActualCharSet );
String aUniText( pAct->GetText(), pAct->GetIndex(), pAct->GetLen() );
- ULONG nAryLen;
- ULONG nLen = pAct->GetLen();
- const ULONG nTextLen = aText.Len();
+ sal_uIntPtr nAryLen;
+ sal_uIntPtr nLen = pAct->GetLen();
+ const sal_uIntPtr nTextLen = aText.Len();
sal_Int32* pDXArray = pAct->GetDXArray();
if ( ImplWriteUnicodeComment( rOStm, aUniText ) )
@@ -1752,17 +1752,17 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
else
nAryLen = nLen; // #105987# Write out all of DX array
- rOStm << (INT16) GDI_TEXTARRAY_ACTION;
- rOStm << (INT32) ( 28 + ( nLen + 1 ) + ( nAryLen * 4 ) );
+ rOStm << (sal_Int16) GDI_TEXTARRAY_ACTION;
+ rOStm << (sal_Int32) ( 28 + ( nLen + 1 ) + ( nAryLen * 4 ) );
rOStm << pAct->GetPoint();
- rOStm << (INT32) 0;
- rOStm << (INT32) nLen;
- rOStm << (INT32) nLen;
- rOStm << (INT32) nAryLen;
+ rOStm << (sal_Int32) 0;
+ rOStm << (sal_Int32) nLen;
+ rOStm << (sal_Int32) nLen;
+ rOStm << (sal_Int32) nAryLen;
rOStm.Write( aText.GetBuffer()+pAct->GetIndex(), nLen + 1 );
- for( ULONG n = 0UL ; n < nAryLen; n++ )
- rOStm << (INT32) pDXArray[ n ];
+ for( sal_uIntPtr n = 0UL ; n < nAryLen; n++ )
+ rOStm << (sal_Int32) pDXArray[ n ];
nCount++;
}
@@ -1773,18 +1773,18 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
MetaStretchTextAction* pAct = (MetaStretchTextAction*) pAction;
String aUniText( pAct->GetText() );
ByteString aText( aUniText, rActualCharSet );
- const ULONG nStrLen = aText.Len();
+ const sal_uIntPtr nStrLen = aText.Len();
if ( ImplWriteUnicodeComment( rOStm, aUniText ) )
nCount++;
- rOStm << (INT16) GDI_STRETCHTEXT_ACTION;
- rOStm << (INT32) ( 28 + ( nStrLen + 1 ) );
+ rOStm << (sal_Int16) GDI_STRETCHTEXT_ACTION;
+ rOStm << (sal_Int32) ( 28 + ( nStrLen + 1 ) );
rOStm << pAct->GetPoint();
- rOStm << (INT32) pAct->GetIndex();
- rOStm << (INT32) pAct->GetLen();
- rOStm << (INT32) nStrLen;
- rOStm << (INT32) pAct->GetWidth();
+ rOStm << (sal_Int32) pAct->GetIndex();
+ rOStm << (sal_Int32) pAct->GetLen();
+ rOStm << (sal_Int32) nStrLen;
+ rOStm << (sal_Int32) pAct->GetWidth();
rOStm.Write( aText.GetBuffer(), nStrLen + 1 );
nCount++;
}
@@ -1794,8 +1794,8 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
{
MetaBmpAction* pAct = (MetaBmpAction*) pAction;
- rOStm << (INT16) GDI_BITMAP_ACTION;
- rOStm << (INT32) 12;
+ rOStm << (sal_Int16) GDI_BITMAP_ACTION;
+ rOStm << (sal_Int32) 12;
rOStm << pAct->GetPoint();
rOStm << pAct->GetBitmap();
nCount++;
@@ -1806,8 +1806,8 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
{
MetaBmpScaleAction* pAct = (MetaBmpScaleAction*) pAction;
- rOStm << (INT16) GDI_BITMAPSCALE_ACTION;
- rOStm << (INT32) 20;
+ rOStm << (sal_Int16) GDI_BITMAPSCALE_ACTION;
+ rOStm << (sal_Int32) 20;
rOStm << pAct->GetPoint();
rOStm << pAct->GetSize();
rOStm << pAct->GetBitmap();
@@ -1819,8 +1819,8 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
{
MetaBmpScalePartAction* pAct = (MetaBmpScalePartAction*) pAction;
- rOStm << (INT16) GDI_BITMAPSCALEPART_ACTION;
- rOStm << (INT32) 36;
+ rOStm << (sal_Int16) GDI_BITMAPSCALEPART_ACTION;
+ rOStm << (sal_Int32) 36;
rOStm << pAct->GetDestPoint();
rOStm << pAct->GetDestSize();
rOStm << pAct->GetSrcPoint();
@@ -1835,8 +1835,8 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
MetaBmpExAction* pAct = (MetaBmpExAction*) pAction;
const Bitmap aBmp( Graphic( pAct->GetBitmapEx() ).GetBitmap() );
- rOStm << (INT16) GDI_BITMAP_ACTION;
- rOStm << (INT32) 12;
+ rOStm << (sal_Int16) GDI_BITMAP_ACTION;
+ rOStm << (sal_Int32) 12;
rOStm << pAct->GetPoint();
rOStm << aBmp;
nCount++;
@@ -1848,8 +1848,8 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
MetaBmpExScaleAction* pAct = (MetaBmpExScaleAction*) pAction;
const Bitmap aBmp( Graphic( pAct->GetBitmapEx() ).GetBitmap() );
- rOStm << (INT16) GDI_BITMAPSCALE_ACTION;
- rOStm << (INT32) 20;
+ rOStm << (sal_Int16) GDI_BITMAPSCALE_ACTION;
+ rOStm << (sal_Int32) 20;
rOStm << pAct->GetPoint();
rOStm << pAct->GetSize();
rOStm << aBmp;
@@ -1862,8 +1862,8 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
MetaBmpExScalePartAction* pAct = (MetaBmpExScalePartAction*) pAction;
const Bitmap aBmp( Graphic( pAct->GetBitmapEx() ).GetBitmap() );
- rOStm << (INT16) GDI_BITMAPSCALEPART_ACTION;
- rOStm << (INT32) 36;
+ rOStm << (sal_Int16) GDI_BITMAPSCALEPART_ACTION;
+ rOStm << (sal_Int32) 36;
rOStm << pAct->GetDestPoint();
rOStm << pAct->GetDestSize();
rOStm << pAct->GetSrcPoint();
@@ -1878,18 +1878,18 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
MetaGradientAction* pAct = (MetaGradientAction*) pAction;
const Gradient& rGrad = pAct->GetGradient();
- rOStm << (INT16) GDI_GRADIENT_ACTION;
- rOStm << (INT32) 46;
+ rOStm << (sal_Int16) GDI_GRADIENT_ACTION;
+ rOStm << (sal_Int32) 46;
ImplWriteRect( rOStm, pAct->GetRect() );
- rOStm << (INT16) rGrad.GetStyle();
+ rOStm << (sal_Int16) rGrad.GetStyle();
ImplWriteColor( rOStm, rGrad.GetStartColor() );
ImplWriteColor( rOStm, rGrad.GetEndColor() );
- rOStm << (INT16) rGrad.GetAngle();
- rOStm << (INT16) rGrad.GetBorder();
- rOStm << (INT16) rGrad.GetOfsX();
- rOStm << (INT16) rGrad.GetOfsY();
- rOStm << (INT16) rGrad.GetStartIntensity();
- rOStm << (INT16) rGrad.GetEndIntensity();
+ rOStm << (sal_Int16) rGrad.GetAngle();
+ rOStm << (sal_Int16) rGrad.GetBorder();
+ rOStm << (sal_Int16) rGrad.GetOfsX();
+ rOStm << (sal_Int16) rGrad.GetOfsY();
+ rOStm << (sal_Int16) rGrad.GetStartIntensity();
+ rOStm << (sal_Int16) rGrad.GetEndIntensity();
nCount++;
}
break;
@@ -1897,10 +1897,10 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
case( META_GRADIENTEX_ACTION ):
{
const MetaGradientExAction* pA = (MetaGradientExAction*) pAction;
- ULONG nOldPos, nNewPos;
+ sal_uIntPtr nOldPos, nNewPos;
// write RefPoint comment
- rOStm << (INT16) GDI_GRADIENTEX_COMMENT;
+ rOStm << (sal_Int16) GDI_GRADIENTEX_COMMENT;
// we'll write the ActionSize later
nOldPos = rOStm.Tell();
@@ -1908,12 +1908,12 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
// write data
rOStm << pA->GetPolyPolygon() << pA->GetGradient();
- rOStm << (INT32) 0; // number of actions that follow this comment
+ rOStm << (sal_Int32) 0; // number of actions that follow this comment
// calculate and write ActionSize of comment
nNewPos = rOStm.Tell();
rOStm.Seek( nOldPos );
- rOStm << (INT32) ( nNewPos - nOldPos );
+ rOStm << (sal_Int32) ( nNewPos - nOldPos );
rOStm.Seek( nNewPos );
nCount++;
@@ -1929,11 +1929,11 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
ImplWriteLineColor( rOStm, rColor, 1 );
ImplWriteFillColor( rOStm, rColor, 1 );
- rOStm << (INT16) GDI_RECT_ACTION;
- rOStm << (INT32) 28;
+ rOStm << (sal_Int16) GDI_RECT_ACTION;
+ rOStm << (sal_Int32) 28;
ImplWriteRect( rOStm, pAct->GetRect() );
- rOStm << (INT32) 0;
- rOStm << (INT32) 0;
+ rOStm << (sal_Int32) 0;
+ rOStm << (sal_Int32) 0;
ImplWritePopAction( rOStm );
nCount += 5;
@@ -1946,18 +1946,18 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
const Region& rRegion = pAct->GetRegion();
Rectangle aClipRect;
- rOStm << (INT16) GDI_CLIPREGION_ACTION;
- rOStm << (INT32) 24;
+ rOStm << (sal_Int16) GDI_CLIPREGION_ACTION;
+ rOStm << (sal_Int32) 24;
if( pAct->IsClipping() )
{
aClipRect = rRegion.GetBoundRect();
- rOStm << (INT16) 1;
+ rOStm << (sal_Int16) 1;
}
else
- rOStm << (INT16) 0;
+ rOStm << (sal_Int16) 0;
- rOStm << (INT16) 0;
+ rOStm << (sal_Int16) 0;
ImplWriteRect( rOStm, aClipRect );
if( pAct->IsClipping() )
@@ -1971,8 +1971,8 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
{
MetaISectRectClipRegionAction* pAct = (MetaISectRectClipRegionAction*) pAction;
- rOStm << (INT16) GDI_ISECTCLIPREGION_ACTION;
- rOStm << (INT32) 20;
+ rOStm << (sal_Int16) GDI_ISECTCLIPREGION_ACTION;
+ rOStm << (sal_Int32) 20;
rOStm << pAct->GetRect();
nCount++;
}
@@ -1982,10 +1982,10 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
{
MetaMoveClipRegionAction* pAct = (MetaMoveClipRegionAction*) pAction;
- rOStm << (INT16) GDI_MOVECLIPREGION_ACTION;
- rOStm << (INT32) 12;
- rOStm << (INT32) pAct->GetHorzMove();
- rOStm << (INT32) pAct->GetVertMove();
+ rOStm << (sal_Int16) GDI_MOVECLIPREGION_ACTION;
+ rOStm << (sal_Int32) 12;
+ rOStm << (sal_Int32) pAct->GetHorzMove();
+ rOStm << (sal_Int32) pAct->GetVertMove();
nCount++;
}
break;
@@ -2056,8 +2056,8 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
{
MetaMapModeAction* pAct = (MetaMapModeAction*) pAction;
- rOStm << (INT16) GDI_MAPMODE_ACTION;
- rOStm << (INT32) 30;
+ rOStm << (sal_Int16) GDI_MAPMODE_ACTION;
+ rOStm << (sal_Int32) 30;
ImplWriteMapMode( rOStm, pAct->GetMapMode() );
nCount++;
}
@@ -2094,7 +2094,7 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
if( ( pAct->GetRasterOp() != ROP_0 ) && ( pAct->GetRasterOp() != ROP_1 ) )
{
- INT16 nRasterOp;
+ sal_Int16 nRasterOp;
// Falls vorher ROP_0/1 gesetzt war, alten
// Zustand durch Pop erst wieder herstellen
@@ -2102,7 +2102,7 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
{
ImplWritePopAction( rOStm );
rSaveVDev.Pop();
- rRop_0_1 = FALSE;
+ rRop_0_1 = sal_False;
nCount++;
}
@@ -2134,7 +2134,7 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
}
ImplWriteRasterOpAction( rOStm, 0 );
- rRop_0_1 = TRUE;
+ rRop_0_1 = sal_True;
nCount += 4;
}
}
@@ -2143,12 +2143,12 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
case( META_TRANSPARENT_ACTION ):
{
const PolyPolygon& rPolyPoly = ( (MetaTransparentAction*) pAction )->GetPolyPolygon();
- const INT16 nTrans = ( (MetaTransparentAction*) pAction )->GetTransparence();
- const INT16 nBrushStyle = ( nTrans < 38 ) ? 8 : ( nTrans < 63 ) ? 9 : 10;
- ULONG nOldPos, nNewPos;
+ const sal_Int16 nTrans = ( (MetaTransparentAction*) pAction )->GetTransparence();
+ const sal_Int16 nBrushStyle = ( nTrans < 38 ) ? 8 : ( nTrans < 63 ) ? 9 : 10;
+ sal_uIntPtr nOldPos, nNewPos;
// write transparence comment
- rOStm << (INT16) GDI_TRANSPARENT_COMMENT;
+ rOStm << (sal_Int16) GDI_TRANSPARENT_COMMENT;
// we'll write the ActionSize later
nOldPos = rOStm.Tell();
@@ -2157,12 +2157,12 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
// write comment data
rOStm << rPolyPoly;
rOStm << nTrans;
- rOStm << (INT32) 15; // number of actions that follow this comment
+ rOStm << (sal_Int32) 15; // number of actions that follow this comment
// calculate and write ActionSize of comment
nNewPos = rOStm.Tell();
rOStm.Seek( nOldPos );
- rOStm << (INT32) ( nNewPos - nOldPos );
+ rOStm << (sal_Int32) ( nNewPos - nOldPos );
rOStm.Seek( nNewPos );
{
@@ -2208,10 +2208,10 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
const Point& rPos = pA->GetPoint();
const Size& rSize = pA->GetSize();
const Gradient& rGradient = pA->GetGradient();
- ULONG nOldPos, nNewPos;
+ sal_uIntPtr nOldPos, nNewPos;
// write RefPoint comment
- rOStm << (INT16) GDI_FLOATTRANSPARENT_COMMENT;
+ rOStm << (sal_Int16) GDI_FLOATTRANSPARENT_COMMENT;
// we'll write the ActionSize later
nOldPos = rOStm.Tell();
@@ -2223,12 +2223,12 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
// calculate and write ActionSize of comment
nNewPos = rOStm.Tell();
rOStm.Seek( nOldPos );
- rOStm << (INT32) ( nNewPos - nOldPos + 4 );
+ rOStm << (sal_Int32) ( nNewPos - nOldPos + 4 );
rOStm.Seek( ( nOldPos = nNewPos ) + 4 );
{
// write actions for float transparence
- ULONG nAddCount;
+ sal_uIntPtr nAddCount;
GDIMetaFile aMtf( rTransMtf );
const Size aSrcSize( rTransMtf.GetPrefSize() );
Point aSrcPt( rTransMtf.GetPrefMapMode().GetOrigin() );
@@ -2250,7 +2250,7 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
nAddCount = ImplWriteActions( rOStm, aMtf, rSaveVDev, rRop_0_1, rLineCol, rLineColStack, rActualCharSet );
nNewPos = rOStm.Tell();
rOStm.Seek( nOldPos );
- rOStm << (INT32) nAddCount;
+ rOStm << (sal_Int32) nAddCount;
rOStm.Seek( nNewPos );
#ifdef CVTSVM_WRITE_SUBACTIONCOUNT
@@ -2267,10 +2267,10 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
const MetaHatchAction* pA = (MetaHatchAction*) pAction;
const PolyPolygon& rPolyPoly = pA->GetPolyPolygon();
const Hatch& rHatch = pA->GetHatch();
- ULONG nOldPos, nNewPos, nAddCount;
+ sal_uIntPtr nOldPos, nNewPos, nAddCount;
// write hatch comment
- rOStm << (INT16) GDI_HATCH_COMMENT;
+ rOStm << (sal_Int16) GDI_HATCH_COMMENT;
// we'll write the ActionSize later
nOldPos = rOStm.Tell();
@@ -2283,7 +2283,7 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
// calculate and write ActionSize of comment
nNewPos = rOStm.Tell();
rOStm.Seek( nOldPos );
- rOStm << (INT32) ( nNewPos - nOldPos + 4 );
+ rOStm << (sal_Int32) ( nNewPos - nOldPos + 4 );
rOStm.Seek( ( nOldPos = nNewPos ) + 4 );
{
@@ -2295,7 +2295,7 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
nAddCount = ImplWriteActions( rOStm, aTmpMtf, rSaveVDev, rRop_0_1, rLineCol, rLineColStack, rActualCharSet );
nNewPos = rOStm.Tell();
rOStm.Seek( nOldPos );
- rOStm << (INT32) nAddCount;
+ rOStm << (sal_Int32) nAddCount;
rOStm.Seek( nNewPos );
#ifdef CVTSVM_WRITE_SUBACTIONCOUNT
@@ -2311,11 +2311,11 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
{
const MetaRefPointAction* pA = (MetaRefPointAction*) pAction;
const Point& rRefPoint = pA->GetRefPoint();
- const BOOL bSet = pA->IsSetting();
- ULONG nOldPos, nNewPos;
+ const sal_Bool bSet = pA->IsSetting();
+ sal_uIntPtr nOldPos, nNewPos;
// write RefPoint comment
- rOStm << (INT16) GDI_REFPOINT_COMMENT;
+ rOStm << (sal_Int16) GDI_REFPOINT_COMMENT;
// we'll write the ActionSize later
nOldPos = rOStm.Tell();
@@ -2323,12 +2323,12 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
// write data
rOStm << rRefPoint << bSet;
- rOStm << (INT32) 0; // number of actions that follow this comment
+ rOStm << (sal_Int32) 0; // number of actions that follow this comment
// calculate and write ActionSize of comment
nNewPos = rOStm.Tell();
rOStm.Seek( nOldPos );
- rOStm << (INT32) ( nNewPos - nOldPos );
+ rOStm << (sal_Int32) ( nNewPos - nOldPos );
rOStm.Seek( nNewPos );
nCount++;
@@ -2339,11 +2339,11 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
{
const MetaTextLineColorAction* pA = (MetaTextLineColorAction*) pAction;
const Color& rColor = pA->GetColor();
- const BOOL bSet = pA->IsSetting();
- ULONG nOldPos, nNewPos;
+ const sal_Bool bSet = pA->IsSetting();
+ sal_uIntPtr nOldPos, nNewPos;
// write RefPoint comment
- rOStm << (INT16) GDI_TEXTLINECOLOR_COMMENT;
+ rOStm << (sal_Int16) GDI_TEXTLINECOLOR_COMMENT;
// we'll write the ActionSize later
nOldPos = rOStm.Tell();
@@ -2351,12 +2351,12 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
// write data
rOStm << rColor << bSet;
- rOStm << (INT32) 0; // number of actions that follow this comment
+ rOStm << (sal_Int32) 0; // number of actions that follow this comment
// calculate and write ActionSize of comment
nNewPos = rOStm.Tell();
rOStm.Seek( nOldPos );
- rOStm << (INT32) ( nNewPos - nOldPos );
+ rOStm << (sal_Int32) ( nNewPos - nOldPos );
rOStm.Seek( nNewPos );
nCount++;
@@ -2375,10 +2375,10 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
const long nWidth = pA->GetWidth();
const FontStrikeout eStrikeout = pA->GetStrikeout();
const FontUnderline eUnderline = pA->GetUnderline();
- ULONG nOldPos, nNewPos;
+ sal_uIntPtr nOldPos, nNewPos;
// write RefPoint comment
- rOStm << (INT16) GDI_TEXTLINE_COMMENT;
+ rOStm << (sal_Int16) GDI_TEXTLINE_COMMENT;
// we'll write the ActionSize later
nOldPos = rOStm.Tell();
@@ -2388,12 +2388,12 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
rOStm << rStartPt << nWidth <<
static_cast<sal_uInt32>(eStrikeout) <<
static_cast<sal_uInt32>(eUnderline);
- rOStm << (INT32) 0; // number of actions that follow this comment
+ rOStm << (sal_Int32) 0; // number of actions that follow this comment
// calculate and write ActionSize of comment
nNewPos = rOStm.Tell();
rOStm.Seek( nOldPos );
- rOStm << (INT32) ( nNewPos - nOldPos );
+ rOStm << (sal_Int32) ( nNewPos - nOldPos );
rOStm.Seek( nNewPos );
nCount++;
@@ -2407,10 +2407,10 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
{
const MetaCommentAction* pA = (MetaCommentAction*) pAction;
const sal_uInt32 nDataSize = pA->GetDataSize();
- ULONG nOldPos, nNewPos;
+ sal_uIntPtr nOldPos, nNewPos;
// write RefPoint comment
- rOStm << (INT16) GDI_COMMENT_COMMENT;
+ rOStm << (sal_Int16) GDI_COMMENT_COMMENT;
// we'll write the ActionSize later
nOldPos = rOStm.Tell();
@@ -2422,12 +2422,12 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
if( nDataSize )
rOStm.Write( pA->GetData(), nDataSize );
- rOStm << (INT32) 0; // number of actions that follow this comment
+ rOStm << (sal_Int32) 0; // number of actions that follow this comment
// calculate and write ActionSize of comment
nNewPos = rOStm.Tell();
rOStm.Seek( nOldPos );
- rOStm << (INT32) ( nNewPos - nOldPos );
+ rOStm << (sal_Int32) ( nNewPos - nOldPos );
rOStm.Seek( nNewPos );
nCount++;
diff --git a/vcl/source/gdi/font.cxx b/vcl/source/gdi/font.cxx
index e26c15309c54..7bea58f97f5a 100644
--- a/vcl/source/gdi/font.cxx
+++ b/vcl/source/gdi/font.cxx
@@ -170,7 +170,7 @@ void Impl_Font::AskConfig()
String aShortName;
String aFamilyName;
- ULONG nType = 0;
+ sal_uIntPtr nType = 0;
FontWeight eWeight = WEIGHT_DONTKNOW;
FontWidth eWidthType = WIDTH_DONTKNOW;
String aMapName = maFamilyName;
@@ -347,7 +347,7 @@ void Font::SetFillColor( const Color& rColor )
// -----------------------------------------------------------------------
-void Font::SetTransparent( BOOL bTransparent )
+void Font::SetTransparent( sal_Bool bTransparent )
{
DBG_CHKTHIS( Font, NULL );
@@ -484,7 +484,7 @@ void Font::SetOrientation( short nOrientation )
// -----------------------------------------------------------------------
-void Font::SetVertical( BOOL bVertical )
+void Font::SetVertical( sal_Bool bVertical )
{
DBG_CHKTHIS( Font, NULL );
@@ -510,7 +510,7 @@ void Font::SetKerning( FontKerning nKerning )
// -----------------------------------------------------------------------
-BOOL Font::IsKerning() const
+sal_Bool Font::IsKerning() const
{
return (mpImplFont->mnKerning & KERNING_FONTSPECIFIC) != 0;
}
@@ -556,7 +556,7 @@ void Font::SetItalic( FontItalic eItalic )
// -----------------------------------------------------------------------
-void Font::SetOutline( BOOL bOutline )
+void Font::SetOutline( sal_Bool bOutline )
{
DBG_CHKTHIS( Font, NULL );
@@ -569,7 +569,7 @@ void Font::SetOutline( BOOL bOutline )
// -----------------------------------------------------------------------
-void Font::SetShadow( BOOL bShadow )
+void Font::SetShadow( sal_Bool bShadow )
{
DBG_CHKTHIS( Font, NULL );
@@ -647,7 +647,7 @@ void Font::SetEmphasisMark( FontEmphasisMark eEmphasisMark )
// -----------------------------------------------------------------------
-void Font::SetWordLineMode( BOOL bWordLine )
+void Font::SetWordLineMode( sal_Bool bWordLine )
{
DBG_CHKTHIS( Font, NULL );
@@ -688,17 +688,17 @@ Font& Font::operator=( const Font& rFont )
// -----------------------------------------------------------------------
-BOOL Font::operator==( const Font& rFont ) const
+sal_Bool Font::operator==( const Font& rFont ) const
{
DBG_CHKTHIS( Font, NULL );
DBG_CHKOBJ( &rFont, Font, NULL );
if( mpImplFont == rFont.mpImplFont )
- return TRUE;
+ return sal_True;
if( *mpImplFont == *rFont.mpImplFont )
- return TRUE;
+ return sal_True;
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -773,9 +773,9 @@ void Font::GetFontAttributes( ImplFontAttributes& rAttrs ) const
SvStream& operator>>( SvStream& rIStm, Impl_Font& rImpl_Font )
{
VersionCompat aCompat( rIStm, STREAM_READ );
- UINT16 nTmp16;
- BOOL bTmp;
- BYTE nTmp8;
+ sal_uInt16 nTmp16;
+ sal_Bool bTmp;
+ sal_uInt8 nTmp8;
rIStm.ReadByteString( rImpl_Font.maFamilyName, rIStm.GetStreamCharSet() );
rIStm.ReadByteString( rImpl_Font.maStyleName, rIStm.GetStreamCharSet() );
@@ -824,31 +824,31 @@ SvStream& operator<<( SvStream& rOStm, const Impl_Font& rImpl_Font )
rOStm.WriteByteString( rImpl_Font.maStyleName, rOStm.GetStreamCharSet() );
rOStm << rImpl_Font.maSize;
- rOStm << (UINT16) GetStoreCharSet( rImpl_Font.meCharSet );
- rOStm << (UINT16) rImpl_Font.meFamily;
- rOStm << (UINT16) rImpl_Font.mePitch;
- rOStm << (UINT16) rImpl_Font.meWeight;
- rOStm << (UINT16) rImpl_Font.meUnderline;
- rOStm << (UINT16) rImpl_Font.meStrikeout;
- rOStm << (UINT16) rImpl_Font.meItalic;
- rOStm << (UINT16) rImpl_Font.meLanguage;
- rOStm << (UINT16) rImpl_Font.meWidthType;
+ rOStm << (sal_uInt16) GetStoreCharSet( rImpl_Font.meCharSet );
+ rOStm << (sal_uInt16) rImpl_Font.meFamily;
+ rOStm << (sal_uInt16) rImpl_Font.mePitch;
+ rOStm << (sal_uInt16) rImpl_Font.meWeight;
+ rOStm << (sal_uInt16) rImpl_Font.meUnderline;
+ rOStm << (sal_uInt16) rImpl_Font.meStrikeout;
+ rOStm << (sal_uInt16) rImpl_Font.meItalic;
+ rOStm << (sal_uInt16) rImpl_Font.meLanguage;
+ rOStm << (sal_uInt16) rImpl_Font.meWidthType;
rOStm << rImpl_Font.mnOrientation;
- rOStm << (BOOL) rImpl_Font.mbWordLine;
- rOStm << (BOOL) rImpl_Font.mbOutline;
- rOStm << (BOOL) rImpl_Font.mbShadow;
- rOStm << (BYTE) rImpl_Font.mnKerning;
+ rOStm << (sal_Bool) rImpl_Font.mbWordLine;
+ rOStm << (sal_Bool) rImpl_Font.mbOutline;
+ rOStm << (sal_Bool) rImpl_Font.mbShadow;
+ rOStm << (sal_uInt8) rImpl_Font.mnKerning;
// new in version 2
- rOStm << (BYTE) rImpl_Font.meRelief;
- rOStm << (UINT16) rImpl_Font.meCJKLanguage;
- rOStm << (BOOL) rImpl_Font.mbVertical;
- rOStm << (UINT16) rImpl_Font.meEmphasisMark;
+ rOStm << (sal_uInt8) rImpl_Font.meRelief;
+ rOStm << (sal_uInt16) rImpl_Font.meCJKLanguage;
+ rOStm << (sal_Bool) rImpl_Font.mbVertical;
+ rOStm << (sal_uInt16) rImpl_Font.meEmphasisMark;
// new in version 3
- rOStm << (UINT16) rImpl_Font.meOverline;
+ rOStm << (sal_uInt16) rImpl_Font.meOverline;
return rOStm;
}
@@ -1085,7 +1085,7 @@ Font Font::identifyFont( const void* i_pBuffer, sal_uInt32 i_nSize )
// TODO: reformat
const Color& Font::GetColor() const { return mpImplFont->maColor; }
const Color& Font::GetFillColor() const { return mpImplFont->maFillColor; }
-BOOL Font::IsTransparent() const { return mpImplFont->mbTransparent; }
+sal_Bool Font::IsTransparent() const { return mpImplFont->mbTransparent; }
FontAlign Font::GetAlign() const { return mpImplFont->meAlign; }
const String& Font::GetName() const { return mpImplFont->maFamilyName; }
const String& Font::GetStyleName() const { return mpImplFont->maStyleName; }
@@ -1098,19 +1098,19 @@ rtl_TextEncoding Font::GetCharSet() const { return mpImplFont->meCharSet; }
LanguageType Font::GetLanguage() const { return mpImplFont->meLanguage; }
LanguageType Font::GetCJKContextLanguage() const { return mpImplFont->meCJKLanguage; }
short Font::GetOrientation() const { return mpImplFont->mnOrientation; }
-BOOL Font::IsVertical() const { return mpImplFont->mbVertical; }
+sal_Bool Font::IsVertical() const { return mpImplFont->mbVertical; }
FontKerning Font::GetKerning() const { return mpImplFont->mnKerning; }
FontPitch Font::GetPitch() const { return mpImplFont->GetPitch(); }
FontWeight Font::GetWeight() const { return mpImplFont->GetWeight(); }
FontWidth Font::GetWidthType() const { return mpImplFont->GetWidthType(); }
FontItalic Font::GetItalic() const { return mpImplFont->GetItalic(); }
FontFamily Font::GetFamily() const { return mpImplFont->GetFamily(); }
-BOOL Font::IsOutline() const { return mpImplFont->mbOutline; }
-BOOL Font::IsShadow() const { return mpImplFont->mbShadow; }
+sal_Bool Font::IsOutline() const { return mpImplFont->mbOutline; }
+sal_Bool Font::IsShadow() const { return mpImplFont->mbShadow; }
FontRelief Font::GetRelief() const { return mpImplFont->meRelief; }
FontUnderline Font::GetUnderline() const { return mpImplFont->meUnderline; }
FontUnderline Font::GetOverline() const { return mpImplFont->meOverline; }
FontStrikeout Font::GetStrikeout() const { return mpImplFont->meStrikeout; }
FontEmphasisMark Font::GetEmphasisMark() const { return mpImplFont->meEmphasisMark; }
-BOOL Font::IsWordLineMode() const { return mpImplFont->mbWordLine; }
-BOOL Font::IsSameInstance( const Font& rFont ) const { return (mpImplFont == rFont.mpImplFont); }
+sal_Bool Font::IsWordLineMode() const { return mpImplFont->mbWordLine; }
+sal_Bool Font::IsSameInstance( const Font& rFont ) const { return (mpImplFont == rFont.mpImplFont); }
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index 01b34286a086..c916bc8481aa 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -46,7 +46,7 @@
// - Defines -
// -----------
-#define GAMMA( _def_cVal, _def_InvGamma ) ((BYTE)MinMax(FRound(pow( _def_cVal/255.0,_def_InvGamma)*255.0),0L,255L))
+#define GAMMA( _def_cVal, _def_InvGamma ) ((sal_uInt8)MinMax(FRound(pow( _def_cVal/255.0,_def_InvGamma)*255.0),0L,255L))
// --------------------------
// - Color exchange structs -
@@ -54,9 +54,9 @@
struct ImplColAdjustParam
{
- BYTE* pMapR;
- BYTE* pMapG;
- BYTE* pMapB;
+ sal_uInt8* pMapR;
+ sal_uInt8* pMapG;
+ sal_uInt8* pMapB;
};
struct ImplBmpAdjustParam
@@ -67,7 +67,7 @@ struct ImplBmpAdjustParam
short nChannelGPercent;
short nChannelBPercent;
double fGamma;
- BOOL bInvert;
+ sal_Bool bInvert;
};
// -----------------------------------------------------------------------------
@@ -98,22 +98,22 @@ struct ImplBmpMonoParam
struct ImplColReplaceParam
{
- ULONG* pMinR;
- ULONG* pMaxR;
- ULONG* pMinG;
- ULONG* pMaxG;
- ULONG* pMinB;
- ULONG* pMaxB;
+ sal_uIntPtr* pMinR;
+ sal_uIntPtr* pMaxR;
+ sal_uIntPtr* pMinG;
+ sal_uIntPtr* pMaxG;
+ sal_uIntPtr* pMinB;
+ sal_uIntPtr* pMaxB;
const Color* pDstCols;
- ULONG nCount;
+ sal_uIntPtr nCount;
};
struct ImplBmpReplaceParam
{
const Color* pSrcCols;
const Color* pDstCols;
- ULONG nCount;
- const ULONG* pTols;
+ sal_uIntPtr nCount;
+ const sal_uIntPtr* pTols;
};
@@ -124,9 +124,9 @@ struct ImplBmpReplaceParam
struct ImpLabel
{
String aLabelName;
- ULONG nActionPos;
+ sal_uIntPtr nActionPos;
- ImpLabel( const String& rLabelName, ULONG _nActionPos ) :
+ ImpLabel( const String& rLabelName, sal_uIntPtr _nActionPos ) :
aLabelName( rLabelName ),
nActionPos( _nActionPos ) {}
};
@@ -144,13 +144,13 @@ public:
~ImpLabelList();
void ImplInsert( ImpLabel* p ) { Insert( p, LIST_APPEND ); }
- ImpLabel* ImplRemove( ULONG nPos ) { return (ImpLabel*) Remove( nPos ); }
+ ImpLabel* ImplRemove( sal_uIntPtr nPos ) { return (ImpLabel*) Remove( nPos ); }
void ImplReplace( ImpLabel* p ) { Replace( (void*)p ); }
ImpLabel* ImplFirst() { return (ImpLabel*) First(); }
ImpLabel* ImplNext() { return (ImpLabel*) Next(); }
- ImpLabel* ImplGetLabel( ULONG nPos ) const { return (ImpLabel*) GetObject( nPos ); }
- ULONG ImplGetLabelPos( const String& rLabelName );
- ULONG ImplCount() const { return Count(); }
+ ImpLabel* ImplGetLabel( sal_uIntPtr nPos ) const { return (ImpLabel*) GetObject( nPos ); }
+ sal_uIntPtr ImplGetLabelPos( const String& rLabelName );
+ sal_uIntPtr ImplCount() const { return Count(); }
};
// ------------------------------------------------------------------------
@@ -172,9 +172,9 @@ ImpLabelList::~ImpLabelList()
// ------------------------------------------------------------------------
-ULONG ImpLabelList::ImplGetLabelPos( const String& rLabelName )
+sal_uIntPtr ImpLabelList::ImplGetLabelPos( const String& rLabelName )
{
- ULONG nLabelPos = METAFILE_LABEL_NOTFOUND;
+ sal_uIntPtr nLabelPos = METAFILE_LABEL_NOTFOUND;
for( ImpLabel* pLabel = ImplFirst(); pLabel; pLabel = ImplNext() )
{
@@ -199,8 +199,8 @@ GDIMetaFile::GDIMetaFile() :
pNext ( NULL ),
pOutDev ( NULL ),
pLabelList ( NULL ),
- bPause ( FALSE ),
- bRecord ( FALSE )
+ bPause ( sal_False ),
+ bRecord ( sal_False )
{
}
@@ -214,8 +214,8 @@ GDIMetaFile::GDIMetaFile( const GDIMetaFile& rMtf ) :
pPrev ( rMtf.pPrev ),
pNext ( rMtf.pNext ),
pOutDev ( NULL ),
- bPause ( FALSE ),
- bRecord ( FALSE )
+ bPause ( sal_False ),
+ bRecord ( sal_False )
{
// RefCount der MetaActions erhoehen
for( void* pAct = First(); pAct; pAct = Next() )
@@ -231,7 +231,7 @@ GDIMetaFile::GDIMetaFile( const GDIMetaFile& rMtf ) :
Record( rMtf.pOutDev );
if ( rMtf.bPause )
- Pause( TRUE );
+ Pause( sal_True );
}
}
@@ -267,15 +267,15 @@ GDIMetaFile& GDIMetaFile::operator=( const GDIMetaFile& rMtf )
pPrev = rMtf.pPrev;
pNext = rMtf.pNext;
pOutDev = NULL;
- bPause = FALSE;
- bRecord = FALSE;
+ bPause = sal_False;
+ bRecord = sal_False;
if( rMtf.bRecord )
{
Record( rMtf.pOutDev );
if( rMtf.bPause )
- Pause( TRUE );
+ Pause( sal_True );
}
}
@@ -284,24 +284,24 @@ GDIMetaFile& GDIMetaFile::operator=( const GDIMetaFile& rMtf )
// ------------------------------------------------------------------------
-BOOL GDIMetaFile::operator==( const GDIMetaFile& rMtf ) const
+sal_Bool GDIMetaFile::operator==( const GDIMetaFile& rMtf ) const
{
- const ULONG nObjCount = Count();
- BOOL bRet = FALSE;
+ const sal_uIntPtr nObjCount = Count();
+ sal_Bool bRet = sal_False;
if( this == &rMtf )
- bRet = TRUE;
+ bRet = sal_True;
else if( rMtf.GetActionCount() == nObjCount &&
rMtf.GetPrefSize() == aPrefSize &&
rMtf.GetPrefMapMode() == aPrefMapMode )
{
- bRet = TRUE;
+ bRet = sal_True;
- for( ULONG n = 0UL; n < nObjCount; n++ )
+ for( sal_uIntPtr n = 0UL; n < nObjCount; n++ )
{
if( GetObject( n ) != rMtf.GetObject( n ) )
{
- bRet = FALSE;
+ bRet = sal_False;
break;
}
}
@@ -314,22 +314,22 @@ BOOL GDIMetaFile::operator==( const GDIMetaFile& rMtf ) const
sal_Bool GDIMetaFile::IsEqual( const GDIMetaFile& rMtf ) const
{
- const ULONG nObjCount = Count();
- BOOL bRet = FALSE;
+ const sal_uIntPtr nObjCount = Count();
+ sal_Bool bRet = sal_False;
if( this == &rMtf )
- bRet = TRUE;
+ bRet = sal_True;
else if( rMtf.GetActionCount() == nObjCount &&
rMtf.GetPrefSize() == aPrefSize &&
rMtf.GetPrefMapMode() == aPrefMapMode )
{
- bRet = TRUE;
+ bRet = sal_True;
- for( ULONG n = 0UL; n < nObjCount; n++ )
+ for( sal_uIntPtr n = 0UL; n < nObjCount; n++ )
{
if(!((MetaAction*)GetObject( n ))->IsEqual(*((MetaAction*)rMtf.GetObject( n ))))
{
- bRet = FALSE;
+ bRet = sal_False;
break;
}
}
@@ -356,7 +356,7 @@ void GDIMetaFile::Clear()
// ------------------------------------------------------------------------
-void GDIMetaFile::Linker( OutputDevice* pOut, BOOL bLink )
+void GDIMetaFile::Linker( OutputDevice* pOut, sal_Bool bLink )
{
if( bLink )
{
@@ -405,23 +405,23 @@ void GDIMetaFile::Record( OutputDevice* pOut )
Last();
pOutDev = pOut;
- bRecord = TRUE;
- Linker( pOut, TRUE );
+ bRecord = sal_True;
+ Linker( pOut, sal_True );
}
// ------------------------------------------------------------------------
-void GDIMetaFile::Play( GDIMetaFile& rMtf, ULONG nPos )
+void GDIMetaFile::Play( GDIMetaFile& rMtf, sal_uIntPtr nPos )
{
if ( !bRecord && !rMtf.bRecord )
{
MetaAction* pAction = GetCurAction();
- const ULONG nObjCount = Count();
+ const sal_uIntPtr nObjCount = Count();
if( nPos > nObjCount )
nPos = nObjCount;
- for( ULONG nCurPos = GetCurPos(); nCurPos < nPos; nCurPos++ )
+ for( sal_uIntPtr nCurPos = GetCurPos(); nCurPos < nPos; nCurPos++ )
{
if( !Hook() )
{
@@ -436,13 +436,13 @@ void GDIMetaFile::Play( GDIMetaFile& rMtf, ULONG nPos )
// ------------------------------------------------------------------------
-void GDIMetaFile::Play( OutputDevice* pOut, ULONG nPos )
+void GDIMetaFile::Play( OutputDevice* pOut, sal_uIntPtr nPos )
{
if( !bRecord )
{
MetaAction* pAction = GetCurAction();
- const ULONG nObjCount = Count();
- ULONG i = 0, nSyncCount = ( pOut->GetOutDevType() == OUTDEV_WINDOW ) ? 0x000000ff : 0xffffffff;
+ const sal_uIntPtr nObjCount = Count();
+ sal_uIntPtr i = 0, nSyncCount = ( pOut->GetOutDevType() == OUTDEV_WINDOW ) ? 0x000000ff : 0xffffffff;
if( nPos > nObjCount )
nPos = nObjCount;
@@ -455,7 +455,7 @@ void GDIMetaFile::Play( OutputDevice* pOut, ULONG nPos )
pOut->SetLayoutMode( 0 );
pOut->SetDigitLanguage( 0 );
- for( ULONG nCurPos = GetCurPos(); nCurPos < nPos; nCurPos++ )
+ for( sal_uIntPtr nCurPos = GetCurPos(); nCurPos < nPos; nCurPos++ )
{
if( !Hook() )
{
@@ -476,7 +476,7 @@ void GDIMetaFile::Play( OutputDevice* pOut, ULONG nPos )
// ------------------------------------------------------------------------
void GDIMetaFile::Play( OutputDevice* pOut, const Point& rPos,
- const Size& rSize, ULONG nPos )
+ const Size& rSize, sal_uIntPtr nPos )
{
Region aDrawClipRegion;
MapMode aDrawMap( GetPrefMapMode() );
@@ -537,19 +537,19 @@ void GDIMetaFile::Play( OutputDevice* pOut, const Point& rPos,
// ------------------------------------------------------------------------
-void GDIMetaFile::Pause( BOOL _bPause )
+void GDIMetaFile::Pause( sal_Bool _bPause )
{
if( bRecord )
{
if( _bPause )
{
if( !bPause )
- Linker( pOutDev, FALSE );
+ Linker( pOutDev, sal_False );
}
else
{
if( bPause )
- Linker( pOutDev, TRUE );
+ Linker( pOutDev, sal_True );
}
bPause = _bPause;
@@ -562,12 +562,12 @@ void GDIMetaFile::Stop()
{
if( bRecord )
{
- bRecord = FALSE;
+ bRecord = sal_False;
if( !bPause )
- Linker( pOutDev, FALSE );
+ Linker( pOutDev, sal_False );
else
- bPause = FALSE;
+ bPause = sal_False;
}
}
@@ -589,7 +589,7 @@ void GDIMetaFile::WindEnd()
// ------------------------------------------------------------------------
-void GDIMetaFile::Wind( ULONG nActionPos )
+void GDIMetaFile::Wind( sal_uIntPtr nActionPos )
{
if( !bRecord )
Seek( nActionPos );
@@ -626,7 +626,7 @@ void GDIMetaFile::AddAction( MetaAction* pAction )
// ------------------------------------------------------------------------
-void GDIMetaFile::AddAction( MetaAction* pAction, ULONG nPos )
+void GDIMetaFile::AddAction( MetaAction* pAction, sal_uIntPtr nPos )
{
Insert( pAction, nPos );
@@ -640,7 +640,7 @@ void GDIMetaFile::AddAction( MetaAction* pAction, ULONG nPos )
// ------------------------------------------------------------------------
// @since #110496#
-void GDIMetaFile::RemoveAction( ULONG nPos )
+void GDIMetaFile::RemoveAction( sal_uIntPtr nPos )
{
Remove( nPos );
@@ -650,14 +650,14 @@ void GDIMetaFile::RemoveAction( ULONG nPos )
// ------------------------------------------------------------------------
-MetaAction* GDIMetaFile::CopyAction( ULONG nPos ) const
+MetaAction* GDIMetaFile::CopyAction( sal_uIntPtr nPos ) const
{
return ( (MetaAction*) GetObject( nPos ) )->Clone();
}
// ------------------------------------------------------------------------
-ULONG GDIMetaFile::GetActionPos( const String& rLabel )
+sal_uIntPtr GDIMetaFile::GetActionPos( const String& rLabel )
{
ImpLabel* pLabel = NULL;
@@ -671,9 +671,9 @@ ULONG GDIMetaFile::GetActionPos( const String& rLabel )
// ------------------------------------------------------------------------
-BOOL GDIMetaFile::InsertLabel( const String& rLabel, ULONG nActionPos )
+sal_Bool GDIMetaFile::InsertLabel( const String& rLabel, sal_uIntPtr nActionPos )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !pLabelList )
pLabelList = new ImpLabelList;
@@ -681,7 +681,7 @@ BOOL GDIMetaFile::InsertLabel( const String& rLabel, ULONG nActionPos )
if( pLabelList->ImplGetLabelPos( rLabel ) == METAFILE_LABEL_NOTFOUND )
{
pLabelList->ImplInsert( new ImpLabel( rLabel, nActionPos ) );
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -693,7 +693,7 @@ void GDIMetaFile::RemoveLabel( const String& rLabel )
{
if( pLabelList )
{
- const ULONG nLabelPos = pLabelList->ImplGetLabelPos( rLabel );
+ const sal_uIntPtr nLabelPos = pLabelList->ImplGetLabelPos( rLabel );
if( nLabelPos != METAFILE_LABEL_NOTFOUND )
delete pLabelList->ImplRemove( nLabelPos );
@@ -706,7 +706,7 @@ void GDIMetaFile::RenameLabel( const String& rLabel, const String& rNewLabel )
{
if( pLabelList )
{
- const ULONG nLabelPos = pLabelList->ImplGetLabelPos( rLabel );
+ const sal_uIntPtr nLabelPos = pLabelList->ImplGetLabelPos( rLabel );
if ( nLabelPos != METAFILE_LABEL_NOTFOUND )
pLabelList->ImplGetLabel( nLabelPos )->aLabelName = rNewLabel;
@@ -715,14 +715,14 @@ void GDIMetaFile::RenameLabel( const String& rLabel, const String& rNewLabel )
// ------------------------------------------------------------------------
-ULONG GDIMetaFile::GetLabelCount() const
+sal_uIntPtr GDIMetaFile::GetLabelCount() const
{
return( pLabelList ? pLabelList->ImplCount() : 0UL );
}
// ------------------------------------------------------------------------
-String GDIMetaFile::GetLabel( ULONG nLabel )
+String GDIMetaFile::GetLabel( sal_uIntPtr nLabel )
{
String aString;
@@ -739,12 +739,12 @@ String GDIMetaFile::GetLabel( ULONG nLabel )
// ------------------------------------------------------------------------
-BOOL GDIMetaFile::SaveStatus()
+sal_Bool GDIMetaFile::SaveStatus()
{
if ( bRecord )
{
if ( bPause )
- Linker( pOutDev, TRUE );
+ Linker( pOutDev, sal_True );
AddAction( new MetaLineColorAction( pOutDev->GetLineColor(),
pOutDev->IsLineColor() ) );
@@ -765,22 +765,22 @@ BOOL GDIMetaFile::SaveStatus()
pOutDev->IsClipRegion() ) );
if ( bPause )
- Linker( pOutDev, FALSE );
+ Linker( pOutDev, sal_False );
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
// ------------------------------------------------------------------------
-BOOL GDIMetaFile::Mirror( ULONG nMirrorFlags )
+sal_Bool GDIMetaFile::Mirror( sal_uIntPtr nMirrorFlags )
{
const Size aOldPrefSize( GetPrefSize() );
long nMoveX, nMoveY;
double fScaleX, fScaleY;
- BOOL bRet;
+ sal_Bool bRet;
if( nMirrorFlags & MTF_MIRROR_HORZ )
nMoveX = VOS_ABS( aOldPrefSize.Width() ) - 1, fScaleX = -1.0;
@@ -797,10 +797,10 @@ BOOL GDIMetaFile::Mirror( ULONG nMirrorFlags )
Scale( fScaleX, fScaleY );
Move( nMoveX, nMoveY );
SetPrefSize( aOldPrefSize );
- bRet = TRUE;
+ bRet = sal_True;
}
else
- bRet = FALSE;
+ bRet = sal_False;
return bRet;
}
@@ -813,7 +813,7 @@ void GDIMetaFile::Move( long nX, long nY )
Size aOffset( aBaseOffset );
VirtualDevice aMapVDev;
- aMapVDev.EnableOutput( FALSE );
+ aMapVDev.EnableOutput( sal_False );
aMapVDev.SetMapMode( GetPrefMapMode() );
for( MetaAction* pAct = (MetaAction*) First(); pAct; pAct = (MetaAction*) Next() )
@@ -878,7 +878,7 @@ void GDIMetaFile::Clip( const Rectangle& i_rClipRect )
Rectangle aCurRect( i_rClipRect );
VirtualDevice aMapVDev;
- aMapVDev.EnableOutput( FALSE );
+ aMapVDev.EnableOutput( sal_False );
aMapVDev.SetMapMode( GetPrefMapMode() );
for( MetaAction* pAct = (MetaAction*) First(); pAct; pAct = (MetaAction*) Next() )
@@ -898,7 +898,7 @@ void GDIMetaFile::Clip( const Rectangle& i_rClipRect )
Region aNewReg( aCurRect );
if( pOldAct->IsClipping() )
aNewReg.Intersect( pOldAct->GetRegion() );
- MetaClipRegionAction* pNewAct = new MetaClipRegionAction( aNewReg, TRUE );
+ MetaClipRegionAction* pNewAct = new MetaClipRegionAction( aNewReg, sal_True );
Replace( pNewAct, GetCurPos() );
pOldAct->Delete();
}
@@ -953,7 +953,7 @@ void GDIMetaFile::ImplAddGradientEx( GDIMetaFile& rMtf,
// #105055# Generate comment, GradientEx and Gradient actions
// (within DrawGradient)
VirtualDevice aVDev( rMapDev, 0 );
- aVDev.EnableOutput( FALSE );
+ aVDev.EnableOutput( sal_False );
GDIMetaFile aGradMtf;
aGradMtf.Record( &aVDev );
@@ -988,7 +988,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
aPoly.Rotate( Point(), fSin, fCos );
- aMapVDev.EnableOutput( FALSE );
+ aMapVDev.EnableOutput( sal_False );
aMapVDev.SetMapMode( GetPrefMapMode() );
const Rectangle aNewBound( aPoly.GetBoundRect() );
@@ -1001,7 +1001,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
for( MetaAction* pAction = (MetaAction*) First(); pAction; pAction = (MetaAction*) Next() )
{
- const USHORT nActionType = pAction->GetType();
+ const sal_uInt16 nActionType = pAction->GetType();
switch( nActionType )
{
@@ -1218,7 +1218,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
// skip everything, except gradientex action
while( pAction )
{
- const USHORT nType = pAction->GetType();
+ const sal_uInt16 nType = pAction->GetType();
if( META_GRADIENTEX_ACTION == nType )
{
@@ -1269,7 +1269,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
aStroke.setPath( ImplGetRotatedPolygon( aPath, aRotAnchor, aRotOffset, fSin, fCos ) );
aDest << aStroke;
aMtf.AddAction( new MetaCommentAction( "XPATHSTROKE_SEQ_BEGIN", 0,
- static_cast<const BYTE*>( aDest.GetData()), aDest.Tell() ) );
+ static_cast<const sal_uInt8*>( aDest.GetData()), aDest.Tell() ) );
}
else
{
@@ -1280,7 +1280,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
aFill.setPath( ImplGetRotatedPolyPolygon( aPath, aRotAnchor, aRotOffset, fSin, fCos ) );
aDest << aFill;
aMtf.AddAction( new MetaCommentAction( "XPATHFILL_SEQ_BEGIN", 0,
- static_cast<const BYTE*>( aDest.GetData()), aDest.Tell() ) );
+ static_cast<const sal_uInt8*>( aDest.GetData()), aDest.Tell() ) );
}
}
}
@@ -1300,7 +1300,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
MetaHatchAction* pAct = (MetaHatchAction*) pAction;
Hatch aHatch( pAct->GetHatch() );
- aHatch.SetAngle( aHatch.GetAngle() + (USHORT) nAngle10 );
+ aHatch.SetAngle( aHatch.GetAngle() + (sal_uInt16) nAngle10 );
aMtf.AddAction( new MetaHatchAction( ImplGetRotatedPolyPolygon( pAct->GetPolyPolygon(), aRotAnchor, aRotOffset, fSin, fCos ),
aHatch ) );
}
@@ -1345,7 +1345,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
MetaClipRegionAction* pAct = (MetaClipRegionAction*) pAction;
if( pAct->IsClipping() && pAct->GetRegion().HasPolyPolygon() )
- aMtf.AddAction( new MetaClipRegionAction( Region( ImplGetRotatedPolyPolygon( pAct->GetRegion().GetPolyPolygon(), aRotAnchor, aRotOffset, fSin, fCos ) ), TRUE ) );
+ aMtf.AddAction( new MetaClipRegionAction( Region( ImplGetRotatedPolyPolygon( pAct->GetRegion().GetPolyPolygon(), aRotAnchor, aRotOffset, fSin, fCos ) ), sal_True ) );
else
{
pAction->Duplicate();
@@ -1388,7 +1388,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
MetaFontAction* pAct = (MetaFontAction*) pAction;
Font aFont( pAct->GetFont() );
- aFont.SetOrientation( aFont.GetOrientation() + (USHORT) nAngle10 );
+ aFont.SetOrientation( aFont.GetOrientation() + (sal_uInt16) nAngle10 );
aMtf.AddAction( new MetaFontAction( aFont ) );
}
break;
@@ -1455,17 +1455,17 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
GDIMetaFile aMtf;
VirtualDevice aMapVDev( i_rReference );
- aMapVDev.EnableOutput( FALSE );
+ aMapVDev.EnableOutput( sal_False );
aMapVDev.SetMapMode( GetPrefMapMode() );
std::vector<Rectangle> aClipStack( 1, Rectangle() );
- std::vector<USHORT> aPushFlagStack;
+ std::vector<sal_uInt16> aPushFlagStack;
Rectangle aBound;
for( MetaAction* pAction = (MetaAction*) First(); pAction; pAction = (MetaAction*) Next() )
{
- const USHORT nActionType = pAction->GetType();
+ const sal_uInt16 nActionType = pAction->GetType();
switch( nActionType )
{
@@ -1891,7 +1891,7 @@ BitmapEx GDIMetaFile::ImplBmpAdjustFnc( const BitmapEx& rBmpEx, const void* pBmp
Color GDIMetaFile::ImplColConvertFnc( const Color& rColor, const void* pColParam )
{
- BYTE cLum = rColor.GetLuminance();
+ sal_uInt8 cLum = rColor.GetLuminance();
if( MTF_CONVERSION_1BIT_THRESHOLD == ( (const ImplColConvertParam*) pColParam )->eConversion )
cLum = ( cLum < 128 ) ? 0 : 255;
@@ -1942,9 +1942,9 @@ BitmapEx GDIMetaFile::ImplBmpMonoFnc( const BitmapEx& rBmpEx, const void* pBmpPa
Color GDIMetaFile::ImplColReplaceFnc( const Color& rColor, const void* pColParam )
{
- const ULONG nR = rColor.GetRed(), nG = rColor.GetGreen(), nB = rColor.GetBlue();
+ const sal_uIntPtr nR = rColor.GetRed(), nG = rColor.GetGreen(), nB = rColor.GetBlue();
- for( ULONG i = 0; i < ( (const ImplColReplaceParam*) pColParam )->nCount; i++ )
+ for( sal_uIntPtr i = 0; i < ( (const ImplColReplaceParam*) pColParam )->nCount; i++ )
{
if( ( ( (const ImplColReplaceParam*) pColParam )->pMinR[ i ] <= nR ) &&
( ( (const ImplColReplaceParam*) pColParam )->pMaxR[ i ] >= nR ) &&
@@ -1984,7 +1984,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
for( MetaAction* pAction = (MetaAction*) First(); pAction; pAction = (MetaAction*) Next() )
{
- const USHORT nType = pAction->GetType();
+ const sal_uInt16 nType = pAction->GetType();
switch( nType )
{
@@ -2002,7 +2002,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
if( !pAct->IsSetting() )
pAct->Duplicate();
else
- pAct = new MetaLineColorAction( pFncCol( pAct->GetColor(), pColParam ), TRUE );
+ pAct = new MetaLineColorAction( pFncCol( pAct->GetColor(), pColParam ), sal_True );
aMtf.Insert( pAct, LIST_APPEND );
}
@@ -2015,7 +2015,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
if( !pAct->IsSetting() )
pAct->Duplicate();
else
- pAct = new MetaFillColorAction( pFncCol( pAct->GetColor(), pColParam ), TRUE );
+ pAct = new MetaFillColorAction( pFncCol( pAct->GetColor(), pColParam ), sal_True );
aMtf.Insert( pAct, LIST_APPEND );
}
@@ -2035,7 +2035,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
if( !pAct->IsSetting() )
pAct->Duplicate();
else
- pAct = new MetaTextFillColorAction( pFncCol( pAct->GetColor(), pColParam ), TRUE );
+ pAct = new MetaTextFillColorAction( pFncCol( pAct->GetColor(), pColParam ), sal_True );
aMtf.Insert( pAct, LIST_APPEND );
}
@@ -2048,7 +2048,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
if( !pAct->IsSetting() )
pAct->Duplicate();
else
- pAct = new MetaTextLineColorAction( pFncCol( pAct->GetColor(), pColParam ), TRUE );
+ pAct = new MetaTextLineColorAction( pFncCol( pAct->GetColor(), pColParam ), sal_True );
aMtf.Insert( pAct, LIST_APPEND );
}
@@ -2061,7 +2061,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
if( !pAct->IsSetting() )
pAct->Duplicate();
else
- pAct = new MetaOverlineColorAction( pFncCol( pAct->GetColor(), pColParam ), TRUE );
+ pAct = new MetaOverlineColorAction( pFncCol( pAct->GetColor(), pColParam ), sal_True );
aMtf.Insert( pAct, LIST_APPEND );
}
@@ -2242,7 +2242,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
void GDIMetaFile::Adjust( short nLuminancePercent, short nContrastPercent,
short nChannelRPercent, short nChannelGPercent,
- short nChannelBPercent, double fGamma, BOOL bInvert )
+ short nChannelBPercent, double fGamma, sal_Bool bInvert )
{
// nothing to do? => return quickly
if( nLuminancePercent || nContrastPercent ||
@@ -2253,9 +2253,9 @@ void GDIMetaFile::Adjust( short nLuminancePercent, short nContrastPercent,
ImplColAdjustParam aColParam;
ImplBmpAdjustParam aBmpParam;
- aColParam.pMapR = new BYTE[ 256 ];
- aColParam.pMapG = new BYTE[ 256 ];
- aColParam.pMapB = new BYTE[ 256 ];
+ aColParam.pMapR = new sal_uInt8[ 256 ];
+ aColParam.pMapG = new sal_uInt8[ 256 ];
+ aColParam.pMapB = new sal_uInt8[ 256 ];
// calculate slope
if( nContrastPercent >= 0 )
@@ -2273,14 +2273,14 @@ void GDIMetaFile::Adjust( short nLuminancePercent, short nContrastPercent,
// calculate gamma value
fGamma = ( fGamma <= 0.0 || fGamma > 10.0 ) ? 1.0 : ( 1.0 / fGamma );
- const BOOL bGamma = ( fGamma != 1.0 );
+ const sal_Bool bGamma = ( fGamma != 1.0 );
// create mapping table
for( long nX = 0L; nX < 256L; nX++ )
{
- aColParam.pMapR[ nX ] = (BYTE) MinMax( FRound( nX * fM + fROff ), 0L, 255L );
- aColParam.pMapG[ nX ] = (BYTE) MinMax( FRound( nX * fM + fGOff ), 0L, 255L );
- aColParam.pMapB[ nX ] = (BYTE) MinMax( FRound( nX * fM + fBOff ), 0L, 255L );
+ aColParam.pMapR[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fROff ), 0L, 255L );
+ aColParam.pMapG[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fGOff ), 0L, 255L );
+ aColParam.pMapB[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fBOff ), 0L, 255L );
if( bGamma )
{
@@ -2333,41 +2333,41 @@ void GDIMetaFile::Convert( MtfConversion eConversion )
// ------------------------------------------------------------------------
-void GDIMetaFile::ReplaceColors( const Color& rSearchColor, const Color& rReplaceColor, ULONG nTol )
+void GDIMetaFile::ReplaceColors( const Color& rSearchColor, const Color& rReplaceColor, sal_uIntPtr nTol )
{
ReplaceColors( &rSearchColor, &rReplaceColor, 1, &nTol );
}
// ------------------------------------------------------------------------
-void GDIMetaFile::ReplaceColors( const Color* pSearchColors, const Color* pReplaceColors, ULONG nColorCount, ULONG* pTols )
+void GDIMetaFile::ReplaceColors( const Color* pSearchColors, const Color* pReplaceColors, sal_uIntPtr nColorCount, sal_uIntPtr* pTols )
{
ImplColReplaceParam aColParam;
ImplBmpReplaceParam aBmpParam;
- aColParam.pMinR = new ULONG[ nColorCount ];
- aColParam.pMaxR = new ULONG[ nColorCount ];
- aColParam.pMinG = new ULONG[ nColorCount ];
- aColParam.pMaxG = new ULONG[ nColorCount ];
- aColParam.pMinB = new ULONG[ nColorCount ];
- aColParam.pMaxB = new ULONG[ nColorCount ];
+ aColParam.pMinR = new sal_uIntPtr[ nColorCount ];
+ aColParam.pMaxR = new sal_uIntPtr[ nColorCount ];
+ aColParam.pMinG = new sal_uIntPtr[ nColorCount ];
+ aColParam.pMaxG = new sal_uIntPtr[ nColorCount ];
+ aColParam.pMinB = new sal_uIntPtr[ nColorCount ];
+ aColParam.pMaxB = new sal_uIntPtr[ nColorCount ];
- for( ULONG i = 0; i < nColorCount; i++ )
+ for( sal_uIntPtr i = 0; i < nColorCount; i++ )
{
const long nTol = pTols ? ( pTols[ i ] * 255 ) / 100 : 0;
long nVal;
nVal = pSearchColors[ i ].GetRed();
- aColParam.pMinR[ i ] = (ULONG) Max( nVal - nTol, 0L );
- aColParam.pMaxR[ i ] = (ULONG) Min( nVal + nTol, 255L );
+ aColParam.pMinR[ i ] = (sal_uIntPtr) Max( nVal - nTol, 0L );
+ aColParam.pMaxR[ i ] = (sal_uIntPtr) Min( nVal + nTol, 255L );
nVal = pSearchColors[ i ].GetGreen();
- aColParam.pMinG[ i ] = (ULONG) Max( nVal - nTol, 0L );
- aColParam.pMaxG[ i ] = (ULONG) Min( nVal + nTol, 255L );
+ aColParam.pMinG[ i ] = (sal_uIntPtr) Max( nVal - nTol, 0L );
+ aColParam.pMaxG[ i ] = (sal_uIntPtr) Min( nVal + nTol, 255L );
nVal = pSearchColors[ i ].GetBlue();
- aColParam.pMinB[ i ] = (ULONG) Max( nVal - nTol, 0L );
- aColParam.pMaxB[ i ] = (ULONG) Min( nVal + nTol, 255L );
+ aColParam.pMinB[ i ] = (sal_uIntPtr) Max( nVal - nTol, 0L );
+ aColParam.pMaxB[ i ] = (sal_uIntPtr) Min( nVal + nTol, 255L );
}
aColParam.pDstCols = pReplaceColors;
@@ -2407,16 +2407,16 @@ GDIMetaFile GDIMetaFile::GetMonochromeMtf( const Color& rColor ) const
// ------------------------------------------------------------------------
-ULONG GDIMetaFile::GetChecksum() const
+sal_uIntPtr GDIMetaFile::GetChecksum() const
{
GDIMetaFile aMtf;
SvMemoryStream aMemStm( 65535, 65535 );
ImplMetaWriteData aWriteData; aWriteData.meActualCharSet = aMemStm.GetStreamCharSet();
SVBT16 aBT16;
SVBT32 aBT32;
- ULONG nCrc = 0;
+ sal_uIntPtr nCrc = 0;
- for( ULONG i = 0, nObjCount = GetActionCount(); i < nObjCount; i++ )
+ for( sal_uIntPtr i = 0, nObjCount = GetActionCount(); i < nObjCount; i++ )
{
MetaAction* pAction = GetAction( i );
@@ -2687,11 +2687,11 @@ ULONG GDIMetaFile::GetChecksum() const
// ------------------------------------------------------------------------
-ULONG GDIMetaFile::GetSizeBytes() const
+sal_uIntPtr GDIMetaFile::GetSizeBytes() const
{
- ULONG nSizeBytes = 0;
+ sal_uIntPtr nSizeBytes = 0;
- for( ULONG i = 0, nObjCount = GetActionCount(); i < nObjCount; ++i )
+ for( sal_uIntPtr i = 0, nObjCount = GetActionCount(); i < nObjCount; ++i )
{
MetaAction* pAction = GetAction( i );
@@ -2719,7 +2719,7 @@ ULONG GDIMetaFile::GetSizeBytes() const
{
const PolyPolygon& rPolyPoly = ( (MetaPolyPolygonAction*) pAction )->GetPolyPolygon();
- for( USHORT n = 0; n < rPolyPoly.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rPolyPoly.Count(); ++n )
nSizeBytes += ( rPolyPoly[ n ].GetSize() * sizeof( Point ) );
}
break;
@@ -2753,8 +2753,8 @@ SvStream& operator>>( SvStream& rIStm, GDIMetaFile& rGDIMetaFile )
if( !rIStm.GetError() )
{
char aId[ 7 ];
- ULONG nStmPos = rIStm.Tell();
- USHORT nOldFormat = rIStm.GetNumberFormatInt();
+ sal_uIntPtr nStmPos = rIStm.Tell();
+ sal_uInt16 nOldFormat = rIStm.GetNumberFormatInt();
rIStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
@@ -2767,8 +2767,8 @@ SvStream& operator>>( SvStream& rIStm, GDIMetaFile& rGDIMetaFile )
// new format
VersionCompat* pCompat;
MetaAction* pAction;
- UINT32 nStmCompressMode = 0;
- UINT32 nCount = 0;
+ sal_uInt32 nStmCompressMode = 0;
+ sal_uInt32 nCount = 0;
pCompat = new VersionCompat( rIStm, STREAM_READ );
@@ -2782,7 +2782,7 @@ SvStream& operator>>( SvStream& rIStm, GDIMetaFile& rGDIMetaFile )
ImplMetaReadData aReadData;
aReadData.meActualCharSet = rIStm.GetStreamCharSet();
- for( UINT32 nAction = 0UL; ( nAction < nCount ) && !rIStm.IsEof(); nAction++ )
+ for( sal_uInt32 nAction = 0UL; ( nAction < nCount ) && !rIStm.IsEof(); nAction++ )
{
pAction = MetaAction::ReadMetaAction( rIStm, &aReadData );
@@ -2840,8 +2840,8 @@ SvStream& GDIMetaFile::Read( SvStream& rIStm )
SvStream& GDIMetaFile::Write( SvStream& rOStm )
{
VersionCompat* pCompat;
- const UINT32 nStmCompressMode = rOStm.GetCompressMode();
- USHORT nOldFormat = rOStm.GetNumberFormatInt();
+ const sal_uInt32 nStmCompressMode = rOStm.GetCompressMode();
+ sal_uInt16 nOldFormat = rOStm.GetNumberFormatInt();
rOStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
rOStm.Write( "VCLMTF", 6 );
@@ -2851,7 +2851,7 @@ SvStream& GDIMetaFile::Write( SvStream& rOStm )
rOStm << nStmCompressMode;
rOStm << aPrefMapMode;
rOStm << aPrefSize;
- rOStm << (UINT32) GetActionCount();
+ rOStm << (sal_uInt32) GetActionCount();
delete pCompat;
@@ -2872,7 +2872,7 @@ SvStream& GDIMetaFile::Write( SvStream& rOStm )
// ------------------------------------------------------------------------
-BOOL GDIMetaFile::CreateThumbnail( sal_uInt32 nMaximumExtent,
+sal_Bool GDIMetaFile::CreateThumbnail( sal_uInt32 nMaximumExtent,
BitmapEx& rBmpEx,
const BitmapEx* pOverlay,
const Rectangle* pOverlayRect ) const
diff --git a/vcl/source/gdi/gfxlink.cxx b/vcl/source/gdi/gfxlink.cxx
index 4d32990f9335..489ef3833935 100644
--- a/vcl/source/gdi/gfxlink.cxx
+++ b/vcl/source/gdi/gfxlink.cxx
@@ -63,7 +63,7 @@ GfxLink::GfxLink( const GfxLink& rGfxLink ) :
// ------------------------------------------------------------------------
-GfxLink::GfxLink( BYTE* pBuf, sal_uInt32 nSize, GfxLinkType nType, BOOL bOwns ) :
+GfxLink::GfxLink( sal_uInt8* pBuf, sal_uInt32 nSize, GfxLinkType nType, sal_Bool bOwns ) :
mpImpData( new ImpGfxLink )
{
DBG_ASSERT( (pBuf != NULL && nSize) || (!bOwns && nSize == 0),
@@ -165,7 +165,7 @@ GfxLinkType GfxLink::GetType() const
// ------------------------------------------------------------------------
-BOOL GfxLink::IsNative() const
+sal_Bool GfxLink::IsNative() const
{
return( meType >= GFX_LINK_FIRST_NATIVE_ID && meType <= GFX_LINK_LAST_NATIVE_ID );
}
@@ -179,7 +179,7 @@ sal_uInt32 GfxLink::GetDataSize() const
// ------------------------------------------------------------------------
-const BYTE* GfxLink::GetData() const
+const sal_uInt8* GfxLink::GetData() const
{
if( IsSwappedOut() )
( (GfxLink*) this )->SwapIn();
@@ -233,20 +233,20 @@ bool GfxLink::IsPrefMapModeValid()
// ------------------------------------------------------------------------
-BOOL GfxLink::LoadNative( Graphic& rGraphic )
+sal_Bool GfxLink::LoadNative( Graphic& rGraphic )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( IsNative() && mnBufSize )
{
- const BYTE* pData = GetData();
+ const sal_uInt8* pData = GetData();
if( pData )
{
SvMemoryStream aMemStm;
- ULONG nCvtType;
+ sal_uIntPtr nCvtType;
- aMemStm.SetBuffer( (char*) pData, mnBufSize, FALSE, mnBufSize );
+ aMemStm.SetBuffer( (char*) pData, mnBufSize, sal_False, mnBufSize );
switch( meType )
{
@@ -262,7 +262,7 @@ BOOL GfxLink::LoadNative( Graphic& rGraphic )
}
if( nCvtType && ( GraphicConverter::Import( aMemStm, rGraphic, nCvtType ) == ERRCODE_NONE ) )
- bRet = TRUE;
+ bRet = sal_True;
}
}
@@ -309,7 +309,7 @@ void GfxLink::SwapIn()
// ------------------------------------------------------------------------
-BOOL GfxLink::ExportNative( SvStream& rOStream ) const
+sal_Bool GfxLink::ExportNative( SvStream& rOStream ) const
{
if( GetDataSize() )
{
@@ -329,7 +329,7 @@ SvStream& operator<<( SvStream& rOStream, const GfxLink& rGfxLink )
VersionCompat* pCompat = new VersionCompat( rOStream, STREAM_WRITE, 2 );
// Version 1
- rOStream << (UINT16) rGfxLink.GetType() << rGfxLink.GetDataSize() << rGfxLink.GetUserId();
+ rOStream << (sal_uInt16) rGfxLink.GetType() << rGfxLink.GetDataSize() << rGfxLink.GetUserId();
// Version 2
rOStream << rGfxLink.GetPrefSize() << rGfxLink.GetPrefMapMode();
@@ -355,8 +355,8 @@ SvStream& operator>>( SvStream& rIStream, GfxLink& rGfxLink)
MapMode aMapMode;
sal_uInt32 nSize;
sal_uInt32 nUserId;
- UINT16 nType;
- BYTE* pBuf;
+ sal_uInt16 nType;
+ sal_uInt8* pBuf;
bool bMapAndSizeValid( false );
VersionCompat* pCompat = new VersionCompat( rIStream, STREAM_READ );
@@ -371,10 +371,10 @@ SvStream& operator>>( SvStream& rIStream, GfxLink& rGfxLink)
delete pCompat;
- pBuf = new BYTE[ nSize ];
+ pBuf = new sal_uInt8[ nSize ];
rIStream.Read( pBuf, nSize );
- rGfxLink = GfxLink( pBuf, nSize, (GfxLinkType) nType, TRUE );
+ rGfxLink = GfxLink( pBuf, nSize, (GfxLinkType) nType, sal_True );
rGfxLink.SetUserId( nUserId );
if( bMapAndSizeValid )
@@ -390,7 +390,7 @@ SvStream& operator>>( SvStream& rIStream, GfxLink& rGfxLink)
// - ImpSwap -
// -----------
-ImpSwap::ImpSwap( BYTE* pData, ULONG nDataSize ) :
+ImpSwap::ImpSwap( sal_uInt8* pData, sal_uIntPtr nDataSize ) :
mnDataSize( nDataSize ),
mnRefCount( 1UL )
{
@@ -471,9 +471,9 @@ ImpSwap::~ImpSwap()
// ------------------------------------------------------------------------
-BYTE* ImpSwap::GetData() const
+sal_uInt8* ImpSwap::GetData() const
{
- BYTE* pData;
+ sal_uInt8* pData;
if( IsSwapped() )
{
@@ -481,7 +481,7 @@ BYTE* ImpSwap::GetData() const
if( pIStm )
{
- pData = new BYTE[ mnDataSize ];
+ pData = new sal_uInt8[ mnDataSize ];
pIStm->Read( pData, mnDataSize );
sal_Bool bError = ( ERRCODE_NONE != pIStm->GetError() );
delete pIStm;
@@ -502,7 +502,7 @@ BYTE* ImpSwap::GetData() const
void ImpSwap::WriteTo( SvStream& rOStm ) const
{
- BYTE* pData = GetData();
+ sal_uInt8* pData = GetData();
if( pData )
{
diff --git a/vcl/source/gdi/gradient.cxx b/vcl/source/gdi/gradient.cxx
index 9856e2213d85..9f4f91c38e60 100644
--- a/vcl/source/gdi/gradient.cxx
+++ b/vcl/source/gdi/gradient.cxx
@@ -174,7 +174,7 @@ void Gradient::SetEndColor( const Color& rColor )
// -----------------------------------------------------------------------
-void Gradient::SetAngle( USHORT nAngle )
+void Gradient::SetAngle( sal_uInt16 nAngle )
{
DBG_CHKTHIS( Gradient, NULL );
@@ -184,7 +184,7 @@ void Gradient::SetAngle( USHORT nAngle )
// -----------------------------------------------------------------------
-void Gradient::SetBorder( USHORT nBorder )
+void Gradient::SetBorder( sal_uInt16 nBorder )
{
DBG_CHKTHIS( Gradient, NULL );
@@ -194,7 +194,7 @@ void Gradient::SetBorder( USHORT nBorder )
// -----------------------------------------------------------------------
-void Gradient::SetOfsX( USHORT nOfsX )
+void Gradient::SetOfsX( sal_uInt16 nOfsX )
{
DBG_CHKTHIS( Gradient, NULL );
@@ -204,7 +204,7 @@ void Gradient::SetOfsX( USHORT nOfsX )
// -----------------------------------------------------------------------
-void Gradient::SetOfsY( USHORT nOfsY )
+void Gradient::SetOfsY( sal_uInt16 nOfsY )
{
DBG_CHKTHIS( Gradient, NULL );
@@ -214,7 +214,7 @@ void Gradient::SetOfsY( USHORT nOfsY )
// -----------------------------------------------------------------------
-void Gradient::SetStartIntensity( USHORT nIntens )
+void Gradient::SetStartIntensity( sal_uInt16 nIntens )
{
DBG_CHKTHIS( Gradient, NULL );
@@ -224,7 +224,7 @@ void Gradient::SetStartIntensity( USHORT nIntens )
// -----------------------------------------------------------------------
-void Gradient::SetEndIntensity( USHORT nIntens )
+void Gradient::SetEndIntensity( sal_uInt16 nIntens )
{
DBG_CHKTHIS( Gradient, NULL );
@@ -234,7 +234,7 @@ void Gradient::SetEndIntensity( USHORT nIntens )
// -----------------------------------------------------------------------
-void Gradient::SetSteps( USHORT nSteps )
+void Gradient::SetSteps( sal_uInt16 nSteps )
{
DBG_CHKTHIS( Gradient, NULL );
@@ -265,13 +265,13 @@ Gradient& Gradient::operator=( const Gradient& rGradient )
// -----------------------------------------------------------------------
-BOOL Gradient::operator==( const Gradient& rGradient ) const
+sal_Bool Gradient::operator==( const Gradient& rGradient ) const
{
DBG_CHKTHIS( Gradient, NULL );
DBG_CHKOBJ( &rGradient, Gradient, NULL );
if ( mpImplGradient == rGradient.mpImplGradient )
- return TRUE;
+ return sal_True;
if ( (mpImplGradient->meStyle == rGradient.mpImplGradient->meStyle) ||
(mpImplGradient->mnAngle == rGradient.mpImplGradient->mnAngle) ||
@@ -283,15 +283,15 @@ BOOL Gradient::operator==( const Gradient& rGradient ) const
(mpImplGradient->mnIntensityEnd == rGradient.mpImplGradient->mnIntensityEnd) ||
(mpImplGradient->maStartColor == rGradient.mpImplGradient->maStartColor) ||
(mpImplGradient->maEndColor == rGradient.mpImplGradient->maEndColor) )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
SvStream& operator>>( SvStream& rIStm, Impl_Gradient& rImpl_Gradient )
{
VersionCompat aCompat( rIStm, STREAM_READ );
- UINT16 nTmp16;
+ sal_uInt16 nTmp16;
rIStm >> nTmp16; rImpl_Gradient.meStyle = (GradientStyle) nTmp16;
@@ -314,7 +314,7 @@ SvStream& operator<<( SvStream& rOStm, const Impl_Gradient& rImpl_Gradient )
{
VersionCompat aCompat( rOStm, STREAM_WRITE, 1 );
- rOStm << (UINT16) rImpl_Gradient.meStyle <<
+ rOStm << (sal_uInt16) rImpl_Gradient.meStyle <<
rImpl_Gradient.maStartColor <<
rImpl_Gradient.maEndColor <<
rImpl_Gradient.mnAngle <<
diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx
index 790c3d43bb85..9a643e41afa3 100644
--- a/vcl/source/gdi/graph.cxx
+++ b/vcl/source/gdi/graph.cxx
@@ -59,11 +59,11 @@ static void ImplDrawDefault( OutputDevice* pOutDev, const UniString* pText,
Font* pFont, const Bitmap* pBitmap, const BitmapEx* pBitmapEx,
const Point& rDestPt, const Size& rDestSize )
{
- USHORT nPixel = (USHORT) pOutDev->PixelToLogic( Size( 1, 1 ) ).Width();
- USHORT nPixelWidth = nPixel;
+ sal_uInt16 nPixel = (sal_uInt16) pOutDev->PixelToLogic( Size( 1, 1 ) ).Width();
+ sal_uInt16 nPixelWidth = nPixel;
Point aPoint( rDestPt.X() + nPixelWidth, rDestPt.Y() + nPixelWidth );
Size aSize( rDestSize.Width() - ( nPixelWidth << 1 ), rDestSize.Height() - ( nPixelWidth << 1 ) );
- BOOL bFilled = ( pBitmap != NULL || pBitmapEx != NULL || pFont != NULL );
+ sal_Bool bFilled = ( pBitmap != NULL || pBitmapEx != NULL || pFont != NULL );
Rectangle aBorderRect( aPoint, aSize );
pOutDev->Push();
@@ -138,8 +138,8 @@ static void ImplDrawDefault( OutputDevice* pOutDev, const UniString* pText,
if ( nTextWidth <= nWidth || aSz.Height() <= nThreshold )
{
- USHORT nStart = 0;
- USHORT nLen = 0;
+ sal_uInt16 nStart = 0;
+ sal_uInt16 nLen = 0;
while( nStart < pText->Len() && pText->GetChar( nStart ) == ' ' )
nStart++;
@@ -147,7 +147,7 @@ static void ImplDrawDefault( OutputDevice* pOutDev, const UniString* pText,
nLen++;
while( nStart < pText->Len() && nLines-- )
{
- USHORT nNext = nLen;
+ sal_uInt16 nNext = nLen;
do
{
while ( nStart+nNext < pText->Len() && pText->GetChar( nStart+nNext ) == ' ' )
@@ -161,14 +161,14 @@ static void ImplDrawDefault( OutputDevice* pOutDev, const UniString* pText,
}
while ( nStart+nNext < pText->Len() );
- USHORT n = nLen;
+ sal_uInt16 n = nLen;
nTextWidth = pOutDev->GetTextWidth( *pText, nStart, n );
while( nTextWidth > aSize.Width() )
nTextWidth = pOutDev->GetTextWidth( *pText, nStart, --n );
pOutDev->DrawText( aPoint, *pText, nStart, n );
aPoint.Y() += nTextHeight;
- nStart = sal::static_int_cast<USHORT>(nStart + nLen);
+ nStart = sal::static_int_cast<sal_uInt16>(nStart + nLen);
nLen = nNext-nLen;
while( nStart < pText->Len() && pText->GetChar( nStart ) == ' ' )
{
@@ -334,21 +334,21 @@ Graphic& Graphic::operator=( const Graphic& rGraphic )
// ------------------------------------------------------------------------
-BOOL Graphic::operator==( const Graphic& rGraphic ) const
+sal_Bool Graphic::operator==( const Graphic& rGraphic ) const
{
return( *mpImpGraphic == *rGraphic.mpImpGraphic );
}
// ------------------------------------------------------------------------
-BOOL Graphic::operator!=( const Graphic& rGraphic ) const
+sal_Bool Graphic::operator!=( const Graphic& rGraphic ) const
{
return( *mpImpGraphic != *rGraphic.mpImpGraphic );
}
// ------------------------------------------------------------------------
-BOOL Graphic::operator!() const
+sal_Bool Graphic::operator!() const
{
return( GRAPHIC_NONE == mpImpGraphic->ImplGetType() );
}
@@ -399,28 +399,28 @@ void Graphic::SetDefaultType()
// ------------------------------------------------------------------------
-BOOL Graphic::IsSupportedGraphic() const
+sal_Bool Graphic::IsSupportedGraphic() const
{
return mpImpGraphic->ImplIsSupportedGraphic();
}
// ------------------------------------------------------------------------
-BOOL Graphic::IsTransparent() const
+sal_Bool Graphic::IsTransparent() const
{
return mpImpGraphic->ImplIsTransparent();
}
// ------------------------------------------------------------------------
-BOOL Graphic::IsAlpha() const
+sal_Bool Graphic::IsAlpha() const
{
return mpImpGraphic->ImplIsAlpha();
}
// ------------------------------------------------------------------------
-BOOL Graphic::IsAnimated() const
+sal_Bool Graphic::IsAnimated() const
{
return mpImpGraphic->ImplIsAnimated();
}
@@ -531,7 +531,7 @@ Size Graphic::GetSizePixel( const OutputDevice* pRefDevice ) const
// ------------------------------------------------------------------
-ULONG Graphic::GetSizeBytes() const
+sal_uIntPtr Graphic::GetSizeBytes() const
{
return mpImpGraphic->ImplGetSizeBytes();
}
@@ -615,7 +615,7 @@ Link Graphic::GetAnimationNotifyHdl() const
// ------------------------------------------------------------------------
-ULONG Graphic::GetAnimationLoopCount() const
+sal_uIntPtr Graphic::GetAnimationLoopCount() const
{
return mpImpGraphic->ImplGetAnimationLoopCount();
}
@@ -650,20 +650,20 @@ void Graphic::SetContext( GraphicReader* pReader )
// ------------------------------------------------------------------------
-USHORT Graphic::GetGraphicsCompressMode( SvStream& rIStm )
+sal_uInt16 Graphic::GetGraphicsCompressMode( SvStream& rIStm )
{
- const ULONG nPos = rIStm.Tell();
- const USHORT nOldFormat = rIStm.GetNumberFormatInt();
- UINT32 nTmp32;
- UINT16 nTmp16;
- USHORT nCompressMode = COMPRESSMODE_NONE;
+ const sal_uIntPtr nPos = rIStm.Tell();
+ const sal_uInt16 nOldFormat = rIStm.GetNumberFormatInt();
+ sal_uInt32 nTmp32;
+ sal_uInt16 nTmp16;
+ sal_uInt16 nCompressMode = COMPRESSMODE_NONE;
rIStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
rIStm >> nTmp32;
// is it a swapped graphic with a bitmap?
- rIStm.SeekRel( (nTmp32 == (UINT32) GRAPHIC_BITMAP ) ? 40 : -4 );
+ rIStm.SeekRel( (nTmp32 == (sal_uInt32) GRAPHIC_BITMAP ) ? 40 : -4 );
// try to read bitmap id
rIStm >> nTmp16;
@@ -688,7 +688,7 @@ USHORT Graphic::GetGraphicsCompressMode( SvStream& rIStm )
// ------------------------------------------------------------------------
-void Graphic::SetDocFileName( const String& rName, ULONG nFilePos )
+void Graphic::SetDocFileName( const String& rName, sal_uIntPtr nFilePos )
{
mpImpGraphic->ImplSetDocFileName( rName, nFilePos );
}
@@ -702,14 +702,14 @@ const String& Graphic::GetDocFileName() const
// ------------------------------------------------------------------------
-ULONG Graphic::GetDocFilePos() const
+sal_uIntPtr Graphic::GetDocFilePos() const
{
return mpImpGraphic->ImplGetDocFilePos();
}
// ------------------------------------------------------------------------
-BOOL Graphic::ReadEmbedded( SvStream& rIStream, BOOL bSwap )
+sal_Bool Graphic::ReadEmbedded( SvStream& rIStream, sal_Bool bSwap )
{
ImplTestRefCount();
return mpImpGraphic->ImplReadEmbedded( rIStream, bSwap );
@@ -717,7 +717,7 @@ BOOL Graphic::ReadEmbedded( SvStream& rIStream, BOOL bSwap )
// ------------------------------------------------------------------------
-BOOL Graphic::WriteEmbedded( SvStream& rOStream )
+sal_Bool Graphic::WriteEmbedded( SvStream& rOStream )
{
ImplTestRefCount();
return mpImpGraphic->ImplWriteEmbedded( rOStream );
@@ -725,7 +725,7 @@ BOOL Graphic::WriteEmbedded( SvStream& rOStream )
// ------------------------------------------------------------------------
-BOOL Graphic::SwapOut()
+sal_Bool Graphic::SwapOut()
{
ImplTestRefCount();
return mpImpGraphic->ImplSwapOut();
@@ -733,7 +733,7 @@ BOOL Graphic::SwapOut()
// ------------------------------------------------------------------------
-BOOL Graphic::SwapOut( SvStream* pOStream )
+sal_Bool Graphic::SwapOut( SvStream* pOStream )
{
ImplTestRefCount();
return mpImpGraphic->ImplSwapOut( pOStream );
@@ -741,7 +741,7 @@ BOOL Graphic::SwapOut( SvStream* pOStream )
// ------------------------------------------------------------------------
-BOOL Graphic::SwapIn()
+sal_Bool Graphic::SwapIn()
{
ImplTestRefCount();
return mpImpGraphic->ImplSwapIn();
@@ -749,7 +749,7 @@ BOOL Graphic::SwapIn()
// ------------------------------------------------------------------------
-BOOL Graphic::SwapIn( SvStream* pStrm )
+sal_Bool Graphic::SwapIn( SvStream* pStrm )
{
ImplTestRefCount();
return mpImpGraphic->ImplSwapIn( pStrm );
@@ -757,7 +757,7 @@ BOOL Graphic::SwapIn( SvStream* pStrm )
// ------------------------------------------------------------------------
-BOOL Graphic::IsSwapOut() const
+sal_Bool Graphic::IsSwapOut() const
{
return mpImpGraphic->ImplIsSwapOut();
}
@@ -779,21 +779,21 @@ GfxLink Graphic::GetLink() const
// ------------------------------------------------------------------------
-BOOL Graphic::IsLink() const
+sal_Bool Graphic::IsLink() const
{
return mpImpGraphic->ImplIsLink();
}
// ------------------------------------------------------------------------
-ULONG Graphic::GetChecksum() const
+sal_uIntPtr Graphic::GetChecksum() const
{
return mpImpGraphic->ImplGetChecksum();
}
// ------------------------------------------------------------------------
-BOOL Graphic::ExportNative( SvStream& rOStream ) const
+sal_Bool Graphic::ExportNative( SvStream& rOStream ) const
{
return mpImpGraphic->ImplExportNative( rOStream );
}
diff --git a/vcl/source/gdi/graphictools.cxx b/vcl/source/gdi/graphictools.cxx
index 83c0cd628cdb..5ef9ed038163 100644
--- a/vcl/source/gdi/graphictools.cxx
+++ b/vcl/source/gdi/graphictools.cxx
@@ -34,7 +34,7 @@
static ::rtl::OString polyToString( const Polygon& rPoly )
{
::rtl::OString aStr;
- USHORT nVertex;
+ sal_uInt16 nVertex;
for(nVertex=0; nVertex<rPoly.GetSize(); ++nVertex)
{
aStr += "(";
@@ -66,7 +66,7 @@ static ::rtl::OString polyToString( const Polygon& rPoly )
static ::rtl::OString polyPolyToString( const PolyPolygon& rPolyPoly )
{
::rtl::OString aStr;
- USHORT nPoly;
+ sal_uInt16 nPoly;
for(nPoly=0; nPoly<rPolyPoly.Count(); ++nPoly)
{
const Polygon& rPoly = rPolyPoly[nPoly];
@@ -327,9 +327,9 @@ SvStream& operator<<( SvStream& rOStm, const SvtGraphicStroke& rClass )
rClass.maEndArrow.Write( rOStm );
rOStm << rClass.mfTransparency;
rOStm << rClass.mfStrokeWidth;
- UINT16 nTmp = sal::static_int_cast<UINT16>( rClass.maCapType );
+ sal_uInt16 nTmp = sal::static_int_cast<sal_uInt16>( rClass.maCapType );
rOStm << nTmp;
- nTmp = sal::static_int_cast<UINT16>( rClass.maJoinType );
+ nTmp = sal::static_int_cast<sal_uInt16>( rClass.maJoinType );
rOStm << nTmp;
rOStm << rClass.mfMiterLimit;
@@ -350,7 +350,7 @@ SvStream& operator>>( SvStream& rIStm, SvtGraphicStroke& rClass )
rClass.maEndArrow.Read( rIStm );
rIStm >> rClass.mfTransparency;
rIStm >> rClass.mfStrokeWidth;
- UINT16 nTmp;
+ sal_uInt16 nTmp;
rIStm >> nTmp;
rClass.maCapType = SvtGraphicStroke::CapType(nTmp);
rIStm >> nTmp;
@@ -706,19 +706,19 @@ SvStream& operator<<( SvStream& rOStm, const SvtGraphicFill& rClass )
rClass.maPath.Write( rOStm );
rOStm << rClass.maFillColor;
rOStm << rClass.mfTransparency;
- UINT16 nTmp = sal::static_int_cast<UINT16>( rClass.maFillRule );
+ sal_uInt16 nTmp = sal::static_int_cast<sal_uInt16>( rClass.maFillRule );
rOStm << nTmp;
- nTmp = sal::static_int_cast<UINT16>( rClass.maFillType );
+ nTmp = sal::static_int_cast<sal_uInt16>( rClass.maFillType );
rOStm << nTmp;
int i;
for(i=0; i<SvtGraphicFill::Transform::MatrixSize; ++i)
rOStm << rClass.maFillTransform.matrix[i];
nTmp = rClass.mbTiling;
rOStm << nTmp;
- nTmp = sal::static_int_cast<UINT16>( rClass.maHatchType );
+ nTmp = sal::static_int_cast<sal_uInt16>( rClass.maHatchType );
rOStm << nTmp;
rOStm << rClass.maHatchColor;
- nTmp = sal::static_int_cast<UINT16>( rClass.maGradientType );
+ nTmp = sal::static_int_cast<sal_uInt16>( rClass.maGradientType );
rOStm << nTmp;
rOStm << rClass.maGradient1stColor;
rOStm << rClass.maGradient2ndColor;
@@ -735,7 +735,7 @@ SvStream& operator>>( SvStream& rIStm, SvtGraphicFill& rClass )
rClass.maPath.Read( rIStm );
rIStm >> rClass.maFillColor;
rIStm >> rClass.mfTransparency;
- UINT16 nTmp;
+ sal_uInt16 nTmp;
rIStm >> nTmp;
rClass.maFillRule = SvtGraphicFill::FillRule( nTmp );
rIStm >> nTmp;
diff --git a/vcl/source/gdi/hatch.cxx b/vcl/source/gdi/hatch.cxx
index 3a8b51bf3022..b226c0f06936 100644
--- a/vcl/source/gdi/hatch.cxx
+++ b/vcl/source/gdi/hatch.cxx
@@ -83,7 +83,7 @@ Hatch::Hatch( const Hatch& rHatch )
// -----------------------------------------------------------------------
Hatch::Hatch( HatchStyle eStyle, const Color& rColor,
- long nDistance, USHORT nAngle10 )
+ long nDistance, sal_uInt16 nAngle10 )
{
DBG_CTOR( Hatch, NULL );
mpImplHatch = new ImplHatch;
@@ -120,7 +120,7 @@ Hatch& Hatch::operator=( const Hatch& rHatch )
// -----------------------------------------------------------------------
-BOOL Hatch::operator==( const Hatch& rHatch ) const
+sal_Bool Hatch::operator==( const Hatch& rHatch ) const
{
DBG_CHKTHIS( Hatch, NULL );
DBG_CHKOBJ( &rHatch, Hatch, NULL );
@@ -174,7 +174,7 @@ void Hatch::SetDistance( long nDistance )
// -----------------------------------------------------------------------
-void Hatch::SetAngle( USHORT nAngle10 )
+void Hatch::SetAngle( sal_uInt16 nAngle10 )
{
DBG_CHKTHIS( Hatch, NULL );
ImplMakeUnique();
@@ -186,7 +186,7 @@ void Hatch::SetAngle( USHORT nAngle10 )
SvStream& operator>>( SvStream& rIStm, ImplHatch& rImplHatch )
{
VersionCompat aCompat( rIStm, STREAM_READ );
- UINT16 nTmp16;
+ sal_uInt16 nTmp16;
rIStm >> nTmp16; rImplHatch.meStyle = (HatchStyle) nTmp16;
rIStm >> rImplHatch.maColor >> rImplHatch.mnDistance >> rImplHatch.mnAngle;
@@ -200,7 +200,7 @@ SvStream& operator<<( SvStream& rOStm, const ImplHatch& rImplHatch )
{
VersionCompat aCompat( rOStm, STREAM_WRITE, 1 );
- rOStm << (UINT16) rImplHatch.meStyle << rImplHatch.maColor;
+ rOStm << (sal_uInt16) rImplHatch.meStyle << rImplHatch.maColor;
rOStm << rImplHatch.mnDistance << rImplHatch.mnAngle;
return rOStm;
diff --git a/vcl/source/gdi/image.cxx b/vcl/source/gdi/image.cxx
index e79308b2664e..38999576a1cc 100644
--- a/vcl/source/gdi/image.cxx
+++ b/vcl/source/gdi/image.cxx
@@ -86,7 +86,7 @@ Image::Image( const ResId& rResId ) :
pResMgr->Increment( sizeof( RSHEADER_TYPE ) );
BitmapEx aBmpEx;
- ULONG nObjMask = pResMgr->ReadLong();
+ sal_uIntPtr nObjMask = pResMgr->ReadLong();
if( nObjMask & RSC_IMAGE_IMAGEBITMAP )
{
@@ -293,7 +293,7 @@ Image Image::GetColorTransformedImage( ImageColorTransform eColorTransform ) con
{
Color* pSrcColors = NULL;
Color* pDstColors = NULL;
- ULONG nColorCount = 0;
+ sal_uIntPtr nColorCount = 0;
Image::GetColorTransformArrays( eColorTransform, pSrcColors, pDstColors, nColorCount );
@@ -334,7 +334,7 @@ void Image::Invert()
// -----------------------------------------------------------------------
void Image::GetColorTransformArrays( ImageColorTransform eColorTransform,
- Color*& rpSrcColor, Color*& rpDstColor, ULONG& rColorCount )
+ Color*& rpSrcColor, Color*& rpDstColor, sal_uIntPtr& rColorCount )
{
if( IMAGECOLORTRANSFORM_HIGHCONTRAST == eColorTransform )
{
@@ -381,7 +381,7 @@ Image& Image::operator=( const Image& rImage )
// -----------------------------------------------------------------------
-BOOL Image::operator==( const Image& rImage ) const
+sal_Bool Image::operator==( const Image& rImage ) const
{
DBG_CHKTHIS( Image, NULL );
DBG_CHKOBJ( &rImage, Image, NULL );
@@ -419,7 +419,7 @@ BOOL Image::operator==( const Image& rImage ) const
// - ImageList -
// -------------
-ImageList::ImageList( USHORT nInit, USHORT nGrow ) :
+ImageList::ImageList( sal_uInt16 nInit, sal_uInt16 nGrow ) :
mpImplData( NULL ),
mnInitSize( nInit ),
mnGrowSize( nGrow )
@@ -446,7 +446,7 @@ ImageList::ImageList( const ResId& rResId ) :
{
pResMgr->Increment( sizeof( RSHEADER_TYPE ) );
- ULONG nObjMask = pResMgr->ReadLong();
+ sal_uIntPtr nObjMask = pResMgr->ReadLong();
const String aPrefix( pResMgr->ReadString() );
::boost::scoped_ptr< Color > spMaskColor;
@@ -462,13 +462,13 @@ ImageList::ImageList( const ResId& rResId ) :
}
sal_Int32 nCount = pResMgr->ReadLong();
- ImplInit( static_cast< USHORT >( nCount ), Size() );
+ ImplInit( static_cast< sal_uInt16 >( nCount ), Size() );
BitmapEx aEmpty;
for( sal_Int32 i = 0; i < nCount; ++i )
{
rtl::OUString aName = pResMgr->ReadString();
- USHORT nId = static_cast< USHORT >( pResMgr->ReadLong() );
+ sal_uInt16 nId = static_cast< sal_uInt16 >( pResMgr->ReadLong() );
mpImplData->AddImage( aName, nId, aEmpty );
}
@@ -490,14 +490,14 @@ ImageList::ImageList( const ::std::vector< ::rtl::OUString >& rNameVector,
DBG_CTOR( ImageList, NULL );
- ImplInit( sal::static_int_cast< USHORT >( rNameVector.size() ), Size() );
+ ImplInit( sal::static_int_cast< sal_uInt16 >( rNameVector.size() ), Size() );
mpImplData->maPrefix = rPrefix;
for( sal_uInt32 i = 0; i < rNameVector.size(); ++i )
{
// fprintf (stderr, "List %p [%d]: '%s'\n",
// this, i, rtl::OUStringToOString( rNameVector[i], RTL_TEXTENCODING_UTF8 ).getStr() );
- mpImplData->AddImage( rNameVector[ i ], static_cast< USHORT >( i ) + 1, BitmapEx() );
+ mpImplData->AddImage( rNameVector[ i ], static_cast< sal_uInt16 >( i ) + 1, BitmapEx() );
}
}
@@ -524,7 +524,7 @@ ImageList::~ImageList()
delete mpImplData;
}
-void ImageList::ImplInit( USHORT nItems, const Size &rSize )
+void ImageList::ImplInit( sal_uInt16 nItems, const Size &rSize )
{
mpImplData = new ImplImageList;
mpImplData->mnRefCount = 1;
@@ -579,13 +579,13 @@ void ImageList::ImplMakeUnique()
BitmapEx ImageList::GetAsHorizontalStrip() const
{
Size aSize( mpImplData->maImageSize );
- USHORT nCount = GetImageCount();
+ sal_uInt16 nCount = GetImageCount();
if( !nCount )
return BitmapEx();
aSize.Width() *= nCount;
// Load any stragglers
- for (USHORT nIdx = 0; nIdx < nCount; nIdx++)
+ for (sal_uInt16 nIdx = 0; nIdx < nCount; nIdx++)
{
ImageAryData *pData = mpImplData->maImages[ nIdx ];
if( pData->IsLoadable() )
@@ -603,7 +603,7 @@ BitmapEx ImageList::GetAsHorizontalStrip() const
aResult = BitmapEx( aPixels );
Rectangle aSrcRect( Point( 0, 0 ), mpImplData->maImageSize );
- for (USHORT nIdx = 0; nIdx < nCount; nIdx++)
+ for (sal_uInt16 nIdx = 0; nIdx < nCount; nIdx++)
{
Rectangle aDestRect( Point( nIdx * mpImplData->maImageSize.Width(), 0 ),
mpImplData->maImageSize );
@@ -619,7 +619,7 @@ BitmapEx ImageList::GetAsHorizontalStrip() const
void ImageList::InsertFromHorizontalStrip( const BitmapEx &rBitmapEx,
const std::vector< rtl::OUString > &rNameVector )
{
- USHORT nItems = sal::static_int_cast< USHORT >( rNameVector.size() );
+ sal_uInt16 nItems = sal::static_int_cast< sal_uInt16 >( rNameVector.size() );
// fprintf (stderr, "InsertFromHorizontalStrip (1) [%d items]\n", nItems);
@@ -632,7 +632,7 @@ void ImageList::InsertFromHorizontalStrip( const BitmapEx &rBitmapEx,
aSize.Width() /= nItems;
ImplInit( nItems, aSize );
- for (USHORT nIdx = 0; nIdx < nItems; nIdx++)
+ for (sal_uInt16 nIdx = 0; nIdx < nItems; nIdx++)
{
BitmapEx aBitmap( rBitmapEx, Point( nIdx * aSize.Width(), 0 ), aSize );
mpImplData->AddImage( rNameVector[ nIdx ], nIdx + 1, aBitmap );
@@ -642,11 +642,11 @@ void ImageList::InsertFromHorizontalStrip( const BitmapEx &rBitmapEx,
// -----------------------------------------------------------------------
void ImageList::InsertFromHorizontalBitmap( const ResId& rResId,
- USHORT nCount,
+ sal_uInt16 nCount,
const Color *pMaskColor,
const Color *pSearchColors,
const Color *pReplaceColors,
- ULONG nColorCount)
+ sal_uIntPtr nColorCount)
{
BitmapEx aBmpEx( rResId );
if (!aBmpEx.IsTransparent())
@@ -665,7 +665,7 @@ void ImageList::InsertFromHorizontalBitmap( const ResId& rResId,
// -----------------------------------------------------------------------
-USHORT ImageList::ImplGetImageId( const ::rtl::OUString& rImageName ) const
+sal_uInt16 ImageList::ImplGetImageId( const ::rtl::OUString& rImageName ) const
{
DBG_CHKTHIS( ImageList, NULL );
@@ -678,7 +678,7 @@ USHORT ImageList::ImplGetImageId( const ::rtl::OUString& rImageName ) const
// -----------------------------------------------------------------------
-void ImageList::AddImage( USHORT nId, const Image& rImage )
+void ImageList::AddImage( sal_uInt16 nId, const Image& rImage )
{
DBG_CHKTHIS( ImageList, NULL );
DBG_CHKOBJ( &rImage, Image, NULL );
@@ -708,7 +708,7 @@ void ImageList::AddImage( const ::rtl::OUString& rImageName, const Image& rImage
// -----------------------------------------------------------------------
-void ImageList::ReplaceImage( USHORT nId, const Image& rImage )
+void ImageList::ReplaceImage( sal_uInt16 nId, const Image& rImage )
{
DBG_CHKTHIS( ImageList, NULL );
DBG_CHKOBJ( &rImage, Image, NULL );
@@ -722,7 +722,7 @@ void ImageList::ReplaceImage( USHORT nId, const Image& rImage )
void ImageList::ReplaceImage( const ::rtl::OUString& rImageName, const Image& rImage )
{
- const USHORT nId = ImplGetImageId( rImageName );
+ const sal_uInt16 nId = ImplGetImageId( rImageName );
if( nId )
{
@@ -736,14 +736,14 @@ void ImageList::ReplaceImage( const ::rtl::OUString& rImageName, const Image& rI
// -----------------------------------------------------------------------
-void ImageList::ReplaceImage( USHORT nId, USHORT nReplaceId )
+void ImageList::ReplaceImage( sal_uInt16 nId, sal_uInt16 nReplaceId )
{
DBG_CHKTHIS( ImageList, NULL );
DBG_ASSERT( GetImagePos( nId ) != IMAGELIST_IMAGE_NOTFOUND, "ImageList::ReplaceImage(): Unknown nId" );
DBG_ASSERT( GetImagePos( nReplaceId ) != IMAGELIST_IMAGE_NOTFOUND, "ImageList::ReplaceImage(): Unknown nReplaceId" );
- ULONG nPosDest = GetImagePos( nId );
- ULONG nPosSrc = GetImagePos( nReplaceId );
+ sal_uIntPtr nPosDest = GetImagePos( nId );
+ sal_uIntPtr nPosSrc = GetImagePos( nReplaceId );
if( nPosDest != IMAGELIST_IMAGE_NOTFOUND &&
nPosSrc != IMAGELIST_IMAGE_NOTFOUND )
{
@@ -756,7 +756,7 @@ void ImageList::ReplaceImage( USHORT nId, USHORT nReplaceId )
void ImageList::ReplaceImage( const ::rtl::OUString& rImageName, const ::rtl::OUString& rReplaceName )
{
- const USHORT nId1 = ImplGetImageId( rImageName ), nId2 = ImplGetImageId( rReplaceName );
+ const sal_uInt16 nId1 = ImplGetImageId( rImageName ), nId2 = ImplGetImageId( rReplaceName );
if( nId1 && nId2 )
ReplaceImage( nId1, nId2 );
@@ -764,7 +764,7 @@ void ImageList::ReplaceImage( const ::rtl::OUString& rImageName, const ::rtl::OU
// -----------------------------------------------------------------------
-void ImageList::RemoveImage( USHORT nId )
+void ImageList::RemoveImage( sal_uInt16 nId )
{
DBG_CHKTHIS( ImageList, NULL );
@@ -772,7 +772,7 @@ void ImageList::RemoveImage( USHORT nId )
{
if( mpImplData->maImages[ i ]->mnId == nId )
{
- mpImplData->RemoveImage( static_cast< USHORT >( i ) );
+ mpImplData->RemoveImage( static_cast< sal_uInt16 >( i ) );
break;
}
}
@@ -782,7 +782,7 @@ void ImageList::RemoveImage( USHORT nId )
void ImageList::RemoveImage( const ::rtl::OUString& rImageName )
{
- const USHORT nId = ImplGetImageId( rImageName );
+ const sal_uInt16 nId = ImplGetImageId( rImageName );
if( nId )
RemoveImage( nId );
@@ -790,7 +790,7 @@ void ImageList::RemoveImage( const ::rtl::OUString& rImageName )
// -----------------------------------------------------------------------
-Image ImageList::GetImage( USHORT nId ) const
+Image ImageList::GetImage( sal_uInt16 nId ) const
{
DBG_CHKTHIS( ImageList, NULL );
@@ -854,16 +854,16 @@ void ImageList::Clear()
// -----------------------------------------------------------------------
-USHORT ImageList::GetImageCount() const
+sal_uInt16 ImageList::GetImageCount() const
{
DBG_CHKTHIS( ImageList, NULL );
- return mpImplData ? static_cast< USHORT >( mpImplData->maImages.size() ) : 0;
+ return mpImplData ? static_cast< sal_uInt16 >( mpImplData->maImages.size() ) : 0;
}
// -----------------------------------------------------------------------
-USHORT ImageList::GetImagePos( USHORT nId ) const
+sal_uInt16 ImageList::GetImagePos( sal_uInt16 nId ) const
{
DBG_CHKTHIS( ImageList, NULL );
@@ -872,21 +872,21 @@ USHORT ImageList::GetImagePos( USHORT nId ) const
for( sal_uInt32 i = 0; i < mpImplData->maImages.size(); ++i )
{
if (mpImplData->maImages[ i ]->mnId == nId)
- return static_cast< USHORT >( i );
+ return static_cast< sal_uInt16 >( i );
}
}
return IMAGELIST_IMAGE_NOTFOUND;
}
-bool ImageList::HasImageAtPos( USHORT nId ) const
+bool ImageList::HasImageAtPos( sal_uInt16 nId ) const
{
return GetImagePos( nId ) != IMAGELIST_IMAGE_NOTFOUND;
}
// -----------------------------------------------------------------------
-USHORT ImageList::GetImagePos( const ::rtl::OUString& rImageName ) const
+sal_uInt16 ImageList::GetImagePos( const ::rtl::OUString& rImageName ) const
{
DBG_CHKTHIS( ImageList, NULL );
@@ -895,7 +895,7 @@ USHORT ImageList::GetImagePos( const ::rtl::OUString& rImageName ) const
for( sal_uInt32 i = 0; i < mpImplData->maImages.size(); i++ )
{
if (mpImplData->maImages[i]->maName == rImageName)
- return static_cast< USHORT >( i );
+ return static_cast< sal_uInt16 >( i );
}
}
@@ -904,7 +904,7 @@ USHORT ImageList::GetImagePos( const ::rtl::OUString& rImageName ) const
// -----------------------------------------------------------------------
-USHORT ImageList::GetImageId( USHORT nPos ) const
+sal_uInt16 ImageList::GetImageId( sal_uInt16 nPos ) const
{
DBG_CHKTHIS( ImageList, NULL );
@@ -916,13 +916,13 @@ USHORT ImageList::GetImageId( USHORT nPos ) const
// -----------------------------------------------------------------------
-void ImageList::GetImageIds( ::std::vector< USHORT >& rIds ) const
+void ImageList::GetImageIds( ::std::vector< sal_uInt16 >& rIds ) const
{
RTL_LOGFILE_CONTEXT( aLog, "vcl: ImageList::GetImageIds" );
DBG_CHKTHIS( ImageList, NULL );
- rIds = ::std::vector< USHORT >();
+ rIds = ::std::vector< sal_uInt16 >();
if( mpImplData )
{
@@ -933,7 +933,7 @@ void ImageList::GetImageIds( ::std::vector< USHORT >& rIds ) const
// -----------------------------------------------------------------------
-::rtl::OUString ImageList::GetImageName( USHORT nPos ) const
+::rtl::OUString ImageList::GetImageName( sal_uInt16 nPos ) const
{
DBG_CHKTHIS( ImageList, NULL );
@@ -1010,7 +1010,7 @@ ImageList& ImageList::operator=( const ImageList& rImageList )
// -----------------------------------------------------------------------
-BOOL ImageList::operator==( const ImageList& rImageList ) const
+sal_Bool ImageList::operator==( const ImageList& rImageList ) const
{
DBG_CHKTHIS( ImageList, NULL );
DBG_CHKOBJ( &rImageList, ImageList, NULL );
diff --git a/vcl/source/gdi/imgcons.cxx b/vcl/source/gdi/imgcons.cxx
index 0826c5f2310b..30148b85734e 100644
--- a/vcl/source/gdi/imgcons.cxx
+++ b/vcl/source/gdi/imgcons.cxx
@@ -41,35 +41,35 @@
class ImplColorMapper
{
Color maCol;
- ULONG mnR;
- ULONG mnG;
- ULONG mnB;
- ULONG mnT;
- ULONG mnRShift;
- ULONG mnGShift;
- ULONG mnBShift;
- ULONG mnTShift;
+ sal_uIntPtr mnR;
+ sal_uIntPtr mnG;
+ sal_uIntPtr mnB;
+ sal_uIntPtr mnT;
+ sal_uIntPtr mnRShift;
+ sal_uIntPtr mnGShift;
+ sal_uIntPtr mnBShift;
+ sal_uIntPtr mnTShift;
- ULONG ImplCalcMaskShift( ULONG nVal );
+ sal_uIntPtr ImplCalcMaskShift( sal_uIntPtr nVal );
public:
- ImplColorMapper( ULONG nRMask, ULONG nGMask, ULONG nBMask, ULONG nTMask );
+ ImplColorMapper( sal_uIntPtr nRMask, sal_uIntPtr nGMask, sal_uIntPtr nBMask, sal_uIntPtr nTMask );
~ImplColorMapper();
- const Color& ImplGetColor( ULONG nColor )
+ const Color& ImplGetColor( sal_uIntPtr nColor )
{
- maCol.SetRed( (UINT8) ( ( nColor & mnR ) >> mnRShift ) );
- maCol.SetGreen( (UINT8) ( ( nColor & mnG ) >> mnGShift ) );
- maCol.SetBlue( (UINT8) ( ( nColor & mnB ) >> mnBShift ) );
- maCol.SetTransparency( (UINT8) ( ( nColor & mnT ) >> mnTShift ) );
+ maCol.SetRed( (sal_uInt8) ( ( nColor & mnR ) >> mnRShift ) );
+ maCol.SetGreen( (sal_uInt8) ( ( nColor & mnG ) >> mnGShift ) );
+ maCol.SetBlue( (sal_uInt8) ( ( nColor & mnB ) >> mnBShift ) );
+ maCol.SetTransparency( (sal_uInt8) ( ( nColor & mnT ) >> mnTShift ) );
return maCol;
}
};
// -----------------------------------------------------------------------------
-ImplColorMapper::ImplColorMapper( ULONG nRMask, ULONG nGMask, ULONG nBMask, ULONG nTMask ) :
+ImplColorMapper::ImplColorMapper( sal_uIntPtr nRMask, sal_uIntPtr nGMask, sal_uIntPtr nBMask, sal_uIntPtr nTMask ) :
mnR( nRMask ),
mnG( nGMask ),
mnB( nBMask ),
@@ -89,13 +89,13 @@ ImplColorMapper::~ImplColorMapper()
// -----------------------------------------------------------------------------
-ULONG ImplColorMapper::ImplCalcMaskShift( ULONG nVal )
+sal_uIntPtr ImplColorMapper::ImplCalcMaskShift( sal_uIntPtr nVal )
{
DBG_ASSERT( nVal > 0, "Mask has no value!" );
- ULONG nRet = 0UL;
+ sal_uIntPtr nRet = 0UL;
- for( ULONG i = 0UL; i < 32; i++ )
+ for( sal_uIntPtr i = 0UL; i < 32; i++ )
{
if( nVal & ( 1UL << i ) )
{
@@ -115,7 +115,7 @@ ImageConsumer::ImageConsumer() :
mpMapper( NULL ),
mpPal ( NULL ),
mnStatus( 0UL ),
- mbTrans ( FALSE )
+ mbTrans ( sal_False )
{
}
@@ -134,18 +134,18 @@ void ImageConsumer::Init( sal_uInt32 nWidth, sal_uInt32 nHeight )
maSize = Size( nWidth, nHeight );
maBitmap = maMask = Bitmap();
mnStatus = 0UL;
- mbTrans = FALSE;
+ mbTrans = sal_False;
}
// -----------------------------------------------------------------------------
-void ImageConsumer::SetColorModel( USHORT nBitCount,
+void ImageConsumer::SetColorModel( sal_uInt16 nBitCount,
sal_uInt32 nPalEntries, const sal_uInt32* pRGBAPal,
sal_uInt32 nRMask, sal_uInt32 nGMask, sal_uInt32 nBMask, sal_uInt32 nAMask )
{
DBG_ASSERT( maSize.Width() && maSize.Height(), "Missing call to ImageConsumer::Init(...)!" );
- BitmapPalette aPal( Min( (USHORT) nPalEntries, (USHORT) 256 ) );
+ BitmapPalette aPal( Min( (sal_uInt16) nPalEntries, (sal_uInt16) 256 ) );
if( nPalEntries )
{
@@ -158,30 +158,30 @@ void ImageConsumer::SetColorModel( USHORT nBitCount,
delete[] mpPal;
mpPal = new Color[ nPalEntries ];
- for( ULONG i = 0; i < nPalEntries; i++, pTmp++ )
+ for( sal_uIntPtr i = 0; i < nPalEntries; i++, pTmp++ )
{
Color& rCol = mpPal[ i ];
- BYTE cVal;
+ sal_uInt8 cVal;
- cVal = (BYTE) ( ( *pTmp & 0xff000000UL ) >> 24L );
+ cVal = (sal_uInt8) ( ( *pTmp & 0xff000000UL ) >> 24L );
rCol.SetRed( cVal );
- if( i < (ULONG) aPal.GetEntryCount() )
- aPal[ (USHORT) i ].SetRed( cVal );
+ if( i < (sal_uIntPtr) aPal.GetEntryCount() )
+ aPal[ (sal_uInt16) i ].SetRed( cVal );
- cVal = (BYTE) ( ( *pTmp & 0x00ff0000UL ) >> 16L );
+ cVal = (sal_uInt8) ( ( *pTmp & 0x00ff0000UL ) >> 16L );
rCol.SetGreen( cVal );
- if( i < (ULONG) aPal.GetEntryCount() )
- aPal[ (USHORT) i ].SetGreen( cVal );
+ if( i < (sal_uIntPtr) aPal.GetEntryCount() )
+ aPal[ (sal_uInt16) i ].SetGreen( cVal );
- cVal = (BYTE) ( ( *pTmp & 0x0000ff00UL ) >> 8L );
+ cVal = (sal_uInt8) ( ( *pTmp & 0x0000ff00UL ) >> 8L );
rCol.SetBlue( cVal );
- if( i < (ULONG) aPal.GetEntryCount() )
- aPal[ (USHORT) i ].SetBlue( cVal );
+ if( i < (sal_uIntPtr) aPal.GetEntryCount() )
+ aPal[ (sal_uInt16) i ].SetBlue( cVal );
- rCol.SetTransparency( (BYTE) ( ( *pTmp & 0x000000ffL ) ) );
+ rCol.SetTransparency( (sal_uInt8) ( ( *pTmp & 0x000000ffL ) ) );
}
if( nBitCount <= 1 )
@@ -210,7 +210,7 @@ void ImageConsumer::SetColorModel( USHORT nBitCount,
maBitmap = Bitmap( maSize, nBitCount, &aPal );
maMask = Bitmap( maSize, 1 );
maMask.Erase( COL_BLACK );
- mbTrans = FALSE;
+ mbTrans = sal_False;
}
}
@@ -218,7 +218,7 @@ void ImageConsumer::SetColorModel( USHORT nBitCount,
void ImageConsumer::SetPixelsByBytes( sal_uInt32 nConsX, sal_uInt32 nConsY,
sal_uInt32 nConsWidth, sal_uInt32 nConsHeight,
- const BYTE* pData, sal_uInt32 nOffset, sal_uInt32 nScanSize )
+ const sal_uInt8* pData, sal_uInt32 nOffset, sal_uInt32 nScanSize )
{
DBG_ASSERT( !!maBitmap && !!maMask, "Missing call to ImageConsumer::SetColorModel(...)!" );
@@ -248,7 +248,7 @@ void ImageConsumer::SetPixelsByBytes( sal_uInt32 nConsX, sal_uInt32 nConsY,
for( long nY = nStartY; nY <= nEndY; nY++ )
{
- const BYTE* pTmp = pData + ( nY - nStartY ) * nScanSize + nOffset;
+ const sal_uInt8* pTmp = pData + ( nY - nStartY ) * nScanSize + nOffset;
for( long nX = nStartX; nX <= nEndX; nX++ )
{
@@ -258,7 +258,7 @@ void ImageConsumer::SetPixelsByBytes( sal_uInt32 nConsX, sal_uInt32 nConsY,
if( !rCol.GetTransparency() )
{
pMskAcc->SetPixel( nY, nX, aMskWhite );
- mbTrans = TRUE;
+ mbTrans = sal_True;
}
else
{
@@ -274,23 +274,23 @@ void ImageConsumer::SetPixelsByBytes( sal_uInt32 nConsX, sal_uInt32 nConsY,
}
else if( mpPal && ( pBmpAcc->GetBitCount() <= 8 ) )
{
- BitmapColor aIndex( (BYTE) 0 );
+ BitmapColor aIndex( (sal_uInt8) 0 );
BitmapColor aMskWhite( pMskAcc->GetBestMatchingColor( Color( COL_WHITE ) ) );
for( long nY = nStartY; nY <= nEndY; nY++ )
{
- const BYTE* pTmp = pData + ( nY - nStartY ) * nScanSize + nOffset;
+ const sal_uInt8* pTmp = pData + ( nY - nStartY ) * nScanSize + nOffset;
for( long nX = nStartX; nX <= nEndX; nX++ )
{
- const BYTE cIndex = *pTmp++;
+ const sal_uInt8 cIndex = *pTmp++;
const Color& rCol = mpPal[ cIndex ];
// 0: Transparent; >0: Non-Transparent
if( !rCol.GetTransparency() )
{
pMskAcc->SetPixel( nY, nX, aMskWhite );
- mbTrans = TRUE;
+ mbTrans = sal_True;
}
else
{
@@ -309,18 +309,18 @@ void ImageConsumer::SetPixelsByBytes( sal_uInt32 nConsX, sal_uInt32 nConsY,
for( long nY = nStartY; nY <= nEndY; nY++ )
{
- const BYTE* pTmp = pData + ( nY - nStartY ) * nScanSize + nOffset;
+ const sal_uInt8* pTmp = pData + ( nY - nStartY ) * nScanSize + nOffset;
for( long nX = nStartX; nX <= nEndX; nX++ )
{
- const BYTE cIndex = *pTmp++;
+ const sal_uInt8 cIndex = *pTmp++;
const Color& rCol = mpPal[ cIndex ];
// 0: Transparent; >0: Non-Transparent
if( !rCol.GetTransparency() )
{
pMskAcc->SetPixel( nY, nX, aMskWhite );
- mbTrans = TRUE;
+ mbTrans = sal_True;
}
else
{
@@ -395,7 +395,7 @@ void ImageConsumer::SetPixelsByLongs( sal_uInt32 nConsX, sal_uInt32 nConsY,
if( !rCol.GetTransparency() )
{
pMskAcc->SetPixel( nY, nX, aMskWhite );
- mbTrans = TRUE;
+ mbTrans = sal_True;
}
else
{
@@ -411,7 +411,7 @@ void ImageConsumer::SetPixelsByLongs( sal_uInt32 nConsX, sal_uInt32 nConsY,
}
else if( mpPal && ( pBmpAcc->GetBitCount() <= 8 ) )
{
- BitmapColor aIndex( (BYTE) 0 );
+ BitmapColor aIndex( (sal_uInt8) 0 );
BitmapColor aMskWhite( pMskAcc->GetBestMatchingColor( Color( COL_WHITE ) ) );
for( long nY = nStartY; nY <= nEndY; nY++ )
@@ -427,11 +427,11 @@ void ImageConsumer::SetPixelsByLongs( sal_uInt32 nConsX, sal_uInt32 nConsY,
if( !rCol.GetTransparency() )
{
pMskAcc->SetPixel( nY, nX, aMskWhite );
- mbTrans = TRUE;
+ mbTrans = sal_True;
}
else
{
- aIndex.SetIndex( (BYTE) nIndex );
+ aIndex.SetIndex( (sal_uInt8) nIndex );
pBmpAcc->SetPixel( nY, nX, aIndex );
}
}
@@ -457,7 +457,7 @@ void ImageConsumer::SetPixelsByLongs( sal_uInt32 nConsX, sal_uInt32 nConsY,
if( !rCol.GetTransparency() )
{
pMskAcc->SetPixel( nY, nX, aMskWhite );
- mbTrans = TRUE;
+ mbTrans = sal_True;
}
else
{
@@ -541,9 +541,9 @@ sal_uInt32 ImageConsumer::GetStatus() const
// -----------------------------------------------------------------------------
-BOOL ImageConsumer::GetData( BitmapEx& rBmpEx ) const
+sal_Bool ImageConsumer::GetData( BitmapEx& rBmpEx ) const
{
- const BOOL bRet = ( SINGLEFRAMEDONE == mnStatus || STATICIMAGEDONE == mnStatus );
+ const sal_Bool bRet = ( SINGLEFRAMEDONE == mnStatus || STATICIMAGEDONE == mnStatus );
if( bRet )
{
@@ -558,9 +558,9 @@ BOOL ImageConsumer::GetData( BitmapEx& rBmpEx ) const
// -----------------------------------------------------------------------------
-BOOL ImageConsumer::GetData( Image& rImage ) const
+sal_Bool ImageConsumer::GetData( Image& rImage ) const
{
- const BOOL bRet = ( SINGLEFRAMEDONE == mnStatus || STATICIMAGEDONE == mnStatus );
+ const sal_Bool bRet = ( SINGLEFRAMEDONE == mnStatus || STATICIMAGEDONE == mnStatus );
if( bRet )
{
diff --git a/vcl/source/gdi/impanmvw.cxx b/vcl/source/gdi/impanmvw.cxx
index 7762087dc605..f2bb1b190bc0 100644
--- a/vcl/source/gdi/impanmvw.cxx
+++ b/vcl/source/gdi/impanmvw.cxx
@@ -39,7 +39,7 @@
ImplAnimView::ImplAnimView( Animation* pParent, OutputDevice* pOut,
const Point& rPt, const Size& rSz,
- ULONG nExtraData,
+ sal_uIntPtr nExtraData,
OutputDevice* pFirstFrameOutDev ) :
mpParent ( pParent ),
mpOut ( pFirstFrameOutDev ? pFirstFrameOutDev : pOut ),
@@ -51,8 +51,8 @@ ImplAnimView::ImplAnimView( Animation* pParent, OutputDevice* pOut,
mpBackground ( new VirtualDevice ),
mpRestore ( new VirtualDevice ),
meLastDisposal ( DISPOSE_BACK ),
- mbPause ( FALSE ),
- mbMarked ( FALSE ),
+ mbPause ( sal_False ),
+ mbMarked ( sal_False ),
mbHMirr ( maSz.Width() < 0L ),
mbVMirr ( maSz.Height() < 0L )
{
@@ -118,17 +118,17 @@ ImplAnimView::~ImplAnimView()
// ------------------------------------------------------------------------
-BOOL ImplAnimView::ImplMatches( OutputDevice* pOut, long nExtraData ) const
+sal_Bool ImplAnimView::ImplMatches( OutputDevice* pOut, long nExtraData ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( nExtraData )
{
if( ( mnExtraData == nExtraData ) && ( !pOut || ( pOut == mpOut ) ) )
- bRet = TRUE;
+ bRet = sal_True;
}
else if( !pOut || ( pOut == mpOut ) )
- bRet = TRUE;
+ bRet = sal_True;
return bRet;
}
@@ -174,15 +174,15 @@ void ImplAnimView::ImplGetPosSize( const AnimationBitmap& rAnm, Point& rPosPix,
// ------------------------------------------------------------------------
-void ImplAnimView::ImplDrawToPos( ULONG nPos )
+void ImplAnimView::ImplDrawToPos( sal_uIntPtr nPos )
{
VirtualDevice aVDev;
Region* pOldClip = !maClip.IsNull() ? new Region( mpOut->GetClipRegion() ) : NULL;
- aVDev.SetOutputSizePixel( maSzPix, FALSE );
- nPos = Min( nPos, (ULONG) mpParent->Count() - 1UL );
+ aVDev.SetOutputSizePixel( maSzPix, sal_False );
+ nPos = Min( nPos, (sal_uIntPtr) mpParent->Count() - 1UL );
- for( ULONG i = 0UL; i <= nPos; i++ )
+ for( sal_uIntPtr i = 0UL; i <= nPos; i++ )
ImplDraw( i, &aVDev );
if( pOldClip )
@@ -199,20 +199,20 @@ void ImplAnimView::ImplDrawToPos( ULONG nPos )
// ------------------------------------------------------------------------
-void ImplAnimView::ImplDraw( ULONG nPos )
+void ImplAnimView::ImplDraw( sal_uIntPtr nPos )
{
ImplDraw( nPos, NULL );
}
// ------------------------------------------------------------------------
-void ImplAnimView::ImplDraw( ULONG nPos, VirtualDevice* pVDev )
+void ImplAnimView::ImplDraw( sal_uIntPtr nPos, VirtualDevice* pVDev )
{
Rectangle aOutRect( mpOut->PixelToLogic( Point() ), mpOut->GetOutputSize() );
// check, if output lies out of display
if( aOutRect.Intersection( Rectangle( maDispPt, maDispSz ) ).IsEmpty() )
- ImplSetMarked( TRUE );
+ ImplSetMarked( sal_True );
else if( !mbPause )
{
VirtualDevice* pDev;
@@ -220,8 +220,8 @@ void ImplAnimView::ImplDraw( ULONG nPos, VirtualDevice* pVDev )
Point aBmpPosPix;
Size aSizePix;
Size aBmpSizePix;
- const ULONG nLastPos = mpParent->Count() - 1;
- const AnimationBitmap& rAnm = mpParent->Get( (USHORT) ( mnActPos = Min( nPos, nLastPos ) ) );
+ const sal_uIntPtr nLastPos = mpParent->Count() - 1;
+ const AnimationBitmap& rAnm = mpParent->Get( (sal_uInt16) ( mnActPos = Min( nPos, nLastPos ) ) );
ImplGetPosSize( rAnm, aPosPix, aSizePix );
@@ -253,7 +253,7 @@ void ImplAnimView::ImplDraw( ULONG nPos, VirtualDevice* pVDev )
if( !pVDev )
{
pDev = new VirtualDevice;
- pDev->SetOutputSizePixel( maSzPix, FALSE );
+ pDev->SetOutputSizePixel( maSzPix, sal_False );
pDev->DrawOutDev( Point(), maSzPix, maDispPt, maDispSz, *mpOut );
}
else
@@ -284,10 +284,10 @@ void ImplAnimView::ImplDraw( ULONG nPos, VirtualDevice* pVDev )
// ==> ggf. in eine Bitmap stecken, ansonsten SaveBitmap
// aus Speichergruenden loeschen
if( ( meLastDisposal == DISPOSE_BACK ) || ( meLastDisposal == DISPOSE_NOT ) )
- mpRestore->SetOutputSizePixel( Size( 1, 1 ), FALSE );
+ mpRestore->SetOutputSizePixel( Size( 1, 1 ), sal_False );
else
{
- mpRestore->SetOutputSizePixel( maRestSz, FALSE );
+ mpRestore->SetOutputSizePixel( maRestSz, sal_False );
mpRestore->DrawOutDev( Point(), maRestSz, aPosPix, aSizePix, *pDev );
}
@@ -320,7 +320,7 @@ void ImplAnimView::ImplDraw( ULONG nPos, VirtualDevice* pVDev )
void ImplAnimView::ImplRepaint()
{
- const BOOL bOldPause = mbPause;
+ const sal_Bool bOldPause = mbPause;
if( mpOut->GetOutDevType() == OUTDEV_WINDOW )
{
@@ -333,7 +333,7 @@ void ImplAnimView::ImplRepaint()
else
mpBackground->DrawOutDev( Point(), maSzPix, maDispPt, maDispSz, *mpOut );
- mbPause = FALSE;
+ mbPause = sal_False;
ImplDrawToPos( mnActPos );
mbPause = bOldPause;
}
diff --git a/vcl/source/gdi/impanmvw.hxx b/vcl/source/gdi/impanmvw.hxx
index 69403c0f6928..a9d41a051bc4 100644
--- a/vcl/source/gdi/impanmvw.hxx
+++ b/vcl/source/gdi/impanmvw.hxx
@@ -57,27 +57,27 @@ private:
Region maClip;
VirtualDevice* mpBackground;
VirtualDevice* mpRestore;
- ULONG mnActPos;
+ sal_uIntPtr mnActPos;
Disposal meLastDisposal;
- BOOL mbPause;
- BOOL mbFirst;
- BOOL mbMarked;
- BOOL mbHMirr;
- BOOL mbVMirr;
+ sal_Bool mbPause;
+ sal_Bool mbFirst;
+ sal_Bool mbMarked;
+ sal_Bool mbHMirr;
+ sal_Bool mbVMirr;
void ImplGetPosSize( const AnimationBitmap& rAnm, Point& rPosPix, Size& rSizePix );
- void ImplDraw( ULONG nPos, VirtualDevice* pVDev );
+ void ImplDraw( sal_uIntPtr nPos, VirtualDevice* pVDev );
public:
ImplAnimView( Animation* pParent, OutputDevice* pOut,
- const Point& rPt, const Size& rSz, ULONG nExtraData,
+ const Point& rPt, const Size& rSz, sal_uIntPtr nExtraData,
OutputDevice* pFirstFrameOutDev = NULL );
~ImplAnimView();
- BOOL ImplMatches( OutputDevice* pOut, long nExtraData ) const;
- void ImplDrawToPos( ULONG nPos );
- void ImplDraw( ULONG nPos );
+ sal_Bool ImplMatches( OutputDevice* pOut, long nExtraData ) const;
+ void ImplDrawToPos( sal_uIntPtr nPos );
+ void ImplDraw( sal_uIntPtr nPos );
void ImplRepaint();
AInfo* ImplCreateAInfo() const;
@@ -86,11 +86,11 @@ public:
const Size& ImplGetOutSize() const { return maSz; }
const Size& ImplGetOutSizePix() const { return maSzPix; }
- void ImplPause( BOOL bPause ) { mbPause = bPause; }
- BOOL ImplIsPause() const { return mbPause; }
+ void ImplPause( sal_Bool bPause ) { mbPause = bPause; }
+ sal_Bool ImplIsPause() const { return mbPause; }
- void ImplSetMarked( BOOL bMarked ) { mbMarked = bMarked; }
- BOOL ImplIsMarked() const { return mbMarked; }
+ void ImplSetMarked( sal_Bool bMarked ) { mbMarked = bMarked; }
+ sal_Bool ImplIsMarked() const { return mbMarked; }
};
#endif
diff --git a/vcl/source/gdi/impbmp.cxx b/vcl/source/gdi/impbmp.cxx
index 3e328b7db7a4..af39ed615874 100644
--- a/vcl/source/gdi/impbmp.cxx
+++ b/vcl/source/gdi/impbmp.cxx
@@ -65,7 +65,7 @@ void ImpBitmap::ImplSetSalBitmap( SalBitmap* pBitmap )
// -----------------------------------------------------------------------
-BOOL ImpBitmap::ImplCreate( const Size& rSize, USHORT nBitCount, const BitmapPalette& rPal )
+sal_Bool ImpBitmap::ImplCreate( const Size& rSize, sal_uInt16 nBitCount, const BitmapPalette& rPal )
{
maSourceSize = rSize;
return mpSalBitmap->Create( rSize, nBitCount, rPal );
@@ -73,7 +73,7 @@ BOOL ImpBitmap::ImplCreate( const Size& rSize, USHORT nBitCount, const BitmapPal
// -----------------------------------------------------------------------
-BOOL ImpBitmap::ImplCreate( const ImpBitmap& rImpBitmap )
+sal_Bool ImpBitmap::ImplCreate( const ImpBitmap& rImpBitmap )
{
maSourceSize = rImpBitmap.maSourceSize;
mnChecksum = rImpBitmap.mnChecksum;
@@ -82,14 +82,14 @@ BOOL ImpBitmap::ImplCreate( const ImpBitmap& rImpBitmap )
// -----------------------------------------------------------------------
-BOOL ImpBitmap::ImplCreate( const ImpBitmap& rImpBitmap, SalGraphics* pGraphics )
+sal_Bool ImpBitmap::ImplCreate( const ImpBitmap& rImpBitmap, SalGraphics* pGraphics )
{
return mpSalBitmap->Create( *rImpBitmap.mpSalBitmap, pGraphics );
}
// -----------------------------------------------------------------------
-BOOL ImpBitmap::ImplCreate( const ImpBitmap& rImpBitmap, USHORT nNewBitCount )
+sal_Bool ImpBitmap::ImplCreate( const ImpBitmap& rImpBitmap, sal_uInt16 nNewBitCount )
{
return mpSalBitmap->Create( *rImpBitmap.mpSalBitmap, nNewBitCount );
}
@@ -110,22 +110,22 @@ Size ImpBitmap::ImplGetSize() const
// -----------------------------------------------------------------------
-USHORT ImpBitmap::ImplGetBitCount() const
+sal_uInt16 ImpBitmap::ImplGetBitCount() const
{
- USHORT nBitCount = mpSalBitmap->GetBitCount();
+ sal_uInt16 nBitCount = mpSalBitmap->GetBitCount();
return( ( nBitCount <= 1 ) ? 1 : ( nBitCount <= 4 ) ? 4 : ( nBitCount <= 8 ) ? 8 : 24 );
}
// -----------------------------------------------------------------------
-BitmapBuffer* ImpBitmap::ImplAcquireBuffer( BOOL bReadOnly )
+BitmapBuffer* ImpBitmap::ImplAcquireBuffer( sal_Bool bReadOnly )
{
return mpSalBitmap->AcquireBuffer( bReadOnly );
}
// -----------------------------------------------------------------------
-void ImpBitmap::ImplReleaseBuffer( BitmapBuffer* pBuffer, BOOL bReadOnly )
+void ImpBitmap::ImplReleaseBuffer( BitmapBuffer* pBuffer, sal_Bool bReadOnly )
{
mpSalBitmap->ReleaseBuffer( pBuffer, bReadOnly );
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index 397a5d6b704a..01952913c2eb 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -70,7 +70,7 @@
struct ImpSwapFile
{
INetURLObject aSwapURL;
- ULONG nRefCount;
+ sal_uIntPtr nRefCount;
};
// -----------------
@@ -90,15 +90,15 @@ GraphicReader::~GraphicReader()
// ------------------------------------------------------------------------
-BOOL GraphicReader::IsPreviewModeEnabled() const
+sal_Bool GraphicReader::IsPreviewModeEnabled() const
{
if( !mpReaderData )
- return FALSE;
+ return sal_False;
if( mpReaderData->maPreviewSize.Width() )
- return TRUE;
+ return sal_True;
if( mpReaderData->maPreviewSize.Height() )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
// ------------------------------------------------------------------------
@@ -141,8 +141,8 @@ ImpGraphic::ImpGraphic() :
mnDocFilePos ( 0UL ),
mnSizeBytes ( 0UL ),
mnRefCount ( 1UL ),
- mbSwapOut ( FALSE ),
- mbSwapUnderway ( FALSE )
+ mbSwapOut ( sal_False ),
+ mbSwapUnderway ( sal_False )
{
}
@@ -159,7 +159,7 @@ ImpGraphic::ImpGraphic( const ImpGraphic& rImpGraphic ) :
mnSizeBytes ( rImpGraphic.mnSizeBytes ),
mnRefCount ( 1UL ),
mbSwapOut ( rImpGraphic.mbSwapOut ),
- mbSwapUnderway ( FALSE )
+ mbSwapUnderway ( sal_False )
{
if( mpSwapFile )
mpSwapFile->nRefCount++;
@@ -190,8 +190,8 @@ ImpGraphic::ImpGraphic( const Bitmap& rBitmap ) :
mnDocFilePos ( 0UL ),
mnSizeBytes ( 0UL ),
mnRefCount ( 1UL ),
- mbSwapOut ( FALSE ),
- mbSwapUnderway ( FALSE )
+ mbSwapOut ( sal_False ),
+ mbSwapUnderway ( sal_False )
{
}
@@ -207,8 +207,8 @@ ImpGraphic::ImpGraphic( const BitmapEx& rBitmapEx ) :
mnDocFilePos ( 0UL ),
mnSizeBytes ( 0UL ),
mnRefCount ( 1UL ),
- mbSwapOut ( FALSE ),
- mbSwapUnderway ( FALSE )
+ mbSwapOut ( sal_False ),
+ mbSwapUnderway ( sal_False )
{
}
@@ -224,8 +224,8 @@ ImpGraphic::ImpGraphic( const Animation& rAnimation ) :
mnDocFilePos ( 0UL ),
mnSizeBytes ( 0UL ),
mnRefCount ( 1UL ),
- mbSwapOut ( FALSE ),
- mbSwapUnderway ( FALSE )
+ mbSwapOut ( sal_False ),
+ mbSwapUnderway ( sal_False )
{
}
@@ -241,8 +241,8 @@ ImpGraphic::ImpGraphic( const GDIMetaFile& rMtf ) :
mnDocFilePos ( 0UL ),
mnSizeBytes ( 0UL ),
mnRefCount ( 1UL ),
- mbSwapOut ( FALSE ),
- mbSwapUnderway ( FALSE )
+ mbSwapOut ( sal_False ),
+ mbSwapUnderway ( sal_False )
{
}
@@ -252,7 +252,7 @@ ImpGraphic::~ImpGraphic()
{
ImplClear();
- if( (ULONG) mpContext > 1UL )
+ if( (sal_uIntPtr) mpContext > 1UL )
delete mpContext;
}
@@ -306,24 +306,24 @@ ImpGraphic& ImpGraphic::operator=( const ImpGraphic& rImpGraphic )
// ------------------------------------------------------------------------
-BOOL ImpGraphic::operator==( const ImpGraphic& rImpGraphic ) const
+sal_Bool ImpGraphic::operator==( const ImpGraphic& rImpGraphic ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( this == &rImpGraphic )
- bRet = TRUE;
+ bRet = sal_True;
else if( !ImplIsSwapOut() && ( rImpGraphic.meType == meType ) )
{
switch( meType )
{
case( GRAPHIC_NONE ):
- bRet = TRUE;
+ bRet = sal_True;
break;
case( GRAPHIC_GDIMETAFILE ):
{
if( rImpGraphic.maMetaFile == maMetaFile )
- bRet = TRUE;
+ bRet = sal_True;
}
break;
@@ -332,10 +332,10 @@ BOOL ImpGraphic::operator==( const ImpGraphic& rImpGraphic ) const
if( mpAnimation )
{
if( rImpGraphic.mpAnimation && ( *rImpGraphic.mpAnimation == *mpAnimation ) )
- bRet = TRUE;
+ bRet = sal_True;
}
else if( !rImpGraphic.mpAnimation && ( rImpGraphic.maEx == maEx ) )
- bRet = TRUE;
+ bRet = sal_True;
}
break;
@@ -349,7 +349,7 @@ BOOL ImpGraphic::operator==( const ImpGraphic& rImpGraphic ) const
// ------------------------------------------------------------------------
-void ImpGraphic::ImplClearGraphics( BOOL bCreateSwapInfo )
+void ImpGraphic::ImplClearGraphics( sal_Bool bCreateSwapInfo )
{
if( bCreateSwapInfo && !ImplIsSwapOut() )
{
@@ -411,12 +411,12 @@ void ImpGraphic::ImplClear()
mpSwapFile = NULL;
}
- mbSwapOut = FALSE;
+ mbSwapOut = sal_False;
mnDocFilePos = 0UL;
maDocFileURLStr.Erase();
// cleanup
- ImplClearGraphics( FALSE );
+ ImplClearGraphics( sal_False );
meType = GRAPHIC_NONE;
mnSizeBytes = 0;
}
@@ -438,42 +438,42 @@ void ImpGraphic::ImplSetDefaultType()
// ------------------------------------------------------------------------
-BOOL ImpGraphic::ImplIsSupportedGraphic() const
+sal_Bool ImpGraphic::ImplIsSupportedGraphic() const
{
return( meType != GRAPHIC_NONE );
}
// ------------------------------------------------------------------------
-BOOL ImpGraphic::ImplIsTransparent() const
+sal_Bool ImpGraphic::ImplIsTransparent() const
{
- BOOL bRet;
+ sal_Bool bRet;
if( meType == GRAPHIC_BITMAP )
bRet = ( mpAnimation ? mpAnimation->IsTransparent() : maEx.IsTransparent() );
else
- bRet = TRUE;
+ bRet = sal_True;
return bRet;
}
// ------------------------------------------------------------------------
-BOOL ImpGraphic::ImplIsAlpha() const
+sal_Bool ImpGraphic::ImplIsAlpha() const
{
- BOOL bRet;
+ sal_Bool bRet;
if( meType == GRAPHIC_BITMAP )
bRet = ( NULL == mpAnimation ) && maEx.IsAlpha();
else
- bRet = FALSE;
+ bRet = sal_False;
return bRet;
}
// ------------------------------------------------------------------------
-BOOL ImpGraphic::ImplIsAnimated() const
+sal_Bool ImpGraphic::ImplIsAnimated() const
{
return( mpAnimation != NULL );
}
@@ -729,7 +729,7 @@ void ImpGraphic::ImplSetPrefMapMode( const MapMode& rPrefMapMode )
// ------------------------------------------------------------------------
-ULONG ImpGraphic::ImplGetSizeBytes() const
+sal_uIntPtr ImpGraphic::ImplGetSizeBytes() const
{
if( 0 == mnSizeBytes )
{
@@ -856,7 +856,7 @@ Link ImpGraphic::ImplGetAnimationNotifyHdl() const
// ------------------------------------------------------------------------
-ULONG ImpGraphic::ImplGetAnimationLoopCount() const
+sal_uIntPtr ImpGraphic::ImplGetAnimationLoopCount() const
{
return( mpAnimation ? mpAnimation->GetLoopCount() : 0UL );
}
@@ -892,7 +892,7 @@ void ImpGraphic::ImplSetContext( GraphicReader* pReader )
// ------------------------------------------------------------------------
-void ImpGraphic::ImplSetDocFileName( const String& rName, ULONG nFilePos )
+void ImpGraphic::ImplSetDocFileName( const String& rName, sal_uIntPtr nFilePos )
{
const INetURLObject aURL( rName );
@@ -911,29 +911,29 @@ const String& ImpGraphic::ImplGetDocFileName() const
// ------------------------------------------------------------------------
-ULONG ImpGraphic::ImplGetDocFilePos() const
+sal_uIntPtr ImpGraphic::ImplGetDocFilePos() const
{
return mnDocFilePos;
}
// ------------------------------------------------------------------------
-BOOL ImpGraphic::ImplReadEmbedded( SvStream& rIStm, BOOL bSwap )
+sal_Bool ImpGraphic::ImplReadEmbedded( SvStream& rIStm, sal_Bool bSwap )
{
MapMode aMapMode;
Size aSize;
- const ULONG nStartPos = rIStm.Tell();
+ const sal_uIntPtr nStartPos = rIStm.Tell();
sal_uInt32 nId;
- ULONG nHeaderLen;
+ sal_uIntPtr nHeaderLen;
long nType;
long nLen;
- const USHORT nOldFormat = rIStm.GetNumberFormatInt();
- BOOL bRet = FALSE;
+ const sal_uInt16 nOldFormat = rIStm.GetNumberFormatInt();
+ sal_Bool bRet = sal_False;
if( !mbSwapUnderway )
{
const String aTempURLStr( maDocFileURLStr );
- const ULONG nTempPos = mnDocFilePos;
+ const sal_uIntPtr nTempPos = mnDocFilePos;
ImplClear();
@@ -1018,7 +1018,7 @@ BOOL ImpGraphic::ImplReadEmbedded( SvStream& rIStm, BOOL bSwap )
if( maDocFileURLStr.Len() )
{
rIStm.Seek( nStartPos + nHeaderLen + nLen );
- bRet = mbSwapOut = TRUE;
+ bRet = mbSwapOut = sal_True;
}
else
{
@@ -1031,9 +1031,9 @@ BOOL ImpGraphic::ImplReadEmbedded( SvStream& rIStm, BOOL bSwap )
if( pOStm )
{
- ULONG nFullLen = nHeaderLen + nLen;
- ULONG nPartLen = Min( nFullLen, (ULONG) GRAPHIC_MAXPARTLEN );
- BYTE* pBuffer = (BYTE*) rtl_allocateMemory( nPartLen );
+ sal_uIntPtr nFullLen = nHeaderLen + nLen;
+ sal_uIntPtr nPartLen = Min( nFullLen, (sal_uIntPtr) GRAPHIC_MAXPARTLEN );
+ sal_uInt8* pBuffer = (sal_uInt8*) rtl_allocateMemory( nPartLen );
pOStm->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
@@ -1053,12 +1053,12 @@ BOOL ImpGraphic::ImplReadEmbedded( SvStream& rIStm, BOOL bSwap )
}
rtl_freeMemory( pBuffer );
- ULONG nReadErr = rIStm.GetError(), nWriteErr = pOStm->GetError();
+ sal_uIntPtr nReadErr = rIStm.GetError(), nWriteErr = pOStm->GetError();
delete pOStm, pOStm = NULL;
if( !nReadErr && !nWriteErr )
{
- bRet = mbSwapOut = TRUE;
+ bRet = mbSwapOut = sal_True;
mpSwapFile = new ImpSwapFile;
mpSwapFile->nRefCount = 1;
mpSwapFile->aSwapURL = aTmpURL;
@@ -1101,9 +1101,9 @@ BOOL ImpGraphic::ImplReadEmbedded( SvStream& rIStm, BOOL bSwap )
else if( meType >= SYS_WINMETAFILE && meType <= SYS_MACMETAFILE )
{
Graphic aSysGraphic;
- ULONG nCvtType;
+ sal_uIntPtr nCvtType;
- switch( sal::static_int_cast<ULONG>(meType) )
+ switch( sal::static_int_cast<sal_uIntPtr>(meType) )
{
case( SYS_WINMETAFILE ):
case( SYS_WNTMETAFILE ): nCvtType = CVT_WMF; break;
@@ -1131,7 +1131,7 @@ BOOL ImpGraphic::ImplReadEmbedded( SvStream& rIStm, BOOL bSwap )
}
}
else
- bRet = TRUE;
+ bRet = sal_True;
rIStm.SetNumberFormatInt( nOldFormat );
@@ -1140,16 +1140,16 @@ BOOL ImpGraphic::ImplReadEmbedded( SvStream& rIStm, BOOL bSwap )
// ------------------------------------------------------------------------
-BOOL ImpGraphic::ImplWriteEmbedded( SvStream& rOStm )
+sal_Bool ImpGraphic::ImplWriteEmbedded( SvStream& rOStm )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( ( meType != GRAPHIC_NONE ) && ( meType != GRAPHIC_DEFAULT ) && !ImplIsSwapOut() )
{
const MapMode aMapMode( ImplGetPrefMapMode() );
const Size aSize( ImplGetPrefSize() );
- const USHORT nOldFormat = rOStm.GetNumberFormatInt();
- ULONG nDataFieldPos;
+ const sal_uInt16 nOldFormat = rOStm.GetNumberFormatInt();
+ sal_uIntPtr nDataFieldPos;
rOStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
@@ -1196,18 +1196,18 @@ BOOL ImpGraphic::ImplWriteEmbedded( SvStream& rOStm )
// write data block
if( !rOStm.GetError() )
{
- const ULONG nDataStart = rOStm.Tell();
+ const sal_uIntPtr nDataStart = rOStm.Tell();
if( ImplIsSupportedGraphic() )
rOStm << *this;
if( !rOStm.GetError() )
{
- const ULONG nStmPos2 = rOStm.Tell();
+ const sal_uIntPtr nStmPos2 = rOStm.Tell();
rOStm.Seek( nDataFieldPos );
rOStm << (long) ( nStmPos2 - nDataStart );
rOStm.Seek( nStmPos2 );
- bRet = TRUE;
+ bRet = sal_True;
}
}
@@ -1219,9 +1219,9 @@ BOOL ImpGraphic::ImplWriteEmbedded( SvStream& rOStm )
// ------------------------------------------------------------------------
-BOOL ImpGraphic::ImplSwapOut()
+sal_Bool ImpGraphic::ImplSwapOut()
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !ImplIsSwapOut() )
{
@@ -1239,7 +1239,7 @@ BOOL ImpGraphic::ImplSwapOut()
pOStm->SetVersion( SOFFICE_FILEFORMAT_50 );
pOStm->SetCompressMode( COMPRESSMODE_NATIVE );
- if( ( bRet = ImplSwapOut( pOStm ) ) == TRUE )
+ if( ( bRet = ImplSwapOut( pOStm ) ) == sal_True )
{
mpSwapFile = new ImpSwapFile;
mpSwapFile->nRefCount = 1;
@@ -1277,8 +1277,8 @@ BOOL ImpGraphic::ImplSwapOut()
}
else
{
- ImplClearGraphics( TRUE );
- bRet = mbSwapOut = TRUE;
+ ImplClearGraphics( sal_True );
+ bRet = mbSwapOut = sal_True;
}
}
@@ -1287,9 +1287,9 @@ BOOL ImpGraphic::ImplSwapOut()
// ------------------------------------------------------------------------
-BOOL ImpGraphic::ImplSwapOut( SvStream* pOStm )
+sal_Bool ImpGraphic::ImplSwapOut( SvStream* pOStm )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pOStm )
{
@@ -1301,15 +1301,15 @@ BOOL ImpGraphic::ImplSwapOut( SvStream* pOStm )
if( !pOStm->GetError() )
{
- ImplClearGraphics( TRUE );
- bRet = mbSwapOut = TRUE;
+ ImplClearGraphics( sal_True );
+ bRet = mbSwapOut = sal_True;
}
}
}
else
{
- ImplClearGraphics( TRUE );
- bRet = mbSwapOut = TRUE;
+ ImplClearGraphics( sal_True );
+ bRet = mbSwapOut = sal_True;
}
return bRet;
@@ -1317,9 +1317,9 @@ BOOL ImpGraphic::ImplSwapOut( SvStream* pOStm )
// ------------------------------------------------------------------------
-BOOL ImpGraphic::ImplSwapIn()
+sal_Bool ImpGraphic::ImplSwapIn()
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( ImplIsSwapOut() )
{
@@ -1386,9 +1386,9 @@ BOOL ImpGraphic::ImplSwapIn()
// ------------------------------------------------------------------------
-BOOL ImpGraphic::ImplSwapIn( SvStream* pIStm )
+sal_Bool ImpGraphic::ImplSwapIn( SvStream* pIStm )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pIStm )
{
@@ -1396,14 +1396,14 @@ BOOL ImpGraphic::ImplSwapIn( SvStream* pIStm )
if( !pIStm->GetError() )
{
- mbSwapUnderway = TRUE;
+ mbSwapUnderway = sal_True;
bRet = ImplReadEmbedded( *pIStm );
- mbSwapUnderway = FALSE;
+ mbSwapUnderway = sal_False;
if( !bRet )
ImplClear();
else
- mbSwapOut = FALSE;
+ mbSwapOut = sal_False;
}
}
@@ -1412,7 +1412,7 @@ BOOL ImpGraphic::ImplSwapIn( SvStream* pIStm )
// ------------------------------------------------------------------------
-BOOL ImpGraphic::ImplIsSwapOut() const
+sal_Bool ImpGraphic::ImplIsSwapOut() const
{
return mbSwapOut;
}
@@ -1437,16 +1437,16 @@ GfxLink ImpGraphic::ImplGetLink()
// ------------------------------------------------------------------------
-BOOL ImpGraphic::ImplIsLink() const
+sal_Bool ImpGraphic::ImplIsLink() const
{
- return ( mpGfxLink != NULL ) ? TRUE : FALSE;
+ return ( mpGfxLink != NULL ) ? sal_True : sal_False;
}
// ------------------------------------------------------------------------
-ULONG ImpGraphic::ImplGetChecksum() const
+sal_uIntPtr ImpGraphic::ImplGetChecksum() const
{
- ULONG nRet = 0;
+ sal_uIntPtr nRet = 0;
if( ImplIsSupportedGraphic() && !ImplIsSwapOut() )
{
@@ -1475,9 +1475,9 @@ ULONG ImpGraphic::ImplGetChecksum() const
// ------------------------------------------------------------------------
-BOOL ImpGraphic::ImplExportNative( SvStream& rOStm ) const
+sal_Bool ImpGraphic::ImplExportNative( SvStream& rOStm ) const
{
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
if( !rOStm.GetError() )
{
@@ -1504,7 +1504,7 @@ SvStream& operator>>( SvStream& rIStm, ImpGraphic& rImpGraphic )
{
if( !rIStm.GetError() )
{
- const ULONG nStmPos1 = rIStm.Tell();
+ const sal_uIntPtr nStmPos1 = rIStm.Tell();
sal_uInt32 nTmp;
if ( !rImpGraphic.mbSwapUnderway )
@@ -1538,7 +1538,7 @@ SvStream& operator>>( SvStream& rIStm, ImpGraphic& rImpGraphic )
if( !rIStm.GetError() && aLink.LoadNative( aGraphic ) )
{
// set link only, if no other link was set
- const BOOL bSetLink = ( rImpGraphic.mpGfxLink == NULL );
+ const sal_Bool bSetLink = ( rImpGraphic.mpGfxLink == NULL );
// assign graphic
rImpGraphic = *aGraphic.ImplGetImpGraphic();
@@ -1561,7 +1561,7 @@ SvStream& operator>>( SvStream& rIStm, ImpGraphic& rImpGraphic )
else
{
BitmapEx aBmpEx;
- const USHORT nOldFormat = rIStm.GetNumberFormatInt();
+ const sal_uInt16 nOldFormat = rIStm.GetNumberFormatInt();
rIStm.SeekRel( -4 );
rIStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
@@ -1569,8 +1569,8 @@ SvStream& operator>>( SvStream& rIStm, ImpGraphic& rImpGraphic )
if( !rIStm.GetError() )
{
- UINT32 nMagic1(0), nMagic2(0);
- ULONG nActPos = rIStm.Tell();
+ sal_uInt32 nMagic1(0), nMagic2(0);
+ sal_uIntPtr nActPos = rIStm.Tell();
rIStm >> nMagic1 >> nMagic2;
rIStm.Seek( nActPos );
@@ -1640,7 +1640,7 @@ SvStream& operator<<( SvStream& rOStm, const ImpGraphic& rImpGraphic )
else
{
// own format
- const USHORT nOldFormat = rOStm.GetNumberFormatInt();
+ const sal_uInt16 nOldFormat = rOStm.GetNumberFormatInt();
rOStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
switch( rImpGraphic.ImplGetType() )
diff --git a/vcl/source/gdi/impimage.cxx b/vcl/source/gdi/impimage.cxx
index 476ac3ca44a9..4fb91beefb01 100644
--- a/vcl/source/gdi/impimage.cxx
+++ b/vcl/source/gdi/impimage.cxx
@@ -65,7 +65,7 @@ ImageAryData::ImageAryData( const ImageAryData& rData ) :
}
ImageAryData::ImageAryData( const rtl::OUString &aName,
- USHORT nId, const BitmapEx &aBitmap )
+ sal_uInt16 nId, const BitmapEx &aBitmap )
: maName( aName ), mnId( nId ), maBitmapEx( aBitmap )
{
}
@@ -117,7 +117,7 @@ ImplImageList::~ImplImageList()
}
void ImplImageList::AddImage( const ::rtl::OUString &aName,
- USHORT nId, const BitmapEx &aBitmapEx )
+ sal_uInt16 nId, const BitmapEx &aBitmapEx )
{
ImageAryData *pImg = new ImageAryData( aName, nId, aBitmapEx );
maImages.push_back( pImg );
@@ -125,7 +125,7 @@ void ImplImageList::AddImage( const ::rtl::OUString &aName,
maNameHash [ aName ] = pImg;
}
-void ImplImageList::RemoveImage( USHORT nPos )
+void ImplImageList::RemoveImage( sal_uInt16 nPos )
{
ImageAryData *pImg = maImages[ nPos ];
if( pImg->maName.getLength() )
@@ -133,9 +133,9 @@ void ImplImageList::RemoveImage( USHORT nPos )
maImages.erase( maImages.begin() + nPos );
}
-USHORT ImplImageList::GetImageCount() const
+sal_uInt16 ImplImageList::GetImageCount() const
{
- return sal::static_int_cast< USHORT >( maImages.size() );
+ return sal::static_int_cast< sal_uInt16 >( maImages.size() );
}
// -----------------
@@ -159,7 +159,7 @@ ImplImageData::~ImplImageData()
// - ImplImageData -
// -----------------
-BOOL ImplImageData::IsEqual( const ImplImageData& rData )
+sal_Bool ImplImageData::IsEqual( const ImplImageData& rData )
{
return( maBmpEx == rData.maBmpEx );
}
@@ -211,7 +211,7 @@ ImplImageBmp::~ImplImageBmp()
// -----------------------------------------------------------------------
-void ImplImageBmp::Create( long nItemWidth, long nItemHeight, USHORT nInitSize )
+void ImplImageBmp::Create( long nItemWidth, long nItemHeight, sal_uInt16 nInitSize )
{
const Size aTotalSize( nInitSize * nItemWidth, nItemHeight );
@@ -225,13 +225,13 @@ void ImplImageBmp::Create( long nItemWidth, long nItemHeight, USHORT nInitSize )
mnSize = nInitSize;
delete[] mpInfoAry;
- mpInfoAry = new BYTE[ mnSize ];
+ mpInfoAry = new sal_uInt8[ mnSize ];
memset( mpInfoAry, 0, mnSize );
}
// -----------------------------------------------------------------------
-void ImplImageBmp::Create( const BitmapEx& rBmpEx, long nItemWidth, long nItemHeight, USHORT nInitSize )
+void ImplImageBmp::Create( const BitmapEx& rBmpEx, long nItemWidth, long nItemHeight, sal_uInt16 nInitSize )
{
maBmpEx = rBmpEx;
maDisabledBmpEx.SetEmpty();
@@ -243,7 +243,7 @@ void ImplImageBmp::Create( const BitmapEx& rBmpEx, long nItemWidth, long nItemHe
mnSize = nInitSize;
delete[] mpInfoAry;
- mpInfoAry = new BYTE[ mnSize ];
+ mpInfoAry = new sal_uInt8[ mnSize ];
memset( mpInfoAry,
rBmpEx.IsAlpha() ? IMPSYSIMAGEITEM_ALPHA : ( rBmpEx.IsTransparent() ? IMPSYSIMAGEITEM_MASK : 0 ),
mnSize );
@@ -251,11 +251,11 @@ void ImplImageBmp::Create( const BitmapEx& rBmpEx, long nItemWidth, long nItemHe
// -----------------------------------------------------------------------
-void ImplImageBmp::Expand( USHORT nGrowSize )
+void ImplImageBmp::Expand( sal_uInt16 nGrowSize )
{
- const ULONG nDX = nGrowSize * maSize.Width();
- const USHORT nOldSize = mnSize;
- BYTE* pNewAry = new BYTE[ mnSize = sal::static_int_cast<USHORT>(mnSize+nGrowSize) ];
+ const sal_uIntPtr nDX = nGrowSize * maSize.Width();
+ const sal_uInt16 nOldSize = mnSize;
+ sal_uInt8* pNewAry = new sal_uInt8[ mnSize = sal::static_int_cast<sal_uInt16>(mnSize+nGrowSize) ];
maBmpEx.Expand( nDX, 0UL );
@@ -283,7 +283,7 @@ void ImplImageBmp::Invert()
// -----------------------------------------------------------------------
-void ImplImageBmp::Replace( USHORT nPos, USHORT nSrcPos )
+void ImplImageBmp::Replace( sal_uInt16 nPos, sal_uInt16 nSrcPos )
{
const Point aSrcPos( nSrcPos * maSize.Width(), 0L ), aPos( nPos * maSize.Width(), 0L );
const Rectangle aSrcRect( aSrcPos, maSize );
@@ -302,7 +302,7 @@ void ImplImageBmp::Replace( USHORT nPos, USHORT nSrcPos )
// -----------------------------------------------------------------------
-void ImplImageBmp::Replace( USHORT nPos, const ImplImageBmp& rImageBmp, USHORT nSrcPos )
+void ImplImageBmp::Replace( sal_uInt16 nPos, const ImplImageBmp& rImageBmp, sal_uInt16 nSrcPos )
{
const Point aSrcPos( nSrcPos * maSize.Width(), 0L ), aPos( nPos * maSize.Width(), 0L );
const Rectangle aSrcRect( aSrcPos, maSize );
@@ -319,7 +319,7 @@ void ImplImageBmp::Replace( USHORT nPos, const ImplImageBmp& rImageBmp, USHORT n
// -----------------------------------------------------------------------
-void ImplImageBmp::Replace( USHORT nPos, const BitmapEx& rBmpEx )
+void ImplImageBmp::Replace( sal_uInt16 nPos, const BitmapEx& rBmpEx )
{
const Point aNullPos, aPos( nPos * maSize.Width(), 0L );
const Rectangle aSrcRect( aNullPos, maSize );
@@ -337,7 +337,7 @@ void ImplImageBmp::Replace( USHORT nPos, const BitmapEx& rBmpEx )
// -----------------------------------------------------------------------
-void ImplImageBmp::ReplaceColors( const Color* pSrcColors, const Color* pDstColors, ULONG nColorCount )
+void ImplImageBmp::ReplaceColors( const Color* pSrcColors, const Color* pDstColors, sal_uIntPtr nColorCount )
{
maBmpEx.Replace( pSrcColors, pDstColors, nColorCount );
delete mpDisplayBmp;
@@ -355,7 +355,7 @@ void ImplImageBmp::ColorTransform( BmpColorMode eColorMode )
// -----------------------------------------------------------------------
-BitmapEx ImplImageBmp::GetBitmapEx( USHORT nPosCount, USHORT* pPosAry ) const
+BitmapEx ImplImageBmp::GetBitmapEx( sal_uInt16 nPosCount, sal_uInt16* pPosAry ) const
{
const Bitmap aNewBmp( Size( nPosCount * maSize.Width(), maSize.Height() ), maBmpEx.GetBitmap().GetBitCount() );
BitmapEx aRet;
@@ -370,7 +370,7 @@ BitmapEx ImplImageBmp::GetBitmapEx( USHORT nPosCount, USHORT* pPosAry ) const
else
aRet = BitmapEx( aNewBmp );
- for( USHORT i = 0; i < nPosCount; i++ )
+ for( sal_uInt16 i = 0; i < nPosCount; i++ )
{
const Point aSrcPos( pPosAry[ i ] * maSize.Width(), 0L );
const Point aPos( i * maSize.Width(), 0L );
@@ -385,8 +385,8 @@ BitmapEx ImplImageBmp::GetBitmapEx( USHORT nPosCount, USHORT* pPosAry ) const
// -----------------------------------------------------------------------
-void ImplImageBmp::Draw( USHORT nPos, OutputDevice* pOutDev,
- const Point& rPos, USHORT nStyle,
+void ImplImageBmp::Draw( sal_uInt16 nPos, OutputDevice* pOutDev,
+ const Point& rPos, sal_uInt16 nStyle,
const Size* pSize )
{
if( pOutDev->IsDeviceOutputNecessary() )
@@ -438,9 +438,9 @@ void ImplImageBmp::Draw( USHORT nPos, OutputDevice* pOutDev,
BitmapColor aCol;
const long nW = pAcc->Width();
const long nH = pAcc->Height();
- BYTE* pMapR = new BYTE[ 256 ];
- BYTE* pMapG = new BYTE[ 256 ];
- BYTE* pMapB = new BYTE[ 256 ];
+ sal_uInt8* pMapR = new sal_uInt8[ 256 ];
+ sal_uInt8* pMapG = new sal_uInt8[ 256 ];
+ sal_uInt8* pMapB = new sal_uInt8[ 256 ];
long nX, nY;
if( nStyle & IMAGE_DRAW_HIGHLIGHT )
@@ -448,20 +448,20 @@ void ImplImageBmp::Draw( USHORT nPos, OutputDevice* pOutDev,
else
aColor = rSettings.GetDeactiveColor();
- const BYTE cR = aColor.GetRed();
- const BYTE cG = aColor.GetGreen();
- const BYTE cB = aColor.GetBlue();
+ const sal_uInt8 cR = aColor.GetRed();
+ const sal_uInt8 cG = aColor.GetGreen();
+ const sal_uInt8 cB = aColor.GetBlue();
for( nX = 0L; nX < 256L; nX++ )
{
- pMapR[ nX ] = (BYTE) ( ( ( nY = ( nX + cR ) >> 1 ) > 255 ) ? 255 : nY );
- pMapG[ nX ] = (BYTE) ( ( ( nY = ( nX + cG ) >> 1 ) > 255 ) ? 255 : nY );
- pMapB[ nX ] = (BYTE) ( ( ( nY = ( nX + cB ) >> 1 ) > 255 ) ? 255 : nY );
+ pMapR[ nX ] = (sal_uInt8) ( ( ( nY = ( nX + cR ) >> 1 ) > 255 ) ? 255 : nY );
+ pMapG[ nX ] = (sal_uInt8) ( ( ( nY = ( nX + cG ) >> 1 ) > 255 ) ? 255 : nY );
+ pMapB[ nX ] = (sal_uInt8) ( ( ( nY = ( nX + cB ) >> 1 ) > 255 ) ? 255 : nY );
}
if( pAcc->HasPalette() )
{
- for( USHORT i = 0, nCount = pAcc->GetPaletteEntryCount(); i < nCount; i++ )
+ for( sal_uInt16 i = 0, nCount = pAcc->GetPaletteEntryCount(); i < nCount; i++ )
{
const BitmapColor& rCol = pAcc->GetPaletteColor( i );
aCol.SetRed( pMapR[ rCol.GetRed() ] );
@@ -517,7 +517,7 @@ void ImplImageBmp::Draw( USHORT nPos, OutputDevice* pOutDev,
}
else
{
- BYTE cErase = 128;
+ sal_uInt8 cErase = 128;
aTmpBmpEx = BitmapEx( aTmpBmp, AlphaMask( aTmpBmp.GetSizePixel(), &cErase ) );
}
}
diff --git a/vcl/source/gdi/impprn.cxx b/vcl/source/gdi/impprn.cxx
index 5224286cdad1..dad8c5c9be3f 100644
--- a/vcl/source/gdi/impprn.cxx
+++ b/vcl/source/gdi/impprn.cxx
@@ -53,8 +53,8 @@ struct QueuePage
{
GDIMetaFile* mpMtf;
JobSetup* mpSetup;
- USHORT mnPage;
- BOOL mbEndJob;
+ sal_uInt16 mnPage;
+ sal_Bool mbEndJob;
QueuePage() { mpMtf = NULL; mpSetup = NULL; }
~QueuePage() { delete mpMtf; if ( mpSetup ) delete mpSetup; }
@@ -73,7 +73,7 @@ ImplQPrinter::ImplQPrinter( Printer* pParent ) :
mnMaxBmpDPIY( mnDPIY ),
mnCurCopyCount( 0 )
{
- SetSelfAsQueuePrinter( TRUE );
+ SetSelfAsQueuePrinter( sal_True );
SetPrinterProps( pParent );
SetPageQueueSize( 0 );
mnCopyCount = pParent->mnCopyCount;
@@ -96,7 +96,7 @@ void ImplQPrinter::Destroy()
if( mbDestroyAllowed )
delete this;
else
- mbDestroyed = TRUE;
+ mbDestroyed = sal_True;
}
// -----------------------------------------------------------------------
@@ -105,7 +105,7 @@ void ImplQPrinter::ImplPrintMtf( GDIMetaFile& rPrtMtf, long nMaxBmpDPIX, long nM
{
for( MetaAction* pAct = rPrtMtf.FirstAction(); pAct && !mbAborted; pAct = rPrtMtf.NextAction() )
{
- const ULONG nType = pAct->GetType();
+ const sal_uIntPtr nType = pAct->GetType();
sal_Bool bExecuted = sal_False;
if( nType == META_COMMENT_ACTION )
@@ -225,7 +225,7 @@ void ImplQPrinter::ImplPrintMtf( GDIMetaFile& rPrtMtf, long nMaxBmpDPIX, long nM
else if( nType == META_TRANSPARENT_ACTION )
{
MetaTransparentAction* pTransAct = static_cast<MetaTransparentAction*>(pAct);
- USHORT nTransparency( pTransAct->GetTransparence() );
+ sal_uInt16 nTransparency( pTransAct->GetTransparence() );
// #i10613# Respect transparency for draw color
if( nTransparency )
@@ -234,15 +234,15 @@ void ImplQPrinter::ImplPrintMtf( GDIMetaFile& rPrtMtf, long nMaxBmpDPIX, long nM
// assume white background for alpha blending
Color aLineColor( GetLineColor() );
- aLineColor.SetRed( static_cast<UINT8>( (255L*nTransparency + (100L - nTransparency)*aLineColor.GetRed()) / 100L ) );
- aLineColor.SetGreen( static_cast<UINT8>( (255L*nTransparency + (100L - nTransparency)*aLineColor.GetGreen()) / 100L ) );
- aLineColor.SetBlue( static_cast<UINT8>( (255L*nTransparency + (100L - nTransparency)*aLineColor.GetBlue()) / 100L ) );
+ aLineColor.SetRed( static_cast<sal_uInt8>( (255L*nTransparency + (100L - nTransparency)*aLineColor.GetRed()) / 100L ) );
+ aLineColor.SetGreen( static_cast<sal_uInt8>( (255L*nTransparency + (100L - nTransparency)*aLineColor.GetGreen()) / 100L ) );
+ aLineColor.SetBlue( static_cast<sal_uInt8>( (255L*nTransparency + (100L - nTransparency)*aLineColor.GetBlue()) / 100L ) );
SetLineColor( aLineColor );
Color aFillColor( GetFillColor() );
- aFillColor.SetRed( static_cast<UINT8>( (255L*nTransparency + (100L - nTransparency)*aFillColor.GetRed()) / 100L ) );
- aFillColor.SetGreen( static_cast<UINT8>( (255L*nTransparency + (100L - nTransparency)*aFillColor.GetGreen()) / 100L ) );
- aFillColor.SetBlue( static_cast<UINT8>( (255L*nTransparency + (100L - nTransparency)*aFillColor.GetBlue()) / 100L ) );
+ aFillColor.SetRed( static_cast<sal_uInt8>( (255L*nTransparency + (100L - nTransparency)*aFillColor.GetRed()) / 100L ) );
+ aFillColor.SetGreen( static_cast<sal_uInt8>( (255L*nTransparency + (100L - nTransparency)*aFillColor.GetGreen()) / 100L ) );
+ aFillColor.SetBlue( static_cast<sal_uInt8>( (255L*nTransparency + (100L - nTransparency)*aFillColor.GetBlue()) / 100L ) );
SetFillColor( aFillColor );
}
@@ -381,9 +381,9 @@ ImplJobSetup* ImplQPrinter::GetPageSetup( unsigned int nPage ) const
}
// -----------------------------------------------------------------------
-ULONG ImplQPrinter::GetPrintPageCount() const
+sal_uIntPtr ImplQPrinter::GetPrintPageCount() const
{
- ULONG nPageCount = maQueue.size() * ((mbUserCopy && !mbCollateCopy) ? mnCopyCount : 1);
+ sal_uIntPtr nPageCount = maQueue.size() * ((mbUserCopy && !mbCollateCopy) ? mnCopyCount : 1);
return nPageCount;
}
@@ -392,7 +392,7 @@ ULONG ImplQPrinter::GetPrintPageCount() const
IMPL_LINK( ImplQPrinter, ImplPrintHdl, Timer*, EMPTYARG )
{
// Ist Drucken abgebrochen wurden?
- if( !IsPrinting() || ( mpParent->IsJobActive() && ( maQueue.size() < (ULONG)mpParent->GetPageQueueSize() ) ) )
+ if( !IsPrinting() || ( mpParent->IsJobActive() && ( maQueue.size() < (sal_uIntPtr)mpParent->GetPageQueueSize() ) ) )
return 0;
// Druck-Job zuende?
@@ -412,15 +412,15 @@ IMPL_LINK( ImplQPrinter, ImplPrintHdl, Timer*, EMPTYARG )
}
else
{
- mbDestroyAllowed = FALSE;
+ mbDestroyAllowed = sal_False;
PrePrintPage( pActPage );
- USHORT nCopyCount = 1;
+ sal_uInt16 nCopyCount = 1;
if( mbUserCopy && !mbCollateCopy )
nCopyCount = mnCopyCount;
- for ( USHORT i = 0; i < nCopyCount; i++ )
+ for ( sal_uInt16 i = 0; i < nCopyCount; i++ )
{
if ( pActPage->mpSetup )
{
@@ -445,7 +445,7 @@ IMPL_LINK( ImplQPrinter, ImplPrintHdl, Timer*, EMPTYARG )
PostPrintPage();
delete pActPage;
- mbDestroyAllowed = TRUE;
+ mbDestroyAllowed = sal_True;
if( mbDestroyed )
Destroy();
@@ -488,14 +488,14 @@ void ImplQPrinter::EndQueuePrint()
else
{
QueuePage* pQueuePage = new QueuePage;
- pQueuePage->mbEndJob = TRUE;
+ pQueuePage->mbEndJob = sal_True;
maQueue.push_back( pQueuePage );
}
}
// -----------------------------------------------------------------------
-bool ImplQPrinter::GetPaperRanges( std::vector< ULONG >& o_rRanges, bool i_bIncludeOrientationChanges ) const
+bool ImplQPrinter::GetPaperRanges( std::vector< sal_uIntPtr >& o_rRanges, bool i_bIncludeOrientationChanges ) const
{
bool bRet = false;
@@ -506,7 +506,7 @@ bool ImplQPrinter::GetPaperRanges( std::vector< ULONG >& o_rRanges, bool i_bIncl
if( ! maQueue.empty() )
{
- ULONG nCurPage = 0;
+ sal_uIntPtr nCurPage = 0;
// get first job data
const ImplJobSetup* pLastFormat = NULL;
@@ -562,18 +562,18 @@ bool ImplQPrinter::GetPaperRanges( std::vector< ULONG >& o_rRanges, bool i_bIncl
void ImplQPrinter::AbortQueuePrint()
{
maTimer.Stop();
- mbAborted = TRUE;
+ mbAborted = sal_True;
AbortJob();
}
// -----------------------------------------------------------------------
-void ImplQPrinter::AddQueuePage( GDIMetaFile* pPage, USHORT nPage, BOOL bNewJobSetup )
+void ImplQPrinter::AddQueuePage( GDIMetaFile* pPage, sal_uInt16 nPage, sal_Bool bNewJobSetup )
{
QueuePage* pQueuePage = new QueuePage;
pQueuePage->mpMtf = pPage;
pQueuePage->mnPage = nPage;
- pQueuePage->mbEndJob = FALSE;
+ pQueuePage->mbEndJob = sal_False;
// ensure that the first page has a valid setup, this is needed
// in GetPaperRanges (used in pullmodel)
// caution: this depends on mnCurPage in Printer being
diff --git a/vcl/source/gdi/impvect.cxx b/vcl/source/gdi/impvect.cxx
index 0846f5567200..e5c6c6b7e743 100644
--- a/vcl/source/gdi/impvect.cxx
+++ b/vcl/source/gdi/impvect.cxx
@@ -111,23 +111,23 @@ static ChainMove aImplMoveOuter[ 8 ] = {
struct ImplColorSet
{
BitmapColor maColor;
- USHORT mnIndex;
- BOOL mbSet;
+ sal_uInt16 mnIndex;
+ sal_Bool mbSet;
- BOOL operator<( const ImplColorSet& rSet ) const;
- BOOL operator>( const ImplColorSet& rSet ) const;
+ sal_Bool operator<( const ImplColorSet& rSet ) const;
+ sal_Bool operator>( const ImplColorSet& rSet ) const;
};
// ----------------------------------------------------------------------------
-inline BOOL ImplColorSet::operator<( const ImplColorSet& rSet ) const
+inline sal_Bool ImplColorSet::operator<( const ImplColorSet& rSet ) const
{
return( mbSet && ( !rSet.mbSet || ( maColor.GetLuminance() > rSet.maColor.GetLuminance() ) ) );
}
// ----------------------------------------------------------------------------
-inline BOOL ImplColorSet::operator>( const ImplColorSet& rSet ) const
+inline sal_Bool ImplColorSet::operator>( const ImplColorSet& rSet ) const
{
return( !mbSet || ( rSet.mbSet && maColor.GetLuminance() < rSet.maColor.GetLuminance() ) );
}
@@ -142,8 +142,8 @@ extern "C" int __LOADONCALLAPI ImplColorSetCmpFnc( const void* p1, const void* p
if( pSet1->mbSet && pSet2->mbSet )
{
- const BYTE cLum1 = pSet1->maColor.GetLuminance();
- const BYTE cLum2 = pSet2->maColor.GetLuminance();
+ const sal_uInt8 cLum1 = pSet1->maColor.GetLuminance();
+ const sal_uInt8 cLum2 = pSet2->maColor.GetLuminance();
nRet = ( ( cLum1 > cLum2 ) ? -1 : ( ( cLum1 == cLum2 ) ? 0 : 1 ) );
}
else if( pSet1->mbSet )
@@ -163,21 +163,21 @@ extern "C" int __LOADONCALLAPI ImplColorSetCmpFnc( const void* p1, const void* p
class ImplPointArray
{
Point* mpArray;
- ULONG mnSize;
- ULONG mnRealSize;
+ sal_uIntPtr mnSize;
+ sal_uIntPtr mnRealSize;
public:
ImplPointArray();
~ImplPointArray();
- void ImplSetSize( ULONG nSize );
+ void ImplSetSize( sal_uIntPtr nSize );
- ULONG ImplGetRealSize() const { return mnRealSize; }
- void ImplSetRealSize( ULONG nRealSize ) { mnRealSize = nRealSize; }
+ sal_uIntPtr ImplGetRealSize() const { return mnRealSize; }
+ void ImplSetRealSize( sal_uIntPtr nRealSize ) { mnRealSize = nRealSize; }
- inline Point& operator[]( ULONG nPos );
- inline const Point& operator[]( ULONG nPos ) const;
+ inline Point& operator[]( sal_uIntPtr nPos );
+ inline const Point& operator[]( sal_uIntPtr nPos ) const;
void ImplCreatePoly( Polygon& rPoly ) const;
};
@@ -202,9 +202,9 @@ ImplPointArray::~ImplPointArray()
// -----------------------------------------------------------------------------
-void ImplPointArray::ImplSetSize( ULONG nSize )
+void ImplPointArray::ImplSetSize( sal_uIntPtr nSize )
{
- const ULONG nTotal = nSize * sizeof( Point );
+ const sal_uIntPtr nTotal = nSize * sizeof( Point );
mnSize = nSize;
mnRealSize = 0UL;
@@ -218,7 +218,7 @@ void ImplPointArray::ImplSetSize( ULONG nSize )
// -----------------------------------------------------------------------------
-inline Point& ImplPointArray::operator[]( ULONG nPos )
+inline Point& ImplPointArray::operator[]( sal_uIntPtr nPos )
{
DBG_ASSERT( nPos < mnSize, "ImplPointArray::operator[]: nPos out of range!" );
return mpArray[ nPos ];
@@ -226,7 +226,7 @@ inline Point& ImplPointArray::operator[]( ULONG nPos )
// -----------------------------------------------------------------------------
-inline const Point& ImplPointArray::operator[]( ULONG nPos ) const
+inline const Point& ImplPointArray::operator[]( sal_uIntPtr nPos ) const
{
DBG_ASSERT( nPos < mnSize, "ImplPointArray::operator[]: nPos out of range!" );
return mpArray[ nPos ];
@@ -236,7 +236,7 @@ inline const Point& ImplPointArray::operator[]( ULONG nPos ) const
void ImplPointArray::ImplCreatePoly( Polygon& rPoly ) const
{
- rPoly = Polygon( sal::static_int_cast<USHORT>(mnRealSize), mpArray );
+ rPoly = Polygon( sal::static_int_cast<sal_uInt16>(mnRealSize), mpArray );
}
// ---------------
@@ -262,12 +262,12 @@ public:
inline long Width() const { return mnWidth; }
inline long Height() const { return mnHeight; }
- inline void Set( long nY, long nX, BYTE cVal );
- inline BYTE Get( long nY, long nX ) const;
+ inline void Set( long nY, long nX, sal_uInt8 cVal );
+ inline sal_uInt8 Get( long nY, long nX ) const;
- inline BOOL IsFree( long nY, long nX ) const;
- inline BOOL IsCont( long nY, long nX ) const;
- inline BOOL IsDone( long nY, long nX ) const;
+ inline sal_Bool IsFree( long nY, long nX ) const;
+ inline sal_Bool IsCont( long nY, long nX ) const;
+ inline sal_Bool IsDone( long nY, long nX ) const;
};
@@ -299,36 +299,36 @@ ImplVectMap::~ImplVectMap()
// -----------------------------------------------------------------------------
-inline void ImplVectMap::Set( long nY, long nX, BYTE cVal )
+inline void ImplVectMap::Set( long nY, long nX, sal_uInt8 cVal )
{
- const BYTE cShift = sal::static_int_cast<BYTE>(6 - ( ( nX & 3 ) << 1 ));
+ const sal_uInt8 cShift = sal::static_int_cast<sal_uInt8>(6 - ( ( nX & 3 ) << 1 ));
( ( mpScan[ nY ][ nX >> 2 ] ) &= ~( 3 << cShift ) ) |= ( cVal << cShift );
}
// -----------------------------------------------------------------------------
-inline BYTE ImplVectMap::Get( long nY, long nX ) const
+inline sal_uInt8 ImplVectMap::Get( long nY, long nX ) const
{
- return sal::static_int_cast<BYTE>( ( ( mpScan[ nY ][ nX >> 2 ] ) >> ( 6 - ( ( nX & 3 ) << 1 ) ) ) & 3 );
+ return sal::static_int_cast<sal_uInt8>( ( ( mpScan[ nY ][ nX >> 2 ] ) >> ( 6 - ( ( nX & 3 ) << 1 ) ) ) & 3 );
}
// -----------------------------------------------------------------------------
-inline BOOL ImplVectMap::IsFree( long nY, long nX ) const
+inline sal_Bool ImplVectMap::IsFree( long nY, long nX ) const
{
return( VECT_FREE_INDEX == Get( nY, nX ) );
}
// -----------------------------------------------------------------------------
-inline BOOL ImplVectMap::IsCont( long nY, long nX ) const
+inline sal_Bool ImplVectMap::IsCont( long nY, long nX ) const
{
return( VECT_CONT_INDEX == Get( nY, nX ) );
}
// -----------------------------------------------------------------------------
-inline BOOL ImplVectMap::IsDone( long nY, long nX ) const
+inline sal_Bool ImplVectMap::IsDone( long nY, long nX ) const
{
return( VECT_DONE_INDEX == Get( nY, nX ) );
}
@@ -343,10 +343,10 @@ private:
Polygon maPoly;
Point maStartPt;
- ULONG mnArraySize;
- ULONG mnCount;
+ sal_uIntPtr mnArraySize;
+ sal_uIntPtr mnCount;
long mnResize;
- BYTE* mpCodes;
+ sal_uInt8* mpCodes;
void ImplGetSpace();
@@ -357,25 +357,25 @@ private:
public:
- ImplChain( ULONG nInitCount = 1024UL, long nResize = -1L );
+ ImplChain( sal_uIntPtr nInitCount = 1024UL, long nResize = -1L );
~ImplChain();
void ImplBeginAdd( const Point& rStartPt );
- inline void ImplAdd( BYTE nCode );
- void ImplEndAdd( ULONG nTypeFlag );
+ inline void ImplAdd( sal_uInt8 nCode );
+ void ImplEndAdd( sal_uIntPtr nTypeFlag );
const Polygon& ImplGetPoly() { return maPoly; }
};
// -----------------------------------------------------------------------------
-ImplChain::ImplChain( ULONG nInitCount, long nResize ) :
+ImplChain::ImplChain( sal_uIntPtr nInitCount, long nResize ) :
mnArraySize ( nInitCount ),
mnCount ( 0UL ),
mnResize ( nResize )
{
DBG_ASSERT( nInitCount && nResize, "ImplChain::ImplChain(): invalid parameters!" );
- mpCodes = new BYTE[ mnArraySize ];
+ mpCodes = new sal_uInt8[ mnArraySize ];
}
// -----------------------------------------------------------------------------
@@ -389,11 +389,11 @@ ImplChain::~ImplChain()
void ImplChain::ImplGetSpace()
{
- const ULONG nOldArraySize = mnArraySize;
- BYTE* pNewCodes;
+ const sal_uIntPtr nOldArraySize = mnArraySize;
+ sal_uInt8* pNewCodes;
- mnArraySize = ( mnResize < 0L ) ? ( mnArraySize << 1UL ) : ( mnArraySize + (ULONG) mnResize );
- pNewCodes = new BYTE[ mnArraySize ];
+ mnArraySize = ( mnResize < 0L ) ? ( mnArraySize << 1UL ) : ( mnArraySize + (sal_uIntPtr) mnResize );
+ pNewCodes = new sal_uInt8[ mnArraySize ];
memcpy( pNewCodes, mpCodes, nOldArraySize );
delete[] mpCodes;
mpCodes = pNewCodes;
@@ -410,7 +410,7 @@ void ImplChain::ImplBeginAdd( const Point& rStartPt )
// -----------------------------------------------------------------------------
-inline void ImplChain::ImplAdd( BYTE nCode )
+inline void ImplChain::ImplAdd( sal_uInt8 nCode )
{
if( mnCount == mnArraySize )
ImplGetSpace();
@@ -420,7 +420,7 @@ inline void ImplChain::ImplAdd( BYTE nCode )
// -----------------------------------------------------------------------------
-void ImplChain::ImplEndAdd( ULONG nFlag )
+void ImplChain::ImplEndAdd( sal_uIntPtr nFlag )
{
if( mnCount )
{
@@ -435,15 +435,15 @@ void ImplChain::ImplEndAdd( ULONG nFlag )
nFirstY = nLastY = maStartPt.Y();
aArr.ImplSetSize( mnCount << 1 );
- USHORT i, nPolyPos;
+ sal_uInt16 i, nPolyPos;
for( i = 0, nPolyPos = 0; i < ( mnCount - 1 ); i++ )
{
- const BYTE cMove = mpCodes[ i ];
- const BYTE cNextMove = mpCodes[ i + 1 ];
+ const sal_uInt8 cMove = mpCodes[ i ];
+ const sal_uInt8 cNextMove = mpCodes[ i + 1 ];
const ChainMove& rMove = aImplMove[ cMove ];
const ChainMove& rMoveInner = aImplMoveInner[ cMove ];
// Point& rPt = aArr[ nPolyPos ];
- BOOL bDone = TRUE;
+ sal_Bool bDone = sal_True;
nLastX += rMove.nDX;
nLastY += rMove.nDY;
@@ -501,7 +501,7 @@ void ImplChain::ImplEndAdd( ULONG nFlag )
aArr[ nPolyPos++ ].Y() = nLastY - 1;
}
else
- bDone = FALSE;
+ bDone = sal_False;
}
else if( cMove == 7 && cNextMove == 0 )
{
@@ -520,7 +520,7 @@ void ImplChain::ImplEndAdd( ULONG nFlag )
aArr[ nPolyPos++ ].Y() = nLastY;
}
else
- bDone = FALSE;
+ bDone = sal_False;
if( !bDone )
{
@@ -542,15 +542,15 @@ void ImplChain::ImplEndAdd( ULONG nFlag )
nFirstY = nLastY = maStartPt.Y();
aArr.ImplSetSize( mnCount << 1 );
- USHORT i, nPolyPos;
+ sal_uInt16 i, nPolyPos;
for( i = 0, nPolyPos = 0; i < ( mnCount - 1 ); i++ )
{
- const BYTE cMove = mpCodes[ i ];
- const BYTE cNextMove = mpCodes[ i + 1 ];
+ const sal_uInt8 cMove = mpCodes[ i ];
+ const sal_uInt8 cNextMove = mpCodes[ i + 1 ];
const ChainMove& rMove = aImplMove[ cMove ];
const ChainMove& rMoveOuter = aImplMoveOuter[ cMove ];
// Point& rPt = aArr[ nPolyPos ];
- BOOL bDone = TRUE;
+ sal_Bool bDone = sal_True;
nLastX += rMove.nDX;
nLastY += rMove.nDY;
@@ -608,7 +608,7 @@ void ImplChain::ImplEndAdd( ULONG nFlag )
aArr[ nPolyPos++ ].Y() = nLastY - 1;
}
else
- bDone = FALSE;
+ bDone = sal_False;
}
else if( cMove == 7 && cNextMove == 3 )
{
@@ -627,7 +627,7 @@ void ImplChain::ImplEndAdd( ULONG nFlag )
aArr[ nPolyPos++ ].Y() = nLastY + 1;
}
else
- bDone = FALSE;
+ bDone = sal_False;
if( !bDone )
{
@@ -647,7 +647,7 @@ void ImplChain::ImplEndAdd( ULONG nFlag )
aArr.ImplSetSize( mnCount + 1 );
aArr[ 0 ] = Point( nLastX, nLastY );
- for( ULONG i = 0; i < mnCount; )
+ for( sal_uIntPtr i = 0; i < mnCount; )
{
const ChainMove& rMove = aImplMove[ mpCodes[ i ] ];
aArr[ ++i ] = Point( nLastX += rMove.nDX, nLastY += rMove.nDY );
@@ -670,9 +670,9 @@ void ImplChain::ImplPostProcess( const ImplPointArray& rArr )
ImplPointArray aNewArr2;
Point* pLast;
Point* pLeast;
- ULONG nNewPos;
- ULONG nCount = rArr.ImplGetRealSize();
- ULONG n;
+ sal_uIntPtr nNewPos;
+ sal_uIntPtr nCount = rArr.ImplGetRealSize();
+ sal_uIntPtr n;
// pass 1
aNewArr1.ImplSetSize( nCount );
@@ -739,10 +739,10 @@ ImplVectorizer::~ImplVectorizer()
// -----------------------------------------------------------------------------
-BOOL ImplVectorizer::ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
- BYTE cReduce, ULONG nFlags, const Link* pProgress )
+sal_Bool ImplVectorizer::ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
+ sal_uInt8 cReduce, sal_uIntPtr nFlags, const Link* pProgress )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
VECT_PROGRESS( pProgress, 0 );
@@ -756,9 +756,9 @@ BOOL ImplVectorizer::ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
double fPercentStep_2 = 0.0;
const long nWidth = pRAcc->Width();
const long nHeight = pRAcc->Height();
- const USHORT nColorCount = pRAcc->GetPaletteEntryCount();
- USHORT n;
- ImplColorSet* pColorSet = (ImplColorSet*) new BYTE[ 256 * sizeof( ImplColorSet ) ];
+ const sal_uInt16 nColorCount = pRAcc->GetPaletteEntryCount();
+ sal_uInt16 n;
+ ImplColorSet* pColorSet = (ImplColorSet*) new sal_uInt8[ 256 * sizeof( ImplColorSet ) ];
memset( pColorSet, 0, 256 * sizeof( ImplColorSet ) );
rMtf.Clear();
@@ -785,11 +785,11 @@ BOOL ImplVectorizer::ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
VECT_PROGRESS( pProgress, FRound( fPercent += 10.0 ) );
- for( USHORT i = 0; i < n; i++ )
+ for( sal_uInt16 i = 0; i < n; i++ )
{
const BitmapColor aBmpCol( pRAcc->GetPaletteColor( pColorSet[ i ].mnIndex ) );
const Color aFindColor( aBmpCol.GetRed(), aBmpCol.GetGreen(), aBmpCol.GetBlue() );
-// const BYTE cLum = aFindColor.GetLuminance();
+// const sal_uInt8 cLum = aFindColor.GetLuminance();
ImplVectMap* pMap = ImplExpand( pRAcc, aFindColor );
VECT_PROGRESS( pProgress, FRound( fPercent += fPercentStep_2 ) );
@@ -809,8 +809,8 @@ BOOL ImplVectorizer::ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
if( aPolyPoly.Count() )
{
- rMtf.AddAction( new MetaLineColorAction( aFindColor, TRUE ) );
- rMtf.AddAction( new MetaFillColorAction( aFindColor, TRUE ) );
+ rMtf.AddAction( new MetaLineColorAction( aFindColor, sal_True ) );
+ rMtf.AddAction( new MetaFillColorAction( aFindColor, sal_True ) );
rMtf.AddAction( new MetaPolyPolygonAction( aPolyPoly ) );
}
}
@@ -819,7 +819,7 @@ BOOL ImplVectorizer::ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
VECT_PROGRESS( pProgress, FRound( fPercent += fPercentStep_2 ) );
}
- delete[] (BYTE*) pColorSet;
+ delete[] (sal_uInt8*) pColorSet;
if( rMtf.GetActionCount() )
{
@@ -831,7 +831,7 @@ BOOL ImplVectorizer::ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
rMtf.SetPrefSize( Size( nWidth + 2, nHeight + 2 ) );
rMtf.Move( 1, 1 );
rMtf.Scale( aLogSize1.Width(), aLogSize1.Height() );
- bRet = TRUE;
+ bRet = sal_True;
}
}
@@ -844,14 +844,14 @@ BOOL ImplVectorizer::ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
// -----------------------------------------------------------------------------
-BOOL ImplVectorizer::ImplVectorize( const Bitmap& rMonoBmp,
+sal_Bool ImplVectorizer::ImplVectorize( const Bitmap& rMonoBmp,
PolyPolygon& rPolyPoly,
- ULONG nFlags, const Link* pProgress )
+ sal_uIntPtr nFlags, const Link* pProgress )
{
Bitmap* pBmp = new Bitmap( rMonoBmp );
BitmapReadAccess* pRAcc;
ImplVectMap* pMap;
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
VECT_PROGRESS( pProgress, 10 );
@@ -925,13 +925,13 @@ BOOL ImplVectorizer::ImplVectorize( const Bitmap& rMonoBmp,
// put outmost polygon to the front
if( nFirstPoly > 0 )
{
- const Polygon aFirst( rPolyPoly.GetObject( static_cast< USHORT >( nFirstPoly ) ) );
+ const Polygon aFirst( rPolyPoly.GetObject( static_cast< sal_uInt16 >( nFirstPoly ) ) );
- rPolyPoly.Remove( static_cast< USHORT >( nFirstPoly ) );
+ rPolyPoly.Remove( static_cast< sal_uInt16 >( nFirstPoly ) );
rPolyPoly.Insert( aFirst, 0 );
}
- bRet = TRUE;
+ bRet = sal_True;
}
VECT_PROGRESS( pProgress, 100 );
@@ -947,14 +947,14 @@ void ImplVectorizer::ImplLimitPolyPoly( PolyPolygon& rPolyPoly )
{
PolyPolygon aNewPolyPoly;
long nReduce = 0;
- USHORT nNewCount;
+ sal_uInt16 nNewCount;
do
{
aNewPolyPoly.Clear();
nReduce++;
- for( USHORT i = 0, nCount = rPolyPoly.Count(); i < nCount; i++ )
+ for( sal_uInt16 i = 0, nCount = rPolyPoly.Count(); i < nCount; i++ )
{
const Rectangle aBound( rPolyPoly[ i ].GetBoundRect() );
@@ -1068,14 +1068,14 @@ ImplVectMap* ImplVectorizer::ImplExpand( BitmapReadAccess* pRAcc, const Color& r
// -----------------------------------------------------------------------------
-void ImplVectorizer::ImplCalculate( ImplVectMap* pMap, PolyPolygon& rPolyPoly, BYTE cReduce, ULONG nFlags )
+void ImplVectorizer::ImplCalculate( ImplVectMap* pMap, PolyPolygon& rPolyPoly, sal_uInt8 cReduce, sal_uIntPtr nFlags )
{
const long nWidth = pMap->Width(), nHeight= pMap->Height();
for( long nY = 0L; nY < nHeight; nY++ )
{
long nX = 0L;
- BOOL bInner = TRUE;
+ sal_Bool bInner = sal_True;
while( nX < nWidth )
{
@@ -1137,15 +1137,15 @@ void ImplVectorizer::ImplCalculate( ImplVectMap* pMap, PolyPolygon& rPolyPoly, B
// -----------------------------------------------------------------------------
-BOOL ImplVectorizer::ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, ImplChain& rChain )
+sal_Bool ImplVectorizer::ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, ImplChain& rChain )
{
long nActX = rStartPt.X();
long nActY = rStartPt.Y();
long nTryX;
long nTryY;
- ULONG nFound;
- ULONG nLastDir = 0UL;
- ULONG nDir;
+ sal_uIntPtr nFound;
+ sal_uIntPtr nLastDir = 0UL;
+ sal_uIntPtr nDir;
do
{
@@ -1157,7 +1157,7 @@ BOOL ImplVectorizer::ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, Im
if( pMap->IsCont( nTryY, nTryX ) )
{
- rChain.ImplAdd( (BYTE) nLastDir );
+ rChain.ImplAdd( (sal_uInt8) nLastDir );
pMap->Set( nActY = nTryY, nActX = nTryX, VECT_DONE_INDEX );
nFound = 1UL;
}
@@ -1174,7 +1174,7 @@ BOOL ImplVectorizer::ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, Im
if( pMap->IsCont( nTryY, nTryX ) )
{
- rChain.ImplAdd( (BYTE) nDir );
+ rChain.ImplAdd( (sal_uInt8) nDir );
pMap->Set( nActY = nTryY, nActX = nTryX, VECT_DONE_INDEX );
nFound = 1UL;
nLastDir = nDir;
@@ -1186,19 +1186,19 @@ BOOL ImplVectorizer::ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, Im
}
while( nFound );
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------------
-BOOL ImplVectorizer::ImplIsUp( ImplVectMap* pMap, long nY, long nX ) const
+sal_Bool ImplVectorizer::ImplIsUp( ImplVectMap* pMap, long nY, long nX ) const
{
if( pMap->IsDone( nY - 1L, nX ) )
- return TRUE;
+ return sal_True;
else if( pMap->IsDone( nY + 1L, nX ) )
- return FALSE;
+ return sal_False;
else if( pMap->IsDone( nY - 1L, nX - 1L ) || pMap->IsDone( nY - 1L, nX + 1L ) )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
diff --git a/vcl/source/gdi/impvect.hxx b/vcl/source/gdi/impvect.hxx
index b21a9df2eb7a..21d73d2daafe 100644
--- a/vcl/source/gdi/impvect.hxx
+++ b/vcl/source/gdi/impvect.hxx
@@ -44,9 +44,9 @@ class ImplVectorizer
private:
ImplVectMap* ImplExpand( BitmapReadAccess* pRAcc, const Color& rColor );
- void ImplCalculate( ImplVectMap* pMap, PolyPolygon& rPolyPoly, BYTE cReduce, ULONG nFlags );
- BOOL ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, ImplChain& rChain );
- BOOL ImplIsUp( ImplVectMap* pMap, long nY, long nX ) const;
+ void ImplCalculate( ImplVectMap* pMap, PolyPolygon& rPolyPoly, sal_uInt8 cReduce, sal_uIntPtr nFlags );
+ sal_Bool ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, ImplChain& rChain );
+ sal_Bool ImplIsUp( ImplVectMap* pMap, long nY, long nX ) const;
void ImplLimitPolyPoly( PolyPolygon& rPolyPoly );
public:
@@ -54,10 +54,10 @@ public:
ImplVectorizer();
~ImplVectorizer();
- BOOL ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
- BYTE cReduce, ULONG nFlags, const Link* pProgress );
- BOOL ImplVectorize( const Bitmap& rMonoBmp, PolyPolygon& rPolyPoly,
- ULONG nFlags, const Link* pProgress );
+ sal_Bool ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
+ sal_uInt8 cReduce, sal_uIntPtr nFlags, const Link* pProgress );
+ sal_Bool ImplVectorize( const Bitmap& rMonoBmp, PolyPolygon& rPolyPoly,
+ sal_uIntPtr nFlags, const Link* pProgress );
};
#endif
diff --git a/vcl/source/gdi/jobset.cxx b/vcl/source/gdi/jobset.cxx
index 2bc0addaa93c..f7293781c91b 100644
--- a/vcl/source/gdi/jobset.cxx
+++ b/vcl/source/gdi/jobset.cxx
@@ -40,8 +40,8 @@
DBG_NAME( JobSetup )
#define JOBSET_FILEFORMAT2 3780
-#define JOBSET_FILE364_SYSTEM ((USHORT)0xFFFF)
-#define JOBSET_FILE605_SYSTEM ((USHORT)0xFFFE)
+#define JOBSET_FILE364_SYSTEM ((sal_uInt16)0xFFFF)
+#define JOBSET_FILE605_SYSTEM ((sal_uInt16)0xFFFE)
struct ImplOldJobSetupData
{
@@ -96,7 +96,7 @@ ImplJobSetup::ImplJobSetup( const ImplJobSetup& rJobSetup ) :
mnDriverDataLen = rJobSetup.mnDriverDataLen;
if ( rJobSetup.mpDriverData )
{
- mpDriverData = (BYTE*)rtl_allocateMemory( mnDriverDataLen );
+ mpDriverData = (sal_uInt8*)rtl_allocateMemory( mnDriverDataLen );
memcpy( mpDriverData, rJobSetup.mpDriverData, mnDriverDataLen );
}
else
@@ -259,16 +259,16 @@ JobSetup& JobSetup::operator=( const JobSetup& rJobSetup )
// -----------------------------------------------------------------------
-BOOL JobSetup::operator==( const JobSetup& rJobSetup ) const
+sal_Bool JobSetup::operator==( const JobSetup& rJobSetup ) const
{
DBG_CHKTHIS( JobSetup, NULL );
DBG_CHKOBJ( &rJobSetup, JobSetup, NULL );
if ( mpData == rJobSetup.mpData )
- return TRUE;
+ return sal_True;
if ( !mpData || !rJobSetup.mpData )
- return FALSE;
+ return sal_False;
ImplJobSetup* pData1 = mpData;
ImplJobSetup* pData2 = rJobSetup.mpData;
@@ -285,9 +285,9 @@ BOOL JobSetup::operator==( const JobSetup& rJobSetup ) const
(memcmp( pData1->mpDriverData, pData2->mpDriverData, pData1->mnDriverDataLen ) == 0) &&
(pData1->maValueMap == pData2->maValueMap)
)
- return TRUE;
+ return sal_True;
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -299,8 +299,8 @@ SvStream& operator>>( SvStream& rIStream, JobSetup& rJobSetup )
// Zur Zeit haben wir noch kein neues FileFormat
// if ( rIStream.GetVersion() < JOBSET_FILEFORMAT2 )
{
- USHORT nLen;
- USHORT nSystem;
+ sal_uInt16 nLen;
+ sal_uInt16 nSystem;
sal_Size nFirstPos = rIStream.Tell();
rIStream >> nLen;
if ( !nLen )
@@ -333,7 +333,7 @@ SvStream& operator>>( SvStream& rIStream, JobSetup& rJobSetup )
nSystem == JOBSET_FILE605_SYSTEM )
{
Impl364JobSetupData* pOldJobData = (Impl364JobSetupData*)(pTempBuf + sizeof( ImplOldJobSetupData ));
- USHORT nOldJobDataSize = SVBT16ToShort( pOldJobData->nSize );
+ sal_uInt16 nOldJobDataSize = SVBT16ToShort( pOldJobData->nSize );
pJobData->mnSystem = SVBT16ToShort( pOldJobData->nSystem );
pJobData->mnDriverDataLen = SVBT32ToUInt32( pOldJobData->nDriverDataLen );
pJobData->meOrientation = (Orientation)SVBT16ToShort( pOldJobData->nOrientation );
@@ -344,8 +344,8 @@ SvStream& operator>>( SvStream& rIStream, JobSetup& rJobSetup )
pJobData->mnPaperHeight = (long)SVBT32ToUInt32( pOldJobData->nPaperHeight );
if ( pJobData->mnDriverDataLen )
{
- BYTE* pDriverData = ((BYTE*)pOldJobData) + nOldJobDataSize;
- pJobData->mpDriverData = (BYTE*)rtl_allocateMemory( pJobData->mnDriverDataLen );
+ sal_uInt8* pDriverData = ((sal_uInt8*)pOldJobData) + nOldJobDataSize;
+ pJobData->mpDriverData = (sal_uInt8*)rtl_allocateMemory( pJobData->mnDriverDataLen );
memcpy( pJobData->mpDriverData, pDriverData, pJobData->mnDriverDataLen );
}
if( nSystem == JOBSET_FILE605_SYSTEM )
@@ -396,24 +396,24 @@ SvStream& operator<<( SvStream& rOStream, const JobSetup& rJobSetup )
// Zur Zeit haben wir noch kein neues FileFormat
// if ( rOStream.GetVersion() < JOBSET_FILEFORMAT2 )
{
- USHORT nLen = 0;
+ sal_uInt16 nLen = 0;
if ( !rJobSetup.mpData )
rOStream << nLen;
else
{
- USHORT nSystem = JOBSET_FILE605_SYSTEM;
+ sal_uInt16 nSystem = JOBSET_FILE605_SYSTEM;
const ImplJobSetup* pJobData = rJobSetup.ImplGetConstData();
Impl364JobSetupData aOldJobData;
- USHORT nOldJobDataSize = sizeof( aOldJobData );
+ sal_uInt16 nOldJobDataSize = sizeof( aOldJobData );
ShortToSVBT16( nOldJobDataSize, aOldJobData.nSize );
ShortToSVBT16( pJobData->mnSystem, aOldJobData.nSystem );
UInt32ToSVBT32( pJobData->mnDriverDataLen, aOldJobData.nDriverDataLen );
- ShortToSVBT16( (USHORT)(pJobData->meOrientation), aOldJobData.nOrientation );
+ ShortToSVBT16( (sal_uInt16)(pJobData->meOrientation), aOldJobData.nOrientation );
ShortToSVBT16( pJobData->mnPaperBin, aOldJobData.nPaperBin );
- ShortToSVBT16( (USHORT)(pJobData->mePaperFormat), aOldJobData.nPaperFormat );
- UInt32ToSVBT32( (ULONG)(pJobData->mnPaperWidth), aOldJobData.nPaperWidth );
- UInt32ToSVBT32( (ULONG)(pJobData->mnPaperHeight), aOldJobData.nPaperHeight );
+ ShortToSVBT16( (sal_uInt16)(pJobData->mePaperFormat), aOldJobData.nPaperFormat );
+ UInt32ToSVBT32( (sal_uIntPtr)(pJobData->mnPaperWidth), aOldJobData.nPaperWidth );
+ UInt32ToSVBT32( (sal_uIntPtr)(pJobData->mnPaperHeight), aOldJobData.nPaperHeight );
ImplOldJobSetupData aOldData;
memset( &aOldData, 0, sizeof( aOldData ) );
@@ -442,7 +442,7 @@ SvStream& operator<<( SvStream& rOStream, const JobSetup& rJobSetup )
case DUPLEX_SHORTEDGE: rOStream.WriteByteString( "DUPLEX_SHORTEDGE" );break;
case DUPLEX_LONGEDGE: rOStream.WriteByteString( "DUPLEX_LONGEDGE" );break;
}
- nLen = sal::static_int_cast<USHORT>(rOStream.Tell() - nPos);
+ nLen = sal::static_int_cast<sal_uInt16>(rOStream.Tell() - nPos);
rOStream.Seek( nPos );
rOStream << nLen;
rOStream.Seek( nPos + nLen );
diff --git a/vcl/source/gdi/lineinfo.cxx b/vcl/source/gdi/lineinfo.cxx
index bb57a0b582e6..b7020874ca9c 100644
--- a/vcl/source/gdi/lineinfo.cxx
+++ b/vcl/source/gdi/lineinfo.cxx
@@ -119,7 +119,7 @@ LineInfo& LineInfo::operator=( const LineInfo& rLineInfo )
// -----------------------------------------------------------------------
-BOOL LineInfo::operator==( const LineInfo& rLineInfo ) const
+sal_Bool LineInfo::operator==( const LineInfo& rLineInfo ) const
{
DBG_CHKTHIS( LineInfo, NULL );
DBG_CHKOBJ( &rLineInfo, LineInfo, NULL );
@@ -167,7 +167,7 @@ void LineInfo::SetWidth( long nWidth )
// -----------------------------------------------------------------------
-void LineInfo::SetDashCount( USHORT nDashCount )
+void LineInfo::SetDashCount( sal_uInt16 nDashCount )
{
DBG_CHKTHIS( LineInfo, NULL );
ImplMakeUnique();
@@ -185,7 +185,7 @@ void LineInfo::SetDashLen( long nDashLen )
// -----------------------------------------------------------------------
-void LineInfo::SetDotCount( USHORT nDotCount )
+void LineInfo::SetDotCount( sal_uInt16 nDotCount )
{
DBG_CHKTHIS( LineInfo, NULL );
ImplMakeUnique();
@@ -228,7 +228,7 @@ void LineInfo::SetLineJoin(basegfx::B2DLineJoin eLineJoin)
SvStream& operator>>( SvStream& rIStm, ImplLineInfo& rImplLineInfo )
{
VersionCompat aCompat( rIStm, STREAM_READ );
- UINT16 nTmp16;
+ sal_uInt16 nTmp16;
rIStm >> nTmp16; rImplLineInfo.meStyle = (LineStyle) nTmp16;
rIStm >> rImplLineInfo.mnWidth;
@@ -257,7 +257,7 @@ SvStream& operator<<( SvStream& rOStm, const ImplLineInfo& rImplLineInfo )
VersionCompat aCompat( rOStm, STREAM_WRITE, 3 );
// version 1
- rOStm << (UINT16) rImplLineInfo.meStyle << rImplLineInfo.mnWidth;
+ rOStm << (sal_uInt16) rImplLineInfo.meStyle << rImplLineInfo.mnWidth;
// since version2
rOStm << rImplLineInfo.mnDashCount << rImplLineInfo.mnDashLen;
@@ -265,7 +265,7 @@ SvStream& operator<<( SvStream& rOStm, const ImplLineInfo& rImplLineInfo )
rOStm << rImplLineInfo.mnDistance;
// since version3
- rOStm << (UINT16) rImplLineInfo.meLineJoin;
+ rOStm << (sal_uInt16) rImplLineInfo.meLineJoin;
return rOStm;
}
diff --git a/vcl/source/gdi/mapmod.cxx b/vcl/source/gdi/mapmod.cxx
index 34f0f473c7f8..5eff28d559a7 100644
--- a/vcl/source/gdi/mapmod.cxx
+++ b/vcl/source/gdi/mapmod.cxx
@@ -45,7 +45,7 @@ ImplMapMode::ImplMapMode() :
{
mnRefCount = 1;
meUnit = MAP_PIXEL;
- mbSimple = FALSE;
+ mbSimple = sal_False;
}
// -----------------------------------------------------------------------
@@ -57,7 +57,7 @@ ImplMapMode::ImplMapMode( const ImplMapMode& rImplMapMode ) :
{
mnRefCount = 1;
meUnit = rImplMapMode.meUnit;
- mbSimple = FALSE;
+ mbSimple = sal_False;
}
// -----------------------------------------------------------------------
@@ -65,7 +65,7 @@ ImplMapMode::ImplMapMode( const ImplMapMode& rImplMapMode ) :
SvStream& operator>>( SvStream& rIStm, ImplMapMode& rImplMapMode )
{
VersionCompat aCompat( rIStm, STREAM_READ );
- UINT16 nTmp16;
+ sal_uInt16 nTmp16;
rIStm >> nTmp16; rImplMapMode.meUnit = (MapUnit) nTmp16;
rIStm >> rImplMapMode.maOrigin >> rImplMapMode.maScaleX >>
@@ -80,7 +80,7 @@ SvStream& operator<<( SvStream& rOStm, const ImplMapMode& rImplMapMode )
{
VersionCompat aCompat( rOStm, STREAM_WRITE, 1 );
- rOStm << (UINT16) rImplMapMode.meUnit <<
+ rOStm << (sal_uInt16) rImplMapMode.meUnit <<
rImplMapMode.maOrigin <<
rImplMapMode.maScaleX <<
rImplMapMode.maScaleY <<
@@ -106,7 +106,7 @@ ImplMapMode* ImplMapMode::ImplGetStaticMapMode( MapUnit eUnit )
pImplMapMode->maScaleX = aDefFraction;
pImplMapMode->maScaleY = aDefFraction;
pImplMapMode->meUnit = eUnit;
- pImplMapMode->mbSimple = TRUE;
+ pImplMapMode->mbSimple = sal_True;
}
return pImplMapMode;
@@ -259,40 +259,40 @@ MapMode& MapMode::operator=( const MapMode& rMapMode )
// -----------------------------------------------------------------------
-BOOL MapMode::operator==( const MapMode& rMapMode ) const
+sal_Bool MapMode::operator==( const MapMode& rMapMode ) const
{
DBG_CHKTHIS( MapMode, NULL );
DBG_CHKOBJ( &rMapMode, MapMode, NULL );
if ( mpImplMapMode == rMapMode.mpImplMapMode )
- return TRUE;
+ return sal_True;
if ( (mpImplMapMode->meUnit == rMapMode.mpImplMapMode->meUnit) &&
(mpImplMapMode->maOrigin == rMapMode.mpImplMapMode->maOrigin) &&
(mpImplMapMode->maScaleX == rMapMode.mpImplMapMode->maScaleX) &&
(mpImplMapMode->maScaleY == rMapMode.mpImplMapMode->maScaleY) )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL MapMode::IsDefault() const
+sal_Bool MapMode::IsDefault() const
{
DBG_CHKTHIS( MapMode, NULL );
ImplMapMode* pDefMapMode = ImplMapMode::ImplGetStaticMapMode( MAP_PIXEL );
if ( mpImplMapMode == pDefMapMode )
- return TRUE;
+ return sal_True;
if ( (mpImplMapMode->meUnit == pDefMapMode->meUnit) &&
(mpImplMapMode->maOrigin == pDefMapMode->maOrigin) &&
(mpImplMapMode->maScaleX == pDefMapMode->maScaleX) &&
(mpImplMapMode->maScaleY == pDefMapMode->maScaleY) )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx
index 752a4222bcb2..8dd52b66b77d 100644
--- a/vcl/source/gdi/metaact.cxx
+++ b/vcl/source/gdi/metaact.cxx
@@ -65,7 +65,7 @@ inline void ImplScaleRect( Rectangle& rRect, double fScaleX, double fScaleY )
inline void ImplScalePoly( Polygon& rPoly, double fScaleX, double fScaleY )
{
- for( USHORT i = 0, nCount = rPoly.GetSize(); i < nCount; i++ )
+ for( sal_uInt16 i = 0, nCount = rPoly.GetSize(); i < nCount; i++ )
ImplScalePoint( rPoly[ i ], fScaleX, fScaleY );
}
@@ -102,7 +102,7 @@ MetaAction::MetaAction() :
// ------------------------------------------------------------------------
-MetaAction::MetaAction( USHORT nType ) :
+MetaAction::MetaAction( sal_uInt16 nType ) :
mnRefCount( 1 ),
mnType( nType )
{
@@ -175,7 +175,7 @@ void MetaAction::Read( SvStream& rIStm, ImplMetaReadData* )
MetaAction* MetaAction::ReadMetaAction( SvStream& rIStm, ImplMetaReadData* pData )
{
MetaAction* pAction = NULL;
- UINT16 nType;
+ sal_uInt16 nType;
rIStm >> nType;
@@ -308,7 +308,7 @@ void MetaPixelAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
{
WRITE_BASE_COMPAT( rOStm, 1, pData );
rOStm << maPt;
- maColor.Write( rOStm, TRUE );
+ maColor.Write( rOStm, sal_True );
}
// ------------------------------------------------------------------------
@@ -317,7 +317,7 @@ void MetaPixelAction::Read( SvStream& rIStm, ImplMetaReadData* )
{
COMPAT( rIStm );
rIStm >> maPt;
- maColor.Read( rIStm, TRUE );
+ maColor.Read( rIStm, sal_True );
}
// ========================================================================
@@ -1132,7 +1132,7 @@ void MetaPolyPolygonAction::Move( long nHorzMove, long nVertMove )
void MetaPolyPolygonAction::Scale( double fScaleX, double fScaleY )
{
- for( USHORT i = 0, nCount = maPolyPoly.Count(); i < nCount; i++ )
+ for( sal_uInt16 i = 0, nCount = maPolyPoly.Count(); i < nCount; i++ )
ImplScalePoly( maPolyPoly[ i ], fScaleX, fScaleY );
}
@@ -1205,7 +1205,7 @@ IMPL_META_ACTION( Text, META_TEXT_ACTION )
// ------------------------------------------------------------------------
MetaTextAction::MetaTextAction( const Point& rPt, const XubString& rStr,
- USHORT nIndex, USHORT nLen ) :
+ sal_uInt16 nIndex, sal_uInt16 nLen ) :
MetaAction ( META_TEXT_ACTION ),
maPt ( rPt ),
maStr ( rStr ),
@@ -1314,7 +1314,7 @@ MetaTextArrayAction::MetaTextArrayAction( const MetaTextArrayAction& rAction ) :
{
if( rAction.mpDXAry )
{
- const ULONG nAryLen = mnLen;
+ const sal_uIntPtr nAryLen = mnLen;
mpDXAry = new sal_Int32[ nAryLen ];
memcpy( mpDXAry, rAction.mpDXAry, nAryLen * sizeof( sal_Int32 ) );
@@ -1328,15 +1328,15 @@ MetaTextArrayAction::MetaTextArrayAction( const MetaTextArrayAction& rAction ) :
MetaTextArrayAction::MetaTextArrayAction( const Point& rStartPt,
const XubString& rStr,
const sal_Int32* pDXAry,
- USHORT nIndex,
- USHORT nLen ) :
+ sal_uInt16 nIndex,
+ sal_uInt16 nLen ) :
MetaAction ( META_TEXTARRAY_ACTION ),
maStartPt ( rStartPt ),
maStr ( rStr ),
mnIndex ( nIndex ),
mnLen ( ( nLen == STRING_LEN ) ? rStr.Len() : nLen )
{
- const ULONG nAryLen = pDXAry ? mnLen : 0;
+ const sal_uIntPtr nAryLen = pDXAry ? mnLen : 0;
if( nAryLen )
{
@@ -1385,7 +1385,7 @@ void MetaTextArrayAction::Scale( double fScaleX, double fScaleY )
if ( mpDXAry && mnLen )
{
- for ( USHORT i = 0, nCount = mnLen; i < nCount; i++ )
+ for ( sal_uInt16 i = 0, nCount = mnLen; i < nCount; i++ )
mpDXAry[ i ] = FRound( mpDXAry[ i ] * fabs(fScaleX) );
}
}
@@ -1414,7 +1414,7 @@ void MetaTextArrayAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
rOStm << mnLen;
rOStm << nAryLen;
- for( ULONG i = 0UL; i < nAryLen; i++ )
+ for( sal_uIntPtr i = 0UL; i < nAryLen; i++ )
rOStm << mpDXAry[ i ];
sal_uInt16 j, nLen = maStr.Len(); // version 2
@@ -1444,10 +1444,10 @@ void MetaTextArrayAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
if( nAryLen )
{
// #i9762#, #106172# Ensure that DX array is at least mnLen entries long
- const ULONG nIntAryLen( Max(nAryLen, static_cast<sal_uInt32>(mnLen)) );
+ const sal_uIntPtr nIntAryLen( Max(nAryLen, static_cast<sal_uInt32>(mnLen)) );
mpDXAry = new sal_Int32[ nIntAryLen ];
- ULONG i;
+ sal_uIntPtr i;
for( i = 0UL; i < nAryLen; i++ )
rIStm >> mpDXAry[ i ];
@@ -1476,7 +1476,7 @@ IMPL_META_ACTION( StretchText, META_STRETCHTEXT_ACTION )
MetaStretchTextAction::MetaStretchTextAction( const Point& rPt, sal_uInt32 nWidth,
const XubString& rStr,
- USHORT nIndex, USHORT nLen ) :
+ sal_uInt16 nIndex, sal_uInt16 nLen ) :
MetaAction ( META_STRETCHTEXT_ACTION ),
maPt ( rPt ),
maStr ( rStr ),
@@ -1514,7 +1514,7 @@ void MetaStretchTextAction::Move( long nHorzMove, long nVertMove )
void MetaStretchTextAction::Scale( double fScaleX, double fScaleY )
{
ImplScalePoint( maPt, fScaleX, fScaleY );
- mnWidth = (ULONG)FRound( mnWidth * fabs(fScaleX) );
+ mnWidth = (sal_uIntPtr)FRound( mnWidth * fabs(fScaleX) );
}
// ------------------------------------------------------------------------
@@ -1576,7 +1576,7 @@ IMPL_META_ACTION( TextRect, META_TEXTRECT_ACTION )
// ------------------------------------------------------------------------
MetaTextRectAction::MetaTextRectAction( const Rectangle& rRect,
- const XubString& rStr, USHORT nStyle ) :
+ const XubString& rStr, sal_uInt16 nStyle ) :
MetaAction ( META_TEXTRECT_ACTION ),
maRect ( rRect ),
maStr ( rStr ),
@@ -2434,7 +2434,7 @@ void MetaMaskScalePartAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
{
WRITE_BASE_COMPAT( rOStm, 1, pData );
rOStm << maBmp;
- maColor.Write( rOStm, TRUE );
+ maColor.Write( rOStm, sal_True );
rOStm << maDstPt << maDstSz << maSrcPt << maSrcSz;
}
}
@@ -2445,7 +2445,7 @@ void MetaMaskScalePartAction::Read( SvStream& rIStm, ImplMetaReadData* )
{
COMPAT( rIStm );
rIStm >> maBmp;
- maColor.Read( rIStm, TRUE );
+ maColor.Read( rIStm, sal_True );
rIStm >> maDstPt >> maDstSz >> maSrcPt >> maSrcSz;
}
@@ -2566,7 +2566,7 @@ void MetaGradientExAction::Move( long nHorzMove, long nVertMove )
void MetaGradientExAction::Scale( double fScaleX, double fScaleY )
{
- for( USHORT i = 0, nCount = maPolyPoly.Count(); i < nCount; i++ )
+ for( sal_uInt16 i = 0, nCount = maPolyPoly.Count(); i < nCount; i++ )
ImplScalePoly( maPolyPoly[ i ], fScaleX, fScaleY );
}
@@ -2640,7 +2640,7 @@ void MetaHatchAction::Move( long nHorzMove, long nVertMove )
void MetaHatchAction::Scale( double fScaleX, double fScaleY )
{
- for( USHORT i = 0, nCount = maPolyPoly.Count(); i < nCount; i++ )
+ for( sal_uInt16 i = 0, nCount = maPolyPoly.Count(); i < nCount; i++ )
ImplScalePoly( maPolyPoly[ i ], fScaleX, fScaleY );
}
@@ -2748,7 +2748,7 @@ IMPL_META_ACTION( ClipRegion, META_CLIPREGION_ACTION )
// ------------------------------------------------------------------------
-MetaClipRegionAction::MetaClipRegionAction( const Region& rRegion, BOOL bClip ) :
+MetaClipRegionAction::MetaClipRegionAction( const Region& rRegion, sal_Bool bClip ) :
MetaAction ( META_CLIPREGION_ACTION ),
maRegion ( rRegion ),
mbClip ( bClip )
@@ -3009,7 +3009,7 @@ IMPL_META_ACTION( LineColor, META_LINECOLOR_ACTION )
// ------------------------------------------------------------------------
-MetaLineColorAction::MetaLineColorAction( const Color& rColor, BOOL bSet ) :
+MetaLineColorAction::MetaLineColorAction( const Color& rColor, sal_Bool bSet ) :
MetaAction ( META_LINECOLOR_ACTION ),
maColor ( rColor ),
mbSet ( bSet )
@@ -3048,7 +3048,7 @@ sal_Bool MetaLineColorAction::Compare( const MetaAction& rMetaAction ) const
void MetaLineColorAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
{
WRITE_BASE_COMPAT( rOStm, 1, pData );
- maColor.Write( rOStm, TRUE );
+ maColor.Write( rOStm, sal_True );
rOStm << mbSet;
}
@@ -3057,7 +3057,7 @@ void MetaLineColorAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
void MetaLineColorAction::Read( SvStream& rIStm, ImplMetaReadData* )
{
COMPAT( rIStm );
- maColor.Read( rIStm, TRUE );
+ maColor.Read( rIStm, sal_True );
rIStm >> mbSet;
}
@@ -3067,7 +3067,7 @@ IMPL_META_ACTION( FillColor, META_FILLCOLOR_ACTION )
// ------------------------------------------------------------------------
-MetaFillColorAction::MetaFillColorAction( const Color& rColor, BOOL bSet ) :
+MetaFillColorAction::MetaFillColorAction( const Color& rColor, sal_Bool bSet ) :
MetaAction ( META_FILLCOLOR_ACTION ),
maColor ( rColor ),
mbSet ( bSet )
@@ -3106,7 +3106,7 @@ sal_Bool MetaFillColorAction::Compare( const MetaAction& rMetaAction ) const
void MetaFillColorAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
{
WRITE_BASE_COMPAT( rOStm, 1, pData );
- maColor.Write( rOStm, TRUE );
+ maColor.Write( rOStm, sal_True );
rOStm << mbSet;
}
@@ -3115,7 +3115,7 @@ void MetaFillColorAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
void MetaFillColorAction::Read( SvStream& rIStm, ImplMetaReadData* )
{
COMPAT( rIStm );
- maColor.Read( rIStm, TRUE );
+ maColor.Read( rIStm, sal_True );
rIStm >> mbSet;
}
@@ -3159,7 +3159,7 @@ sal_Bool MetaTextColorAction::Compare( const MetaAction& rMetaAction ) const
void MetaTextColorAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
{
WRITE_BASE_COMPAT( rOStm, 1, pData );
- maColor.Write( rOStm, TRUE );
+ maColor.Write( rOStm, sal_True );
}
// ------------------------------------------------------------------------
@@ -3167,7 +3167,7 @@ void MetaTextColorAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
void MetaTextColorAction::Read( SvStream& rIStm, ImplMetaReadData* )
{
COMPAT( rIStm );
- maColor.Read( rIStm, TRUE );
+ maColor.Read( rIStm, sal_True );
}
// ========================================================================
@@ -3176,7 +3176,7 @@ IMPL_META_ACTION( TextFillColor, META_TEXTFILLCOLOR_ACTION )
// ------------------------------------------------------------------------
-MetaTextFillColorAction::MetaTextFillColorAction( const Color& rColor, BOOL bSet ) :
+MetaTextFillColorAction::MetaTextFillColorAction( const Color& rColor, sal_Bool bSet ) :
MetaAction ( META_TEXTFILLCOLOR_ACTION ),
maColor ( rColor ),
mbSet ( bSet )
@@ -3215,7 +3215,7 @@ sal_Bool MetaTextFillColorAction::Compare( const MetaAction& rMetaAction ) const
void MetaTextFillColorAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
{
WRITE_BASE_COMPAT( rOStm, 1, pData );
- maColor.Write( rOStm, TRUE );
+ maColor.Write( rOStm, sal_True );
rOStm << mbSet;
}
@@ -3224,7 +3224,7 @@ void MetaTextFillColorAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
void MetaTextFillColorAction::Read( SvStream& rIStm, ImplMetaReadData* )
{
COMPAT( rIStm );
- maColor.Read( rIStm, TRUE );
+ maColor.Read( rIStm, sal_True );
rIStm >> mbSet;
}
@@ -3234,7 +3234,7 @@ IMPL_META_ACTION( TextLineColor, META_TEXTLINECOLOR_ACTION )
// ------------------------------------------------------------------------
-MetaTextLineColorAction::MetaTextLineColorAction( const Color& rColor, BOOL bSet ) :
+MetaTextLineColorAction::MetaTextLineColorAction( const Color& rColor, sal_Bool bSet ) :
MetaAction ( META_TEXTLINECOLOR_ACTION ),
maColor ( rColor ),
mbSet ( bSet )
@@ -3273,7 +3273,7 @@ sal_Bool MetaTextLineColorAction::Compare( const MetaAction& rMetaAction ) const
void MetaTextLineColorAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
{
WRITE_BASE_COMPAT( rOStm, 1, pData );
- maColor.Write( rOStm, TRUE );
+ maColor.Write( rOStm, sal_True );
rOStm << mbSet;
}
@@ -3282,7 +3282,7 @@ void MetaTextLineColorAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
void MetaTextLineColorAction::Read( SvStream& rIStm, ImplMetaReadData* )
{
COMPAT( rIStm );
- maColor.Read( rIStm, TRUE );
+ maColor.Read( rIStm, sal_True );
rIStm >> mbSet;
}
@@ -3292,7 +3292,7 @@ IMPL_META_ACTION( OverlineColor, META_OVERLINECOLOR_ACTION )
// ------------------------------------------------------------------------
-MetaOverlineColorAction::MetaOverlineColorAction( const Color& rColor, BOOL bSet ) :
+MetaOverlineColorAction::MetaOverlineColorAction( const Color& rColor, sal_Bool bSet ) :
MetaAction ( META_OVERLINECOLOR_ACTION ),
maColor ( rColor ),
mbSet ( bSet )
@@ -3331,7 +3331,7 @@ sal_Bool MetaOverlineColorAction::Compare( const MetaAction& rMetaAction ) const
void MetaOverlineColorAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
{
WRITE_BASE_COMPAT( rOStm, 1, pData );
- maColor.Write( rOStm, TRUE );
+ maColor.Write( rOStm, sal_True );
rOStm << mbSet;
}
@@ -3340,7 +3340,7 @@ void MetaOverlineColorAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
void MetaOverlineColorAction::Read( SvStream& rIStm, ImplMetaReadData* )
{
COMPAT( rIStm );
- maColor.Read( rIStm, TRUE );
+ maColor.Read( rIStm, sal_True );
rIStm >> mbSet;
}
@@ -3384,14 +3384,14 @@ sal_Bool MetaTextAlignAction::Compare( const MetaAction& rMetaAction ) const
void MetaTextAlignAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
{
WRITE_BASE_COMPAT( rOStm, 1, pData );
- rOStm << (UINT16) maAlign;
+ rOStm << (sal_uInt16) maAlign;
}
// ------------------------------------------------------------------------
void MetaTextAlignAction::Read( SvStream& rIStm, ImplMetaReadData* )
{
- UINT16 nTmp16;
+ sal_uInt16 nTmp16;
COMPAT( rIStm );
rIStm >> nTmp16; maAlign = (TextAlign) nTmp16;
@@ -3541,7 +3541,7 @@ IMPL_META_ACTION( Push, META_PUSH_ACTION )
// ------------------------------------------------------------------------
-MetaPushAction::MetaPushAction( USHORT nFlags ) :
+MetaPushAction::MetaPushAction( sal_uInt16 nFlags ) :
MetaAction ( META_PUSH_ACTION ),
mnFlags ( nFlags )
{
@@ -3660,14 +3660,14 @@ sal_Bool MetaRasterOpAction::Compare( const MetaAction& rMetaAction ) const
void MetaRasterOpAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
{
WRITE_BASE_COMPAT( rOStm, 1, pData );
- rOStm << (UINT16) meRasterOp;
+ rOStm << (sal_uInt16) meRasterOp;
}
// ------------------------------------------------------------------------
void MetaRasterOpAction::Read( SvStream& rIStm, ImplMetaReadData* )
{
- UINT16 nTmp16;
+ sal_uInt16 nTmp16;
COMPAT( rIStm );
rIStm >> nTmp16; meRasterOp = (RasterOp) nTmp16;
@@ -3679,7 +3679,7 @@ IMPL_META_ACTION( Transparent, META_TRANSPARENT_ACTION )
// ------------------------------------------------------------------------
-MetaTransparentAction::MetaTransparentAction( const PolyPolygon& rPolyPoly, USHORT nTransPercent ) :
+MetaTransparentAction::MetaTransparentAction( const PolyPolygon& rPolyPoly, sal_uInt16 nTransPercent ) :
MetaAction ( META_TRANSPARENT_ACTION ),
maPolyPoly ( rPolyPoly ),
mnTransPercent ( nTransPercent )
@@ -3713,7 +3713,7 @@ void MetaTransparentAction::Move( long nHorzMove, long nVertMove )
void MetaTransparentAction::Scale( double fScaleX, double fScaleY )
{
- for( USHORT i = 0, nCount = maPolyPoly.Count(); i < nCount; i++ )
+ for( sal_uInt16 i = 0, nCount = maPolyPoly.Count(); i < nCount; i++ )
ImplScalePoly( maPolyPoly[ i ], fScaleX, fScaleY );
}
@@ -3922,7 +3922,7 @@ IMPL_META_ACTION( RefPoint, META_REFPOINT_ACTION )
// ------------------------------------------------------------------------
-MetaRefPointAction::MetaRefPointAction( const Point& rRefPoint, BOOL bSet ) :
+MetaRefPointAction::MetaRefPointAction( const Point& rRefPoint, sal_Bool bSet ) :
MetaAction ( META_REFPOINT_ACTION ),
maRefPoint ( rRefPoint ),
mbSet ( bSet )
@@ -3993,7 +3993,7 @@ MetaCommentAction::MetaCommentAction( const MetaCommentAction& rAct ) :
// ------------------------------------------------------------------------
-MetaCommentAction::MetaCommentAction( const ByteString& rComment, sal_Int32 nValue, const BYTE* pData, sal_uInt32 nDataSize ) :
+MetaCommentAction::MetaCommentAction( const ByteString& rComment, sal_Int32 nValue, const sal_uInt8* pData, sal_uInt32 nDataSize ) :
MetaAction ( META_COMMENT_ACTION ),
maComment ( rComment ),
mnValue ( nValue )
@@ -4003,7 +4003,7 @@ MetaCommentAction::MetaCommentAction( const ByteString& rComment, sal_Int32 nVal
// ------------------------------------------------------------------------
-MetaCommentAction::MetaCommentAction( const BYTE* pData, sal_uInt32 nDataSize ) :
+MetaCommentAction::MetaCommentAction( const sal_uInt8* pData, sal_uInt32 nDataSize ) :
MetaAction ( META_COMMENT_ACTION ),
mnValue ( 0L )
{
@@ -4020,11 +4020,11 @@ MetaCommentAction::~MetaCommentAction()
// ------------------------------------------------------------------------
-void MetaCommentAction::ImplInitDynamicData( const BYTE* pData, sal_uInt32 nDataSize )
+void MetaCommentAction::ImplInitDynamicData( const sal_uInt8* pData, sal_uInt32 nDataSize )
{
if ( nDataSize && pData )
{
- mnDataSize = nDataSize, mpData = new BYTE[ mnDataSize ];
+ mnDataSize = nDataSize, mpData = new sal_uInt8[ mnDataSize ];
memcpy( mpData, pData, mnDataSize );
}
else
@@ -4083,7 +4083,7 @@ void MetaCommentAction::Move( long nXMove, long nYMove )
aDest << aFill;
}
delete[] mpData;
- ImplInitDynamicData( static_cast<const BYTE*>( aDest.GetData() ), aDest.Tell() );
+ ImplInitDynamicData( static_cast<const sal_uInt8*>( aDest.GetData() ), aDest.Tell() );
}
}
}
@@ -4125,7 +4125,7 @@ void MetaCommentAction::Scale( double fXScale, double fYScale )
aDest << aFill;
}
delete[] mpData;
- ImplInitDynamicData( static_cast<const BYTE*>( aDest.GetData() ), aDest.Tell() );
+ ImplInitDynamicData( static_cast<const sal_uInt8*>( aDest.GetData() ), aDest.Tell() );
}
}
}
@@ -4164,7 +4164,7 @@ void MetaCommentAction::Read( SvStream& rIStm, ImplMetaReadData* )
if( mnDataSize )
{
- mpData = new BYTE[ mnDataSize ];
+ mpData = new sal_uInt8[ mnDataSize ];
rIStm.Read( mpData, mnDataSize );
}
else
diff --git a/vcl/source/gdi/metric.cxx b/vcl/source/gdi/metric.cxx
index 325146b6be8a..e65ffb6d381a 100644
--- a/vcl/source/gdi/metric.cxx
+++ b/vcl/source/gdi/metric.cxx
@@ -122,15 +122,15 @@ FontInfo& FontInfo::operator=( const FontInfo& rInfo )
// -----------------------------------------------------------------------
-BOOL FontInfo::operator==( const FontInfo& rInfo ) const
+sal_Bool FontInfo::operator==( const FontInfo& rInfo ) const
{
if( !Font::operator==( rInfo ) )
- return FALSE;
+ return sal_False;
if( mpImplMetric == rInfo.mpImplMetric )
- return TRUE;
+ return sal_True;
if( *mpImplMetric == *rInfo.mpImplMetric )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -142,28 +142,28 @@ FontType FontInfo::GetType() const
// -----------------------------------------------------------------------
-BOOL FontInfo::IsDeviceFont() const
+sal_Bool FontInfo::IsDeviceFont() const
{
return mpImplMetric->IsDeviceFont();
}
// -----------------------------------------------------------------------
-BOOL FontInfo::SupportsLatin() const
+sal_Bool FontInfo::SupportsLatin() const
{
return mpImplMetric->SupportsLatin();
}
// -----------------------------------------------------------------------
-BOOL FontInfo::SupportsCJK() const
+sal_Bool FontInfo::SupportsCJK() const
{
return mpImplMetric->SupportsCJK();
}
// -----------------------------------------------------------------------
-BOOL FontInfo::SupportsCTL() const
+sal_Bool FontInfo::SupportsCTL() const
{
return mpImplMetric->SupportsCTL();
}
@@ -226,7 +226,7 @@ FontMetric& FontMetric::operator =( const FontMetric& rMetric )
// -----------------------------------------------------------------------
-BOOL FontMetric::operator==( const FontMetric& rMetric ) const
+sal_Bool FontMetric::operator==( const FontMetric& rMetric ) const
{
return FontInfo::operator==( rMetric );
}
@@ -235,7 +235,7 @@ BOOL FontMetric::operator==( const FontMetric& rMetric ) const
CmapResult::CmapResult( bool bSymbolic,
const sal_uInt32* pRangeCodes, int nRangeCount,
- const int* pStartGlyphs, const USHORT* pExtraGlyphIds )
+ const int* pStartGlyphs, const sal_uInt16* pExtraGlyphIds )
: mpRangeCodes( pRangeCodes)
, mpStartGlyphs( pStartGlyphs)
, mpGlyphIds( pExtraGlyphIds)
@@ -606,7 +606,7 @@ bool ParseCMAP( const unsigned char* pCmap, int nLength, CmapResult& rResult )
sal_uInt32* pCodePairs = NULL;
int* pStartGlyphs = NULL;
- typedef std::vector<USHORT> U16Vector;
+ typedef std::vector<sal_uInt16> U16Vector;
U16Vector aGlyphIdArray;
aGlyphIdArray.reserve( 0x1000 );
aGlyphIdArray.push_back( 0 );
@@ -644,7 +644,7 @@ bool ParseCMAP( const unsigned char* pCmap, int nLength, CmapResult& rResult )
const unsigned char* pGlyphIdPtr = pOffsetBase + 2*i + nRangeOffset;
for( sal_uInt32 c = cMinChar; c <= cMaxChar; ++c, pGlyphIdPtr+=2 ) {
const int nGlyphIndex = GetUShort( pGlyphIdPtr ) + nGlyphDelta;
- aGlyphIdArray.push_back( static_cast<USHORT>(nGlyphIndex) );
+ aGlyphIdArray.push_back( static_cast<sal_uInt16>(nGlyphIndex) );
}
}
}
@@ -793,11 +793,11 @@ bool ParseCMAP( const unsigned char* pCmap, int nLength, CmapResult& rResult )
// prepare the glyphid-array if needed
// TODO: merge ranges if they are close enough?
- USHORT* pGlyphIds = NULL;
+ sal_uInt16* pGlyphIds = NULL;
if( !aGlyphIdArray.empty())
{
- pGlyphIds = new USHORT[ aGlyphIdArray.size() ];
- USHORT* pOut = pGlyphIds;
+ pGlyphIds = new sal_uInt16[ aGlyphIdArray.size() ];
+ sal_uInt16* pOut = pGlyphIds;
U16Vector::const_iterator it = aGlyphIdArray.begin();
while( it != aGlyphIdArray.end() )
*(pOut++) = *(it++);
@@ -858,14 +858,14 @@ void FontCharMap::Reset( ImplFontCharMap* pNewMap )
// -----------------------------------------------------------------------
-BOOL FontCharMap::IsDefaultMap() const
+sal_Bool FontCharMap::IsDefaultMap() const
{
return mpImpl->IsDefaultMap();
}
// -----------------------------------------------------------------------
-BOOL FontCharMap::HasChar( sal_uInt32 cChar ) const
+sal_Bool FontCharMap::HasChar( sal_uInt32 cChar ) const
{
return mpImpl->HasChar( cChar );
}
diff --git a/vcl/source/gdi/octree.cxx b/vcl/source/gdi/octree.cxx
index 0660728fc8a5..f576e3993e05 100644
--- a/vcl/source/gdi/octree.cxx
+++ b/vcl/source/gdi/octree.cxx
@@ -36,18 +36,18 @@
// - pMask -
// ---------
-static BYTE pImplMask[8] = { 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01 };
+static sal_uInt8 pImplMask[8] = { 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01 };
// -------------
// - NodeCache -
// -------------
-ImpNodeCache::ImpNodeCache( const ULONG nInitSize ) :
+ImpNodeCache::ImpNodeCache( const sal_uIntPtr nInitSize ) :
pActNode( NULL )
{
- const ULONG nSize = nInitSize + 4;
+ const sal_uIntPtr nSize = nInitSize + 4;
- for( ULONG i = 0; i < nSize; i++ )
+ for( sal_uIntPtr i = 0; i < nSize; i++ )
{
OctreeNode* pNewNode = new NODE;
@@ -73,7 +73,7 @@ ImpNodeCache::~ImpNodeCache()
// - Octree -
// ----------
-Octree::Octree( ULONG nColors ) :
+Octree::Octree( sal_uIntPtr nColors ) :
nMax ( nColors ),
nLeafCount ( 0L ),
pTree ( NULL ),
@@ -85,7 +85,7 @@ Octree::Octree( ULONG nColors ) :
// ------------------------------------------------------------------------
-Octree::Octree( const BitmapReadAccess& rReadAcc, ULONG nColors ) :
+Octree::Octree( const BitmapReadAccess& rReadAcc, sal_uIntPtr nColors ) :
nMax ( nColors ),
nLeafCount ( 0L ),
pTree ( NULL ),
@@ -166,7 +166,7 @@ void Octree::ImplCreateOctree()
void Octree::ImplDeleteOctree( PPNODE ppNode )
{
- for ( ULONG i = 0UL; i < 8UL; i++ )
+ for ( sal_uIntPtr i = 0UL; i < 8UL; i++ )
{
if ( (*ppNode)->pChild[ i ] )
ImplDeleteOctree( &(*ppNode)->pChild[ i ] );
@@ -204,9 +204,9 @@ void Octree::ImplAdd( PPNODE ppNode )
}
else
{
- const ULONG nShift = 7 - nLevel;
- const BYTE cMask = pImplMask[ nLevel ];
- const ULONG nIndex = ( ( ( pColor->GetRed() & cMask ) >> nShift ) << 2 ) |
+ const sal_uIntPtr nShift = 7 - nLevel;
+ const sal_uInt8 cMask = pImplMask[ nLevel ];
+ const sal_uIntPtr nIndex = ( ( ( pColor->GetRed() & cMask ) >> nShift ) << 2 ) |
( ( ( pColor->GetGreen() & cMask ) >> nShift ) << 1 ) |
( ( pColor->GetBlue() & cMask ) >> nShift );
@@ -219,12 +219,12 @@ void Octree::ImplAdd( PPNODE ppNode )
void Octree::ImplReduce()
{
- ULONG i;
+ sal_uIntPtr i;
PNODE pNode;
- ULONG nRedSum = 0L;
- ULONG nGreenSum = 0L;
- ULONG nBlueSum = 0L;
- ULONG nChilds = 0L;
+ sal_uIntPtr nRedSum = 0L;
+ sal_uIntPtr nGreenSum = 0L;
+ sal_uIntPtr nBlueSum = 0L;
+ sal_uIntPtr nChilds = 0L;
for ( i = OCTREE_BITS - 1; i && !pReduce[i]; i-- ) {}
@@ -248,7 +248,7 @@ void Octree::ImplReduce()
}
}
- pNode->bLeaf = TRUE;
+ pNode->bLeaf = sal_True;
pNode->nRed = nRedSum;
pNode->nGreen = nGreenSum;
pNode->nBlue = nBlueSum;
@@ -262,11 +262,11 @@ void Octree::CreatePalette( PNODE pNode )
if( pNode->bLeaf )
{
pNode->nPalIndex = nPalIndex;
- aPal[ nPalIndex++ ] = BitmapColor( (BYTE) ( (double) pNode->nRed / pNode->nCount ),
- (BYTE) ( (double) pNode->nGreen / pNode->nCount ),
- (BYTE) ( (double) pNode->nBlue / pNode->nCount ) );
+ aPal[ nPalIndex++ ] = BitmapColor( (sal_uInt8) ( (double) pNode->nRed / pNode->nCount ),
+ (sal_uInt8) ( (double) pNode->nGreen / pNode->nCount ),
+ (sal_uInt8) ( (double) pNode->nBlue / pNode->nCount ) );
}
- else for( ULONG i = 0UL; i < 8UL; i++ )
+ else for( sal_uIntPtr i = 0UL; i < 8UL; i++ )
if( pNode->pChild[ i ] )
CreatePalette( pNode->pChild[ i ] );
@@ -280,9 +280,9 @@ void Octree::GetPalIndex( PNODE pNode )
nPalIndex = pNode->nPalIndex;
else
{
- const ULONG nShift = 7 - nLevel;
- const BYTE cMask = pImplMask[ nLevel++ ];
- const ULONG nIndex = ( ( ( pColor->GetRed() & cMask ) >> nShift ) << 2 ) |
+ const sal_uIntPtr nShift = 7 - nLevel;
+ const sal_uInt8 cMask = pImplMask[ nLevel++ ];
+ const sal_uIntPtr nIndex = ( ( ( pColor->GetRed() & cMask ) >> nShift ) << 2 ) |
( ( ( pColor->GetGreen() & cMask ) >> nShift ) << 1 ) |
( ( pColor->GetBlue() & cMask ) >> nShift );
@@ -297,27 +297,27 @@ void Octree::GetPalIndex( PNODE pNode )
InverseColorMap::InverseColorMap( const BitmapPalette& rPal ) :
nBits( 8 - OCTREE_BITS )
{
- ULONG* cdp;
- BYTE* crgbp;
- const ULONG nColorMax = 1 << OCTREE_BITS;
- const ULONG xsqr = 1 << ( nBits << 1 );
- const ULONG xsqr2 = xsqr << 1;
- const ULONG nColors = rPal.GetEntryCount();
+ sal_uIntPtr* cdp;
+ sal_uInt8* crgbp;
+ const sal_uIntPtr nColorMax = 1 << OCTREE_BITS;
+ const sal_uIntPtr xsqr = 1 << ( nBits << 1 );
+ const sal_uIntPtr xsqr2 = xsqr << 1;
+ const sal_uIntPtr nColors = rPal.GetEntryCount();
const long x = 1L << nBits;
const long x2 = x >> 1L;
- ULONG r, g, b;
+ sal_uIntPtr r, g, b;
long rxx, gxx, bxx;
long rdist, gdist, bdist;
long crinc, cginc, cbinc;
ImplCreateBuffers( nColorMax );
- for( ULONG nIndex = 0; nIndex < nColors; nIndex++ )
+ for( sal_uIntPtr nIndex = 0; nIndex < nColors; nIndex++ )
{
- const BitmapColor& rColor = rPal[ (USHORT) nIndex ];
- const BYTE cRed = rColor.GetRed();
- const BYTE cGreen = rColor.GetGreen();
- const BYTE cBlue = rColor.GetBlue();
+ const BitmapColor& rColor = rPal[ (sal_uInt16) nIndex ];
+ const sal_uInt8 cRed = rColor.GetRed();
+ const sal_uInt8 cGreen = rColor.GetGreen();
+ const sal_uInt8 cBlue = rColor.GetBlue();
rdist = cRed - x2;
gdist = cGreen - x2;
@@ -328,7 +328,7 @@ InverseColorMap::InverseColorMap( const BitmapPalette& rPal ) :
cginc = ( xsqr - ( cGreen << nBits ) ) << 1L;
cbinc = ( xsqr - ( cBlue << nBits ) ) << 1L;
- cdp = (ULONG*) pBuffer;
+ cdp = (sal_uIntPtr*) pBuffer;
crgbp = pMap;
for( r = 0, rxx = crinc; r < nColorMax; rdist += rxx, r++, rxx += xsqr2 )
@@ -339,7 +339,7 @@ InverseColorMap::InverseColorMap( const BitmapPalette& rPal ) :
if ( !nIndex || ( (long) *cdp ) > bdist )
{
*cdp = bdist;
- *crgbp = (BYTE) nIndex;
+ *crgbp = (sal_uInt8) nIndex;
}
}
}
@@ -356,14 +356,14 @@ InverseColorMap::~InverseColorMap()
// ------------------------------------------------------------------------
-void InverseColorMap::ImplCreateBuffers( const ULONG nMax )
+void InverseColorMap::ImplCreateBuffers( const sal_uIntPtr nMax )
{
- const ULONG nCount = nMax * nMax * nMax;
- const ULONG nSize = nCount * sizeof( ULONG );
+ const sal_uIntPtr nCount = nMax * nMax * nMax;
+ const sal_uIntPtr nSize = nCount * sizeof( sal_uIntPtr );
- pMap = (BYTE*) rtl_allocateMemory( nCount );
+ pMap = (sal_uInt8*) rtl_allocateMemory( nCount );
memset( pMap, 0x00, nCount );
- pBuffer = (BYTE*) rtl_allocateMemory( nSize );
+ pBuffer = (sal_uInt8*) rtl_allocateMemory( nSize );
memset( pBuffer, 0xff, nSize );
}
diff --git a/vcl/source/gdi/outdev.cxx b/vcl/source/gdi/outdev.cxx
index bb5e4e3ba36d..fb97eab78f97 100644
--- a/vcl/source/gdi/outdev.cxx
+++ b/vcl/source/gdi/outdev.cxx
@@ -122,9 +122,9 @@ struct ImplObjStack
Point* mpRefPoint;
TextAlign meTextAlign;
RasterOp meRasterOp;
- ULONG mnTextLayoutMode;
+ sal_uIntPtr mnTextLayoutMode;
LanguageType meTextLanguage;
- USHORT mnFlags;
+ sal_uInt16 mnFlags;
};
// -----------------------------------------------------------------------
@@ -228,11 +228,11 @@ bool OutputDevice::ImplSelectClipRegion( const Region& rRegion, SalGraphics* pGr
long nY;
long nWidth;
long nHeight;
- ULONG nRectCount;
+ sal_uIntPtr nRectCount;
ImplRegionInfo aInfo;
- BOOL bRegionRect;
- BOOL bClipRegion = TRUE;
- const BOOL bClipDeviceBounds( !pOutDev->GetPDFWriter()
+ sal_Bool bRegionRect;
+ sal_Bool bClipRegion = sal_True;
+ const sal_Bool bClipDeviceBounds( !pOutDev->GetPDFWriter()
&& pOutDev->GetOutDevType() != OUTDEV_PRINTER );
nRectCount = rRegion.GetRectCount();
@@ -267,7 +267,7 @@ bool OutputDevice::ImplSelectClipRegion( const Region& rRegion, SalGraphics* pGr
aTmpRect.GetHeight(),
pOutDev ) )
{
- bClipRegion = FALSE;
+ bClipRegion = sal_False;
}
}
else
@@ -278,7 +278,7 @@ bool OutputDevice::ImplSelectClipRegion( const Region& rRegion, SalGraphics* pGr
1, 1,
pOutDev ) )
{
- bClipRegion = FALSE;
+ bClipRegion = sal_False;
}
}
DBG_ASSERT( bClipRegion, "OutputDevice::ImplSelectClipRegion() - can't create region" );
@@ -293,7 +293,7 @@ bool OutputDevice::ImplSelectClipRegion( const Region& rRegion, SalGraphics* pGr
while ( bRegionRect )
{
if ( !pGraphics->UnionClipRegion( nX, nY, nWidth, nHeight, pOutDev ) )
- bClipRegion = FALSE;
+ bClipRegion = sal_False;
DBG_ASSERT( bClipRegion, "OutputDevice::ImplSelectClipRegion() - can't cerate region" );
bRegionRect = rRegion.ImplGetNextRect( aInfo, nX, nY, nWidth, nHeight );
}
@@ -319,7 +319,7 @@ Polygon ImplSubdivideBezier( const Polygon& rPoly )
PolyPolygon ImplSubdivideBezier( const PolyPolygon& rPolyPoly )
{
- USHORT i, nPolys = rPolyPoly.Count();
+ sal_uInt16 i, nPolys = rPolyPoly.Count();
PolyPolygon aPolyPoly( nPolys );
for( i=0; i<nPolys; ++i )
aPolyPoly.Insert( ImplSubdivideBezier( rPolyPoly.GetObject(i) ) );
@@ -330,7 +330,7 @@ PolyPolygon ImplSubdivideBezier( const PolyPolygon& rPolyPoly )
// =======================================================================
// #100127# Extracted from OutputDevice::DrawPolyPolygon()
-void OutputDevice::ImplDrawPolyPolygon( USHORT nPoly, const PolyPolygon& rPolyPoly )
+void OutputDevice::ImplDrawPolyPolygon( sal_uInt16 nPoly, const PolyPolygon& rPolyPoly )
{
// AW: This crashes on empty PolyPolygons, avoid that
if(!nPoly)
@@ -338,28 +338,28 @@ void OutputDevice::ImplDrawPolyPolygon( USHORT nPoly, const PolyPolygon& rPolyPo
sal_uInt32 aStackAry1[OUTDEV_POLYPOLY_STACKBUF];
PCONSTSALPOINT aStackAry2[OUTDEV_POLYPOLY_STACKBUF];
- BYTE* aStackAry3[OUTDEV_POLYPOLY_STACKBUF];
+ sal_uInt8* aStackAry3[OUTDEV_POLYPOLY_STACKBUF];
sal_uInt32* pPointAry;
PCONSTSALPOINT* pPointAryAry;
- const BYTE** pFlagAryAry;
- USHORT i = 0, j = 0, last = 0;
- BOOL bHaveBezier = sal_False;
+ const sal_uInt8** pFlagAryAry;
+ sal_uInt16 i = 0, j = 0, last = 0;
+ sal_Bool bHaveBezier = sal_False;
if ( nPoly > OUTDEV_POLYPOLY_STACKBUF )
{
pPointAry = new sal_uInt32[nPoly];
pPointAryAry = new PCONSTSALPOINT[nPoly];
- pFlagAryAry = new const BYTE*[nPoly];
+ pFlagAryAry = new const sal_uInt8*[nPoly];
}
else
{
pPointAry = aStackAry1;
pPointAryAry = aStackAry2;
- pFlagAryAry = (const BYTE**)aStackAry3;
+ pFlagAryAry = (const sal_uInt8**)aStackAry3;
}
do
{
const Polygon& rPoly = rPolyPoly.GetObject( i );
- USHORT nSize = rPoly.GetSize();
+ sal_uInt16 nSize = rPoly.GetSize();
if ( nSize )
{
pPointAry[j] = nSize;
@@ -463,33 +463,33 @@ OutputDevice::OutputDevice() :
mnTextLayoutMode = TEXT_LAYOUT_BIDI_RTL | TEXT_LAYOUT_TEXTORIGIN_LEFT;
meOutDevType = OUTDEV_DONTKNOW;
meOutDevViewType = OUTDEV_VIEWTYPE_DONTKNOW;
- mbMap = FALSE;
- mbMapIsDefault = TRUE;
- mbClipRegion = FALSE;
- mbBackground = FALSE;
- mbOutput = TRUE;
- mbDevOutput = FALSE;
- mbOutputClipped = FALSE;
+ mbMap = sal_False;
+ mbMapIsDefault = sal_True;
+ mbClipRegion = sal_False;
+ mbBackground = sal_False;
+ mbOutput = sal_True;
+ mbDevOutput = sal_False;
+ mbOutputClipped = sal_False;
maTextColor = Color( COL_BLACK );
maOverlineColor = Color( COL_TRANSPARENT );
meTextAlign = maFont.GetAlign();
meRasterOp = ROP_OVERPAINT;
mnAntialiasing = 0;
meTextLanguage = 0; // TODO: get default from configuration?
- mbLineColor = TRUE;
- mbFillColor = TRUE;
- mbInitLineColor = TRUE;
- mbInitFillColor = TRUE;
- mbInitFont = TRUE;
- mbInitTextColor = TRUE;
- mbInitClipRegion = TRUE;
- mbClipRegionSet = FALSE;
- mbKerning = FALSE;
- mbNewFont = TRUE;
- mbTextLines = FALSE;
- mbTextSpecial = FALSE;
- mbRefPoint = FALSE;
- mbEnableRTL = FALSE; // mirroring must be explicitly allowed (typically for windows only)
+ mbLineColor = sal_True;
+ mbFillColor = sal_True;
+ mbInitLineColor = sal_True;
+ mbInitFillColor = sal_True;
+ mbInitFont = sal_True;
+ mbInitTextColor = sal_True;
+ mbInitClipRegion = sal_True;
+ mbClipRegionSet = sal_False;
+ mbKerning = sal_False;
+ mbNewFont = sal_True;
+ mbTextLines = sal_False;
+ mbTextSpecial = sal_False;
+ mbRefPoint = sal_False;
+ mbEnableRTL = sal_False; // mirroring must be explicitly allowed (typically for windows only)
// struct ImplMapRes
maMapRes.mnMapOfsX = 0;
@@ -513,7 +513,7 @@ OutputDevice::~OutputDevice()
if ( GetUnoGraphicsList() )
{
- UnoWrapperBase* pWrapper = Application::GetUnoWrapper( FALSE );
+ UnoWrapperBase* pWrapper = Application::GetUnoWrapper( sal_False );
if ( pWrapper )
pWrapper->ReleaseAllGraphics( this );
delete mpUnoGraphicsList;
@@ -580,7 +580,7 @@ bool OutputDevice::supportsOperation( OutDevSupportType eType ) const
// -----------------------------------------------------------------------
-void OutputDevice::EnableRTL( BOOL bEnable )
+void OutputDevice::EnableRTL( sal_Bool bEnable )
{
mbEnableRTL = (bEnable != 0);
if( meOutDevType == OUTDEV_VIRDEV )
@@ -605,11 +605,11 @@ void OutputDevice::EnableRTL( BOOL bEnable )
mpAlphaVDev->EnableRTL( bEnable );
}
-BOOL OutputDevice::ImplHasMirroredGraphics()
+sal_Bool OutputDevice::ImplHasMirroredGraphics()
{
// HOTFIX for #i55719#
if( meOutDevType == OUTDEV_PRINTER )
- return FALSE;
+ return sal_False;
return ( ImplGetGraphics() && (mpGraphics->GetLayout() & SAL_LAYOUT_BIDI_RTL) );
}
@@ -638,7 +638,7 @@ void OutputDevice::ImplReMirror( Region &rRegion ) const
long nWidth;
long nHeight;
ImplRegionInfo aInfo;
- BOOL bRegionRect;
+ sal_Bool bRegionRect;
Region aMirroredRegion;
bRegionRect = rRegion.ImplGetFirstRect( aInfo, nX, nY, nWidth, nHeight );
@@ -660,13 +660,13 @@ int OutputDevice::ImplGetGraphics() const
DBG_TESTSOLARMUTEX();
if ( mpGraphics )
- return TRUE;
+ return sal_True;
- mbInitLineColor = TRUE;
- mbInitFillColor = TRUE;
- mbInitFont = TRUE;
- mbInitTextColor = TRUE;
- mbInitClipRegion = TRUE;
+ mbInitLineColor = sal_True;
+ mbInitFillColor = sal_True;
+ mbInitFont = sal_True;
+ mbInitTextColor = sal_True;
+ mbInitClipRegion = sal_True;
ImplSVData* pSVData = ImplGetSVData();
if ( meOutDevType == OUTDEV_WINDOW )
@@ -690,7 +690,7 @@ int OutputDevice::ImplGetGraphics() const
{
// steal the wingraphics from the other outdev
mpGraphics = pReleaseOutDev->mpGraphics;
- pReleaseOutDev->ImplReleaseGraphics( FALSE );
+ pReleaseOutDev->ImplReleaseGraphics( sal_False );
}
else
{
@@ -800,15 +800,15 @@ int OutputDevice::ImplGetGraphics() const
{
mpGraphics->SetXORMode( (ROP_INVERT == meRasterOp) || (ROP_XOR == meRasterOp), ROP_INVERT == meRasterOp );
mpGraphics->setAntiAliasB2DDraw(mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW);
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-void OutputDevice::ImplReleaseGraphics( BOOL bRelease )
+void OutputDevice::ImplReleaseGraphics( sal_Bool bRelease )
{
DBG_TESTSOLARMUTEX();
@@ -964,7 +964,7 @@ void OutputDevice::ImplInvalidateViewTransform()
// -----------------------------------------------------------------------
-BOOL OutputDevice::ImplIsRecordLayout() const
+sal_Bool OutputDevice::ImplIsRecordLayout() const
{
return mpOutDevData && mpOutDevData->mpRecordLayout;
}
@@ -1005,7 +1005,7 @@ void OutputDevice::ImplInitLineColor()
else
mpGraphics->SetLineColor();
- mbInitLineColor = FALSE;
+ mbInitLineColor = sal_False;
}
// -----------------------------------------------------------------------
@@ -1028,7 +1028,7 @@ void OutputDevice::ImplInitFillColor()
else
mpGraphics->SetFillColor();
- mbInitFillColor = FALSE;
+ mbInitFillColor = sal_False;
}
// -----------------------------------------------------------------------
@@ -1058,43 +1058,43 @@ void OutputDevice::ImplInitClipRegion()
if ( mbClipRegion )
aRegion.Intersect( ImplPixelToDevicePixel( maRegion ) );
if ( aRegion.IsEmpty() )
- mbOutputClipped = TRUE;
+ mbOutputClipped = sal_True;
else
{
- mbOutputClipped = FALSE;
+ mbOutputClipped = sal_False;
ImplSelectClipRegion( aRegion );
}
- mbClipRegionSet = TRUE;
+ mbClipRegionSet = sal_True;
}
else
{
if ( mbClipRegion )
{
if ( maRegion.IsEmpty() )
- mbOutputClipped = TRUE;
+ mbOutputClipped = sal_True;
else
{
- mbOutputClipped = FALSE;
+ mbOutputClipped = sal_False;
ImplSelectClipRegion(
// #102532# Respect output offset also for clip region
ImplPixelToDevicePixel( maRegion ) );
}
- mbClipRegionSet = TRUE;
+ mbClipRegionSet = sal_True;
}
else
{
if ( mbClipRegionSet )
{
mpGraphics->ResetClipRegion();
- mbClipRegionSet = FALSE;
+ mbClipRegionSet = sal_False;
}
- mbOutputClipped = FALSE;
+ mbOutputClipped = sal_False;
}
}
- mbInitClipRegion = FALSE;
+ mbInitClipRegion = sal_False;
}
// -----------------------------------------------------------------------
@@ -1108,15 +1108,15 @@ void OutputDevice::ImplSetClipRegion( const Region* pRegion )
if ( mbClipRegion )
{
maRegion = Region( REGION_NULL );
- mbClipRegion = FALSE;
- mbInitClipRegion = TRUE;
+ mbClipRegion = sal_False;
+ mbInitClipRegion = sal_True;
}
}
else
{
maRegion = *pRegion;
- mbClipRegion = TRUE;
- mbInitClipRegion = TRUE;
+ mbClipRegion = sal_True;
+ mbInitClipRegion = sal_True;
}
}
@@ -1495,11 +1495,11 @@ void OutputDevice::ImplSetTriangleClipRegion( const PolyPolygon &rPolyPolygon )
// which prevents reliable undoing of the "triangle thingy" parameter
// so the toolspoly -> b2dpoly conversion has to be done manually
::basegfx::B2DPolyPolygon aB2DPolyPolygon;
- for( USHORT nPolyIdx = 0; nPolyIdx < rPolyPolygon.Count(); ++nPolyIdx )
+ for( sal_uInt16 nPolyIdx = 0; nPolyIdx < rPolyPolygon.Count(); ++nPolyIdx )
{
const Polygon& rPolygon = rPolyPolygon[ nPolyIdx ];
::basegfx::B2DPolygon aB2DPoly;
- for( USHORT nPointIdx = 0; nPointIdx < rPolygon.GetSize(); ++nPointIdx )
+ for( sal_uInt16 nPointIdx = 0; nPointIdx < rPolygon.GetSize(); ++nPointIdx )
{
const Point& rPoint = rPolygon[ nPointIdx ];
const ::basegfx::B2DPoint aB2DPoint( rPoint.X(), rPoint.Y() );
@@ -1536,10 +1536,10 @@ void OutputDevice::ImplSetTriangleClipRegion( const PolyPolygon &rPolyPolygon )
mpGraphics->EndSetClipRegion();
// and mark the clip status as ready
- mbOutputClipped = FALSE;
- mbClipRegion = TRUE;
- mbClipRegionSet = TRUE;
- mbInitClipRegion = FALSE;
+ mbOutputClipped = sal_False;
+ mbClipRegion = sal_True;
+ mbClipRegionSet = sal_True;
+ mbInitClipRegion = sal_False;
return;
}
@@ -1556,13 +1556,13 @@ void OutputDevice::ImplSetTriangleClipRegion( const PolyPolygon &rPolyPolygon )
sal_Int32 maxy = SAL_MIN_INT32;
sal_Int32 miny = SAL_MAX_INT32;
sal_uInt32 dwNumTriangles = 0;
- for(USHORT i=0; i<rPolyPolygon.Count(); ++i)
+ for(sal_uInt16 i=0; i<rPolyPolygon.Count(); ++i)
{
const Polygon &rPoly = rPolyPolygon.GetObject(i);
const sal_Int32 dwNumVertices = rPoly.GetSize();
if(!(dwNumVertices % 3))
{
- for(USHORT j=0; j<rPoly.GetSize(); ++j)
+ for(sal_uInt16 j=0; j<rPoly.GetSize(); ++j)
{
const Point &p = rPoly.GetPoint(j);
if(p.Y() < miny)
@@ -1580,20 +1580,20 @@ void OutputDevice::ImplSetTriangleClipRegion( const PolyPolygon &rPolyPolygon )
// indicates that no output needs to be produced
// since the clipping region did not provide any
// visible areas.
- mbOutputClipped = TRUE;
+ mbOutputClipped = sal_True;
// indicates that a clip region has been
// presented to the output device.
- mbClipRegion = TRUE;
+ mbClipRegion = sal_True;
// indicates that the set clipping region
// has been processed.
- mbClipRegionSet = TRUE;
+ mbClipRegionSet = sal_True;
// under 'normal' circumstances a new clipping region
// needs to be processed by ImplInitClipRegion(),
// which we need to circumvent.
- mbInitClipRegion = FALSE;
+ mbInitClipRegion = sal_False;
return;
}
@@ -1606,13 +1606,13 @@ void OutputDevice::ImplSetTriangleClipRegion( const PolyPolygon &rPolyPolygon )
// the polypolygon has already been triangulated since we don't
// want to use the basegfx-types here. this could be leveraged
// after the tools-types had been removed.
- for(USHORT i=0; i<rPolyPolygon.Count(); ++i)
+ for(sal_uInt16 i=0; i<rPolyPolygon.Count(); ++i)
{
const Polygon &rPoly = rPolyPolygon.GetObject(i);
- const USHORT dwNumVertices = rPoly.GetSize();
+ const sal_uInt16 dwNumVertices = rPoly.GetSize();
if(!(dwNumVertices % 3))
{
- for(USHORT j=0; j<dwNumVertices; j+=3)
+ for(sal_uInt16 j=0; j<dwNumVertices; j+=3)
{
const Point &p0 = rPoly.GetPoint(j+0);
const Point &p1 = rPoly.GetPoint(j+1);
@@ -1795,16 +1795,16 @@ void OutputDevice::ImplSetTriangleClipRegion( const PolyPolygon &rPolyPolygon )
// indicates that a clip region has been
// presented to the output device.
- mbClipRegion = TRUE;
+ mbClipRegion = sal_True;
// indicates that the set clipping region
// has been processed.
- mbClipRegionSet = TRUE;
+ mbClipRegionSet = sal_True;
// under 'normal' circumstances a new clipping region
// needs to be processed by ImplInitClipRegion(),
// which we need to circumvent.
- mbInitClipRegion = FALSE;
+ mbInitClipRegion = sal_False;
}
// -----------------------------------------------------------------------
@@ -1815,7 +1815,7 @@ void OutputDevice::SetClipRegion()
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
if ( mpMetaFile )
- mpMetaFile->AddAction( new MetaClipRegionAction( Region(), FALSE ) );
+ mpMetaFile->AddAction( new MetaClipRegionAction( Region(), sal_False ) );
ImplSetClipRegion( NULL );
@@ -1832,7 +1832,7 @@ void OutputDevice::SetClipRegion( const Region& rRegion )
DBG_CHKOBJ( &rRegion, Region, ImplDbgTestRegion );
if ( mpMetaFile )
- mpMetaFile->AddAction( new MetaClipRegionAction( rRegion, TRUE ) );
+ mpMetaFile->AddAction( new MetaClipRegionAction( rRegion, sal_True ) );
if ( rRegion.GetType() == REGION_NULL )
ImplSetClipRegion( NULL );
@@ -1874,7 +1874,7 @@ void OutputDevice::SetTriangleClipRegion( const PolyPolygon &rPolyPolygon )
// feed region to metafile
if ( mpMetaFile )
- mpMetaFile->AddAction( new MetaClipRegionAction( maRegion, TRUE ) );
+ mpMetaFile->AddAction( new MetaClipRegionAction( maRegion, sal_True ) );
ImplSetTriangleClipRegion( rPolyPolygon );
@@ -1928,7 +1928,7 @@ void OutputDevice::MoveClipRegion( long nHorzMove, long nVertMove )
maRegion.Move( ImplLogicWidthToDevicePixel( nHorzMove ),
ImplLogicHeightToDevicePixel( nVertMove ) );
- mbInitClipRegion = TRUE;
+ mbInitClipRegion = sal_True;
}
if( mpAlphaVDev )
@@ -1947,8 +1947,8 @@ void OutputDevice::IntersectClipRegion( const Rectangle& rRect )
Rectangle aRect = LogicToPixel( rRect );
maRegion.Intersect( aRect );
- mbClipRegion = TRUE;
- mbInitClipRegion = TRUE;
+ mbClipRegion = sal_True;
+ mbInitClipRegion = sal_True;
if( mpAlphaVDev )
mpAlphaVDev->IntersectClipRegion( rRect );
@@ -1971,8 +1971,8 @@ void OutputDevice::IntersectClipRegion( const Region& rRegion )
Region aRegion = LogicToPixel( rRegion );
maRegion.Intersect( aRegion );
- mbClipRegion = TRUE;
- mbInitClipRegion = TRUE;
+ mbClipRegion = sal_True;
+ mbInitClipRegion = sal_True;
}
if( mpAlphaVDev )
@@ -1981,7 +1981,7 @@ void OutputDevice::IntersectClipRegion( const Region& rRegion )
// -----------------------------------------------------------------------
-void OutputDevice::SetDrawMode( ULONG nDrawMode )
+void OutputDevice::SetDrawMode( sal_uIntPtr nDrawMode )
{
DBG_TRACE1( "OutputDevice::SetDrawMode( %lx )", nDrawMode );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
@@ -2005,7 +2005,7 @@ void OutputDevice::SetRasterOp( RasterOp eRasterOp )
if ( meRasterOp != eRasterOp )
{
meRasterOp = eRasterOp;
- mbInitLineColor = mbInitFillColor = TRUE;
+ mbInitLineColor = mbInitFillColor = sal_True;
if( mpGraphics || ImplGetGraphics() )
mpGraphics->SetXORMode( (ROP_INVERT == meRasterOp) || (ROP_XOR == meRasterOp), ROP_INVERT == meRasterOp );
@@ -2023,12 +2023,12 @@ void OutputDevice::SetLineColor()
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
if ( mpMetaFile )
- mpMetaFile->AddAction( new MetaLineColorAction( Color(), FALSE ) );
+ mpMetaFile->AddAction( new MetaLineColorAction( Color(), sal_False ) );
if ( mbLineColor )
{
- mbInitLineColor = TRUE;
- mbLineColor = FALSE;
+ mbInitLineColor = sal_True;
+ mbLineColor = sal_False;
maLineColor = Color( COL_TRANSPARENT );
}
@@ -2061,7 +2061,7 @@ void OutputDevice::SetLineColor( const Color& rColor )
}
else if( mnDrawMode & DRAWMODE_GRAYLINE )
{
- const UINT8 cLum = aColor.GetLuminance();
+ const sal_uInt8 cLum = aColor.GetLuminance();
aColor = Color( cLum, cLum, cLum );
}
else if( mnDrawMode & DRAWMODE_SETTINGSLINE )
@@ -2079,14 +2079,14 @@ void OutputDevice::SetLineColor( const Color& rColor )
}
if( mpMetaFile )
- mpMetaFile->AddAction( new MetaLineColorAction( aColor, TRUE ) );
+ mpMetaFile->AddAction( new MetaLineColorAction( aColor, sal_True ) );
if( ImplIsColorTransparent( aColor ) )
{
if ( mbLineColor )
{
- mbInitLineColor = TRUE;
- mbLineColor = FALSE;
+ mbInitLineColor = sal_True;
+ mbLineColor = sal_False;
maLineColor = Color( COL_TRANSPARENT );
}
}
@@ -2094,8 +2094,8 @@ void OutputDevice::SetLineColor( const Color& rColor )
{
if( maLineColor != aColor )
{
- mbInitLineColor = TRUE;
- mbLineColor = TRUE;
+ mbInitLineColor = sal_True;
+ mbLineColor = sal_True;
maLineColor = aColor;
}
}
@@ -2112,12 +2112,12 @@ void OutputDevice::SetFillColor()
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
if ( mpMetaFile )
- mpMetaFile->AddAction( new MetaFillColorAction( Color(), FALSE ) );
+ mpMetaFile->AddAction( new MetaFillColorAction( Color(), sal_False ) );
if ( mbFillColor )
{
- mbInitFillColor = TRUE;
- mbFillColor = FALSE;
+ mbInitFillColor = sal_True;
+ mbFillColor = sal_False;
maFillColor = Color( COL_TRANSPARENT );
}
@@ -2150,7 +2150,7 @@ void OutputDevice::SetFillColor( const Color& rColor )
}
else if( mnDrawMode & DRAWMODE_GRAYFILL )
{
- const UINT8 cLum = aColor.GetLuminance();
+ const sal_uInt8 cLum = aColor.GetLuminance();
aColor = Color( cLum, cLum, cLum );
}
else if( mnDrawMode & DRAWMODE_NOFILL )
@@ -2172,14 +2172,14 @@ void OutputDevice::SetFillColor( const Color& rColor )
}
if ( mpMetaFile )
- mpMetaFile->AddAction( new MetaFillColorAction( aColor, TRUE ) );
+ mpMetaFile->AddAction( new MetaFillColorAction( aColor, sal_True ) );
if ( ImplIsColorTransparent( aColor ) )
{
if ( mbFillColor )
{
- mbInitFillColor = TRUE;
- mbFillColor = FALSE;
+ mbInitFillColor = sal_True;
+ mbFillColor = sal_False;
maFillColor = Color( COL_TRANSPARENT );
}
}
@@ -2187,8 +2187,8 @@ void OutputDevice::SetFillColor( const Color& rColor )
{
if ( maFillColor != aColor )
{
- mbInitFillColor = TRUE;
- mbFillColor = TRUE;
+ mbInitFillColor = sal_True;
+ mbFillColor = sal_True;
maFillColor = aColor;
}
}
@@ -2205,7 +2205,7 @@ void OutputDevice::SetBackground()
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
maBackground = Wallpaper();
- mbBackground = FALSE;
+ mbBackground = sal_False;
if( mpAlphaVDev )
mpAlphaVDev->SetBackground();
@@ -2221,9 +2221,9 @@ void OutputDevice::SetBackground( const Wallpaper& rBackground )
maBackground = rBackground;
if( rBackground.GetStyle() == WALLPAPER_NULL )
- mbBackground = FALSE;
+ mbBackground = sal_False;
else
- mbBackground = TRUE;
+ mbBackground = sal_True;
if( mpAlphaVDev )
mpAlphaVDev->SetBackground( rBackground );
@@ -2237,9 +2237,9 @@ void OutputDevice::SetRefPoint()
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
if ( mpMetaFile )
- mpMetaFile->AddAction( new MetaRefPointAction( Point(), FALSE ) );
+ mpMetaFile->AddAction( new MetaRefPointAction( Point(), sal_False ) );
- mbRefPoint = FALSE;
+ mbRefPoint = sal_False;
maRefPoint.X() = maRefPoint.Y() = 0L;
if( mpAlphaVDev )
@@ -2254,9 +2254,9 @@ void OutputDevice::SetRefPoint( const Point& rRefPoint )
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
if ( mpMetaFile )
- mpMetaFile->AddAction( new MetaRefPointAction( rRefPoint, TRUE ) );
+ mpMetaFile->AddAction( new MetaRefPointAction( rRefPoint, sal_True ) );
- mbRefPoint = TRUE;
+ mbRefPoint = sal_True;
maRefPoint = rRefPoint;
if( mpAlphaVDev )
@@ -2567,7 +2567,7 @@ void OutputDevice::DrawPolyLine( const Polygon& rPoly )
if( mpMetaFile )
mpMetaFile->AddAction( new MetaPolyLineAction( rPoly ) );
- USHORT nPoints = rPoly.GetSize();
+ sal_uInt16 nPoints = rPoly.GetSize();
if ( !IsDeviceOutputNecessary() || !mbLineColor || (nPoints < 2) || ImplIsRecordLayout() )
return;
@@ -2617,7 +2617,7 @@ void OutputDevice::DrawPolyLine( const Polygon& rPoly )
// #100127# Forward beziers to sal, if any
if( aPoly.HasFlags() )
{
- const BYTE* pFlgAry = aPoly.GetConstFlagAry();
+ const sal_uInt8* pFlgAry = aPoly.GetConstFlagAry();
if( !mpGraphics->DrawPolyLineBezier( nPoints, pPtAry, pFlgAry, this ) )
{
aPoly = ImplSubdivideBezier(aPoly);
@@ -2665,7 +2665,7 @@ void OutputDevice::DrawPolyLine( const Polygon& rPoly, const LineInfo& rLineInfo
void OutputDevice::ImpDrawPolyLineWithLineInfo(const Polygon& rPoly, const LineInfo& rLineInfo)
{
- USHORT nPoints(rPoly.GetSize());
+ sal_uInt16 nPoints(rPoly.GetSize());
if ( !IsDeviceOutputNecessary() || !mbLineColor || ( nPoints < 2 ) || ( LINE_NONE == rLineInfo.GetStyle() ) || ImplIsRecordLayout() )
return;
@@ -2737,7 +2737,7 @@ void OutputDevice::DrawPolygon( const Polygon& rPoly )
if( mpMetaFile )
mpMetaFile->AddAction( new MetaPolygonAction( rPoly ) );
- USHORT nPoints = rPoly.GetSize();
+ sal_uInt16 nPoints = rPoly.GetSize();
if ( !IsDeviceOutputNecessary() || (!mbLineColor && !mbFillColor) || (nPoints < 2) || ImplIsRecordLayout() )
return;
@@ -2800,7 +2800,7 @@ void OutputDevice::DrawPolygon( const Polygon& rPoly )
// #100127# Forward beziers to sal, if any
if( aPoly.HasFlags() )
{
- const BYTE* pFlgAry = aPoly.GetConstFlagAry();
+ const sal_uInt8* pFlgAry = aPoly.GetConstFlagAry();
if( !mpGraphics->DrawPolygonBezier( nPoints, pPtAry, pFlgAry, this ) )
{
aPoly = ImplSubdivideBezier(aPoly);
@@ -2827,7 +2827,7 @@ void OutputDevice::DrawPolyPolygon( const PolyPolygon& rPolyPoly )
if( mpMetaFile )
mpMetaFile->AddAction( new MetaPolyPolygonAction( rPolyPoly ) );
- USHORT nPoly = rPolyPoly.Count();
+ sal_uInt16 nPoly = rPolyPoly.Count();
if ( !IsDeviceOutputNecessary() || (!mbLineColor && !mbFillColor) || !nPoly || ImplIsRecordLayout() )
return;
@@ -3159,7 +3159,7 @@ void OutputDevice::DrawPolyLine(
// -----------------------------------------------------------------------
-void OutputDevice::Push( USHORT nFlags )
+void OutputDevice::Push( sal_uInt16 nFlags )
{
DBG_TRACE( "OutputDevice::Push()" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
@@ -3349,7 +3349,7 @@ void OutputDevice::SetConnectMetaFile( GDIMetaFile* pMtf )
// -----------------------------------------------------------------------
-void OutputDevice::EnableOutput( BOOL bEnable )
+void OutputDevice::EnableOutput( sal_Bool bEnable )
{
mbOutput = (bEnable != 0);
@@ -3369,7 +3369,7 @@ void OutputDevice::SetSettings( const AllSettings& rSettings )
// -----------------------------------------------------------------------
-USHORT OutputDevice::GetBitCount() const
+sal_uInt16 OutputDevice::GetBitCount() const
{
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
@@ -3383,12 +3383,12 @@ USHORT OutputDevice::GetBitCount() const
return 0;
}
- return (USHORT)mpGraphics->GetBitCount();
+ return (sal_uInt16)mpGraphics->GetBitCount();
}
// -----------------------------------------------------------------------
-USHORT OutputDevice::GetAlphaBitCount() const
+sal_uInt16 OutputDevice::GetAlphaBitCount() const
{
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
@@ -3403,17 +3403,17 @@ USHORT OutputDevice::GetAlphaBitCount() const
// -----------------------------------------------------------------------
-ULONG OutputDevice::GetColorCount() const
+sal_uIntPtr OutputDevice::GetColorCount() const
{
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
- const USHORT nBitCount = GetBitCount();
- return( ( nBitCount > 31 ) ? ULONG_MAX : ( ( (ULONG) 1 ) << nBitCount) );
+ const sal_uInt16 nBitCount = GetBitCount();
+ return( ( nBitCount > 31 ) ? ULONG_MAX : ( ( (sal_uIntPtr) 1 ) << nBitCount) );
}
// -----------------------------------------------------------------------
-BOOL OutputDevice::HasAlpha()
+sal_Bool OutputDevice::HasAlpha()
{
return mpAlphaVDev != NULL;
}
diff --git a/vcl/source/gdi/outdev2.cxx b/vcl/source/gdi/outdev2.cxx
index 3826a3dbc7b0..c6ec8ede4fa0 100644
--- a/vcl/source/gdi/outdev2.cxx
+++ b/vcl/source/gdi/outdev2.cxx
@@ -87,17 +87,17 @@ DBG_NAMEEX( OutputDevice )
// - externals -
// -------------
-extern ULONG nVCLRLut[ 6 ];
-extern ULONG nVCLGLut[ 6 ];
-extern ULONG nVCLBLut[ 6 ];
-extern ULONG nVCLDitherLut[ 256 ];
-extern ULONG nVCLLut[ 256 ];
+extern sal_uIntPtr nVCLRLut[ 6 ];
+extern sal_uIntPtr nVCLGLut[ 6 ];
+extern sal_uIntPtr nVCLBLut[ 6 ];
+extern sal_uIntPtr nVCLDitherLut[ 256 ];
+extern sal_uIntPtr nVCLLut[ 256 ];
// =======================================================================
-ULONG ImplAdjustTwoRect( TwoRect& rTwoRect, const Size& rSizePix )
+sal_uIntPtr ImplAdjustTwoRect( TwoRect& rTwoRect, const Size& rSizePix )
{
- ULONG nMirrFlags = 0;
+ sal_uIntPtr nMirrFlags = 0;
if ( rTwoRect.mnDestWidth < 0 )
{
@@ -389,7 +389,7 @@ void OutputDevice::DrawOutDev( const Point& rDestPt, const Size& rDestSize,
void OutputDevice::CopyArea( const Point& rDestPt,
const Point& rSrcPt, const Size& rSrcSize,
- USHORT nFlags )
+ sal_uInt16 nFlags )
{
DBG_TRACE( "OutputDevice::CopyArea()" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
@@ -434,7 +434,7 @@ void OutputDevice::CopyArea( const Point& rDestPt,
((Window*)this)->ImplMoveAllInvalidateRegions( aSrcRect,
aPosAry.mnDestX-aPosAry.mnSrcX,
aPosAry.mnDestY-aPosAry.mnSrcY,
- FALSE );
+ sal_False );
mpGraphics->CopyArea( aPosAry.mnDestX, aPosAry.mnDestY,
aPosAry.mnSrcX, aPosAry.mnSrcY,
@@ -464,10 +464,10 @@ void OutputDevice::ImplDrawFrameDev( const Point& rPt, const Point& rDevPt, cons
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
GDIMetaFile* pOldMetaFile = mpMetaFile;
- BOOL bOldMap = mbMap;
+ sal_Bool bOldMap = mbMap;
RasterOp eOldROP = GetRasterOp();
mpMetaFile = NULL;
- mbMap = FALSE;
+ mbMap = sal_False;
SetRasterOp( ROP_OVERPAINT );
if ( !IsDeviceOutputNecessary() )
@@ -497,7 +497,7 @@ void OutputDevice::ImplDrawFrameDev( const Point& rPt, const Point& rDevPt, cons
ImplDrawOutDevDirect( &rOutDev, &aPosAry );
// Dafuer sorgen, das ClipRegion neu berechnet und gesetzt wird
- mbInitClipRegion = TRUE;
+ mbInitClipRegion = sal_True;
SetRasterOp( eOldROP );
mbMap = bOldMap;
@@ -511,8 +511,8 @@ void OutputDevice::ImplGetFrameDev( const Point& rPt, const Point& rDevPt, const
{
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
- BOOL bOldMap = mbMap;
- mbMap = FALSE;
+ sal_Bool bOldMap = mbMap;
+ mbMap = sal_False;
rDev.DrawOutDev( rDevPt, rDevSize, rPt, rDevSize, *this );
mbMap = bOldMap;
}
@@ -578,7 +578,7 @@ void OutputDevice::DrawBitmap( const Point& rDestPt, const Size& rDestSize,
void OutputDevice::ImplDrawBitmap( const Point& rDestPt, const Size& rDestSize,
const Point& rSrcPtPixel, const Size& rSrcSizePixel,
- const Bitmap& rBitmap, const ULONG nAction )
+ const Bitmap& rBitmap, const sal_uIntPtr nAction )
{
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
@@ -596,7 +596,7 @@ void OutputDevice::ImplDrawBitmap( const Point& rDestPt, const Size& rDestSize,
{
if ( mnDrawMode & ( DRAWMODE_BLACKBITMAP | DRAWMODE_WHITEBITMAP ) )
{
- BYTE cCmpVal;
+ sal_uInt8 cCmpVal;
if ( mnDrawMode & DRAWMODE_BLACKBITMAP )
cCmpVal = ( mnDrawMode & DRAWMODE_GHOSTEDBITMAP ) ? 0x80 : 0;
@@ -655,7 +655,7 @@ void OutputDevice::ImplDrawBitmap( const Point& rDestPt, const Size& rDestSize,
aPosAry.mnDestWidth = ImplLogicWidthToDevicePixel( rDestSize.Width() );
aPosAry.mnDestHeight = ImplLogicHeightToDevicePixel( rDestSize.Height() );
- const ULONG nMirrFlags = ImplAdjustTwoRect( aPosAry, aBmp.GetSizePixel() );
+ const sal_uIntPtr nMirrFlags = ImplAdjustTwoRect( aPosAry, aBmp.GetSizePixel() );
if ( aPosAry.mnSrcWidth && aPosAry.mnSrcHeight && aPosAry.mnDestWidth && aPosAry.mnDestHeight )
{
@@ -789,7 +789,7 @@ void OutputDevice::DrawBitmapEx( const Point& rDestPt, const Size& rDestSize,
void OutputDevice::ImplDrawBitmapEx( const Point& rDestPt, const Size& rDestSize,
const Point& rSrcPtPixel, const Size& rSrcSizePixel,
- const BitmapEx& rBitmapEx, const ULONG nAction )
+ const BitmapEx& rBitmapEx, const sal_uIntPtr nAction )
{
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
@@ -808,7 +808,7 @@ void OutputDevice::ImplDrawBitmapEx( const Point& rDestPt, const Size& rDestSize
if ( mnDrawMode & ( DRAWMODE_BLACKBITMAP | DRAWMODE_WHITEBITMAP ) )
{
Bitmap aColorBmp( aBmpEx.GetSizePixel(), ( mnDrawMode & DRAWMODE_GHOSTEDBITMAP ) ? 4 : 1 );
- BYTE cCmpVal;
+ sal_uInt8 cCmpVal;
if ( mnDrawMode & DRAWMODE_BLACKBITMAP )
cCmpVal = ( mnDrawMode & DRAWMODE_GHOSTEDBITMAP ) ? 0x80 : 0;
@@ -902,7 +902,7 @@ void OutputDevice::ImplDrawBitmapEx( const Point& rDestPt, const Size& rDestSize
aPosAry.mnDestWidth = ImplLogicWidthToDevicePixel( rDestSize.Width() );
aPosAry.mnDestHeight = ImplLogicHeightToDevicePixel( rDestSize.Height() );
- const ULONG nMirrFlags = ImplAdjustTwoRect( aPosAry, aBmpEx.GetSizePixel() );
+ const sal_uIntPtr nMirrFlags = ImplAdjustTwoRect( aPosAry, aBmpEx.GetSizePixel() );
if( aPosAry.mnSrcWidth && aPosAry.mnSrcHeight && aPosAry.mnDestWidth && aPosAry.mnDestHeight )
{
@@ -1096,7 +1096,7 @@ void OutputDevice::DrawMask( const Point& rDestPt, const Size& rDestSize,
void OutputDevice::ImplDrawMask( const Point& rDestPt, const Size& rDestSize,
const Point& rSrcPtPixel, const Size& rSrcSizePixel,
const Bitmap& rBitmap, const Color& rMaskColor,
- const ULONG nAction )
+ const sal_uIntPtr nAction )
{
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
@@ -1150,7 +1150,7 @@ void OutputDevice::ImplDrawMask( const Point& rDestPt, const Size& rDestSize,
aPosAry.mnDestHeight = ImplLogicHeightToDevicePixel( rDestSize.Height() );
// spiegeln via Koordinaten wollen wir nicht
- const ULONG nMirrFlags = ImplAdjustTwoRect( aPosAry, pImpBmp->ImplGetSize() );
+ const sal_uIntPtr nMirrFlags = ImplAdjustTwoRect( aPosAry, pImpBmp->ImplGetSize() );
// check if output is necessary
if( aPosAry.mnSrcWidth && aPosAry.mnSrcHeight && aPosAry.mnDestWidth && aPosAry.mnDestHeight )
@@ -1173,7 +1173,7 @@ void OutputDevice::ImplDrawMask( const Point& rDestPt, const Size& rDestSize,
// ------------------------------------------------------------------
-void OutputDevice::DrawImage( const Point& rPos, const Image& rImage, USHORT nStyle )
+void OutputDevice::DrawImage( const Point& rPos, const Image& rImage, sal_uInt16 nStyle )
{
DBG_ASSERT( GetOutDevType() != OUTDEV_PRINTER, "DrawImage(): Images can't be drawn on any mprinter" );
@@ -1210,7 +1210,7 @@ void OutputDevice::DrawImage( const Point& rPos, const Image& rImage, USHORT nSt
// ------------------------------------------------------------------
void OutputDevice::DrawImage( const Point& rPos, const Size& rSize,
- const Image& rImage, USHORT nStyle )
+ const Image& rImage, sal_uInt16 nStyle )
{
DBG_ASSERT( GetOutDevType() != OUTDEV_PRINTER, "DrawImage(): Images can't be drawn on any mprinter" );
@@ -1261,14 +1261,14 @@ Bitmap OutputDevice::GetBitmap( const Point& rSrcPt, const Size& rSize ) const
if ( nWidth && nHeight )
{
Rectangle aRect( Point( nX, nY ), Size( nWidth, nHeight ) );
- BOOL bClipped = FALSE;
+ sal_Bool bClipped = sal_False;
// X-Koordinate ausserhalb des Bereichs?
if ( nX < mnOutOffX )
{
nWidth -= ( mnOutOffX - nX );
nX = mnOutOffX;
- bClipped = TRUE;
+ bClipped = sal_True;
}
// Y-Koordinate ausserhalb des Bereichs?
@@ -1276,21 +1276,21 @@ Bitmap OutputDevice::GetBitmap( const Point& rSrcPt, const Size& rSize ) const
{
nHeight -= ( mnOutOffY - nY );
nY = mnOutOffY;
- bClipped = TRUE;
+ bClipped = sal_True;
}
// Breite ausserhalb des Bereichs?
if ( (nWidth + nX) > (mnOutWidth + mnOutOffX) )
{
nWidth = mnOutOffX + mnOutWidth - nX;
- bClipped = TRUE;
+ bClipped = sal_True;
}
// Hoehe ausserhalb des Bereichs?
if ( (nHeight + nY) > (mnOutHeight + mnOutOffY) )
{
nHeight = mnOutOffY + mnOutHeight - nY;
- bClipped = TRUE;
+ bClipped = sal_True;
}
if ( bClipped )
@@ -1322,10 +1322,10 @@ Bitmap OutputDevice::GetBitmap( const Point& rSrcPt, const Size& rSize ) const
aBmp = aVDev.GetBitmap( Point(), aVDev.GetOutputSizePixel() );
}
else
- bClipped = FALSE;
+ bClipped = sal_False;
}
else
- bClipped = FALSE;
+ bClipped = sal_False;
}
if ( !bClipped )
@@ -1373,8 +1373,8 @@ void OutputDevice::ImplGetFrameBitmap( const Point& rDestPt, const Size& rSize,
{
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
- BOOL bOldMap = mbMap;
- ((OutputDevice*)this)->mbMap = FALSE;
+ sal_Bool bOldMap = mbMap;
+ ((OutputDevice*)this)->mbMap = sal_False;
rBitmap = GetBitmap( rDestPt, rSize );
((OutputDevice*)this)->mbMap = bOldMap;
}
@@ -1412,7 +1412,7 @@ Color* OutputDevice::GetPixel( const Polygon& rPts ) const
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
Color* pColors = NULL;
- const USHORT nSize = rPts.GetSize();
+ const sal_uInt16 nSize = rPts.GetSize();
if( nSize )
{
@@ -1425,7 +1425,7 @@ Color* OutputDevice::GetPixel( const Polygon& rPts ) const
{
pColors = new Color[ nSize ];
- for( USHORT i = 0; i < nSize; i++ )
+ for( sal_uInt16 i = 0; i < nSize; i++ )
{
Color& rCol = pColors[ i ];
const Point& rPt = rPts[ i ];
@@ -1504,7 +1504,7 @@ void OutputDevice::DrawPixel( const Point& rPt, const Color& rColor )
}
else if( mnDrawMode & DRAWMODE_GRAYLINE )
{
- const UINT8 cLum = aColor.GetLuminance();
+ const sal_uInt8 cLum = aColor.GetLuminance();
aColor = Color( cLum, cLum, cLum );
}
else if( mnDrawMode & DRAWMODE_SETTINGSLINE )
@@ -1559,12 +1559,12 @@ void OutputDevice::DrawPixel( const Polygon& rPts, const Color* pColors )
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
DBG_ASSERT( pColors, "OutputDevice::DrawPixel: No color array specified" );
- const USHORT nSize = rPts.GetSize();
+ const sal_uInt16 nSize = rPts.GetSize();
if ( nSize )
{
if ( mpMetaFile )
- for ( USHORT i = 0; i < nSize; i++ )
+ for ( sal_uInt16 i = 0; i < nSize; i++ )
mpMetaFile->AddAction( new MetaPixelAction( rPts[ i ], pColors[ i ] ) );
if ( !IsDeviceOutputNecessary() || ImplIsRecordLayout() )
@@ -1579,7 +1579,7 @@ void OutputDevice::DrawPixel( const Polygon& rPts, const Color* pColors )
if ( mbOutputClipped )
return;
- for ( USHORT i = 0; i < nSize; i++ )
+ for ( sal_uInt16 i = 0; i < nSize; i++ )
{
const Point aPt( ImplLogicToDevicePixel( rPts[ i ] ) );
mpGraphics->DrawPixel( aPt.X(), aPt.Y(), ImplColorToSal( pColors[ i ] ), this );
@@ -1598,10 +1598,10 @@ void OutputDevice::DrawPixel( const Polygon& rPts, const Color& rColor )
{
if( rColor != COL_TRANSPARENT && ! ImplIsRecordLayout() )
{
- const USHORT nSize = rPts.GetSize();
+ const sal_uInt16 nSize = rPts.GetSize();
Color* pColArray = new Color[ nSize ];
- for( USHORT i = 0; i < nSize; i++ )
+ for( sal_uInt16 i = 0; i < nSize; i++ )
pColArray[ i ] = rColor;
DrawPixel( rPts, pColArray );
@@ -1626,15 +1626,15 @@ Bitmap OutputDevice::ImplBlendWithAlpha( Bitmap aBmp,
const long* pMapY )
{
BitmapColor aDstCol,aSrcCol;
- BYTE nSrcAlpha, nDstAlpha;
+ sal_uInt8 nSrcAlpha, nDstAlpha;
Bitmap res;
int nX, nOutX, nY, nOutY;
OSL_ENSURE(mpAlphaVDev,
"ImplBlendWithAlpha(): call me only with valid alpha VDev!" );
- BOOL bOldMapMode( mpAlphaVDev->IsMapModeEnabled() );
- mpAlphaVDev->EnableMapMode(FALSE);
+ sal_Bool bOldMapMode( mpAlphaVDev->IsMapModeEnabled() );
+ mpAlphaVDev->EnableMapMode(sal_False);
Bitmap aAlphaBitmap( mpAlphaVDev->GetBitmap( aDstRect.TopLeft(), aDstRect.GetSize() ) );
BitmapWriteAccess* pAlphaW = aAlphaBitmap.AcquireWriteAccess();
@@ -1656,7 +1656,7 @@ Bitmap OutputDevice::ImplBlendWithAlpha( Bitmap aBmp,
for( nX = 0, nOutX = nOffX; nX < nDstWidth; nX++, nOutX++ )
{
const long nMapX = pMapX[ nX ];
- const ULONG nD = nVCLDitherLut[ nModY | ( nOutX & 0x0FL ) ];
+ const sal_uIntPtr nD = nVCLDitherLut[ nModY | ( nOutX & 0x0FL ) ];
aSrcCol = pP->GetColor( nMapY, nMapX );
aDstCol = pB->GetColor( nY, nX );
@@ -1666,20 +1666,20 @@ Bitmap OutputDevice::ImplBlendWithAlpha( Bitmap aBmp,
if( nSrcAlpha + nDstAlpha == 0 )
{
// #i70653# zero alpha -> zero color values
- aIndex.SetIndex( (BYTE) ( nVCLRLut[ ( nVCLLut[ 0 ] + nD ) >> 16UL ] +
+ aIndex.SetIndex( (sal_uInt8) ( nVCLRLut[ ( nVCLLut[ 0 ] + nD ) >> 16UL ] +
nVCLGLut[ ( nVCLLut[ 0 ] + nD ) >> 16UL ] +
nVCLBLut[ ( nVCLLut[ 0 ] + nD ) >> 16UL ] ) );
}
else
{
- aDstCol.SetRed( (BYTE)(((int)(aSrcCol.GetRed())*nSrcAlpha + (int)(aDstCol.GetRed())*nDstAlpha) /
+ aDstCol.SetRed( (sal_uInt8)(((int)(aSrcCol.GetRed())*nSrcAlpha + (int)(aDstCol.GetRed())*nDstAlpha) /
(nSrcAlpha+nDstAlpha)) );
- aDstCol.SetGreen( (BYTE)(((int)(aSrcCol.GetGreen())*nSrcAlpha + (int)(aDstCol.GetGreen())*nDstAlpha) /
+ aDstCol.SetGreen( (sal_uInt8)(((int)(aSrcCol.GetGreen())*nSrcAlpha + (int)(aDstCol.GetGreen())*nDstAlpha) /
(nSrcAlpha+nDstAlpha)) );
- aDstCol.SetBlue( (BYTE)(((int)(aSrcCol.GetBlue())*nSrcAlpha + (int)(aDstCol.GetBlue())*nDstAlpha) /
+ aDstCol.SetBlue( (sal_uInt8)(((int)(aSrcCol.GetBlue())*nSrcAlpha + (int)(aDstCol.GetBlue())*nDstAlpha) /
(nSrcAlpha+nDstAlpha)) );
- aIndex.SetIndex( (BYTE) ( nVCLRLut[ ( nVCLLut[ aDstCol.GetRed() ] + nD ) >> 16UL ] +
+ aIndex.SetIndex( (sal_uInt8) ( nVCLRLut[ ( nVCLLut[ aDstCol.GetRed() ] + nD ) >> 16UL ] +
nVCLGLut[ ( nVCLLut[ aDstCol.GetGreen() ] + nD ) >> 16UL ] +
nVCLBLut[ ( nVCLLut[ aDstCol.GetBlue() ] + nD ) >> 16UL ] ) );
}
@@ -1689,9 +1689,9 @@ Bitmap OutputDevice::ImplBlendWithAlpha( Bitmap aBmp,
// the inverse alpha space (with 255 meaning
// opaque), otherwise, transitivity is not
// achieved.
- nSrcAlpha = 255-COLOR_CHANNEL_MERGE( 255, (BYTE)nDstAlpha, nSrcAlpha );
+ nSrcAlpha = 255-COLOR_CHANNEL_MERGE( 255, (sal_uInt8)nDstAlpha, nSrcAlpha );
- aIndex.SetIndex( (BYTE) ( nVCLRLut[ ( nVCLLut[ nSrcAlpha ] + nD ) >> 16UL ] +
+ aIndex.SetIndex( (sal_uInt8) ( nVCLRLut[ ( nVCLLut[ nSrcAlpha ] + nD ) >> 16UL ] +
nVCLGLut[ ( nVCLLut[ nSrcAlpha ] + nD ) >> 16UL ] +
nVCLBLut[ ( nVCLLut[ nSrcAlpha ] + nD ) >> 16UL ] ) );
pAlphaW->SetPixel( nY, nX, aIndex );
@@ -1730,11 +1730,11 @@ Bitmap OutputDevice::ImplBlendWithAlpha( Bitmap aBmp,
}
else
{
- aDstCol.SetRed( (BYTE)(((int)(aSrcCol.GetRed())*nSrcAlpha + (int)(aDstCol.GetRed())*nDstAlpha) /
+ aDstCol.SetRed( (sal_uInt8)(((int)(aSrcCol.GetRed())*nSrcAlpha + (int)(aDstCol.GetRed())*nDstAlpha) /
(nSrcAlpha+nDstAlpha)) );
- aDstCol.SetGreen( (BYTE)(((int)(aSrcCol.GetGreen())*nSrcAlpha + (int)(aDstCol.GetGreen())*nDstAlpha) /
+ aDstCol.SetGreen( (sal_uInt8)(((int)(aSrcCol.GetGreen())*nSrcAlpha + (int)(aDstCol.GetGreen())*nDstAlpha) /
(nSrcAlpha+nDstAlpha)) );
- aDstCol.SetBlue( (BYTE)(((int)(aSrcCol.GetBlue())*nSrcAlpha + (int)(aDstCol.GetBlue())*nDstAlpha) /
+ aDstCol.SetBlue( (sal_uInt8)(((int)(aSrcCol.GetBlue())*nSrcAlpha + (int)(aDstCol.GetBlue())*nDstAlpha) /
(nSrcAlpha+nDstAlpha)) );
}
@@ -1744,7 +1744,7 @@ Bitmap OutputDevice::ImplBlendWithAlpha( Bitmap aBmp,
// the inverse alpha space (with 255 meaning
// opaque), otherwise, transitivity is not
// achieved.
- nSrcAlpha = 255-COLOR_CHANNEL_MERGE( 255, (BYTE)nDstAlpha, nSrcAlpha );
+ nSrcAlpha = 255-COLOR_CHANNEL_MERGE( 255, (sal_uInt8)nDstAlpha, nSrcAlpha );
pAlphaW->SetPixel( nY, nX, Color(nSrcAlpha, nSrcAlpha, nSrcAlpha) );
}
@@ -1799,11 +1799,11 @@ Bitmap OutputDevice::ImplBlend( Bitmap aBmp,
for( nX = 0, nOutX = nOffX; nX < nDstWidth; nX++, nOutX++ )
{
const long nMapX = pMapX[ nX ];
- const ULONG nD = nVCLDitherLut[ nModY | ( nOutX & 0x0FL ) ];
+ const sal_uIntPtr nD = nVCLDitherLut[ nModY | ( nOutX & 0x0FL ) ];
aDstCol = pB->GetColor( nY, nX );
- aDstCol.Merge( pP->GetColor( nMapY, nMapX ), (BYTE) pA->GetPixel( nMapY, nMapX ) );
- aIndex.SetIndex( (BYTE) ( nVCLRLut[ ( nVCLLut[ aDstCol.GetRed() ] + nD ) >> 16UL ] +
+ aDstCol.Merge( pP->GetColor( nMapY, nMapX ), (sal_uInt8) pA->GetPixel( nMapY, nMapX ) );
+ aIndex.SetIndex( (sal_uInt8) ( nVCLRLut[ ( nVCLLut[ aDstCol.GetRed() ] + nD ) >> 16UL ] +
nVCLGLut[ ( nVCLLut[ aDstCol.GetGreen() ] + nD ) >> 16UL ] +
nVCLBLut[ ( nVCLLut[ aDstCol.GetBlue() ] + nD ) >> 16UL ] ) );
pW->SetPixel( nY, nX, aIndex );
@@ -1938,7 +1938,7 @@ void OutputDevice::ImplDrawAlpha( const Bitmap& rBmp, const AlphaMask& rAlpha,
Point aOutPt( LogicToPixel( rDestPt ) );
Size aOutSz( LogicToPixel( rDestSize ) );
Rectangle aDstRect( aNullPt, GetOutputSizePixel() );
- const BOOL bHMirr = aOutSz.Width() < 0, bVMirr = aOutSz.Height() < 0;
+ const sal_Bool bHMirr = aOutSz.Width() < 0, bVMirr = aOutSz.Height() < 0;
if( OUTDEV_WINDOW == meOutDevType )
{
@@ -1987,7 +1987,7 @@ void OutputDevice::ImplDrawAlpha( const Bitmap& rBmp, const AlphaMask& rAlpha,
&& !aBmpRect.Intersection( Rectangle( rSrcPtPixel, rSrcSizePixel ) ).IsEmpty() )
{
GDIMetaFile* pOldMetaFile = mpMetaFile; mpMetaFile = NULL;
- const BOOL bOldMap = mbMap; mbMap = FALSE;
+ const sal_Bool bOldMap = mbMap; mbMap = sal_False;
Bitmap aBmp( GetBitmap( aDstRect.TopLeft(), aDstRect.GetSize() ) );
// #109044# The generated bitmap need not necessarily be
@@ -2105,7 +2105,7 @@ void OutputDevice::ImplPrintTransparent( const Bitmap& rBmp, const Bitmap& rMask
if( !rBmp.IsEmpty() && aSrcRect.GetWidth() && aSrcRect.GetHeight() && aDestSz.Width() && aDestSz.Height() )
{
Bitmap aPaint( rBmp ), aMask( rMask );
- ULONG nMirrFlags = 0UL;
+ sal_uIntPtr nMirrFlags = 0UL;
if( aMask.GetBitCount() > 1 )
aMask.Convert( BMP_CONVERSION_1BIT_THRESHOLD );
@@ -2152,9 +2152,9 @@ void OutputDevice::ImplPrintTransparent( const Bitmap& rBmp, const Bitmap& rMask
long nX, nY, nWorkX, nWorkY, nWorkWidth, nWorkHeight;
long* pMapX = new long[ nSrcWidth + 1 ];
long* pMapY = new long[ nSrcHeight + 1 ];
- const BOOL bOldMap = mbMap;
+ const sal_Bool bOldMap = mbMap;
- mbMap = FALSE;
+ mbMap = sal_False;
// create forward mapping tables
for( nX = 0L; nX <= nSrcWidth; nX++ )
@@ -2166,7 +2166,7 @@ void OutputDevice::ImplPrintTransparent( const Bitmap& rBmp, const Bitmap& rMask
// walk through all rectangles of mask
Region aWorkRgn( aMask.CreateRegion( COL_BLACK, Rectangle( Point(), aMask.GetSizePixel() ) ) );
ImplRegionInfo aInfo;
- BOOL bRgnRect = aWorkRgn.ImplGetFirstRect( aInfo, nWorkX, nWorkY, nWorkWidth, nWorkHeight );
+ sal_Bool bRgnRect = aWorkRgn.ImplGetFirstRect( aInfo, nWorkX, nWorkY, nWorkWidth, nWorkHeight );
while( bRgnRect )
{
@@ -2203,7 +2203,7 @@ void OutputDevice::ImplPrintMask( const Bitmap& rMask, const Color& rMaskColor,
if( !rMask.IsEmpty() && aSrcRect.GetWidth() && aSrcRect.GetHeight() && aDestSz.Width() && aDestSz.Height() )
{
Bitmap aMask( rMask );
- ULONG nMirrFlags = 0UL;
+ sal_uIntPtr nMirrFlags = 0UL;
if( aMask.GetBitCount() > 1 )
aMask.Convert( BMP_CONVERSION_1BIT_THRESHOLD );
@@ -2238,10 +2238,10 @@ void OutputDevice::ImplPrintMask( const Bitmap& rMask, const Color& rMaskColor,
long* pMapX = new long[ nSrcWidth + 1 ];
long* pMapY = new long[ nSrcHeight + 1 ];
GDIMetaFile* pOldMetaFile = mpMetaFile;
- const BOOL bOldMap = mbMap;
+ const sal_Bool bOldMap = mbMap;
mpMetaFile = NULL;
- mbMap = FALSE;
+ mbMap = sal_False;
Push( PUSH_FILLCOLOR | PUSH_LINECOLOR );
SetLineColor( rMaskColor );
SetFillColor( rMaskColor );
@@ -2258,7 +2258,7 @@ void OutputDevice::ImplPrintMask( const Bitmap& rMask, const Color& rMaskColor,
// walk through all rectangles of mask
Region aWorkRgn( aMask.CreateRegion( COL_BLACK, Rectangle( Point(), aMask.GetSizePixel() ) ) );
ImplRegionInfo aInfo;
- BOOL bRgnRect = aWorkRgn.ImplGetFirstRect( aInfo, nWorkX, nWorkY, nWorkWidth, nWorkHeight );
+ sal_Bool bRgnRect = aWorkRgn.ImplGetFirstRect( aInfo, nWorkX, nWorkY, nWorkWidth, nWorkHeight );
while( bRgnRect )
{
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index 949d3df5275f..ff6fac84c35f 100644
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -230,7 +230,7 @@ void OutputDevice::ImplUpdateFontData( bool bNewFontLists )
if( mpFontCache && mpFontCache != pSVData->maGDIData.mpScreenFontCache )
delete mpFontCache;
mpFontList = mpPDFWriter->filterDevFontList( pSVData->maGDIData.mpScreenFontList );
- mpFontCache = new ImplFontCache( FALSE );
+ mpFontCache = new ImplFontCache( sal_False );
}
else
{
@@ -322,7 +322,7 @@ void ImplFreeOutDevFontData()
void OutputDevice::BeginFontSubstitution()
{
ImplSVData* pSVData = ImplGetSVData();
- pSVData->maGDIData.mbFontSubChanged = FALSE;
+ pSVData->maGDIData.mbFontSubChanged = sal_False;
}
// -----------------------------------------------------------------------
@@ -338,7 +338,7 @@ void OutputDevice::EndFontSubstitution()
DataChangedEvent aDCEvt( DATACHANGED_FONTSUBSTITUTION );
pApp->DataChanged( aDCEvt );
pApp->NotifyAllWindows( aDCEvt );
- pSVData->maGDIData.mbFontSubChanged = FALSE;
+ pSVData->maGDIData.mbFontSubChanged = sal_False;
}
}
@@ -346,19 +346,19 @@ void OutputDevice::EndFontSubstitution()
void OutputDevice::AddFontSubstitute( const XubString& rFontName,
const XubString& rReplaceFontName,
- USHORT nFlags )
+ sal_uInt16 nFlags )
{
ImplDirectFontSubstitution*& rpSubst = ImplGetSVData()->maGDIData.mpDirectFontSubst;
if( !rpSubst )
rpSubst = new ImplDirectFontSubstitution();
rpSubst->AddFontSubstitute( rFontName, rReplaceFontName, nFlags );
- ImplGetSVData()->maGDIData.mbFontSubChanged = TRUE;
+ ImplGetSVData()->maGDIData.mbFontSubChanged = sal_True;
}
// -----------------------------------------------------------------------
void ImplDirectFontSubstitution::AddFontSubstitute( const String& rFontName,
- const String& rSubstFontName, USHORT nFlags )
+ const String& rSubstFontName, sal_uInt16 nFlags )
{
maFontSubstList.push_back( ImplFontSubstEntry( rFontName, rSubstFontName, nFlags ) );
}
@@ -366,7 +366,7 @@ void ImplDirectFontSubstitution::AddFontSubstitute( const String& rFontName,
// -----------------------------------------------------------------------
ImplFontSubstEntry::ImplFontSubstEntry( const String& rFontName,
- const String& rSubstFontName, USHORT nSubstFlags )
+ const String& rSubstFontName, sal_uInt16 nSubstFlags )
: maName( rFontName )
, maReplaceName( rSubstFontName )
, mnFlags( nSubstFlags )
@@ -381,7 +381,7 @@ ImplFontSubstEntry::ImplFontSubstEntry( const String& rFontName,
void OutputDevice::ImplAddDevFontSubstitute( const XubString& rFontName,
const XubString& rReplaceFontName,
- USHORT nFlags )
+ sal_uInt16 nFlags )
{
ImplInitOutDevData();
mpOutDevData->maDevFontSubst.AddFontSubstitute( rFontName, rReplaceFontName, nFlags );
@@ -389,7 +389,7 @@ void OutputDevice::ImplAddDevFontSubstitute( const XubString& rFontName,
// -----------------------------------------------------------------------
-void OutputDevice::RemoveFontSubstitute( USHORT n )
+void OutputDevice::RemoveFontSubstitute( sal_uInt16 n )
{
ImplDirectFontSubstitution* pSubst = ImplGetSVData()->maGDIData.mpDirectFontSubst;
if( pSubst )
@@ -408,21 +408,21 @@ void ImplDirectFontSubstitution::RemoveFontSubstitute( int nIndex )
// -----------------------------------------------------------------------
-USHORT OutputDevice::GetFontSubstituteCount()
+sal_uInt16 OutputDevice::GetFontSubstituteCount()
{
const ImplDirectFontSubstitution* pSubst = ImplGetSVData()->maGDIData.mpDirectFontSubst;
if( !pSubst )
return 0;
int nCount = pSubst->GetFontSubstituteCount();
- return (USHORT)nCount;
+ return (sal_uInt16)nCount;
}
// -----------------------------------------------------------------------
-void OutputDevice::GetFontSubstitute( USHORT n,
+void OutputDevice::GetFontSubstitute( sal_uInt16 n,
XubString& rFontName,
XubString& rReplaceFontName,
- USHORT& rFlags )
+ sal_uInt16& rFlags )
{
const ImplDirectFontSubstitution* pSubst = ImplGetSVData()->maGDIData.mpDirectFontSubst;
if( pSubst )
@@ -432,7 +432,7 @@ void OutputDevice::GetFontSubstitute( USHORT n,
// -----------------------------------------------------------------------
bool ImplDirectFontSubstitution::GetFontSubstitute( int nIndex,
- String& rFontName, String& rSubstFontName, USHORT& rFlags ) const
+ String& rFontName, String& rSubstFontName, sal_uInt16& rFlags ) const
{
FontSubstList::const_iterator it = maFontSubstList.begin();
for( int nCount = 0; (it != maFontSubstList.end()) && (nCount++ != nIndex); ++it ) ;
@@ -449,7 +449,7 @@ bool ImplDirectFontSubstitution::GetFontSubstitute( int nIndex,
// -----------------------------------------------------------------------
bool ImplDirectFontSubstitution::FindFontSubstitute( String& rSubstName,
- const String& rSearchName, USHORT nFlags ) const
+ const String& rSearchName, sal_uInt16 nFlags ) const
{
// TODO: get rid of O(N) searches
FontSubstList::const_iterator it = maFontSubstList.begin();
@@ -470,7 +470,7 @@ bool ImplDirectFontSubstitution::FindFontSubstitute( String& rSubstName,
// -----------------------------------------------------------------------
static void ImplFontSubstitute( String& rFontName,
- USHORT nFlags, ImplDirectFontSubstitution* pDevSpecific )
+ sal_uInt16 nFlags, ImplDirectFontSubstitution* pDevSpecific )
{
#ifdef DBG_UTIL
String aTempName = rFontName;
@@ -501,8 +501,8 @@ static void ImplFontSubstitute( String& rFontName,
// -----------------------------------------------------------------------
-Font OutputDevice::GetDefaultFont( USHORT nType, LanguageType eLang,
- ULONG nFlags, const OutputDevice* pOutDev )
+Font OutputDevice::GetDefaultFont( sal_uInt16 nType, LanguageType eLang,
+ sal_uIntPtr nFlags, const OutputDevice* pOutDev )
{
DBG_TRACE( "OutputDevice::GetDefaultFont()" );
@@ -735,7 +735,7 @@ static unsigned ImplIsCJKFont( const String& rFontName )
// -----------------------------------------------------------------------
-static void ImplCalcType( ULONG& rType, FontWeight& rWeight, FontWidth& rWidth,
+static void ImplCalcType( sal_uIntPtr& rType, FontWeight& rWeight, FontWidth& rWidth,
FontFamily eFamily, const FontNameAttr* pFontAttr )
{
if ( eFamily != FAMILY_DONTKNOW )
@@ -1687,7 +1687,7 @@ ImplDevFontListData* ImplDevFontList::ImplFindByLocale(com::sun::star::lang::Loc
// -----------------------------------------------------------------------
-ImplDevFontListData* ImplDevFontList::ImplFindByAttributes( ULONG nSearchType,
+ImplDevFontListData* ImplDevFontList::ImplFindByAttributes( sal_uIntPtr nSearchType,
FontWeight eSearchWeight, FontWidth eSearchWidth, FontFamily /*eSearchFamily*/,
FontItalic eSearchItalic, const String& rSearchFamilyName ) const
{
@@ -1705,7 +1705,7 @@ ImplDevFontListData* ImplDevFontList::ImplFindByAttributes( ULONG nSearchType,
long nTestMatch;
long nBestMatch = 40000;
- ULONG nBestType = 0;
+ sal_uIntPtr nBestType = 0;
DevFontList::const_iterator it = maDevFontList.begin();
for(; it != maDevFontList.end(); ++it )
@@ -1713,7 +1713,7 @@ ImplDevFontListData* ImplDevFontList::ImplFindByAttributes( ULONG nSearchType,
ImplDevFontListData* pData = (*it).second;
// Get all information about the matching font
- ULONG nMatchType = pData->mnMatchType;
+ sal_uIntPtr nMatchType = pData->mnMatchType;
FontWeight eMatchWeight= pData->meMatchWeight;
FontWidth eMatchWidth = pData->meMatchWidth;
@@ -2423,7 +2423,7 @@ ImplDevFontListData* ImplDevFontList::ImplFindByFont( ImplFontSelectData& rFSD,
// test if a font in the token list is available
// substitute the font if this was requested
- USHORT nSubstFlags = FONT_SUBSTITUTE_ALWAYS;
+ sal_uInt16 nSubstFlags = FONT_SUBSTITUTE_ALWAYS;
if ( bPrinter )
nSubstFlags |= FONT_SUBSTITUTE_SCREENONLY;
@@ -2552,7 +2552,7 @@ ImplDevFontListData* ImplDevFontList::ImplFindByFont( ImplFontSelectData& rFSD,
String aSearchFamilyName;
FontWeight eSearchWeight = rFSD.meWeight;
FontWidth eSearchWidth = rFSD.meWidthType;
- ULONG nSearchType = 0;
+ sal_uIntPtr nSearchType = 0;
FontSubstConfiguration::getMapName( aSearchName, aSearchShortName, aSearchFamilyName,
eSearchWeight, eSearchWidth, nSearchType );
@@ -2624,7 +2624,7 @@ ImplDevFontListData* ImplDevFontList::ImplFindByFont( ImplFontSelectData& rFSD,
String aTempShortName;
String aTempFamilyName;
- ULONG nTempType = 0;
+ sal_uIntPtr nTempType = 0;
FontWeight eTempWeight = rFSD.meWeight;
FontWidth eTempWidth = WIDTH_DONTKNOW;
FontSubstConfiguration::getMapName( aSearchName, aTempShortName, aTempFamilyName,
@@ -2884,17 +2884,17 @@ FontEmphasisMark OutputDevice::ImplGetEmphasisMarkStyle( const Font& rFont )
// -----------------------------------------------------------------------
-BOOL OutputDevice::ImplIsUnderlineAbove( const Font& rFont )
+sal_Bool OutputDevice::ImplIsUnderlineAbove( const Font& rFont )
{
if ( !rFont.IsVertical() )
- return FALSE;
+ return sal_False;
if( (LANGUAGE_JAPANESE == rFont.GetLanguage())
|| (LANGUAGE_JAPANESE == rFont.GetCJKContextLanguage()) )
// the underline is right for Japanese only
- return TRUE;
+ return sal_True;
- return FALSE;
+ return sal_False;
}
// =======================================================================
@@ -2947,7 +2947,7 @@ void OutputDevice::ImplInitTextColor()
if ( mbInitTextColor )
{
mpGraphics->SetTextColor( ImplColorToSal( GetTextColor() ) );
- mbInitTextColor = FALSE;
+ mbInitTextColor = sal_False;
}
}
@@ -3004,9 +3004,9 @@ bool OutputDevice::ImplNewFont() const
ImplFontEntry* pFontEntry = mpFontEntry;
// mark when lower layers need to get involved
- mbNewFont = FALSE;
+ mbNewFont = sal_False;
if( pFontEntry != pOldEntry )
- mbInitFont = TRUE;
+ mbInitFont = sal_True;
// select font when it has not been initialized yet
if ( !pFontEntry->mbInit )
@@ -3107,10 +3107,10 @@ bool OutputDevice::ImplNewFont() const
{
Size aOrigSize = maFont.GetSize();
const_cast<Font&>(maFont).SetSize( Size( nNewWidth, aSize.Height() ) );
- mbMap = FALSE;
- mbNewFont = TRUE;
+ mbMap = sal_False;
+ mbNewFont = sal_True;
ImplNewFont(); // recurse once using stretched width
- mbMap = TRUE;
+ mbMap = sal_True;
const_cast<Font&>(maFont).SetSize( aOrigSize );
}
}
@@ -3198,10 +3198,10 @@ void OutputDevice::ImplDrawTextBackground( const SalLayout& rSalLayout )
if ( mbLineColor || mbInitLineColor )
{
mpGraphics->SetLineColor();
- mbInitLineColor = TRUE;
+ mbInitLineColor = sal_True;
}
mpGraphics->SetFillColor( ImplColorToSal( GetTextFillColor() ) );
- mbInitFillColor = TRUE;
+ mbInitFillColor = sal_True;
ImplDrawTextRect( nX, nY, nX, nY-mpFontEntry->maMetric.mnAscent-mnEmphasisAscent,
nWidth,
@@ -3467,7 +3467,7 @@ static void ImplDrawWavePixel( long nOriginX, long nOriginY,
short nOrientation,
SalGraphics* pGraphics,
OutputDevice* pOutDev,
- BOOL bDrawPixAsRect,
+ sal_Bool bDrawPixAsRect,
long nPixWidth, long nPixHeight )
{
@@ -3500,7 +3500,7 @@ void OutputDevice::ImplDrawWaveLine( long nBaseX, long nBaseY,
if ( (nLineWidth == 1) && (nHeight == 1) )
{
mpGraphics->SetLineColor( ImplColorToSal( rColor ) );
- mbInitLineColor = TRUE;
+ mbInitLineColor = sal_True;
long nEndX = nStartX+nWidth;
long nEndY = nStartY;
@@ -3524,28 +3524,28 @@ void OutputDevice::ImplDrawWaveLine( long nBaseX, long nBaseY,
long i;
long nPixWidth;
long nPixHeight;
- BOOL bDrawPixAsRect;
+ sal_Bool bDrawPixAsRect;
// Auf Druckern die Pixel per DrawRect() ausgeben
if ( (GetOutDevType() == OUTDEV_PRINTER) || (nLineWidth > 1) )
{
if ( mbLineColor || mbInitLineColor )
{
mpGraphics->SetLineColor();
- mbInitLineColor = TRUE;
+ mbInitLineColor = sal_True;
}
mpGraphics->SetFillColor( ImplColorToSal( rColor ) );
- mbInitFillColor = TRUE;
- bDrawPixAsRect = TRUE;
+ mbInitFillColor = sal_True;
+ bDrawPixAsRect = sal_True;
nPixWidth = nLineWidth;
nPixHeight = ((nLineWidth*mnDPIX)+(mnDPIY/2))/mnDPIY;
}
else
{
mpGraphics->SetLineColor( ImplColorToSal( rColor ) );
- mbInitLineColor = TRUE;
+ mbInitLineColor = sal_True;
nPixWidth = 1;
nPixHeight = 1;
- bDrawPixAsRect = FALSE;
+ bDrawPixAsRect = sal_False;
}
if ( !nDiffY )
@@ -3613,7 +3613,7 @@ void OutputDevice::ImplDrawWaveTextLine( long nBaseX, long nBaseY,
long nX, long nY, long nWidth,
FontUnderline eTextLine,
Color aColor,
- BOOL bIsAbove )
+ sal_Bool bIsAbove )
{
ImplFontEntry* pFontEntry = mpFontEntry;
long nLineHeight;
@@ -3677,7 +3677,7 @@ void OutputDevice::ImplDrawStraightTextLine( long nBaseX, long nBaseY,
long nX, long nY, long nWidth,
FontUnderline eTextLine,
Color aColor,
- BOOL bIsAbove )
+ sal_Bool bIsAbove )
{
ImplFontEntry* pFontEntry = mpFontEntry;
long nLineHeight = 0;
@@ -3746,10 +3746,10 @@ void OutputDevice::ImplDrawStraightTextLine( long nBaseX, long nBaseY,
if ( mbLineColor || mbInitLineColor )
{
mpGraphics->SetLineColor();
- mbInitLineColor = TRUE;
+ mbInitLineColor = sal_True;
}
mpGraphics->SetFillColor( ImplColorToSal( aColor ) );
- mbInitFillColor = TRUE;
+ mbInitFillColor = sal_True;
long nLeft = nX;
@@ -3940,10 +3940,10 @@ void OutputDevice::ImplDrawStrikeoutLine( long nBaseX, long nBaseY,
if ( mbLineColor || mbInitLineColor )
{
mpGraphics->SetLineColor();
- mbInitLineColor = TRUE;
+ mbInitLineColor = sal_True;
}
mpGraphics->SetFillColor( ImplColorToSal( aColor ) );
- mbInitFillColor = TRUE;
+ mbInitFillColor = sal_True;
long nLeft = nX;
@@ -4023,7 +4023,7 @@ void OutputDevice::ImplDrawStrikeoutChar( long nBaseX, long nBaseY,
ImplRotatePos( nBaseX, nBaseY, nX, nY, mpFontEntry->mnOrientation );
// strikeout text has to be left aligned
- ULONG nOrigTLM = mnTextLayoutMode;
+ sal_uIntPtr nOrigTLM = mnTextLayoutMode;
mnTextLayoutMode = TEXT_LAYOUT_BIDI_STRONG | TEXT_LAYOUT_COMPLEX_DISABLED;
pLayout = ImplLayout( aStrikeoutText, 0, STRING_LEN );
mnTextLayoutMode = nOrigTLM;
@@ -4051,7 +4051,7 @@ void OutputDevice::ImplDrawTextLine( long nBaseX,
FontStrikeout eStrikeout,
FontUnderline eUnderline,
FontUnderline eOverline,
- BOOL bUnderlineAbove )
+ sal_Bool bUnderlineAbove )
{
if ( !nWidth )
return;
@@ -4059,9 +4059,9 @@ void OutputDevice::ImplDrawTextLine( long nBaseX,
Color aStrikeoutColor = GetTextColor();
Color aUnderlineColor = GetTextLineColor();
Color aOverlineColor = GetOverlineColor();
- BOOL bStrikeoutDone = FALSE;
- BOOL bUnderlineDone = FALSE;
- BOOL bOverlineDone = FALSE;
+ sal_Bool bStrikeoutDone = sal_False;
+ sal_Bool bUnderlineDone = sal_False;
+ sal_Bool bOverlineDone = sal_False;
// TODO: fix rotated text
if ( IsRTLEnabled() )
@@ -4080,29 +4080,29 @@ void OutputDevice::ImplDrawTextLine( long nBaseX,
(eUnderline == UNDERLINE_BOLDWAVE) )
{
ImplDrawWaveTextLine( nBaseX, nY, nX, nY, nWidth, eUnderline, aUnderlineColor, bUnderlineAbove );
- bUnderlineDone = TRUE;
+ bUnderlineDone = sal_True;
}
if ( (eOverline == UNDERLINE_SMALLWAVE) ||
(eOverline == UNDERLINE_WAVE) ||
(eOverline == UNDERLINE_DOUBLEWAVE) ||
(eOverline == UNDERLINE_BOLDWAVE) )
{
- ImplDrawWaveTextLine( nBaseX, nY, nX, nY, nWidth, eOverline, aOverlineColor, TRUE );
- bOverlineDone = TRUE;
+ ImplDrawWaveTextLine( nBaseX, nY, nX, nY, nWidth, eOverline, aOverlineColor, sal_True );
+ bOverlineDone = sal_True;
}
if ( (eStrikeout == STRIKEOUT_SLASH) ||
(eStrikeout == STRIKEOUT_X) )
{
ImplDrawStrikeoutChar( nBaseX, nY, nX, nY, nWidth, eStrikeout, aStrikeoutColor );
- bStrikeoutDone = TRUE;
+ bStrikeoutDone = sal_True;
}
if ( !bUnderlineDone )
ImplDrawStraightTextLine( nBaseX, nY, nX, nY, nWidth, eUnderline, aUnderlineColor, bUnderlineAbove );
if ( !bOverlineDone )
- ImplDrawStraightTextLine( nBaseX, nY, nX, nY, nWidth, eOverline, aOverlineColor, TRUE );
+ ImplDrawStraightTextLine( nBaseX, nY, nX, nY, nWidth, eOverline, aOverlineColor, sal_True );
if ( !bStrikeoutDone )
ImplDrawStrikeoutLine( nBaseX, nY, nX, nY, nWidth, eStrikeout, aStrikeoutColor );
@@ -4111,7 +4111,7 @@ void OutputDevice::ImplDrawTextLine( long nBaseX,
// -----------------------------------------------------------------------
void OutputDevice::ImplDrawTextLines( SalLayout& rSalLayout,
- FontStrikeout eStrikeout, FontUnderline eUnderline, FontUnderline eOverline, BOOL bWordLine, BOOL bUnderlineAbove )
+ FontStrikeout eStrikeout, FontUnderline eUnderline, FontUnderline eOverline, sal_Bool bWordLine, sal_Bool bUnderlineAbove )
{
if( bWordLine )
{
@@ -4169,18 +4169,18 @@ void OutputDevice::ImplDrawMnemonicLine( long nX, long nY, long nWidth )
nX = nBaseX - nWidth - (nX - nBaseX - 1);
}
- ImplDrawTextLine( nBaseX, nX, nY, nWidth, STRIKEOUT_NONE, UNDERLINE_SINGLE, UNDERLINE_NONE, FALSE );
+ ImplDrawTextLine( nBaseX, nX, nY, nWidth, STRIKEOUT_NONE, UNDERLINE_SINGLE, UNDERLINE_NONE, sal_False );
}
// -----------------------------------------------------------------------
-void OutputDevice::ImplGetEmphasisMark( PolyPolygon& rPolyPoly, BOOL& rPolyLine,
+void OutputDevice::ImplGetEmphasisMark( PolyPolygon& rPolyPoly, sal_Bool& rPolyLine,
Rectangle& rRect1, Rectangle& rRect2,
long& rYOff, long& rWidth,
FontEmphasisMark eEmphasis,
long nHeight, short /*nOrient*/ )
{
- static const BYTE aAccentPolyFlags[24] =
+ static const sal_uInt8 aAccentPolyFlags[24] =
{
0, 2, 2, 0, 2, 2, 0, 2, 2, 0, 2, 2, 0, 2, 2, 0, 2, 2, 0, 0, 2, 0, 2, 2
};
@@ -4215,7 +4215,7 @@ void OutputDevice::ImplGetEmphasisMark( PolyPolygon& rPolyPoly, BOOL& rPolyLine,
rWidth = 0;
rYOff = 0;
- rPolyLine = FALSE;
+ rPolyLine = sal_False;
if ( !nHeight )
return;
@@ -4256,7 +4256,7 @@ void OutputDevice::ImplGetEmphasisMark( PolyPolygon& rPolyPoly, BOOL& rPolyLine,
// BorderWidth is 15%
long nBorder = (nDotSize*150)/1000;
if ( nBorder <= 1 )
- rPolyLine = TRUE;
+ rPolyLine = sal_True;
else
{
Polygon aPoly2( Point( nRad, nRad ),
@@ -4330,7 +4330,7 @@ void OutputDevice::ImplGetEmphasisMark( PolyPolygon& rPolyPoly, BOOL& rPolyLine,
// -----------------------------------------------------------------------
void OutputDevice::ImplDrawEmphasisMark( long nBaseX, long nX, long nY,
- const PolyPolygon& rPolyPoly, BOOL bPolyLine,
+ const PolyPolygon& rPolyPoly, sal_Bool bPolyLine,
const Rectangle& rRect1, const Rectangle& rRect2 )
{
// TODO: pass nWidth as width of this mark
@@ -4382,10 +4382,10 @@ void OutputDevice::ImplDrawEmphasisMarks( SalLayout& rSalLayout )
Color aOldColor = GetTextColor();
Color aOldLineColor = GetLineColor();
Color aOldFillColor = GetFillColor();
- BOOL bOldMap = mbMap;
+ sal_Bool bOldMap = mbMap;
GDIMetaFile* pOldMetaFile = mpMetaFile;
mpMetaFile = NULL;
- EnableMapMode( FALSE );
+ EnableMapMode( sal_False );
FontEmphasisMark nEmphasisMark = ImplGetEmphasisMarkStyle( maFont );
PolyPolygon aPolyPoly;
@@ -4394,7 +4394,7 @@ void OutputDevice::ImplDrawEmphasisMarks( SalLayout& rSalLayout )
long nEmphasisYOff;
long nEmphasisWidth;
long nEmphasisHeight;
- BOOL bPolyLine;
+ sal_Bool bPolyLine;
if ( nEmphasisMark & EMPHASISMARK_POS_BELOW )
nEmphasisHeight = mnEmphasisDescent;
@@ -4518,12 +4518,12 @@ bool OutputDevice::ImplDrawRotateText( SalLayout& rSalLayout )
GDIMetaFile* pOldMetaFile = mpMetaFile;
long nOldOffX = mnOutOffX;
long nOldOffY = mnOutOffY;
- BOOL bOldMap = mbMap;
+ sal_Bool bOldMap = mbMap;
mnOutOffX = 0L;
mnOutOffY = 0L;
mpMetaFile = NULL;
- EnableMapMode( FALSE );
+ EnableMapMode( sal_False );
DrawMask( aPoint, aBmp, GetTextColor() );
@@ -4537,7 +4537,7 @@ bool OutputDevice::ImplDrawRotateText( SalLayout& rSalLayout )
// -----------------------------------------------------------------------
-void OutputDevice::ImplDrawTextDirect( SalLayout& rSalLayout, BOOL bTextLines )
+void OutputDevice::ImplDrawTextDirect( SalLayout& rSalLayout, sal_Bool bTextLines )
{
if( mpFontEntry->mnOwnOrientation )
if( ImplDrawRotateText( rSalLayout ) )
@@ -4731,7 +4731,7 @@ void OutputDevice::ImplDrawText( SalLayout& rSalLayout )
long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo,
long nWidth, const XubString& rStr,
- USHORT nStyle, const ::vcl::ITextLayout& _rLayout )
+ sal_uInt16 nStyle, const ::vcl::ITextLayout& _rLayout )
{
DBG_ASSERTWARNING( nWidth >= 0, "ImplGetTextLines: nWidth <= 0!" );
@@ -4801,10 +4801,10 @@ long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo,
// sal_uInt16 nWordStart = nBreakPos;
// sal_uInt16 nBreakPos_OLD = nBreakPos;
sal_uInt16 nWordStart = nPos;
- sal_uInt16 nWordEnd = (USHORT) aBoundary.endPos;
+ sal_uInt16 nWordEnd = (sal_uInt16) aBoundary.endPos;
DBG_ASSERT( nWordEnd > nWordStart, "ImpBreakLine: Start >= End?" );
- USHORT nWordLen = nWordEnd - nWordStart;
+ sal_uInt16 nWordLen = nWordEnd - nWordStart;
if ( ( nWordEnd >= nSoftBreak ) && ( nWordLen > 3 ) )
{
// #104415# May happen, because getLineBreak may differ from getWordBoudary with DICTIONARY_WORD
@@ -4887,7 +4887,7 @@ long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo,
else
{
// fallback to something really simple
- USHORT nSpacePos = STRING_LEN;
+ sal_uInt16 nSpacePos = STRING_LEN;
long nW = 0;
do
{
@@ -4929,7 +4929,7 @@ long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo,
}
}
#ifdef DBG_UTIL
- for ( USHORT nL = 0; nL < rLineInfo.Count(); nL++ )
+ for ( sal_uInt16 nL = 0; nL < rLineInfo.Count(); nL++ )
{
ImplTextLineInfo* pLine = rLineInfo.GetLine( nL );
String aLine( rStr, pLine->GetIndex(), pLine->GetLen() );
@@ -4943,12 +4943,12 @@ long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo,
// =======================================================================
-void OutputDevice::SetAntialiasing( USHORT nMode )
+void OutputDevice::SetAntialiasing( sal_uInt16 nMode )
{
if ( mnAntialiasing != nMode )
{
mnAntialiasing = nMode;
- mbInitFont = TRUE;
+ mbInitFont = sal_True;
if(mpGraphics)
{
@@ -4982,7 +4982,7 @@ void OutputDevice::SetFont( const Font& rNewFont )
aTextColor = Color( COL_WHITE );
else if ( mnDrawMode & DRAWMODE_GRAYTEXT )
{
- const UINT8 cLum = aTextColor.GetLuminance();
+ const sal_uInt8 cLum = aTextColor.GetLuminance();
aTextColor = Color( cLum, cLum, cLum );
}
else if ( mnDrawMode & DRAWMODE_SETTINGSTEXT )
@@ -4997,7 +4997,7 @@ void OutputDevice::SetFont( const Font& rNewFont )
aFont.SetColor( aTextColor );
- BOOL bTransFill = aFont.IsTransparent();
+ sal_Bool bTransFill = aFont.IsTransparent();
if ( !bTransFill )
{
Color aTextFillColor( aFont.GetFillColor() );
@@ -5008,7 +5008,7 @@ void OutputDevice::SetFont( const Font& rNewFont )
aTextFillColor = Color( COL_WHITE );
else if ( mnDrawMode & DRAWMODE_GRAYFILL )
{
- const UINT8 cLum = aTextFillColor.GetLuminance();
+ const sal_uInt8 cLum = aTextFillColor.GetLuminance();
aTextFillColor = Color( cLum, cLum, cLum );
}
else if( mnDrawMode & DRAWMODE_SETTINGSFILL )
@@ -5016,7 +5016,7 @@ void OutputDevice::SetFont( const Font& rNewFont )
else if ( mnDrawMode & DRAWMODE_NOFILL )
{
aTextFillColor = Color( COL_TRANSPARENT );
- bTransFill = TRUE;
+ bTransFill = sal_True;
}
if ( !bTransFill && (mnDrawMode & DRAWMODE_GHOSTEDFILL) )
@@ -5054,12 +5054,12 @@ void OutputDevice::SetFont( const Font& rNewFont )
&& (aFont.GetColor() != maFont.GetColor() || aFont.GetColor() != maTextColor ) )
{
maTextColor = aFont.GetColor();
- mbInitTextColor = TRUE;
+ mbInitTextColor = sal_True;
if( mpMetaFile )
mpMetaFile->AddAction( new MetaTextColorAction( aFont.GetColor() ) );
}
maFont = aFont;
- mbNewFont = TRUE;
+ mbNewFont = sal_True;
if( mpAlphaVDev )
{
@@ -5080,7 +5080,7 @@ void OutputDevice::SetFont( const Font& rNewFont )
// -----------------------------------------------------------------------
-void OutputDevice::SetLayoutMode( ULONG nTextLayoutMode )
+void OutputDevice::SetLayoutMode( sal_uIntPtr nTextLayoutMode )
{
DBG_TRACE( "OutputDevice::SetTextLayoutMode()" );
@@ -5127,7 +5127,7 @@ void OutputDevice::SetTextColor( const Color& rColor )
aColor = Color( COL_WHITE );
else if ( mnDrawMode & DRAWMODE_GRAYTEXT )
{
- const UINT8 cLum = aColor.GetLuminance();
+ const sal_uInt8 cLum = aColor.GetLuminance();
aColor = Color( cLum, cLum, cLum );
}
else if ( mnDrawMode & DRAWMODE_SETTINGSTEXT )
@@ -5147,7 +5147,7 @@ void OutputDevice::SetTextColor( const Color& rColor )
if ( maTextColor != aColor )
{
maTextColor = aColor;
- mbInitTextColor = TRUE;
+ mbInitTextColor = sal_True;
}
if( mpAlphaVDev )
@@ -5162,12 +5162,12 @@ void OutputDevice::SetTextFillColor()
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
if ( mpMetaFile )
- mpMetaFile->AddAction( new MetaTextFillColorAction( Color(), FALSE ) );
+ mpMetaFile->AddAction( new MetaTextFillColorAction( Color(), sal_False ) );
if ( maFont.GetColor() != Color( COL_TRANSPARENT ) )
maFont.SetFillColor( Color( COL_TRANSPARENT ) );
if ( !maFont.IsTransparent() )
- maFont.SetTransparent( TRUE );
+ maFont.SetTransparent( sal_True );
if( mpAlphaVDev )
mpAlphaVDev->SetTextFillColor();
@@ -5181,7 +5181,7 @@ void OutputDevice::SetTextFillColor( const Color& rColor )
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
Color aColor( rColor );
- BOOL bTransFill = ImplIsColorTransparent( aColor ) ? TRUE : FALSE;
+ sal_Bool bTransFill = ImplIsColorTransparent( aColor ) ? sal_True : sal_False;
if ( !bTransFill )
{
@@ -5195,7 +5195,7 @@ void OutputDevice::SetTextFillColor( const Color& rColor )
aColor = Color( COL_WHITE );
else if ( mnDrawMode & DRAWMODE_GRAYFILL )
{
- const UINT8 cLum = aColor.GetLuminance();
+ const sal_uInt8 cLum = aColor.GetLuminance();
aColor = Color( cLum, cLum, cLum );
}
else if( mnDrawMode & DRAWMODE_SETTINGSFILL )
@@ -5203,7 +5203,7 @@ void OutputDevice::SetTextFillColor( const Color& rColor )
else if ( mnDrawMode & DRAWMODE_NOFILL )
{
aColor = Color( COL_TRANSPARENT );
- bTransFill = TRUE;
+ bTransFill = sal_True;
}
if ( !bTransFill && (mnDrawMode & DRAWMODE_GHOSTEDFILL) )
@@ -5216,7 +5216,7 @@ void OutputDevice::SetTextFillColor( const Color& rColor )
}
if ( mpMetaFile )
- mpMetaFile->AddAction( new MetaTextFillColorAction( aColor, TRUE ) );
+ mpMetaFile->AddAction( new MetaTextFillColorAction( aColor, sal_True ) );
if ( maFont.GetFillColor() != aColor )
maFont.SetFillColor( aColor );
@@ -5245,7 +5245,7 @@ void OutputDevice::SetTextLineColor()
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
if ( mpMetaFile )
- mpMetaFile->AddAction( new MetaTextLineColorAction( Color(), FALSE ) );
+ mpMetaFile->AddAction( new MetaTextLineColorAction( Color(), sal_False ) );
maTextLineColor = Color( COL_TRANSPARENT );
@@ -5272,7 +5272,7 @@ void OutputDevice::SetTextLineColor( const Color& rColor )
aColor = Color( COL_WHITE );
else if ( mnDrawMode & DRAWMODE_GRAYTEXT )
{
- const UINT8 cLum = aColor.GetLuminance();
+ const sal_uInt8 cLum = aColor.GetLuminance();
aColor = Color( cLum, cLum, cLum );
}
else if ( mnDrawMode & DRAWMODE_SETTINGSTEXT )
@@ -5288,7 +5288,7 @@ void OutputDevice::SetTextLineColor( const Color& rColor )
}
if ( mpMetaFile )
- mpMetaFile->AddAction( new MetaTextLineColorAction( aColor, TRUE ) );
+ mpMetaFile->AddAction( new MetaTextLineColorAction( aColor, sal_True ) );
maTextLineColor = aColor;
@@ -5304,7 +5304,7 @@ void OutputDevice::SetOverlineColor()
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
if ( mpMetaFile )
- mpMetaFile->AddAction( new MetaOverlineColorAction( Color(), FALSE ) );
+ mpMetaFile->AddAction( new MetaOverlineColorAction( Color(), sal_False ) );
maOverlineColor = Color( COL_TRANSPARENT );
@@ -5331,7 +5331,7 @@ void OutputDevice::SetOverlineColor( const Color& rColor )
aColor = Color( COL_WHITE );
else if ( mnDrawMode & DRAWMODE_GRAYTEXT )
{
- const UINT8 cLum = aColor.GetLuminance();
+ const sal_uInt8 cLum = aColor.GetLuminance();
aColor = Color( cLum, cLum, cLum );
}
else if ( mnDrawMode & DRAWMODE_SETTINGSTEXT )
@@ -5347,7 +5347,7 @@ void OutputDevice::SetOverlineColor( const Color& rColor )
}
if ( mpMetaFile )
- mpMetaFile->AddAction( new MetaOverlineColorAction( aColor, TRUE ) );
+ mpMetaFile->AddAction( new MetaOverlineColorAction( aColor, sal_True ) );
maOverlineColor = aColor;
@@ -5369,7 +5369,7 @@ void OutputDevice::SetTextAlign( TextAlign eAlign )
if ( maFont.GetAlign() != eAlign )
{
maFont.SetAlign( eAlign );
- mbNewFont = TRUE;
+ mbNewFont = sal_True;
}
if( mpAlphaVDev )
@@ -5382,7 +5382,7 @@ void OutputDevice::DrawTextLine( const Point& rPos, long nWidth,
FontStrikeout eStrikeout,
FontUnderline eUnderline,
FontUnderline eOverline,
- BOOL bUnderlineAbove )
+ sal_Bool bUnderlineAbove )
{
DBG_TRACE( "OutputDevice::DrawTextLine()" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
@@ -5425,7 +5425,7 @@ void OutputDevice::DrawTextLine( const Point& rPos, long nWidth,
// ------------------------------------------------------------------------
-BOOL OutputDevice::IsTextUnderlineAbove( const Font& rFont )
+sal_Bool OutputDevice::IsTextUnderlineAbove( const Font& rFont )
{
return ImplIsUnderlineAbove( rFont );
}
@@ -5433,7 +5433,7 @@ BOOL OutputDevice::IsTextUnderlineAbove( const Font& rFont )
// ------------------------------------------------------------------------
void OutputDevice::DrawWaveLine( const Point& rStartPos, const Point& rEndPos,
- USHORT nStyle )
+ sal_uInt16 nStyle )
{
DBG_TRACE( "OutputDevice::DrawWaveLine()" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
@@ -5661,7 +5661,7 @@ long OutputDevice::GetTextArray( const String& rStr, sal_Int32* pDXAry,
if( nIndex >= rStr.Len() )
return 0;
- if( (ULONG)nIndex+nLen >= rStr.Len() )
+ if( (sal_uIntPtr)nIndex+nLen >= rStr.Len() )
nLen = rStr.Len() - nIndex;
// do layout
@@ -5703,14 +5703,14 @@ long OutputDevice::GetTextArray( const String& rStr, sal_Int32* pDXAry,
bool OutputDevice::GetCaretPositions( const XubString& rStr, sal_Int32* pCaretXArray,
xub_StrLen nIndex, xub_StrLen nLen,
sal_Int32* pDXAry, long nLayoutWidth,
- BOOL bCellBreaking ) const
+ sal_Bool bCellBreaking ) const
{
DBG_TRACE( "OutputDevice::GetCaretPositions()" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
if( nIndex >= rStr.Len() )
return false;
- if( (ULONG)nIndex+nLen >= rStr.Len() )
+ if( (sal_uIntPtr)nIndex+nLen >= rStr.Len() )
nLen = rStr.Len() - nIndex;
// layout complex text
@@ -5769,7 +5769,7 @@ bool OutputDevice::GetCaretPositions( const XubString& rStr, sal_Int32* pCaretXA
// -----------------------------------------------------------------------
-void OutputDevice::DrawStretchText( const Point& rStartPt, ULONG nWidth,
+void OutputDevice::DrawStretchText( const Point& rStartPt, sal_uIntPtr nWidth,
const String& rStr,
xub_StrLen nIndex, xub_StrLen nLen )
{
@@ -5801,7 +5801,7 @@ ImplLayoutArgs OutputDevice::ImplPrepareLayoutArgs( String& rStr,
{
// get string length for calculating extents
xub_StrLen nEndIndex = rStr.Len();
- if( (ULONG)nMinIndex + nLen < nEndIndex )
+ if( (sal_uIntPtr)nMinIndex + nLen < nEndIndex )
nEndIndex = nMinIndex + nLen;
// don't bother if there is nothing to do
@@ -5870,7 +5870,7 @@ ImplLayoutArgs OutputDevice::ImplPrepareLayoutArgs( String& rStr,
sal_UCS4 cChar = GetLocalizedChar( *pStr, meTextLanguage );
if( cChar != *pStr )
// TODO: are the localized digit surrogates?
- rStr.SetChar( static_cast<USHORT>(pStr - pBase),
+ rStr.SetChar( static_cast<sal_uInt16>(pStr - pBase),
static_cast<sal_Unicode>(cChar) );
}
}
@@ -6143,7 +6143,7 @@ SalLayout* OutputDevice::ImplGlyphFallbackLayout( SalLayout* pSalLayout, ImplLay
// -----------------------------------------------------------------------
-BOOL OutputDevice::GetTextIsRTL(
+sal_Bool OutputDevice::GetTextIsRTL(
const String& rString,
xub_StrLen nIndex, xub_StrLen nLen ) const
{
@@ -6152,14 +6152,14 @@ BOOL OutputDevice::GetTextIsRTL(
bool bRTL = false;
int nCharPos = -1;
aArgs.GetNextPos( &nCharPos, &bRTL );
- return (nCharPos != nIndex) ? TRUE : FALSE;
+ return (nCharPos != nIndex) ? sal_True : sal_False;
}
// -----------------------------------------------------------------------
xub_StrLen OutputDevice::GetTextBreak( const String& rStr, long nTextWidth,
xub_StrLen nIndex, xub_StrLen nLen,
- long nCharExtra, BOOL /*TODO: bCellBreaking*/ ) const
+ long nCharExtra, sal_Bool /*TODO: bCellBreaking*/ ) const
{
DBG_TRACE( "OutputDevice::GetTextBreak()" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
@@ -6253,17 +6253,17 @@ xub_StrLen OutputDevice::GetTextBreak( const String& rStr, long nTextWidth,
// -----------------------------------------------------------------------
void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const Rectangle& rRect,
- const String& rOrigStr, USHORT nStyle,
+ const String& rOrigStr, sal_uInt16 nStyle,
MetricVector* pVector, String* pDisplayText,
::vcl::ITextLayout& _rLayout )
{
Color aOldTextColor;
Color aOldTextFillColor;
- BOOL bRestoreFillColor = false;
+ sal_Bool bRestoreFillColor = false;
if ( (nStyle & TEXT_DRAW_DISABLE) && ! pVector )
{
- BOOL bHighContrastBlack = FALSE;
- BOOL bHighContrastWhite = FALSE;
+ sal_Bool bHighContrastBlack = sal_False;
+ sal_Bool bHighContrastWhite = sal_False;
const StyleSettings& rStyleSettings( rTargetDevice.GetSettings().GetStyleSettings() );
if( rStyleSettings.GetHighContrastMode() )
{
@@ -6283,7 +6283,7 @@ void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const Rectangle& r
aOldTextColor = rTargetDevice.GetTextColor();
if ( rTargetDevice.IsTextFillColor() )
{
- bRestoreFillColor = TRUE;
+ bRestoreFillColor = sal_True;
aOldTextFillColor = rTargetDevice.GetTextFillColor();
}
if( bHighContrastBlack )
@@ -6412,7 +6412,7 @@ void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const Rectangle& r
long nMnemonicWidth;
sal_Int32* pCaretXArray = (sal_Int32*) alloca( 2 * sizeof(sal_Int32) * nLineLen );
- /*BOOL bRet =*/ _rLayout.GetCaretPositions( aStr, pCaretXArray,
+ /*sal_Bool bRet =*/ _rLayout.GetCaretPositions( aStr, pCaretXArray,
nIndex, nLineLen );
long lc_x1 = pCaretXArray[2*(nMnemonicPos - nIndex)];
long lc_x2 = pCaretXArray[2*(nMnemonicPos - nIndex)+1];
@@ -6483,7 +6483,7 @@ void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const Rectangle& r
if ( nMnemonicPos != STRING_NOTFOUND )
{
sal_Int32* pCaretXArray = (sal_Int32*) alloca( 2 * sizeof(sal_Int32) * aStr.Len() );
- /*BOOL bRet =*/ _rLayout.GetCaretPositions( aStr, pCaretXArray, 0, aStr.Len() );
+ /*sal_Bool bRet =*/ _rLayout.GetCaretPositions( aStr, pCaretXArray, 0, aStr.Len() );
long lc_x1 = pCaretXArray[2*(nMnemonicPos)];
long lc_x2 = pCaretXArray[2*(nMnemonicPos)+1];
nMnemonicWidth = rTargetDevice.ImplLogicWidthToDevicePixel( ::abs((int)(lc_x1 - lc_x2)) );
@@ -6528,7 +6528,7 @@ void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const Rectangle& r
void OutputDevice::AddTextRectActions( const Rectangle& rRect,
const String& rOrigStr,
- USHORT nStyle,
+ sal_uInt16 nStyle,
GDIMetaFile& rMtf )
{
DBG_TRACE( "OutputDevice::AddTextRectActions( const Rectangle& )" );
@@ -6545,11 +6545,11 @@ void OutputDevice::AddTextRectActions( const Rectangle& rRect,
// temporarily swap in passed mtf for action generation, and
// disable output generation.
- const BOOL bOutputEnabled( IsOutputEnabled() );
+ const sal_Bool bOutputEnabled( IsOutputEnabled() );
GDIMetaFile* pMtf = mpMetaFile;
mpMetaFile = &rMtf;
- EnableOutput( FALSE );
+ EnableOutput( sal_False );
// #i47157# Factored out to ImplDrawTextRect(), to be shared
// between us and DrawText()
@@ -6563,7 +6563,7 @@ void OutputDevice::AddTextRectActions( const Rectangle& rRect,
// -----------------------------------------------------------------------
-void OutputDevice::DrawText( const Rectangle& rRect, const String& rOrigStr, USHORT nStyle,
+void OutputDevice::DrawText( const Rectangle& rRect, const String& rOrigStr, sal_uInt16 nStyle,
MetricVector* pVector, String* pDisplayText,
::vcl::ITextLayout* _pTextLayout )
{
@@ -6612,7 +6612,7 @@ void OutputDevice::DrawText( const Rectangle& rRect, const String& rOrigStr, USH
// -----------------------------------------------------------------------
Rectangle OutputDevice::GetTextRect( const Rectangle& rRect,
- const XubString& rStr, USHORT nStyle,
+ const XubString& rStr, sal_uInt16 nStyle,
TextRectInfo* pInfo,
const ::vcl::ITextLayout* _pTextLayout ) const
{
@@ -6642,7 +6642,7 @@ Rectangle OutputDevice::GetTextRect( const Rectangle& rRect,
nFormatLines = aMultiLineInfo.Count();
if ( !nTextHeight )
nTextHeight = 1;
- nLines = (USHORT)(aRect.GetHeight()/nTextHeight);
+ nLines = (sal_uInt16)(aRect.GetHeight()/nTextHeight);
if ( pInfo )
pInfo->mnLineCount = nFormatLines;
if ( !nLines )
@@ -6656,13 +6656,13 @@ Rectangle OutputDevice::GetTextRect( const Rectangle& rRect,
else
{
if ( pInfo )
- pInfo->mbEllipsis = TRUE;
+ pInfo->mbEllipsis = sal_True;
nMaxWidth = nWidth;
}
}
if ( pInfo )
{
- BOOL bMaxWidth = nMaxWidth == 0;
+ sal_Bool bMaxWidth = nMaxWidth == 0;
pInfo->mnMaxWidth = 0;
for ( i = 0; i < nLines; i++ )
{
@@ -6697,7 +6697,7 @@ Rectangle OutputDevice::GetTextRect( const Rectangle& rRect,
if ( (nMaxWidth > nWidth) && (nStyle & TEXT_DRAW_ELLIPSIS) )
{
if ( pInfo )
- pInfo->mbEllipsis = TRUE;
+ pInfo->mbEllipsis = sal_True;
nMaxWidth = nWidth;
}
}
@@ -6728,22 +6728,22 @@ Rectangle OutputDevice::GetTextRect( const Rectangle& rRect,
// -----------------------------------------------------------------------
-static BOOL ImplIsCharIn( xub_Unicode c, const sal_Char* pStr )
+static sal_Bool ImplIsCharIn( xub_Unicode c, const sal_Char* pStr )
{
while ( *pStr )
{
if ( *pStr == c )
- return TRUE;
+ return sal_True;
pStr++;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
String OutputDevice::GetEllipsisString( const String& rOrigStr, long nMaxWidth,
- USHORT nStyle ) const
+ sal_uInt16 nStyle ) const
{
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
DefaultTextLayout aTextLayout( *const_cast< OutputDevice* >( this ) );
@@ -6753,7 +6753,7 @@ String OutputDevice::GetEllipsisString( const String& rOrigStr, long nMaxWidth,
// -----------------------------------------------------------------------
String OutputDevice::ImplGetEllipsisString( const OutputDevice& rTargetDevice, const XubString& rOrigStr, long nMaxWidth,
- USHORT nStyle, const ::vcl::ITextLayout& _rLayout )
+ sal_uInt16 nStyle, const ::vcl::ITextLayout& _rLayout )
{
DBG_TRACE( "OutputDevice::ImplGetEllipsisString()" );
@@ -6809,7 +6809,7 @@ String OutputDevice::ImplGetEllipsisString( const OutputDevice& rTargetDevice, c
aStr = OutputDevice::ImplGetEllipsisString( rTargetDevice, aStr, nMaxWidth, nStyle | TEXT_DRAW_ENDELLIPSIS, _rLayout );
else
{
- USHORT nFirstContent = 0;
+ sal_uInt16 nFirstContent = 0;
while ( nFirstContent < nLastContent )
{
nFirstContent++;
@@ -6873,7 +6873,7 @@ String OutputDevice::ImplGetEllipsisString( const OutputDevice& rTargetDevice, c
void OutputDevice::DrawCtrlText( const Point& rPos, const XubString& rStr,
xub_StrLen nIndex, xub_StrLen nLen,
- USHORT nStyle, MetricVector* pVector, String* pDisplayText )
+ sal_uInt16 nStyle, MetricVector* pVector, String* pDisplayText )
{
DBG_TRACE( "OutputDevice::DrawCtrlText()" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
@@ -6892,7 +6892,7 @@ void OutputDevice::DrawCtrlText( const Point& rPos, const XubString& rStr,
if( nIndex >= rStr.Len() )
return;
- if( (ULONG)nIndex+nLen >= rStr.Len() )
+ if( (sal_uIntPtr)nIndex+nLen >= rStr.Len() )
nLen = rStr.Len() - nIndex;
XubString aStr = rStr;
@@ -6914,7 +6914,7 @@ void OutputDevice::DrawCtrlText( const Point& rPos, const XubString& rStr,
--nLen;
DBG_ASSERT( nMnemonicPos < (nIndex+nLen), "Mnemonic underline marker after last character" );
}
- BOOL bInvalidPos = FALSE;
+ sal_Bool bInvalidPos = sal_False;
if( nMnemonicPos >= nLen )
{
@@ -6922,12 +6922,12 @@ void OutputDevice::DrawCtrlText( const Point& rPos, const XubString& rStr,
// may occur in BiDi-Strings: the '~' is sometimes found behind the last char
// due to some strange BiDi text editors
// ->place the underline behind the string to indicate a failure
- bInvalidPos = TRUE;
+ bInvalidPos = sal_True;
nMnemonicPos = nLen-1;
}
sal_Int32* pCaretXArray = (sal_Int32*)alloca( 2 * sizeof(sal_Int32) * nLen );
- /*BOOL bRet =*/ GetCaretPositions( aStr, pCaretXArray, nIndex, nLen );
+ /*sal_Bool bRet =*/ GetCaretPositions( aStr, pCaretXArray, nIndex, nLen );
long lc_x1 = pCaretXArray[ 2*(nMnemonicPos - nIndex) ];
long lc_x2 = pCaretXArray[ 2*(nMnemonicPos - nIndex)+1 ];
nMnemonicWidth = ::abs((int)(lc_x1 - lc_x2));
@@ -6947,9 +6947,9 @@ void OutputDevice::DrawCtrlText( const Point& rPos, const XubString& rStr,
{
Color aOldTextColor;
Color aOldTextFillColor;
- BOOL bRestoreFillColor;
- BOOL bHighContrastBlack = FALSE;
- BOOL bHighContrastWhite = FALSE;
+ sal_Bool bRestoreFillColor;
+ sal_Bool bHighContrastBlack = sal_False;
+ sal_Bool bHighContrastWhite = sal_False;
const StyleSettings& rStyleSettings( GetSettings().GetStyleSettings() );
if( rStyleSettings.GetHighContrastMode() )
{
@@ -6965,11 +6965,11 @@ void OutputDevice::DrawCtrlText( const Point& rPos, const XubString& rStr,
aOldTextColor = GetTextColor();
if ( IsTextFillColor() )
{
- bRestoreFillColor = TRUE;
+ bRestoreFillColor = sal_True;
aOldTextFillColor = GetTextFillColor();
}
else
- bRestoreFillColor = FALSE;
+ bRestoreFillColor = sal_False;
if( bHighContrastBlack )
SetTextColor( COL_GREEN );
@@ -7006,7 +7006,7 @@ void OutputDevice::DrawCtrlText( const Point& rPos, const XubString& rStr,
long OutputDevice::GetCtrlTextWidth( const String& rStr,
xub_StrLen nIndex, xub_StrLen nLen,
- USHORT nStyle ) const
+ sal_uInt16 nStyle ) const
{
DBG_TRACE( "OutputDevice::GetCtrlTextSize()" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
@@ -7020,7 +7020,7 @@ long OutputDevice::GetCtrlTextWidth( const String& rStr,
if ( nMnemonicPos < nIndex )
nIndex--;
else if ( (nLen < STRING_LEN) &&
- (nMnemonicPos >= nIndex) && (nMnemonicPos < (ULONG)(nIndex+nLen)) )
+ (nMnemonicPos >= nIndex) && (nMnemonicPos < (sal_uIntPtr)(nIndex+nLen)) )
nLen--;
}
return GetTextWidth( aStr, nIndex, nLen );
@@ -7109,7 +7109,7 @@ FontInfo OutputDevice::GetDevFont( int nDevFontIndex ) const
// -----------------------------------------------------------------------
-BOOL OutputDevice::AddTempDevFont( const String& rFileURL, const String& rFontName )
+sal_Bool OutputDevice::AddTempDevFont( const String& rFileURL, const String& rFontName )
{
DBG_TRACE( "OutputDevice::AddTempDevFont()" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
@@ -7117,17 +7117,17 @@ BOOL OutputDevice::AddTempDevFont( const String& rFileURL, const String& rFontNa
ImplInitFontList();
if( !mpGraphics && !ImplGetGraphics() )
- return FALSE;
+ return sal_False;
bool bRC = mpGraphics->AddTempDevFont( mpFontList, rFileURL, rFontName );
if( !bRC )
- return FALSE;
+ return sal_False;
if( mpAlphaVDev )
mpAlphaVDev->AddTempDevFont( rFileURL, rFontName );
mpFontCache->Invalidate();
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -7181,7 +7181,7 @@ Size OutputDevice::GetDevFontSize( const Font& rFont, int nSizeIndex ) const
// -----------------------------------------------------------------------
-BOOL OutputDevice::IsFontAvailable( const String& rFontName ) const
+sal_Bool OutputDevice::IsFontAvailable( const String& rFontName ) const
{
DBG_TRACE( "OutputDevice::IsFontAvailable()" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
@@ -7405,7 +7405,7 @@ xub_StrLen OutputDevice::ValidateKashidas ( const String& rTxt,
// TODO: best is to get rid of this method completely
-ULONG OutputDevice::GetKerningPairCount() const
+sal_uIntPtr OutputDevice::GetKerningPairCount() const
{
DBG_TRACE( "OutputDevice::GetKerningPairCount()" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
@@ -7431,7 +7431,7 @@ inline bool CmpKernData( const KerningPair& a, const KerningPair& b )
}
// TODO: best is to get rid of this method completely
-void OutputDevice::GetKerningPairs( ULONG nRequestedPairs, KerningPair* pKernPairs ) const
+void OutputDevice::GetKerningPairs( sal_uIntPtr nRequestedPairs, KerningPair* pKernPairs ) const
{
DBG_TRACE( "OutputDevice::GetKerningPairs()" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
@@ -7453,7 +7453,7 @@ void OutputDevice::GetKerningPairs( ULONG nRequestedPairs, KerningPair* pKernPai
// -----------------------------------------------------------------------
-BOOL OutputDevice::GetGlyphBoundRects( const Point& rOrigin, const String& rStr,
+sal_Bool OutputDevice::GetGlyphBoundRects( const Point& rOrigin, const String& rStr,
int nIndex, int nLen, int nBase, MetricVector& rVector )
{
DBG_TRACE( "OutputDevice::GetGlyphBoundRect_CTL()" );
@@ -7478,14 +7478,14 @@ BOOL OutputDevice::GetGlyphBoundRects( const Point& rOrigin, const String& rStr,
// -----------------------------------------------------------------------
-BOOL OutputDevice::GetTextBoundRect( Rectangle& rRect,
+sal_Bool OutputDevice::GetTextBoundRect( Rectangle& rRect,
const String& rStr, xub_StrLen nBase, xub_StrLen nIndex, xub_StrLen nLen,
- ULONG nLayoutWidth, const sal_Int32* pDXAry ) const
+ sal_uIntPtr nLayoutWidth, const sal_Int32* pDXAry ) const
{
DBG_TRACE( "OutputDevice::GetTextBoundRect()" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
rRect.SetEmpty();
SalLayout* pSalLayout = NULL;
@@ -7549,8 +7549,8 @@ BOOL OutputDevice::GetTextBoundRect( Rectangle& rRect,
// so we need a monochrome virtual device with matching font
VirtualDevice aVDev( 1 );
Font aFont( GetFont() );
- aFont.SetShadow( FALSE );
- aFont.SetOutline( FALSE );
+ aFont.SetShadow( sal_False );
+ aFont.SetOutline( sal_False );
aFont.SetRelief( RELIEF_NONE );
aFont.SetOrientation( 0 );
aFont.SetSize( Size( mpFontEntry->maFontSelData.mnWidth, mpFontEntry->maFontSelData.mnHeight ) );
@@ -7583,7 +7583,7 @@ BOOL OutputDevice::GetTextBoundRect( Rectangle& rRect,
Bitmap aBmp = aVDev.GetBitmap( Point(), aOutSize );
BitmapReadAccess* pAcc = aBmp.AcquireReadAccess();
if( !pAcc )
- return FALSE;
+ return sal_False;
const BitmapColor aBlack( pAcc->GetBestMatchingColor( Color( COL_BLACK ) ) );
const long nW = pAcc->Width();
const long nH = pAcc->Height();
@@ -7648,17 +7648,17 @@ BOOL OutputDevice::GetTextBoundRect( Rectangle& rRect,
aTopLeft.X() = ImplDevicePixelToLogicWidth( aTopLeft.X() );
aTopLeft.Y() = ImplDevicePixelToLogicHeight( aTopLeft.Y() );
rRect = Rectangle( aTopLeft, aSize );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL OutputDevice::GetTextOutlines( ::basegfx::B2DPolyPolygonVector& rVector,
+sal_Bool OutputDevice::GetTextOutlines( ::basegfx::B2DPolyPolygonVector& rVector,
const String& rStr, xub_StrLen nBase, xub_StrLen nIndex, xub_StrLen nLen,
- BOOL bOptimize, ULONG nTWidth, const sal_Int32* pDXArray ) const
+ sal_Bool bOptimize, sal_uIntPtr nTWidth, const sal_Int32* pDXArray ) const
{
// the fonts need to be initialized
if( mbNewFont )
@@ -7666,9 +7666,9 @@ BOOL OutputDevice::GetTextOutlines( ::basegfx::B2DPolyPolygonVector& rVector,
if( mbInitFont )
ImplInitFont();
if( !mpFontEntry )
- return FALSE;
+ return sal_False;
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
rVector.clear();
if( nLen == STRING_LEN )
nLen = rStr.Len() - nIndex;
@@ -7676,11 +7676,11 @@ BOOL OutputDevice::GetTextOutlines( ::basegfx::B2DPolyPolygonVector& rVector,
// we want to get the Rectangle in logical units, so to
// avoid rounding errors we just size the font in logical units
- BOOL bOldMap = mbMap;
+ sal_Bool bOldMap = mbMap;
if( bOldMap )
{
- const_cast<OutputDevice&>(*this).mbMap = FALSE;
- const_cast<OutputDevice&>(*this).mbNewFont = TRUE;
+ const_cast<OutputDevice&>(*this).mbMap = sal_False;
+ const_cast<OutputDevice&>(*this).mbNewFont = sal_True;
}
SalLayout* pSalLayout = NULL;
@@ -7740,7 +7740,7 @@ BOOL OutputDevice::GetTextOutlines( ::basegfx::B2DPolyPolygonVector& rVector,
{
// restore original font size and map mode
const_cast<OutputDevice&>(*this).mbMap = bOldMap;
- const_cast<OutputDevice&>(*this).mbNewFont = TRUE;
+ const_cast<OutputDevice&>(*this).mbNewFont = sal_True;
}
if( bRet || (OUTDEV_PRINTER == meOutDevType) || !mpFontEntry )
@@ -7787,7 +7787,7 @@ BOOL OutputDevice::GetTextOutlines( ::basegfx::B2DPolyPolygonVector& rVector,
pSalLayout->Release();
if( !nWidth || !nHeight )
- return TRUE;
+ return sal_True;
double fScaleX = static_cast< double >(nOrgWidth) / nWidth;
double fScaleY = static_cast< double >(nOrgHeight) / nHeight;
@@ -7844,10 +7844,10 @@ BOOL OutputDevice::GetTextOutlines( ::basegfx::B2DPolyPolygonVector& rVector,
else
{
// convert units to logical width
- for (USHORT j = 0; j < aPolyPoly.Count(); ++j)
+ for (sal_uInt16 j = 0; j < aPolyPoly.Count(); ++j)
{
Polygon& rPoly = aPolyPoly[j];
- for (USHORT k = 0; k < rPoly.GetSize(); ++k)
+ for (sal_uInt16 k = 0; k < rPoly.GetSize(); ++k)
{
Point& rPt = rPoly[k];
rPt -= aOffset;
@@ -7885,9 +7885,9 @@ BOOL OutputDevice::GetTextOutlines( ::basegfx::B2DPolyPolygonVector& rVector,
// -----------------------------------------------------------------------
-BOOL OutputDevice::GetTextOutlines( PolyPolyVector& rResultVector,
+sal_Bool OutputDevice::GetTextOutlines( PolyPolyVector& rResultVector,
const String& rStr, xub_StrLen nBase, xub_StrLen nIndex,
- xub_StrLen nLen, BOOL bOptimize, ULONG nTWidth, const sal_Int32* pDXArray ) const
+ xub_StrLen nLen, sal_Bool bOptimize, sal_uIntPtr nTWidth, const sal_Int32* pDXArray ) const
{
rResultVector.clear();
@@ -7895,7 +7895,7 @@ BOOL OutputDevice::GetTextOutlines( PolyPolyVector& rResultVector,
::basegfx::B2DPolyPolygonVector aB2DPolyPolyVector;
if( !GetTextOutlines( aB2DPolyPolyVector, rStr, nBase, nIndex, nLen,
bOptimize, nTWidth, pDXArray ) )
- return FALSE;
+ return sal_False;
// convert to a tool polypolygon vector
rResultVector.reserve( aB2DPolyPolyVector.size() );
@@ -7903,14 +7903,14 @@ BOOL OutputDevice::GetTextOutlines( PolyPolyVector& rResultVector,
for(; aIt != aB2DPolyPolyVector.end(); ++aIt )
rResultVector.push_back(PolyPolygon(*aIt)); // #i76339#
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-BOOL OutputDevice::GetTextOutline( PolyPolygon& rPolyPoly,
+sal_Bool OutputDevice::GetTextOutline( PolyPolygon& rPolyPoly,
const String& rStr, xub_StrLen nBase, xub_StrLen nIndex, xub_StrLen nLen,
- BOOL bOptimize, ULONG nTWidth, const sal_Int32* pDXArray ) const
+ sal_Bool bOptimize, sal_uIntPtr nTWidth, const sal_Int32* pDXArray ) const
{
rPolyPoly.Clear();
@@ -7918,7 +7918,7 @@ BOOL OutputDevice::GetTextOutline( PolyPolygon& rPolyPoly,
::basegfx::B2DPolyPolygonVector aB2DPolyPolyVector;
if( !GetTextOutlines( aB2DPolyPolyVector, rStr, nBase, nIndex, nLen,
bOptimize, nTWidth, pDXArray ) )
- return FALSE;
+ return sal_False;
// convert and merge into a tool polypolygon
::basegfx::B2DPolyPolygonVector::const_iterator aIt = aB2DPolyPolyVector.begin();
@@ -7926,25 +7926,25 @@ BOOL OutputDevice::GetTextOutline( PolyPolygon& rPolyPoly,
for( unsigned int i = 0; i < aIt->count(); ++i )
rPolyPoly.Insert(Polygon((*aIt).getB2DPolygon( i ))); // #i76339#
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-BOOL OutputDevice::GetFontCharMap( FontCharMap& rFontCharMap ) const
+sal_Bool OutputDevice::GetFontCharMap( FontCharMap& rFontCharMap ) const
{
rFontCharMap.Reset();
// we need a graphics
if( !mpGraphics && !ImplGetGraphics() )
- return FALSE;
+ return sal_False;
if( mbNewFont )
ImplNewFont();
if( mbInitFont )
ImplInitFont();
if( !mpFontEntry )
- return FALSE;
+ return sal_False;
// a little font charmap cache helps considerably
static const int NMAXITEMS = 16;
@@ -7981,8 +7981,8 @@ BOOL OutputDevice::GetFontCharMap( FontCharMap& rFontCharMap ) const
}
if( rFontCharMap.IsDefaultMap() )
- return FALSE;
- return TRUE;
+ return sal_False;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -7993,7 +7993,7 @@ xub_StrLen OutputDevice::HasGlyphs( const Font& rTempFont, const String& rStr,
if( nIndex >= rStr.Len() )
return nIndex;
xub_StrLen nEnd = nIndex + nLen;
- if( (ULONG)nIndex+nLen > rStr.Len() )
+ if( (sal_uIntPtr)nIndex+nLen > rStr.Len() )
nEnd = rStr.Len();
DBG_ASSERT( nIndex < nEnd, "StartPos >= EndPos?" );
@@ -8003,11 +8003,11 @@ xub_StrLen OutputDevice::HasGlyphs( const Font& rTempFont, const String& rStr,
const Font aOrigFont = GetFont();
const_cast<OutputDevice&>(*this).SetFont( rTempFont );
FontCharMap aFontCharMap;
- BOOL bRet = GetFontCharMap( aFontCharMap );
+ sal_Bool bRet = GetFontCharMap( aFontCharMap );
const_cast<OutputDevice&>(*this).SetFont( aOrigFont );
// if fontmap is unknown assume it doesn't have the glyphs
- if( bRet == FALSE )
+ if( bRet == sal_False )
return nIndex;
const sal_Unicode* pStr = rStr.GetBuffer();
diff --git a/vcl/source/gdi/outdev4.cxx b/vcl/source/gdi/outdev4.cxx
index 8ad02ed2d818..a18b7ff48413 100644
--- a/vcl/source/gdi/outdev4.cxx
+++ b/vcl/source/gdi/outdev4.cxx
@@ -86,7 +86,7 @@ void OutputDevice::ImplDrawPolygon( const Polygon& rPoly, const PolyPolygon* pCl
ImplDrawPolyPolygon( rPoly, pClipPolyPoly );
else
{
- USHORT nPoints = rPoly.GetSize();
+ sal_uInt16 nPoints = rPoly.GetSize();
if ( nPoints < 2 )
return;
@@ -113,7 +113,7 @@ void OutputDevice::ImplDrawPolyPolygon( const PolyPolygon& rPolyPoly, const Poly
if( pPolyPoly->Count() == 1 )
{
const Polygon rPoly = pPolyPoly->GetObject( 0 );
- USHORT nSize = rPoly.GetSize();
+ sal_uInt16 nSize = rPoly.GetSize();
if( nSize >= 2 )
{
@@ -123,14 +123,14 @@ void OutputDevice::ImplDrawPolyPolygon( const PolyPolygon& rPolyPoly, const Poly
}
else if( pPolyPoly->Count() )
{
- USHORT nCount = pPolyPoly->Count();
+ sal_uInt16 nCount = pPolyPoly->Count();
sal_uInt32* pPointAry = new sal_uInt32[nCount];
PCONSTSALPOINT* pPointAryAry = new PCONSTSALPOINT[nCount];
- USHORT i = 0;
+ sal_uInt16 i = 0;
do
{
const Polygon& rPoly = pPolyPoly->GetObject( i );
- USHORT nSize = rPoly.GetSize();
+ sal_uInt16 nSize = rPoly.GetSize();
if ( nSize )
{
pPointAry[i] = nSize;
@@ -157,21 +157,21 @@ void OutputDevice::ImplDrawPolyPolygon( const PolyPolygon& rPolyPoly, const Poly
// -----------------------------------------------------------------------
-inline UINT8 ImplGetGradientColorValue( long nValue )
+inline sal_uInt8 ImplGetGradientColorValue( long nValue )
{
if ( nValue < 0 )
return 0;
else if ( nValue > 0xFF )
return 0xFF;
else
- return (UINT8)nValue;
+ return (sal_uInt8)nValue;
}
// -----------------------------------------------------------------------
void OutputDevice::ImplDrawLinearGradient( const Rectangle& rRect,
const Gradient& rGradient,
- BOOL bMtf, const PolyPolygon* pClipPolyPoly )
+ sal_Bool bMtf, const PolyPolygon* pClipPolyPoly )
{
// rotiertes BoundRect ausrechnen
Rectangle aRect = rRect;
@@ -179,7 +179,7 @@ void OutputDevice::ImplDrawLinearGradient( const Rectangle& rRect,
aRect.Top()--;
aRect.Right()++;
aRect.Bottom()++;
- USHORT nAngle = rGradient.GetAngle() % 3600;
+ sal_uInt16 nAngle = rGradient.GetAngle() % 3600;
double fAngle = nAngle * F_PI1800;
double fWidth = aRect.GetWidth();
double fHeight = aRect.GetHeight();
@@ -198,18 +198,18 @@ void OutputDevice::ImplDrawLinearGradient( const Rectangle& rRect,
Point aCenter = rRect.Center();
Rectangle aFullRect = aRect;
long nBorder = (long)rGradient.GetBorder() * aRect.GetHeight() / 100;
- BOOL bLinear;
+ sal_Bool bLinear;
// Rand berechnen und Rechteck neu setzen fuer linearen Farbverlauf
if ( rGradient.GetStyle() == GRADIENT_LINEAR )
{
- bLinear = TRUE;
+ bLinear = sal_True;
aRect.Top() += nBorder;
}
// Rand berechnen und Rechteck neu setzen fuer axiale Farbverlauf
else
{
- bLinear = FALSE;
+ bLinear = sal_False;
nBorder >>= 1;
aRect.Top() += nBorder;
@@ -297,9 +297,9 @@ void OutputDevice::ImplDrawLinearGradient( const Rectangle& rRect,
double fScanInc = (double)aRect.GetHeight() / (double)nSteps;
// Startfarbe berechnen und setzen
- UINT8 nRed;
- UINT8 nGreen;
- UINT8 nBlue;
+ sal_uInt8 nRed;
+ sal_uInt8 nGreen;
+ sal_uInt8 nBlue;
long nSteps2;
long nStepsHalf = 0;
if ( bLinear )
@@ -307,23 +307,23 @@ void OutputDevice::ImplDrawLinearGradient( const Rectangle& rRect,
// Um 1 erhoeht, um die Border innerhalb der Schleife
// zeichnen zu koennen
nSteps2 = nSteps + 1;
- nRed = (UINT8)nStartRed;
- nGreen = (UINT8)nStartGreen;
- nBlue = (UINT8)nStartBlue;
+ nRed = (sal_uInt8)nStartRed;
+ nGreen = (sal_uInt8)nStartGreen;
+ nBlue = (sal_uInt8)nStartBlue;
}
else
{
// Um 2 erhoeht, um die Border innerhalb der Schleife
// zeichnen zu koennen
nSteps2 = nSteps + 2;
- nRed = (UINT8)nEndRed;
- nGreen = (UINT8)nEndGreen;
- nBlue = (UINT8)nEndBlue;
+ nRed = (sal_uInt8)nEndRed;
+ nGreen = (sal_uInt8)nEndGreen;
+ nBlue = (sal_uInt8)nEndBlue;
nStepsHalf = nSteps >> 1;
}
if ( bMtf )
- mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), TRUE ) );
+ mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), sal_True ) );
else
mpGraphics->SetFillColor( MAKE_SALCOLOR( nRed, nGreen, nBlue ) );
@@ -384,9 +384,9 @@ void OutputDevice::ImplDrawLinearGradient( const Rectangle& rRect,
// on.
if ( i >= nSteps )
{
- nRed = (UINT8)nEndRed;
- nGreen = (UINT8)nEndGreen;
- nBlue = (UINT8)nEndBlue;
+ nRed = (sal_uInt8)nEndRed;
+ nGreen = (sal_uInt8)nEndGreen;
+ nBlue = (sal_uInt8)nEndBlue;
}
else
{
@@ -408,7 +408,7 @@ void OutputDevice::ImplDrawLinearGradient( const Rectangle& rRect,
}
if ( bMtf )
- mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), TRUE ) );
+ mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), sal_True ) );
else
mpGraphics->SetFillColor( MAKE_SALCOLOR( nRed, nGreen, nBlue ) );
}
@@ -418,7 +418,7 @@ void OutputDevice::ImplDrawLinearGradient( const Rectangle& rRect,
void OutputDevice::ImplDrawComplexGradient( const Rectangle& rRect,
const Gradient& rGradient,
- BOOL bMtf, const PolyPolygon* pClipPolyPoly )
+ sal_Bool bMtf, const PolyPolygon* pClipPolyPoly )
{
// Feststellen ob Ausgabe ueber Polygon oder PolyPolygon
// Bei Rasteroperationen ungleich Overpaint immer PolyPolygone,
@@ -442,7 +442,7 @@ void OutputDevice::ImplDrawComplexGradient( const Rectangle& rRect,
long nGreenSteps = nEndGreen - nStartGreen;
long nBlueSteps = nEndBlue - nStartBlue;
long nStepCount = rGradient.GetSteps();
- USHORT nAngle = rGradient.GetAngle() % 3600;
+ sal_uInt16 nAngle = rGradient.GetAngle() % 3600;
if( (meRasterOp != ROP_OVERPAINT) || (meOutDevType != OUTDEV_WINDOW) || bMtf )
pPolyPoly = new PolyPolygon( 2 );
@@ -548,11 +548,11 @@ void OutputDevice::ImplDrawComplexGradient( const Rectangle& rRect,
double fScanRight = aRect.Right();
double fScanBottom = aRect.Bottom();
double fScanInc = (double) nMinRect / (double) nSteps * 0.5;
- UINT8 nRed = (UINT8) nStartRed, nGreen = (UINT8) nStartGreen, nBlue = (UINT8) nStartBlue;
+ sal_uInt8 nRed = (sal_uInt8) nStartRed, nGreen = (sal_uInt8) nStartGreen, nBlue = (sal_uInt8) nStartBlue;
bool bPaintLastPolygon( false ); // #107349# Paint last polygon only if loop has generated any output
if( bMtf )
- mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), TRUE ) );
+ mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), sal_True ) );
else
mpGraphics->SetFillColor( MAKE_SALCOLOR( nRed, nGreen, nBlue ) );
@@ -620,7 +620,7 @@ void OutputDevice::ImplDrawComplexGradient( const Rectangle& rRect,
// the one painted in the window outdev path below. To get
// matching colors, have to delay color setting here.
if( bMtf )
- mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), TRUE ) );
+ mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), sal_True ) );
else
mpGraphics->SetFillColor( MAKE_SALCOLOR( nRed, nGreen, nBlue ) );
}
@@ -628,7 +628,7 @@ void OutputDevice::ImplDrawComplexGradient( const Rectangle& rRect,
{
// #107349# Set fill color _before_ geometry painting
if( bMtf )
- mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), TRUE ) );
+ mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), sal_True ) );
else
mpGraphics->SetFillColor( MAKE_SALCOLOR( nRed, nGreen, nBlue ) );
@@ -655,7 +655,7 @@ void OutputDevice::ImplDrawComplexGradient( const Rectangle& rRect,
if( bMtf )
{
- mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), TRUE ) );
+ mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), sal_True ) );
mpMetaFile->AddAction( new MetaPolygonAction( rPoly ) );
}
else
@@ -715,7 +715,7 @@ void OutputDevice::DrawGradient( const Rectangle& rRect,
if ( mnDrawMode & DRAWMODE_GRAYGRADIENT )
{
- BYTE cStartLum = aStartCol.GetLuminance(), cEndLum = aEndCol.GetLuminance();
+ sal_uInt8 cStartLum = aStartCol.GetLuminance(), cEndLum = aEndCol.GetLuminance();
aStartCol = Color( cStartLum, cStartLum, cStartLum );
aEndCol = Color( cEndLum, cEndLum, cEndLum );
}
@@ -775,19 +775,19 @@ void OutputDevice::DrawGradient( const Rectangle& rRect,
if ( mbLineColor || mbInitLineColor )
{
mpGraphics->SetLineColor();
- mbInitLineColor = TRUE;
+ mbInitLineColor = sal_True;
}
- mbInitFillColor = TRUE;
+ mbInitFillColor = sal_True;
// calculate step count if neccessary
if ( !aGradient.GetSteps() )
aGradient.SetSteps( GRADIENT_DEFAULT_STEPCOUNT );
if( aGradient.GetStyle() == GRADIENT_LINEAR || aGradient.GetStyle() == GRADIENT_AXIAL )
- ImplDrawLinearGradient( aRect, aGradient, FALSE, NULL );
+ ImplDrawLinearGradient( aRect, aGradient, sal_False, NULL );
else
- ImplDrawComplexGradient( aRect, aGradient, FALSE, NULL );
+ ImplDrawComplexGradient( aRect, aGradient, sal_False, NULL );
}
Pop();
@@ -863,9 +863,9 @@ void OutputDevice::DrawGradient( const PolyPolygon& rPolyPoly,
}
else
{
- const BOOL bOldOutput = IsOutputEnabled();
+ const sal_Bool bOldOutput = IsOutputEnabled();
- EnableOutput( FALSE );
+ EnableOutput( sal_False );
Push( PUSH_RASTEROP );
SetRasterOp( ROP_XOR );
DrawGradient( aRect, rGradient );
@@ -893,7 +893,7 @@ void OutputDevice::DrawGradient( const PolyPolygon& rPolyPoly,
if ( mnDrawMode & DRAWMODE_GRAYGRADIENT )
{
- BYTE cStartLum = aStartCol.GetLuminance(), cEndLum = aEndCol.GetLuminance();
+ sal_uInt8 cStartLum = aStartCol.GetLuminance(), cEndLum = aEndCol.GetLuminance();
aStartCol = Color( cStartLum, cStartLum, cStartLum );
aEndCol = Color( cEndLum, cEndLum, cEndLum );
}
@@ -940,19 +940,19 @@ void OutputDevice::DrawGradient( const PolyPolygon& rPolyPoly,
if( mbLineColor || mbInitLineColor )
{
mpGraphics->SetLineColor();
- mbInitLineColor = TRUE;
+ mbInitLineColor = sal_True;
}
- mbInitFillColor = TRUE;
+ mbInitFillColor = sal_True;
// calculate step count if neccessary
if ( !aGradient.GetSteps() )
aGradient.SetSteps( GRADIENT_DEFAULT_STEPCOUNT );
if( aGradient.GetStyle() == GRADIENT_LINEAR || aGradient.GetStyle() == GRADIENT_AXIAL )
- ImplDrawLinearGradient( aRect, aGradient, FALSE, &aClipPolyPoly );
+ ImplDrawLinearGradient( aRect, aGradient, sal_False, &aClipPolyPoly );
else
- ImplDrawComplexGradient( aRect, aGradient, FALSE, &aClipPolyPoly );
+ ImplDrawComplexGradient( aRect, aGradient, sal_False, &aClipPolyPoly );
}
}
}
@@ -994,9 +994,9 @@ void OutputDevice::DrawGradient( const PolyPolygon& rPolyPoly,
if( pVDev->SetOutputSizePixel( aDstSize) )
{
MapMode aVDevMap;
- const BOOL bOldMap = mbMap;
+ const sal_Bool bOldMap = mbMap;
- EnableMapMode( FALSE );
+ EnableMapMode( sal_False );
pVDev->DrawOutDev( Point(), aDstSize, aDstRect.TopLeft(), aDstSize, *this );
pVDev->SetRasterOp( ROP_XOR );
@@ -1045,7 +1045,7 @@ void OutputDevice::AddGradientActions( const Rectangle& rRect, const Gradient& r
mpMetaFile = &rMtf;
mpMetaFile->AddAction( new MetaPushAction( PUSH_ALL ) );
mpMetaFile->AddAction( new MetaISectRectClipRegionAction( aRect ) );
- mpMetaFile->AddAction( new MetaLineColorAction( Color(), FALSE ) );
+ mpMetaFile->AddAction( new MetaLineColorAction( Color(), sal_False ) );
// because we draw with no border line, we have to expand gradient
// rect to avoid missing lines on the right and bottom edge
@@ -1059,9 +1059,9 @@ void OutputDevice::AddGradientActions( const Rectangle& rRect, const Gradient& r
aGradient.SetSteps( GRADIENT_DEFAULT_STEPCOUNT );
if( aGradient.GetStyle() == GRADIENT_LINEAR || aGradient.GetStyle() == GRADIENT_AXIAL )
- ImplDrawLinearGradient( aRect, aGradient, TRUE, NULL );
+ ImplDrawLinearGradient( aRect, aGradient, sal_True, NULL );
else
- ImplDrawComplexGradient( aRect, aGradient, TRUE, NULL );
+ ImplDrawComplexGradient( aRect, aGradient, sal_True, NULL );
mpMetaFile->AddAction( new MetaPopAction() );
mpMetaFile = pOldMtf;
@@ -1089,7 +1089,7 @@ void OutputDevice::DrawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch
aColor = Color( COL_WHITE );
else if ( mnDrawMode & DRAWMODE_GRAYLINE )
{
- const UINT8 cLum = aColor.GetLuminance();
+ const sal_uInt8 cLum = aColor.GetLuminance();
aColor = Color( cLum, cLum, cLum );
}
else if( mnDrawMode & DRAWMODE_SETTINGSLINE )
@@ -1126,17 +1126,17 @@ void OutputDevice::DrawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch
{
PolyPolygon aPolyPoly( LogicToPixel( rPolyPoly ) );
GDIMetaFile* pOldMetaFile = mpMetaFile;
- BOOL bOldMap = mbMap;
+ sal_Bool bOldMap = mbMap;
aPolyPoly.Optimize( POLY_OPTIMIZE_NO_SAME );
aHatch.SetDistance( ImplLogicWidthToDevicePixel( aHatch.GetDistance() ) );
mpMetaFile = NULL;
- EnableMapMode( FALSE );
+ EnableMapMode( sal_False );
Push( PUSH_LINECOLOR );
SetLineColor( aHatch.GetColor() );
ImplInitLineColor();
- ImplDrawHatch( aPolyPoly, aHatch, FALSE );
+ ImplDrawHatch( aPolyPoly, aHatch, sal_False );
Pop();
EnableMapMode( bOldMap );
mpMetaFile = pOldMetaFile;
@@ -1162,8 +1162,8 @@ void OutputDevice::AddHatchActions( const PolyPolygon& rPolyPoly, const Hatch& r
mpMetaFile = &rMtf;
mpMetaFile->AddAction( new MetaPushAction( PUSH_ALL ) );
- mpMetaFile->AddAction( new MetaLineColorAction( rHatch.GetColor(), TRUE ) );
- ImplDrawHatch( aPolyPoly, rHatch, TRUE );
+ mpMetaFile->AddAction( new MetaLineColorAction( rHatch.GetColor(), sal_True ) );
+ ImplDrawHatch( aPolyPoly, rHatch, sal_True );
mpMetaFile->AddAction( new MetaPopAction() );
mpMetaFile = pOldMtf;
}
@@ -1171,7 +1171,7 @@ void OutputDevice::AddHatchActions( const PolyPolygon& rPolyPoly, const Hatch& r
// -----------------------------------------------------------------------
-void OutputDevice::ImplDrawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch, BOOL bMtf )
+void OutputDevice::ImplDrawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch, sal_Bool bMtf )
{
Rectangle aRect( rPolyPoly.GetBoundRect() );
const long nLogPixelWidth = ImplDevicePixelToLogicWidth( 1 );
@@ -1222,7 +1222,7 @@ void OutputDevice::ImplDrawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHa
// -----------------------------------------------------------------------
-void OutputDevice::ImplCalcHatchValues( const Rectangle& rRect, long nDist, USHORT nAngle10,
+void OutputDevice::ImplCalcHatchValues( const Rectangle& rRect, long nDist, sal_uInt16 nAngle10,
Point& rPt1, Point& rPt2, Size& rInc, Point& rEndPt1 )
{
Point aRef;
@@ -1333,14 +1333,14 @@ void OutputDevice::ImplCalcHatchValues( const Rectangle& rRect, long nDist, USHO
// ------------------------------------------------------------------------
void OutputDevice::ImplDrawHatchLine( const Line& rLine, const PolyPolygon& rPolyPoly,
- Point* pPtBuffer, BOOL bMtf )
+ Point* pPtBuffer, sal_Bool bMtf )
{
double fX, fY;
long nAdd, nPCounter = 0;
for( long nPoly = 0, nPolyCount = rPolyPoly.Count(); nPoly < nPolyCount; nPoly++ )
{
- const Polygon& rPoly = rPolyPoly[ (USHORT) nPoly ];
+ const Polygon& rPoly = rPolyPoly[ (sal_uInt16) nPoly ];
if( rPoly.GetSize() > 1 )
{
@@ -1348,7 +1348,7 @@ void OutputDevice::ImplDrawHatchLine( const Line& rLine, const PolyPolygon& rPol
for( long i = 1, nCount = rPoly.GetSize(); i <= nCount; i++ )
{
- aCurSegment.SetEnd( rPoly[ (USHORT)( i % nCount ) ] );
+ aCurSegment.SetEnd( rPoly[ (sal_uInt16)( i % nCount ) ] );
nAdd = 0;
if( rLine.Intersection( aCurSegment, fX, fY ) )
@@ -1356,7 +1356,7 @@ void OutputDevice::ImplDrawHatchLine( const Line& rLine, const PolyPolygon& rPol
if( ( fabs( fX - aCurSegment.GetStart().X() ) <= 0.0000001 ) &&
( fabs( fY - aCurSegment.GetStart().Y() ) <= 0.0000001 ) )
{
- const Line aPrevSegment( rPoly[ (USHORT)( ( i > 1 ) ? ( i - 2 ) : ( nCount - 1 ) ) ], aCurSegment.GetStart() );
+ const Line aPrevSegment( rPoly[ (sal_uInt16)( ( i > 1 ) ? ( i - 2 ) : ( nCount - 1 ) ) ], aCurSegment.GetStart() );
const double fPrevDistance = rLine.GetDistance( aPrevSegment.GetStart() );
const double fCurDistance = rLine.GetDistance( aCurSegment.GetEnd() );
@@ -1369,7 +1369,7 @@ void OutputDevice::ImplDrawHatchLine( const Line& rLine, const PolyPolygon& rPol
else if( ( fabs( fX - aCurSegment.GetEnd().X() ) <= 0.0000001 ) &&
( fabs( fY - aCurSegment.GetEnd().Y() ) <= 0.0000001 ) )
{
- const Line aNextSegment( aCurSegment.GetEnd(), rPoly[ (USHORT)( ( i + 1 ) % nCount ) ] );
+ const Line aNextSegment( aCurSegment.GetEnd(), rPoly[ (sal_uInt16)( ( i + 1 ) % nCount ) ] );
if( ( fabs( rLine.GetDistance( aNextSegment.GetEnd() ) ) <= 0.0000001 ) &&
( rLine.GetDistance( aCurSegment.GetStart() ) > 0.0 ) )
diff --git a/vcl/source/gdi/outdev5.cxx b/vcl/source/gdi/outdev5.cxx
index d42723215c55..aaac45697eaa 100644
--- a/vcl/source/gdi/outdev5.cxx
+++ b/vcl/source/gdi/outdev5.cxx
@@ -50,7 +50,7 @@ DBG_NAMEEX( OutputDevice )
// =======================================================================
void OutputDevice::DrawRect( const Rectangle& rRect,
- ULONG nHorzRound, ULONG nVertRound )
+ sal_uIntPtr nHorzRound, sal_uIntPtr nVertRound )
{
DBG_TRACE( "OutputDevice::DrawRoundRect()" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
diff --git a/vcl/source/gdi/outdev6.cxx b/vcl/source/gdi/outdev6.cxx
index bef37284adbd..0d51196eac09 100644
--- a/vcl/source/gdi/outdev6.cxx
+++ b/vcl/source/gdi/outdev6.cxx
@@ -59,7 +59,7 @@ DBG_NAMEEX( OutputDevice )
// ------------------------------------------------------------------------
-void OutputDevice::DrawGrid( const Rectangle& rRect, const Size& rDist, ULONG nFlags )
+void OutputDevice::DrawGrid( const Rectangle& rRect, const Size& rDist, sal_uIntPtr nFlags )
{
DBG_TRACE( "OutputDevice::DrawGrid()" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
@@ -117,8 +117,8 @@ void OutputDevice::DrawGrid( const Rectangle& rRect, const Size& rDist, ULONG nF
if( mbInitFillColor )
ImplInitFillColor();
- const BOOL bOldMap = mbMap;
- EnableMapMode( FALSE );
+ const sal_Bool bOldMap = mbMap;
+ EnableMapMode( sal_False );
if( nFlags & GRID_DOTS )
{
@@ -220,7 +220,7 @@ void OutputDevice::DrawTransparent( const basegfx::B2DPolyPolygon& rB2DPolyPoly,
// ------------------------------------------------------------------------
void OutputDevice::DrawTransparent( const PolyPolygon& rPolyPoly,
- USHORT nTransparencePercent )
+ sal_uInt16 nTransparencePercent )
{
DBG_TRACE( "OutputDevice::DrawTransparent()" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
@@ -333,7 +333,7 @@ void OutputDevice::DrawTransparent( const PolyPolygon& rPolyPoly,
const Size aDPISize( LogicToPixel( Size( 1, 1 ), MAP_INCH ) );
const long nBaseExtent = Max( FRound( aDPISize.Width() / 300. ), 1L );
long nMove;
- const USHORT nTrans = ( nTransparencePercent < 13 ) ? 0 :
+ const sal_uInt16 nTrans = ( nTransparencePercent < 13 ) ? 0 :
( nTransparencePercent < 38 ) ? 25 :
( nTransparencePercent < 63 ) ? 50 :
( nTransparencePercent < 88 ) ? 75 : 100;
@@ -353,8 +353,8 @@ void OutputDevice::DrawTransparent( const PolyPolygon& rPolyPoly,
Rectangle aRect( aPolyRect.TopLeft(), Size( aPolyRect.GetWidth(), nBaseExtent ) );
- const BOOL bOldMap = mbMap;
- EnableMapMode( FALSE );
+ const sal_Bool bOldMap = mbMap;
+ EnableMapMode( sal_False );
while( aRect.Top() <= aPolyRect.Bottom() )
{
@@ -432,16 +432,16 @@ void OutputDevice::DrawTransparent( const PolyPolygon& rPolyPoly,
{
VirtualDevice aVDev( *this, 1 );
const Size aDstSz( aDstRect.GetSize() );
- const BYTE cTrans = (BYTE) MinMax( FRound( nTransparencePercent * 2.55 ), 0, 255 );
+ const sal_uInt8 cTrans = (sal_uInt8) MinMax( FRound( nTransparencePercent * 2.55 ), 0, 255 );
if( aDstRect.Left() || aDstRect.Top() )
aPolyPoly.Move( -aDstRect.Left(), -aDstRect.Top() );
if( aVDev.SetOutputSizePixel( aDstSz ) )
{
- const BOOL bOldMap = mbMap;
+ const sal_Bool bOldMap = mbMap;
- EnableMapMode( FALSE );
+ EnableMapMode( sal_False );
aVDev.SetLineColor( COL_BLACK );
aVDev.SetFillColor( COL_BLACK );
@@ -469,25 +469,25 @@ void OutputDevice::DrawTransparent( const PolyPolygon& rPolyPoly,
if( aPaint.GetBitCount() <= 8 )
{
const BitmapPalette& rPal = pW->GetPalette();
- const USHORT nCount = rPal.GetEntryCount();
- BitmapColor* pMap = (BitmapColor*) new BYTE[ nCount * sizeof( BitmapColor ) ];
+ const sal_uInt16 nCount = rPal.GetEntryCount();
+ BitmapColor* pMap = (BitmapColor*) new sal_uInt8[ nCount * sizeof( BitmapColor ) ];
- for( USHORT i = 0; i < nCount; i++ )
+ for( sal_uInt16 i = 0; i < nCount; i++ )
{
BitmapColor aCol( rPal[ i ] );
- pMap[ i ] = BitmapColor( (BYTE) rPal.GetBestIndex( aCol.Merge( aFillCol, cTrans ) ) );
+ pMap[ i ] = BitmapColor( (sal_uInt8) rPal.GetBestIndex( aCol.Merge( aFillCol, cTrans ) ) );
}
if( pR->GetScanlineFormat() == BMP_FORMAT_1BIT_MSB_PAL &&
pW->GetScanlineFormat() == BMP_FORMAT_8BIT_PAL )
{
- const BYTE cBlack = aBlack.GetIndex();
+ const sal_uInt8 cBlack = aBlack.GetIndex();
for( nY = 0; nY < nHeight; nY++ )
{
Scanline pWScan = pW->GetScanline( nY );
Scanline pRScan = pR->GetScanline( nY );
- BYTE cBit = 128;
+ sal_uInt8 cBit = 128;
for( nX = 0; nX < nWidth; nX++, cBit >>= 1, pWScan++ )
{
@@ -495,7 +495,7 @@ void OutputDevice::DrawTransparent( const PolyPolygon& rPolyPoly,
cBit = 128, pRScan++;
if( ( *pRScan & cBit ) == cBlack )
- *pWScan = (BYTE) pMap[ *pWScan ].GetIndex();
+ *pWScan = (sal_uInt8) pMap[ *pWScan ].GetIndex();
}
}
}
@@ -507,20 +507,20 @@ void OutputDevice::DrawTransparent( const PolyPolygon& rPolyPoly,
pW->SetPixel( nY, nX, pMap[ pW->GetPixel( nY, nX ).GetIndex() ] );
}
- delete[] (BYTE*) pMap;
+ delete[] (sal_uInt8*) pMap;
}
else
{
if( pR->GetScanlineFormat() == BMP_FORMAT_1BIT_MSB_PAL &&
pW->GetScanlineFormat() == BMP_FORMAT_24BIT_TC_BGR )
{
- const BYTE cBlack = aBlack.GetIndex();
+ const sal_uInt8 cBlack = aBlack.GetIndex();
for( nY = 0; nY < nHeight; nY++ )
{
Scanline pWScan = pW->GetScanline( nY );
Scanline pRScan = pR->GetScanline( nY );
- BYTE cBit = 128;
+ sal_uInt8 cBit = 128;
for( nX = 0; nX < nWidth; nX++, cBit >>= 1, pWScan += 3 )
{
@@ -584,9 +584,9 @@ void OutputDevice::DrawTransparent( const PolyPolygon& rPolyPoly,
if( mpAlphaVDev )
{
const Color aFillCol( mpAlphaVDev->GetFillColor() );
- mpAlphaVDev->SetFillColor( Color(sal::static_int_cast<UINT8>(255*nTransparencePercent/100),
- sal::static_int_cast<UINT8>(255*nTransparencePercent/100),
- sal::static_int_cast<UINT8>(255*nTransparencePercent/100)) );
+ mpAlphaVDev->SetFillColor( Color(sal::static_int_cast<sal_uInt8>(255*nTransparencePercent/100),
+ sal::static_int_cast<sal_uInt8>(255*nTransparencePercent/100),
+ sal::static_int_cast<sal_uInt8>(255*nTransparencePercent/100)) );
mpAlphaVDev->DrawTransparent( rPolyPoly, nTransparencePercent );
@@ -699,19 +699,19 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos,
AlphaMask aAlpha;
MapMode aMap( GetMapMode() );
Point aOutPos( PixelToLogic( aDstRect.TopLeft() ) );
- const BOOL bOldMap = mbMap;
+ const sal_Bool bOldMap = mbMap;
aMap.SetOrigin( Point( -aOutPos.X(), -aOutPos.Y() ) );
pVDev->SetMapMode( aMap );
- const BOOL bVDevOldMap = pVDev->IsMapModeEnabled();
+ const sal_Bool bVDevOldMap = pVDev->IsMapModeEnabled();
// create paint bitmap
( (GDIMetaFile&) rMtf ).WindStart();
( (GDIMetaFile&) rMtf ).Play( pVDev, rPos, rSize );
( (GDIMetaFile&) rMtf ).WindStart();
- pVDev->EnableMapMode( FALSE );
+ pVDev->EnableMapMode( sal_False );
aPaint = pVDev->GetBitmap( Point(), pVDev->GetOutputSizePixel() );
- pVDev->EnableMapMode( bVDevOldMap ); // #i35331#: MUST NOT use EnableMapMode( TRUE ) here!
+ pVDev->EnableMapMode( bVDevOldMap ); // #i35331#: MUST NOT use EnableMapMode( sal_True ) here!
// create mask bitmap
pVDev->SetLineColor( COL_BLACK );
@@ -722,22 +722,22 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos,
( (GDIMetaFile&) rMtf ).WindStart();
( (GDIMetaFile&) rMtf ).Play( pVDev, rPos, rSize );
( (GDIMetaFile&) rMtf ).WindStart();
- pVDev->EnableMapMode( FALSE );
+ pVDev->EnableMapMode( sal_False );
aMask = pVDev->GetBitmap( Point(), pVDev->GetOutputSizePixel() );
- pVDev->EnableMapMode( bVDevOldMap ); // #i35331#: MUST NOT use EnableMapMode( TRUE ) here!
+ pVDev->EnableMapMode( bVDevOldMap ); // #i35331#: MUST NOT use EnableMapMode( sal_True ) here!
// create alpha mask from gradient
pVDev->SetDrawMode( DRAWMODE_GRAYGRADIENT );
pVDev->DrawGradient( Rectangle( rPos, rSize ), rTransparenceGradient );
pVDev->SetDrawMode( DRAWMODE_DEFAULT );
- pVDev->EnableMapMode( FALSE );
+ pVDev->EnableMapMode( sal_False );
pVDev->DrawMask( Point(), pVDev->GetOutputSizePixel(), aMask, Color( COL_WHITE ) );
aAlpha = pVDev->GetBitmap( Point(), pVDev->GetOutputSizePixel() );
delete pVDev;
- EnableMapMode( FALSE );
+ EnableMapMode( sal_False );
DrawBitmapEx( aDstRect.TopLeft(), BitmapEx( aPaint, aAlpha ) );
EnableMapMode( bOldMap );
}
@@ -761,8 +761,8 @@ void OutputDevice::ImplDrawColorWallpaper( long nX, long nY,
Color aOldFillColor = GetFillColor();
SetLineColor();
SetFillColor( rWallpaper.GetColor() );
- BOOL bMap = mbMap;
- EnableMapMode( FALSE );
+ sal_Bool bMap = mbMap;
+ EnableMapMode( sal_False );
DrawRect( Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ) );
SetLineColor( aOldLineColor );
SetFillColor( aOldFillColor );
@@ -781,10 +781,10 @@ void OutputDevice::ImplDrawBitmapWallpaper( long nX, long nY,
Size aSize;
GDIMetaFile* pOldMetaFile = mpMetaFile;
const WallpaperStyle eStyle = rWallpaper.GetStyle();
- const BOOL bOldMap = mbMap;
- BOOL bDrawn = FALSE;
- BOOL bDrawGradientBackground = FALSE;
- BOOL bDrawColorBackground = FALSE;
+ const sal_Bool bOldMap = mbMap;
+ sal_Bool bDrawn = sal_False;
+ sal_Bool bDrawGradientBackground = sal_False;
+ sal_Bool bDrawColorBackground = sal_False;
if( pCached )
aBmpEx = *pCached;
@@ -793,13 +793,13 @@ void OutputDevice::ImplDrawBitmapWallpaper( long nX, long nY,
const long nBmpWidth = aBmpEx.GetSizePixel().Width();
const long nBmpHeight = aBmpEx.GetSizePixel().Height();
- const BOOL bTransparent = aBmpEx.IsTransparent();
+ const sal_Bool bTransparent = aBmpEx.IsTransparent();
// draw background
if( bTransparent )
{
if( rWallpaper.IsGradient() )
- bDrawGradientBackground = TRUE;
+ bDrawGradientBackground = sal_True;
else
{
if( !pCached && !rWallpaper.GetColor().GetTransparency() )
@@ -811,15 +811,15 @@ void OutputDevice::ImplDrawBitmapWallpaper( long nX, long nY,
aBmpEx = aVDev.GetBitmap( Point(), aVDev.GetOutputSizePixel() );
}
- bDrawColorBackground = TRUE;
+ bDrawColorBackground = sal_True;
}
}
else if( eStyle != WALLPAPER_TILE && eStyle != WALLPAPER_SCALE )
{
if( rWallpaper.IsGradient() )
- bDrawGradientBackground = TRUE;
+ bDrawGradientBackground = sal_True;
else
- bDrawColorBackground = TRUE;
+ bDrawColorBackground = sal_True;
}
// background of bitmap?
@@ -828,7 +828,7 @@ void OutputDevice::ImplDrawBitmapWallpaper( long nX, long nY,
else if( bDrawColorBackground && bTransparent )
{
ImplDrawColorWallpaper( nX, nY, nWidth, nHeight, rWallpaper );
- bDrawColorBackground = FALSE;
+ bDrawColorBackground = sal_False;
}
// calc pos and size
@@ -845,7 +845,7 @@ void OutputDevice::ImplDrawBitmapWallpaper( long nX, long nY,
}
mpMetaFile = NULL;
- EnableMapMode( FALSE );
+ EnableMapMode( sal_False );
Push( PUSH_CLIPREGION );
IntersectClipRegion( Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ) );
@@ -945,7 +945,7 @@ void OutputDevice::ImplDrawBitmapWallpaper( long nX, long nY,
for( long nBmpX = nStartX; nBmpX <= nRight; nBmpX += nBmpWidth )
DrawBitmapEx( Point( nBmpX, nBmpY ), aBmpEx );
- bDrawn = TRUE;
+ bDrawn = sal_True;
}
break;
}
@@ -1020,8 +1020,8 @@ void OutputDevice::ImplDrawGradientWallpaper( long nX, long nY,
{
Rectangle aBound;
GDIMetaFile* pOldMetaFile = mpMetaFile;
- const BOOL bOldMap = mbMap;
- BOOL bNeedGradient = TRUE;
+ const sal_Bool bOldMap = mbMap;
+ sal_Bool bNeedGradient = sal_True;
/*
if ( rWallpaper.IsRect() )
@@ -1031,7 +1031,7 @@ void OutputDevice::ImplDrawGradientWallpaper( long nX, long nY,
aBound = Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) );
mpMetaFile = NULL;
- EnableMapMode( FALSE );
+ EnableMapMode( sal_False );
Push( PUSH_CLIPREGION );
IntersectClipRegion( Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ) );
@@ -1048,7 +1048,7 @@ void OutputDevice::ImplDrawGradientWallpaper( long nX, long nY,
if( mnOutOffX+nWidth > gradientWidth )
ImplDrawColorWallpaper( nX, nY, nWidth, nHeight, rWallpaper.GetGradient().GetEndColor() );
if( mnOutOffX > gradientWidth )
- bNeedGradient = FALSE;
+ bNeedGradient = sal_False;
else
aBound = Rectangle( Point( -mnOutOffX, nY ), Size( gradientWidth, nHeight ) );
}
@@ -1110,7 +1110,7 @@ void OutputDevice::Erase()
if ( !IsDeviceOutputNecessary() || ImplIsRecordLayout() )
return;
- BOOL bNativeOK = FALSE;
+ sal_Bool bNativeOK = sal_False;
if( meOutDevType == OUTDEV_WINDOW )
{
Window* pWindow = static_cast<Window*>(this);
@@ -1194,7 +1194,7 @@ bool OutputDevice::DrawEPS( const Point& rPoint, const Size& rSize,
aRect.Justify();
bDrawn = mpGraphics->DrawEPS( aRect.Left(), aRect.Top(), aRect.GetWidth(), aRect.GetHeight(),
- (BYTE*) rGfxLink.GetData(), rGfxLink.GetDataSize(), this );
+ (sal_uInt8*) rGfxLink.GetData(), rGfxLink.GetDataSize(), this );
}
// else draw the substitution graphics
diff --git a/vcl/source/gdi/outdevnative.cxx b/vcl/source/gdi/outdevnative.cxx
index fed41ec4de85..3879bd5386d7 100644
--- a/vcl/source/gdi/outdevnative.cxx
+++ b/vcl/source/gdi/outdevnative.cxx
@@ -66,14 +66,14 @@ static bool lcl_enableNativeWidget( const OutputDevice& i_rDevice )
// -----------------------------------------------------------------------
-BOOL OutputDevice::IsNativeControlSupported( ControlType nType, ControlPart nPart )
+sal_Bool OutputDevice::IsNativeControlSupported( ControlType nType, ControlPart nPart )
{
if( !lcl_enableNativeWidget( *this ) )
- return FALSE;
+ return sal_False;
if ( !mpGraphics )
if ( !ImplGetGraphics() )
- return FALSE;
+ return sal_False;
return( mpGraphics->IsNativeControlSupported(nType, nPart) );
}
@@ -81,18 +81,18 @@ BOOL OutputDevice::IsNativeControlSupported( ControlType nType, ControlPart nPar
// -----------------------------------------------------------------------
-BOOL OutputDevice::HitTestNativeControl( ControlType nType,
+sal_Bool OutputDevice::HitTestNativeControl( ControlType nType,
ControlPart nPart,
const Region& rControlRegion,
const Point& aPos,
- BOOL& rIsInside )
+ sal_Bool& rIsInside )
{
if( !lcl_enableNativeWidget( *this ) )
- return FALSE;
+ return sal_False;
if ( !mpGraphics )
if ( !ImplGetGraphics() )
- return FALSE;
+ return sal_False;
Point aWinOffs( mnOutOffX, mnOutOffY );
Region screenRegion( rControlRegion );
@@ -142,7 +142,7 @@ static void lcl_moveControlValue( ControlType nType, const ImplControlValue& aVa
}
}
-BOOL OutputDevice::DrawNativeControl( ControlType nType,
+sal_Bool OutputDevice::DrawNativeControl( ControlType nType,
ControlPart nPart,
const Region& rControlRegion,
ControlState nState,
@@ -150,7 +150,7 @@ BOOL OutputDevice::DrawNativeControl( ControlType nType,
::rtl::OUString aCaption )
{
if( !lcl_enableNativeWidget( *this ) )
- return FALSE;
+ return sal_False;
/*
if( !IsInPaint() && IsPaintTransparent() )
@@ -162,19 +162,19 @@ BOOL OutputDevice::DrawNativeControl( ControlType nType,
if( !rControlRegion.IsEmpty() )
aClipRgn.Intersect( rControlRegion );
Invalidate( aClipRgn, INVALIDATE_UPDATE );
- return TRUE;
+ return sal_True;
}
*/
// make sure the current clip region is initialized correctly
if ( !mpGraphics )
if ( !ImplGetGraphics() )
- return FALSE;
+ return sal_False;
if ( mbInitClipRegion )
ImplInitClipRegion();
if ( mbOutputClipped )
- return TRUE;
+ return sal_True;
if ( mbInitLineColor )
ImplInitLineColor();
@@ -195,7 +195,7 @@ BOOL OutputDevice::DrawNativeControl( ControlType nType,
if( aTestRegion == rControlRegion )
nState |= CTRL_CACHING_ALLOWED; // control is not clipped, caching allowed
- BOOL bRet = mpGraphics->DrawNativeControl(nType, nPart, screenRegion, nState, aValue, aCaption, this );
+ sal_Bool bRet = mpGraphics->DrawNativeControl(nType, nPart, screenRegion, nState, aValue, aCaption, this );
// transform back ImplControlValue members
lcl_moveControlValue( nType, aValue, Point()-aWinOffs );
@@ -206,7 +206,7 @@ BOOL OutputDevice::DrawNativeControl( ControlType nType,
// -----------------------------------------------------------------------
-BOOL OutputDevice::DrawNativeControlText(ControlType nType,
+sal_Bool OutputDevice::DrawNativeControlText(ControlType nType,
ControlPart nPart,
const Region& rControlRegion,
ControlState nState,
@@ -214,7 +214,7 @@ BOOL OutputDevice::DrawNativeControlText(ControlType nType,
::rtl::OUString aCaption )
{
if( !lcl_enableNativeWidget( *this ) )
- return FALSE;
+ return sal_False;
// make sure the current clip region is initialized correctly
if ( !mpGraphics )
@@ -238,7 +238,7 @@ BOOL OutputDevice::DrawNativeControlText(ControlType nType,
screenRegion.Move( aWinOffs.X(), aWinOffs.Y());
lcl_moveControlValue( nType, aValue, aWinOffs );
- BOOL bRet = mpGraphics->DrawNativeControlText(nType, nPart, screenRegion, nState, aValue, aCaption, this );
+ sal_Bool bRet = mpGraphics->DrawNativeControlText(nType, nPart, screenRegion, nState, aValue, aCaption, this );
// transform back ImplControlValue members
lcl_moveControlValue( nType, aValue, Point()-aWinOffs );
@@ -249,7 +249,7 @@ BOOL OutputDevice::DrawNativeControlText(ControlType nType,
// -----------------------------------------------------------------------
-BOOL OutputDevice::GetNativeControlRegion( ControlType nType,
+sal_Bool OutputDevice::GetNativeControlRegion( ControlType nType,
ControlPart nPart,
const Region& rControlRegion,
ControlState nState,
@@ -259,11 +259,11 @@ BOOL OutputDevice::GetNativeControlRegion( ControlType nType,
Region &rNativeContentRegion )
{
if( !lcl_enableNativeWidget( *this ) )
- return FALSE;
+ return sal_False;
if ( !mpGraphics )
if ( !ImplGetGraphics() )
- return FALSE;
+ return sal_False;
// Convert the coordinates from relative to Window-absolute, so we draw
// in the correct place in platform code
@@ -272,7 +272,7 @@ BOOL OutputDevice::GetNativeControlRegion( ControlType nType,
screenRegion.Move( aWinOffs.X(), aWinOffs.Y());
lcl_moveControlValue( nType, aValue, aWinOffs );
- BOOL bRet = mpGraphics->GetNativeControlRegion(nType, nPart, screenRegion, nState, aValue,
+ sal_Bool bRet = mpGraphics->GetNativeControlRegion(nType, nPart, screenRegion, nState, aValue,
aCaption, rNativeBoundingRegion,
rNativeContentRegion, this );
if( bRet )
diff --git a/vcl/source/gdi/outmap.cxx b/vcl/source/gdi/outmap.cxx
index 189ba4c29e59..3b546cd22c1d 100644
--- a/vcl/source/gdi/outmap.cxx
+++ b/vcl/source/gdi/outmap.cxx
@@ -134,7 +134,7 @@ static void ImplCalcBigIntThreshold( long nDPIX, long nDPIY,
{
// Schwellenwerte fuer BigInt Arithmetik berechnen
long nDenomHalfX = rMapRes.mnMapScDenomX / 2;
- ULONG nDenomX = rMapRes.mnMapScDenomX;
+ sal_uIntPtr nDenomX = rMapRes.mnMapScDenomX;
long nProductX = nDPIX * rMapRes.mnMapScNumX;
if ( !nProductX )
@@ -145,9 +145,9 @@ static void ImplCalcBigIntThreshold( long nDPIX, long nDPIY,
if ( !nDenomX )
rThresRes.mnThresPixToLogX = LONG_MAX;
else if ( nProductX >= 0 )
- rThresRes.mnThresPixToLogX = (long)(((ULONG)LONG_MAX - (ULONG)( nProductX/2)) / nDenomX);
+ rThresRes.mnThresPixToLogX = (long)(((sal_uIntPtr)LONG_MAX - (sal_uIntPtr)( nProductX/2)) / nDenomX);
else
- rThresRes.mnThresPixToLogX = (long)(((ULONG)LONG_MAX + (ULONG)(-nProductX/2)) / nDenomX);
+ rThresRes.mnThresPixToLogX = (long)(((sal_uIntPtr)LONG_MAX + (sal_uIntPtr)(-nProductX/2)) / nDenomX);
}
if ( nDPIY && (LONG_MAX / nDPIY < Abs( rMapRes.mnMapScNumY ) ) ) // #111139# avoid div by zero
@@ -159,7 +159,7 @@ static void ImplCalcBigIntThreshold( long nDPIX, long nDPIY,
{
// Schwellenwerte fuer BigInt Arithmetik berechnen
long nDenomHalfY = rMapRes.mnMapScDenomY / 2;
- ULONG nDenomY = rMapRes.mnMapScDenomY;
+ sal_uIntPtr nDenomY = rMapRes.mnMapScDenomY;
long nProductY = nDPIY * rMapRes.mnMapScNumY;
if ( !nProductY )
@@ -170,9 +170,9 @@ static void ImplCalcBigIntThreshold( long nDPIX, long nDPIY,
if ( !nDenomY )
rThresRes.mnThresPixToLogY = LONG_MAX;
else if ( nProductY >= 0 )
- rThresRes.mnThresPixToLogY = (long)(((ULONG)LONG_MAX - (ULONG)( nProductY/2)) / nDenomY);
+ rThresRes.mnThresPixToLogY = (long)(((sal_uIntPtr)LONG_MAX - (sal_uIntPtr)( nProductY/2)) / nDenomY);
else
- rThresRes.mnThresPixToLogY = (long)(((ULONG)LONG_MAX + (ULONG)(-nProductY/2)) / nDenomY);
+ rThresRes.mnThresPixToLogY = (long)(((sal_uIntPtr)LONG_MAX + (sal_uIntPtr)(-nProductY/2)) / nDenomY);
}
#ifdef USE_64BIT_INTS
@@ -688,8 +688,8 @@ Polygon OutputDevice::ImplLogicToDevicePixel( const Polygon& rLogicPoly ) const
if ( !mbMap && !mnOutOffX && !mnOutOffY )
return rLogicPoly;
- USHORT i;
- USHORT nPoints = rLogicPoly.GetSize();
+ sal_uInt16 i;
+ sal_uInt16 nPoints = rLogicPoly.GetSize();
Polygon aPoly( rLogicPoly );
// Pointer auf das Point-Array holen (Daten werden kopiert)
@@ -732,8 +732,8 @@ PolyPolygon OutputDevice::ImplLogicToDevicePixel( const PolyPolygon& rLogicPolyP
return rLogicPolyPoly;
PolyPolygon aPolyPoly( rLogicPolyPoly );
- USHORT nPoly = aPolyPoly.Count();
- for( USHORT i = 0; i < nPoly; i++ )
+ sal_uInt16 nPoly = aPolyPoly.Count();
+ for( sal_uInt16 i = 0; i < nPoly; i++ )
{
Polygon& rPoly = aPolyPoly[i];
rPoly = ImplLogicToDevicePixel( rPoly );
@@ -813,7 +813,7 @@ Region OutputDevice::ImplPixelToDevicePixel( const Region& rRegion ) const
// -----------------------------------------------------------------------
-void OutputDevice::EnableMapMode( BOOL bEnable )
+void OutputDevice::EnableMapMode( sal_Bool bEnable )
{
mbMap = (bEnable != 0);
@@ -832,12 +832,12 @@ void OutputDevice::SetMapMode()
if ( mbMap || !maMapMode.IsDefault() )
{
- mbMap = FALSE;
+ mbMap = sal_False;
maMapMode = MapMode();
// create new objects (clip region werden nicht neu skaliert)
- mbNewFont = TRUE;
- mbInitFont = TRUE;
+ mbNewFont = sal_True;
+ mbInitFont = sal_True;
if ( GetOutDevType() == OUTDEV_WINDOW )
{
if ( ((Window*)this)->mpWindowImpl->mpCursor )
@@ -862,7 +862,7 @@ void OutputDevice::SetMapMode( const MapMode& rNewMapMode )
{
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
- BOOL bRelMap = (rNewMapMode.GetMapUnit() == MAP_RELATIVE);
+ sal_Bool bRelMap = (rNewMapMode.GetMapUnit() == MAP_RELATIVE);
if ( mpMetaFile )
{
@@ -881,7 +881,7 @@ void OutputDevice::SetMapMode( const MapMode& rNewMapMode )
mpAlphaVDev->SetMapMode( rNewMapMode );
// Ist Default-MapMode, dann bereche nichts
- BOOL bOldMap = mbMap;
+ sal_Bool bOldMap = mbMap;
mbMap = !rNewMapMode.IsDefault();
if ( mbMap )
{
@@ -937,8 +937,8 @@ void OutputDevice::SetMapMode( const MapMode& rNewMapMode )
maMapMode = rNewMapMode;
// create new objects (clip region werden nicht neu skaliert)
- mbNewFont = TRUE;
- mbInitFont = TRUE;
+ mbNewFont = sal_True;
+ mbInitFont = sal_True;
if ( GetOutDevType() == OUTDEV_WINDOW )
{
if ( ((Window*)this)->mpWindowImpl->mpCursor )
@@ -1209,8 +1209,8 @@ Polygon OutputDevice::LogicToPixel( const Polygon& rLogicPoly ) const
if ( !mbMap )
return rLogicPoly;
- USHORT i;
- USHORT nPoints = rLogicPoly.GetSize();
+ sal_uInt16 i;
+ sal_uInt16 nPoints = rLogicPoly.GetSize();
Polygon aPoly( rLogicPoly );
// Pointer auf das Point-Array holen (Daten werden kopiert)
@@ -1243,8 +1243,8 @@ PolyPolygon OutputDevice::LogicToPixel( const PolyPolygon& rLogicPolyPoly ) cons
return rLogicPolyPoly;
PolyPolygon aPolyPoly( rLogicPolyPoly );
- USHORT nPoly = aPolyPoly.Count();
- for( USHORT i = 0; i < nPoly; i++ )
+ sal_uInt16 nPoly = aPolyPoly.Count();
+ for( sal_uInt16 i = 0; i < nPoly; i++ )
{
Polygon& rPoly = aPolyPoly[i];
rPoly = LogicToPixel( rPoly );
@@ -1305,7 +1305,7 @@ Region OutputDevice::LogicToPixel( const Region& rLogicRegion ) const
long nWidth;
long nHeight;
ImplRegionInfo aInfo;
- BOOL bRegionRect;
+ sal_Bool bRegionRect;
aRegion.ImplBeginAddRect();
bRegionRect = rLogicRegion.ImplGetFirstRect( aInfo, nX, nY, nWidth, nHeight );
@@ -1412,8 +1412,8 @@ Polygon OutputDevice::LogicToPixel( const Polygon& rLogicPoly,
ImplThresholdRes aThresRes;
ImplCalcMapResolution( rMapMode, mnDPIX, mnDPIY, aMapRes, aThresRes );
- USHORT i;
- USHORT nPoints = rLogicPoly.GetSize();
+ sal_uInt16 i;
+ sal_uInt16 nPoints = rLogicPoly.GetSize();
Polygon aPoly( rLogicPoly );
// Pointer auf das Point-Array holen (Daten werden kopiert)
@@ -1447,8 +1447,8 @@ PolyPolygon OutputDevice::LogicToPixel( const PolyPolygon& rLogicPolyPoly,
return rLogicPolyPoly;
PolyPolygon aPolyPoly( rLogicPolyPoly );
- USHORT nPoly = aPolyPoly.Count();
- for( USHORT i = 0; i < nPoly; i++ )
+ sal_uInt16 nPoly = aPolyPoly.Count();
+ for( sal_uInt16 i = 0; i < nPoly; i++ )
{
Polygon& rPoly = aPolyPoly[i];
rPoly = LogicToPixel( rPoly, rMapMode );
@@ -1503,7 +1503,7 @@ Region OutputDevice::LogicToPixel( const Region& rLogicRegion,
long nWidth;
long nHeight;
ImplRegionInfo aInfo;
- BOOL bRegionRect;
+ sal_Bool bRegionRect;
aRegion.ImplBeginAddRect();
bRegionRect = rLogicRegion.ImplGetFirstRect( aInfo, nX, nY, nWidth, nHeight );
@@ -1586,8 +1586,8 @@ Polygon OutputDevice::PixelToLogic( const Polygon& rDevicePoly ) const
if ( !mbMap )
return rDevicePoly;
- USHORT i;
- USHORT nPoints = rDevicePoly.GetSize();
+ sal_uInt16 i;
+ sal_uInt16 nPoints = rDevicePoly.GetSize();
Polygon aPoly( rDevicePoly );
// Pointer auf das Point-Array holen (Daten werden kopiert)
@@ -1620,8 +1620,8 @@ PolyPolygon OutputDevice::PixelToLogic( const PolyPolygon& rDevicePolyPoly ) con
return rDevicePolyPoly;
PolyPolygon aPolyPoly( rDevicePolyPoly );
- USHORT nPoly = aPolyPoly.Count();
- for( USHORT i = 0; i < nPoly; i++ )
+ sal_uInt16 nPoly = aPolyPoly.Count();
+ for( sal_uInt16 i = 0; i < nPoly; i++ )
{
Polygon& rPoly = aPolyPoly[i];
rPoly = PixelToLogic( rPoly );
@@ -1673,7 +1673,7 @@ Region OutputDevice::PixelToLogic( const Region& rDeviceRegion ) const
long nWidth;
long nHeight;
ImplRegionInfo aInfo;
- BOOL bRegionRect;
+ sal_Bool bRegionRect;
aRegion.ImplBeginAddRect();
bRegionRect = rDeviceRegion.ImplGetFirstRect( aInfo, nX, nY, nWidth, nHeight );
@@ -1784,8 +1784,8 @@ Polygon OutputDevice::PixelToLogic( const Polygon& rDevicePoly,
ImplThresholdRes aThresRes;
ImplCalcMapResolution( rMapMode, mnDPIX, mnDPIY, aMapRes, aThresRes );
- USHORT i;
- USHORT nPoints = rDevicePoly.GetSize();
+ sal_uInt16 i;
+ sal_uInt16 nPoints = rDevicePoly.GetSize();
Polygon aPoly( rDevicePoly );
// Pointer auf das Point-Array holen (Daten werden kopiert)
@@ -1819,8 +1819,8 @@ PolyPolygon OutputDevice::PixelToLogic( const PolyPolygon& rDevicePolyPoly,
return rDevicePolyPoly;
PolyPolygon aPolyPoly( rDevicePolyPoly );
- USHORT nPoly = aPolyPoly.Count();
- for( USHORT i = 0; i < nPoly; i++ )
+ sal_uInt16 nPoly = aPolyPoly.Count();
+ for( sal_uInt16 i = 0; i < nPoly; i++ )
{
Polygon& rPoly = aPolyPoly[i];
rPoly = PixelToLogic( rPoly, rMapMode );
@@ -1875,7 +1875,7 @@ Region OutputDevice::PixelToLogic( const Region& rDeviceRegion,
long nWidth;
long nHeight;
ImplRegionInfo aInfo;
- BOOL bRegionRect;
+ sal_Bool bRegionRect;
aRegion.ImplBeginAddRect();
bRegionRect = rDeviceRegion.ImplGetFirstRect( aInfo, nX, nY, nWidth, nHeight );
@@ -2191,7 +2191,7 @@ Rectangle OutputDevice::LogicToLogic( const Rectangle& rRectSource,
// -----------------------------------------------------------------------
-long* OutputDevice::LogicToLogic( long* pX, USHORT nCount,
+long* OutputDevice::LogicToLogic( long* pX, sal_uInt16 nCount,
const MapMode* pMapModeSource,
const MapMode* pMapModeDest ) const
{
diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx b/vcl/source/gdi/pdfextoutdevdata.cxx
index 046bc4a8951d..77458d2b26fd 100644
--- a/vcl/source/gdi/pdfextoutdevdata.cxx
+++ b/vcl/source/gdi/pdfextoutdevdata.cxx
@@ -784,7 +784,7 @@ void PDFExtOutDevData::EndGroup()
mpPageSyncData->PushAction( mrOutDev, PDFExtOutDevDataSync::EndGroup );
}
void PDFExtOutDevData::EndGroup( const Graphic& rGraphic,
- BYTE nTransparency,
+ sal_uInt8 nTransparency,
const Rectangle& rOutputRect,
const Rectangle& rVisibleOutputRect )
{
diff --git a/vcl/source/gdi/pdfwriter.cxx b/vcl/source/gdi/pdfwriter.cxx
index 5dcce25a0315..e9140cffc6a0 100644
--- a/vcl/source/gdi/pdfwriter.cxx
+++ b/vcl/source/gdi/pdfwriter.cxx
@@ -100,7 +100,7 @@ void PDFWriter::DrawTextLine(
FontStrikeout eStrikeout,
FontUnderline eUnderline,
FontUnderline eOverline,
- BOOL bUnderlineAbove )
+ sal_Bool bUnderlineAbove )
{
((PDFWriterImpl*)pImplementation)->drawTextLine( rPos, nWidth, eStrikeout, eUnderline, eOverline, bUnderlineAbove );
}
@@ -117,7 +117,7 @@ void PDFWriter::DrawTextArray(
void PDFWriter::DrawStretchText(
const Point& rStartPt,
- ULONG nWidth,
+ sal_uIntPtr nWidth,
const XubString& rStr,
xub_StrLen nIndex,
xub_StrLen nLen )
@@ -128,7 +128,7 @@ void PDFWriter::DrawStretchText(
void PDFWriter::DrawText(
const Rectangle& rRect,
const XubString& rStr,
- USHORT nStyle )
+ sal_uInt16 nStyle )
{
((PDFWriterImpl*)pImplementation)->drawText( rRect, rStr, nStyle );
}
@@ -158,7 +158,7 @@ void PDFWriter::DrawRect( const Rectangle& rRect )
((PDFWriterImpl*)pImplementation)->drawRectangle( rRect );
}
-void PDFWriter::DrawRect( const Rectangle& rRect, ULONG nHorzRound, ULONG nVertRound )
+void PDFWriter::DrawRect( const Rectangle& rRect, sal_uIntPtr nHorzRound, sal_uIntPtr nVertRound )
{
((PDFWriterImpl*)pImplementation)->drawRectangle( rRect, nHorzRound, nVertRound );
}
@@ -291,7 +291,7 @@ void PDFWriter::DrawWallpaper( const Rectangle& rRect, const Wallpaper& rWallpap
((PDFWriterImpl*)pImplementation)->drawWallpaper( rRect, rWallpaper );
}
-void PDFWriter::DrawTransparent( const PolyPolygon& rPolyPoly, USHORT nTransparencePercent )
+void PDFWriter::DrawTransparent( const PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent )
{
((PDFWriterImpl*)pImplementation)->drawTransparent( rPolyPoly, nTransparencePercent );
}
@@ -301,7 +301,7 @@ void PDFWriter::BeginTransparencyGroup()
((PDFWriterImpl*)pImplementation)->beginTransparencyGroup();
}
-void PDFWriter::EndTransparencyGroup( const Rectangle& rRect, USHORT nTransparentPercent )
+void PDFWriter::EndTransparencyGroup( const Rectangle& rRect, sal_uInt16 nTransparentPercent )
{
((PDFWriterImpl*)pImplementation)->endTransparencyGroup( rRect, nTransparentPercent );
}
@@ -311,7 +311,7 @@ void PDFWriter::EndTransparencyGroup( const Rectangle& rRect, const Bitmap& rAlp
((PDFWriterImpl*)pImplementation)->endTransparencyGroup( rRect, rAlphaMask );
}
-void PDFWriter::Push( USHORT nFlags )
+void PDFWriter::Push( sal_uInt16 nFlags )
{
((PDFWriterImpl*)pImplementation)->push( nFlags );
}
@@ -366,12 +366,12 @@ void PDFWriter::IntersectClipRegion( const Rectangle& rRect )
((PDFWriterImpl*)pImplementation)->intersectClipRegion( rRect );
}
-void PDFWriter::SetAntialiasing( USHORT nMode )
+void PDFWriter::SetAntialiasing( sal_uInt16 nMode )
{
((PDFWriterImpl*)pImplementation)->setAntiAlias( (sal_Int32)nMode );
}
-void PDFWriter::SetLayoutMode( ULONG nMode )
+void PDFWriter::SetLayoutMode( sal_uIntPtr nMode )
{
((PDFWriterImpl*)pImplementation)->setLayoutMode( (sal_Int32)nMode );
}
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 77f7f74fc10e..88e183040277 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -250,7 +250,7 @@ void doTestCode()
BitmapWriteAccess* pAcc = aTransMask.AcquireWriteAccess();
for( int nX = 0; nX < 256; nX++ )
for( int nY = 0; nY < 256; nY++ )
- pAcc->SetPixel( nX, nY, BitmapColor( (BYTE)((nX+nY)/2) ) );
+ pAcc->SetPixel( nX, nY, BitmapColor( (sal_uInt8)((nX+nY)/2) ) );
aTransMask.ReleaseAccess( pAcc );
aTransMask.SetPrefMapMode( MAP_MM );
aTransMask.SetPrefSize( Size( 10, 10 ) );
@@ -1434,17 +1434,17 @@ void PDFWriterImpl::PDFPage::convertRect( Rectangle& rRect ) const
void PDFWriterImpl::PDFPage::appendPolygon( const Polygon& rPoly, OStringBuffer& rBuffer, bool bClose ) const
{
- USHORT nPoints = rPoly.GetSize();
+ sal_uInt16 nPoints = rPoly.GetSize();
/*
* #108582# applications do weird things
*/
sal_uInt32 nBufLen = rBuffer.getLength();
if( nPoints > 0 )
{
- const BYTE* pFlagArray = rPoly.GetConstFlagAry();
+ const sal_uInt8* pFlagArray = rPoly.GetConstFlagAry();
appendPoint( rPoly[0], rBuffer );
rBuffer.append( " m\n" );
- for( USHORT i = 1; i < nPoints; i++ )
+ for( sal_uInt16 i = 1; i < nPoints; i++ )
{
if( pFlagArray && pFlagArray[i] == POLY_CONTROL && nPoints-i > 2 )
{
@@ -1555,8 +1555,8 @@ void PDFWriterImpl::PDFPage::appendPolygon( const basegfx::B2DPolygon& rPoly, OS
void PDFWriterImpl::PDFPage::appendPolyPolygon( const PolyPolygon& rPolyPoly, OStringBuffer& rBuffer, bool bClose ) const
{
- USHORT nPolygons = rPolyPoly.Count();
- for( USHORT n = 0; n < nPolygons; n++ )
+ sal_uInt16 nPolygons = rPolyPoly.Count();
+ for( sal_uInt16 n = 0; n < nPolygons; n++ )
appendPolygon( rPolyPoly[n], rBuffer, bClose );
}
@@ -2030,12 +2030,12 @@ bool PDFWriterImpl::compressStream( SvMemoryStream* pStream )
{
#ifndef DEBUG_DISABLE_PDFCOMPRESSION
pStream->Seek( STREAM_SEEK_TO_END );
- ULONG nEndPos = pStream->Tell();
+ sal_uIntPtr nEndPos = pStream->Tell();
pStream->Seek( STREAM_SEEK_TO_BEGIN );
ZCodec* pCodec = new ZCodec( 0x4000, 0x4000 );
SvMemoryStream aStream;
pCodec->BeginCompression();
- pCodec->Write( aStream, (const BYTE*)pStream->GetData(), nEndPos );
+ pCodec->Write( aStream, (const sal_uInt8*)pStream->GetData(), nEndPos );
pCodec->EndCompression();
delete pCodec;
nEndPos = aStream.Tell();
@@ -2094,7 +2094,7 @@ bool PDFWriterImpl::writeBuffer( const void* pBuffer, sal_uInt64 nBytes )
sal_uInt64 nWritten;
if( m_pCodec )
{
- m_pCodec->Write( *m_pMemStream, static_cast<const BYTE*>(pBuffer), (ULONG)nBytes );
+ m_pCodec->Write( *m_pMemStream, static_cast<const sal_uInt8*>(pBuffer), (sal_uIntPtr)nBytes );
nWritten = nBytes;
}
else
@@ -2142,7 +2142,7 @@ OutputDevice* PDFWriterImpl::getReferenceDevice()
pVDev->SetMapMode( MAP_MM );
m_pReferenceDevice->mpPDFWriter = this;
- m_pReferenceDevice->ImplUpdateFontData( TRUE );
+ m_pReferenceDevice->ImplUpdateFontData( sal_True );
}
return m_pReferenceDevice;
}
@@ -3835,7 +3835,7 @@ sal_Int32 PDFWriterImpl::createToUnicodeCMap( sal_uInt8* pEncoding,
ZCodec* pCodec = new ZCodec( 0x4000, 0x4000 );
SvMemoryStream aStream;
pCodec->BeginCompression();
- pCodec->Write( aStream, (const BYTE*)aContents.getStr(), aContents.getLength() );
+ pCodec->Write( aStream, (const sal_uInt8*)aContents.getStr(), aContents.getLength() );
pCodec->EndCompression();
delete pCodec;
#endif
@@ -6993,7 +6993,7 @@ void PDFWriterImpl::drawRelief( SalLayout& rLayout, const String& rText, bool bT
Font aSetFont = m_aCurrentPDFState.m_aFont;
aSetFont.SetRelief( RELIEF_NONE );
- aSetFont.SetShadow( FALSE );
+ aSetFont.SetShadow( sal_False );
aSetFont.SetColor( aReliefColor );
setTextLineColor( aReliefColor );
@@ -7030,8 +7030,8 @@ void PDFWriterImpl::drawShadow( SalLayout& rLayout, const String& rText, bool bT
rFont.SetColor( Color( COL_LIGHTGRAY ) );
else
rFont.SetColor( Color( COL_BLACK ) );
- rFont.SetShadow( FALSE );
- rFont.SetOutline( FALSE );
+ rFont.SetShadow( sal_False );
+ rFont.SetOutline( sal_False );
setFont( rFont );
setTextLineColor( rFont.GetColor() );
setOverlineColor( rFont.GetColor() );
@@ -7478,7 +7478,7 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const String& rText, bool bT
)
)
{
- BOOL bUnderlineAbove = OutputDevice::ImplIsUnderlineAbove( m_aCurrentPDFState.m_aFont );
+ sal_Bool bUnderlineAbove = OutputDevice::ImplIsUnderlineAbove( m_aCurrentPDFState.m_aFont );
if( m_aCurrentPDFState.m_aFont.IsWordLineMode() )
{
Point aPos, aStartPt;
@@ -7531,7 +7531,7 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const String& rText, bool bT
long nEmphYOff;
long nEmphWidth;
long nEmphHeight;
- BOOL bEmphPolyLine;
+ sal_Bool bEmphPolyLine;
FontEmphasisMark nEmphMark;
push( PUSH_ALL );
@@ -7612,7 +7612,7 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const String& rText, bool bT
}
void PDFWriterImpl::drawEmphasisMark( long nX, long nY,
- const PolyPolygon& rPolyPoly, BOOL bPolyLine,
+ const PolyPolygon& rPolyPoly, sal_Bool bPolyLine,
const Rectangle& rRect1, const Rectangle& rRect2 )
{
// TODO: pass nWidth as width of this mark
@@ -7682,7 +7682,7 @@ void PDFWriterImpl::drawTextArray( const Point& rPos, const String& rText, const
}
}
-void PDFWriterImpl::drawStretchText( const Point& rPos, ULONG nWidth, const String& rText, xub_StrLen nIndex, xub_StrLen nLen, bool bTextLines )
+void PDFWriterImpl::drawStretchText( const Point& rPos, sal_uIntPtr nWidth, const String& rText, xub_StrLen nIndex, xub_StrLen nLen, bool bTextLines )
{
MARK( "drawStretchText" );
@@ -7698,7 +7698,7 @@ void PDFWriterImpl::drawStretchText( const Point& rPos, ULONG nWidth, const Stri
}
}
-void PDFWriterImpl::drawText( const Rectangle& rRect, const String& rOrigStr, USHORT nStyle, bool bTextLines )
+void PDFWriterImpl::drawText( const Rectangle& rRect, const String& rOrigStr, sal_uInt16 nStyle, bool bTextLines )
{
long nWidth = rRect.GetWidth();
long nHeight = rRect.GetHeight();
@@ -8242,17 +8242,17 @@ void PDFWriterImpl::drawStrikeoutChar( const Point& rPos, long nWidth, FontStrik
while( m_pReferenceDevice->GetTextWidth( aStrikeout ) >= nWidth )
aStrikeout.Erase( 0, 1 );
aStrikeout.Append( aStrikeoutChar );
- BOOL bShadow = m_aCurrentPDFState.m_aFont.IsShadow();
+ sal_Bool bShadow = m_aCurrentPDFState.m_aFont.IsShadow();
if ( bShadow )
{
Font aFont = m_aCurrentPDFState.m_aFont;
- aFont.SetShadow( FALSE );
+ aFont.SetShadow( sal_False );
setFont( aFont );
updateGraphicsState();
}
// strikeout string is left aligned non-CTL text
- ULONG nOrigTLM = m_pReferenceDevice->GetLayoutMode();
+ sal_uIntPtr nOrigTLM = m_pReferenceDevice->GetLayoutMode();
m_pReferenceDevice->SetLayoutMode( TEXT_LAYOUT_BIDI_STRONG|TEXT_LAYOUT_COMPLEX_DISABLED );
drawText( rPos, aStrikeout, 0, aStrikeout.Len(), false );
m_pReferenceDevice->SetLayoutMode( nOrigTLM );
@@ -8260,7 +8260,7 @@ void PDFWriterImpl::drawStrikeoutChar( const Point& rPos, long nWidth, FontStrik
if ( bShadow )
{
Font aFont = m_aCurrentPDFState.m_aFont;
- aFont.SetShadow( TRUE );
+ aFont.SetShadow( sal_True );
setFont( aFont );
updateGraphicsState();
}
@@ -8923,7 +8923,7 @@ void PDFWriterImpl::drawPolyLine( const Polygon& rPoly )
{
MARK( "drawPolyLine" );
- USHORT nPoints = rPoly.GetSize();
+ sal_uInt16 nPoints = rPoly.GetSize();
if( nPoints < 2 )
return;
@@ -9116,7 +9116,7 @@ void PDFWriterImpl::drawPolyLine( const Polygon& rPoly, const PDFWriter::ExtLine
aBoundRect.Right() += nLW;
aBoundRect.Bottom() += nLW;
}
- endTransparencyGroup( aBoundRect, (USHORT)(100.0*rInfo.m_fTransparency) );
+ endTransparencyGroup( aBoundRect, (sal_uInt16)(100.0*rInfo.m_fTransparency) );
}
}
@@ -9157,7 +9157,7 @@ void PDFWriterImpl::drawPixel( const Polygon& rPoints, const Color* pColors )
if( m_aGraphicsStack.front().m_aLineColor == Color( COL_TRANSPARENT ) && ! pColors )
return;
- USHORT nPoints = rPoints.GetSize();
+ sal_uInt16 nPoints = rPoints.GetSize();
OStringBuffer aLine( nPoints*40 );
aLine.append( "q " );
if( ! pColors )
@@ -9172,7 +9172,7 @@ void PDFWriterImpl::drawPixel( const Polygon& rPoints, const Color* pColors )
aPixel.append( ' ' );
appendDouble( 1.0/double(getReferenceDevice()->ImplGetDPIY()), aPixel );
OString aPixelStr = aPixel.makeStringAndClear();
- for( USHORT i = 0; i < nPoints; i++ )
+ for( sal_uInt16 i = 0; i < nPoints; i++ )
{
if( pColors )
{
@@ -9204,7 +9204,7 @@ bool PDFWriterImpl::writeTransparentObject( TransparencyEmit& rObject )
bool bFlateFilter = compressStream( rObject.m_pContentStream );
rObject.m_pContentStream->Seek( STREAM_SEEK_TO_END );
- ULONG nSize = rObject.m_pContentStream->Tell();
+ sal_uIntPtr nSize = rObject.m_pContentStream->Tell();
rObject.m_pContentStream->Seek( STREAM_SEEK_TO_BEGIN );
#if OSL_DEBUG_LEVEL > 1
{
@@ -9661,7 +9661,7 @@ bool PDFWriterImpl::writeBitmapObject( BitmapEmit& rObject, bool bMask )
{
int nChar = 0;
//fill the encryption buffer
- for( USHORT i = 0; i < pAccess->GetPaletteEntryCount(); i++ )
+ for( sal_uInt16 i = 0; i < pAccess->GetPaletteEntryCount(); i++ )
{
const BitmapColor& rColor = pAccess->GetPaletteColor( i );
m_pEncryptionBuffer[nChar++] = rColor.GetRed();
@@ -9672,7 +9672,7 @@ bool PDFWriterImpl::writeBitmapObject( BitmapEmit& rObject, bool bMask )
rtl_cipher_encodeARCFOUR( m_aCipher, m_pEncryptionBuffer, nChar, m_pEncryptionBuffer, nChar );
//now queue the data for output
nChar = 0;
- for( USHORT i = 0; i < pAccess->GetPaletteEntryCount(); i++ )
+ for( sal_uInt16 i = 0; i < pAccess->GetPaletteEntryCount(); i++ )
{
appendHex(m_pEncryptionBuffer[nChar++], aLine );
appendHex(m_pEncryptionBuffer[nChar++], aLine );
@@ -9682,7 +9682,7 @@ bool PDFWriterImpl::writeBitmapObject( BitmapEmit& rObject, bool bMask )
}
else //no encryption requested (PDF/A-1a program flow drops here)
{
- for( USHORT i = 0; i < pAccess->GetPaletteEntryCount(); i++ )
+ for( sal_uInt16 i = 0; i < pAccess->GetPaletteEntryCount(); i++ )
{
const BitmapColor& rColor = pAccess->GetPaletteColor( i );
appendHex( rColor.GetRed(), aLine );
@@ -10132,7 +10132,7 @@ void PDFWriterImpl::drawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch
aPolyPoly.Optimize( POLY_OPTIMIZE_NO_SAME );
push( PUSH_LINECOLOR );
setLineColor( rHatch.GetColor() );
- getReferenceDevice()->ImplDrawHatch( aPolyPoly, rHatch, FALSE );
+ getReferenceDevice()->ImplDrawHatch( aPolyPoly, rHatch, sal_False );
pop();
}
}
diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx
index 2eacdc215dd8..85a470870dd9 100644
--- a/vcl/source/gdi/pdfwriter_impl.hxx
+++ b/vcl/source/gdi/pdfwriter_impl.hxx
@@ -446,7 +446,7 @@ public:
rtl::OString m_aName;
rtl::OUString m_aDescription;
rtl::OUString m_aText;
- USHORT m_nTextStyle;
+ sal_uInt16 m_nTextStyle;
rtl::OUString m_aValue;
rtl::OString m_aDAString;
rtl::OString m_aDRDict;
@@ -1091,7 +1091,7 @@ i12626
bool checkEmitStructure();
/* draws an emphasis mark */
- void drawEmphasisMark( long nX, long nY, const PolyPolygon& rPolyPoly, BOOL bPolyLine, const Rectangle& rRect1, const Rectangle& rRect2 );
+ void drawEmphasisMark( long nX, long nY, const PolyPolygon& rPolyPoly, sal_Bool bPolyLine, const Rectangle& rRect1, const Rectangle& rRect2 );
/* true if PDF/A-1a or PDF/A-1b is output */
sal_Bool m_bIsPDF_A1;
@@ -1202,13 +1202,13 @@ public:
void setTextFillColor( const Color& rColor )
{
m_aGraphicsStack.front().m_aFont.SetFillColor( rColor );
- m_aGraphicsStack.front().m_aFont.SetTransparent( ImplIsColorTransparent( rColor ) ? TRUE : FALSE );
+ m_aGraphicsStack.front().m_aFont.SetTransparent( ImplIsColorTransparent( rColor ) ? sal_True : sal_False );
m_aGraphicsStack.front().m_nUpdateFlags |= GraphicsState::updateFont;
}
void setTextFillColor()
{
m_aGraphicsStack.front().m_aFont.SetFillColor( Color( COL_TRANSPARENT ) );
- m_aGraphicsStack.front().m_aFont.SetTransparent( TRUE );
+ m_aGraphicsStack.front().m_aFont.SetTransparent( sal_True );
m_aGraphicsStack.front().m_nUpdateFlags |= GraphicsState::updateFont;
}
void setTextColor( const Color& rColor )
@@ -1259,10 +1259,10 @@ public:
/* actual drawing functions */
void drawText( const Point& rPos, const String& rText, xub_StrLen nIndex = 0, xub_StrLen nLen = STRING_LEN, bool bTextLines = true );
void drawTextArray( const Point& rPos, const String& rText, const sal_Int32* pDXArray = NULL, xub_StrLen nIndex = 0, xub_StrLen nLen = STRING_LEN, bool bTextLines = true );
- void drawStretchText( const Point& rPos, ULONG nWidth, const String& rText,
+ void drawStretchText( const Point& rPos, sal_uIntPtr nWidth, const String& rText,
xub_StrLen nIndex = 0, xub_StrLen nLen = STRING_LEN,
bool bTextLines = true );
- void drawText( const Rectangle& rRect, const String& rOrigStr, USHORT nStyle, bool bTextLines = true );
+ void drawText( const Rectangle& rRect, const String& rOrigStr, sal_uInt16 nStyle, bool bTextLines = true );
void drawTextLine( const Point& rPos, long nWidth, FontStrikeout eStrikeout, FontUnderline eUnderline, FontUnderline eOverline, bool bUnderlineAbove );
void drawWaveTextLine( rtl::OStringBuffer& aLine, long nWidth, FontUnderline eTextLine, Color aColor, bool bIsAbove );
void drawStraightTextLine( rtl::OStringBuffer& aLine, long nWidth, FontUnderline eTextLine, Color aColor, bool bIsAbove );
diff --git a/vcl/source/gdi/pngread.cxx b/vcl/source/gdi/pngread.cxx
index 11971db34378..5cc33874bbbf 100644
--- a/vcl/source/gdi/pngread.cxx
+++ b/vcl/source/gdi/pngread.cxx
@@ -72,7 +72,7 @@ namespace vcl
// ------------------------------------------------------------------------------
-static const BYTE mpDefaultColorTable[ 256 ] =
+static const sal_uInt8 mpDefaultColorTable[ 256 ] =
{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
@@ -111,11 +111,11 @@ private:
AlphaMask* mpAlphaMask;
BitmapWriteAccess* mpMaskAcc;
ZCodec* mpZCodec;
- BYTE* mpInflateInBuf; // as big as the size of a scanline + alphachannel + 1
- BYTE* mpScanPrior; // pointer to the latest scanline
- BYTE* mpTransTab; // for transparency in images with palette colortype
- BYTE* mpScanCurrent; // pointer into the current scanline
- BYTE* mpColorTable; //
+ sal_uInt8* mpInflateInBuf; // as big as the size of a scanline + alphachannel + 1
+ sal_uInt8* mpScanPrior; // pointer to the latest scanline
+ sal_uInt8* mpTransTab; // for transparency in images with palette colortype
+ sal_uInt8* mpScanCurrent; // pointer into the current scanline
+ sal_uInt8* mpColorTable; //
sal_Size mnStreamSize; // estimate of PNG file size
sal_uInt32 mnChunkType; // Type of current PNG chunk
sal_Int32 mnChunkLen; // Length of current PNG chunk
@@ -131,28 +131,28 @@ private:
sal_uInt32 mnYAdd; // the increment for input images Y coords for the current pass
int mnPreviewShift; // shift to convert orig image coords into preview image coords
int mnPreviewMask; // == ((1 << mnPreviewShift) - 1)
- USHORT mnIStmOldMode;
- USHORT mnTargetDepth; // pixel depth of target bitmap
- BYTE mnTransRed;
- BYTE mnTransGreen;
- BYTE mnTransBlue;
- BYTE mnPngDepth; // pixel depth of PNG data
- BYTE mnColorType;
- BYTE mnCompressionType;
- BYTE mnFilterType;
- BYTE mnInterlaceType;
+ sal_uInt16 mnIStmOldMode;
+ sal_uInt16 mnTargetDepth; // pixel depth of target bitmap
+ sal_uInt8 mnTransRed;
+ sal_uInt8 mnTransGreen;
+ sal_uInt8 mnTransBlue;
+ sal_uInt8 mnPngDepth; // pixel depth of PNG data
+ sal_uInt8 mnColorType;
+ sal_uInt8 mnCompressionType;
+ sal_uInt8 mnFilterType;
+ sal_uInt8 mnInterlaceType;
BitmapColor mcTranspColor; // transparency mask's transparency "color"
BitmapColor mcOpaqueColor; // transparency mask's opaque "color"
- BOOL mbTransparent; // graphic includes an tRNS Chunk or an alpha Channel
- BOOL mbAlphaChannel; // is true for ColorType 4 and 6
- BOOL mbRGBTriple;
- BOOL mbPalette; // FALSE if we need a Palette
- BOOL mbGrayScale;
- BOOL mbzCodecInUse;
- BOOL mbStatus;
- BOOL mbIDAT; // TRUE if finished with enough IDAT chunks
- BOOL mbGamma; // TRUE if Gamma Correction available
- BOOL mbpHYs; // TRUE if pysical size of pixel available
+ sal_Bool mbTransparent; // graphic includes an tRNS Chunk or an alpha Channel
+ sal_Bool mbAlphaChannel; // is true for ColorType 4 and 6
+ sal_Bool mbRGBTriple;
+ sal_Bool mbPalette; // sal_False if we need a Palette
+ sal_Bool mbGrayScale;
+ sal_Bool mbzCodecInUse;
+ sal_Bool mbStatus;
+ sal_Bool mbIDAT; // sal_True if finished with enough IDAT chunks
+ sal_Bool mbGamma; // sal_True if Gamma Correction available
+ sal_Bool mbpHYs; // sal_True if pysical size of pixel available
sal_Bool mbIgnoreGammaChunk;
bool ReadNextChunk();
@@ -160,20 +160,20 @@ private:
void SkipRemainingChunks();
void ImplSetPixel( sal_uInt32 y, sal_uInt32 x, const BitmapColor & );
- void ImplSetPixel( sal_uInt32 y, sal_uInt32 x, BYTE nPalIndex );
- void ImplSetTranspPixel( sal_uInt32 y, sal_uInt32 x, const BitmapColor &, BOOL bTrans );
- void ImplSetAlphaPixel( sal_uInt32 y, sal_uInt32 x, BYTE nPalIndex, BYTE nAlpha );
- void ImplSetAlphaPixel( sal_uInt32 y, sal_uInt32 x, const BitmapColor&, BYTE nAlpha );
+ void ImplSetPixel( sal_uInt32 y, sal_uInt32 x, sal_uInt8 nPalIndex );
+ void ImplSetTranspPixel( sal_uInt32 y, sal_uInt32 x, const BitmapColor &, sal_Bool bTrans );
+ void ImplSetAlphaPixel( sal_uInt32 y, sal_uInt32 x, sal_uInt8 nPalIndex, sal_uInt8 nAlpha );
+ void ImplSetAlphaPixel( sal_uInt32 y, sal_uInt32 x, const BitmapColor&, sal_uInt8 nAlpha );
void ImplReadIDAT();
bool ImplPreparePass();
void ImplApplyFilter();
void ImplDrawScanline( sal_uInt32 nXStart, sal_uInt32 nXAdd );
- BOOL ImplReadTransparent();
+ sal_Bool ImplReadTransparent();
void ImplGetGamma();
void ImplGetBackground();
- BYTE ImplScaleColor();
- BOOL ImplReadHeader( const Size& rPreviewSizeHint );
- BOOL ImplReadPalette();
+ sal_uInt8 ImplScaleColor();
+ sal_Bool ImplReadHeader( const Size& rPreviewSizeHint );
+ sal_Bool ImplReadPalette();
void ImplGetGrayPalette( sal_uInt16 );
sal_uInt32 ImplReadsal_uInt32();
@@ -202,8 +202,8 @@ PNGReaderImpl::PNGReaderImpl( SvStream& rPNGStream )
mpTransTab ( NULL ),
mpColorTable ( (sal_uInt8*) mpDefaultColorTable ),
mbzCodecInUse ( sal_False ),
- mbStatus( TRUE),
- mbIDAT( FALSE ),
+ mbStatus( sal_True),
+ mbIDAT( sal_False ),
mbGamma ( sal_False ),
mbpHYs ( sal_False ),
mbIgnoreGammaChunk ( sal_False )
@@ -383,7 +383,7 @@ BitmapEx PNGReaderImpl::GetBitmapEx( const Size& rPreviewSizeHint )
case PNGCHUNK_gAMA : // the gamma chunk must precede
{ // the 'IDAT' and also the 'PLTE'(if available )
- if ( !mbIgnoreGammaChunk && ( mbIDAT == FALSE ) )
+ if ( !mbIgnoreGammaChunk && ( mbIDAT == sal_False ) )
ImplGetGamma();
}
break;
@@ -404,7 +404,7 @@ BitmapEx PNGReaderImpl::GetBitmapEx( const Size& rPreviewSizeHint )
case PNGCHUNK_bKGD : // the background chunk must appear
{
- if ( ( mbIDAT == FALSE ) && mbPalette ) // before the 'IDAT' and after the
+ if ( ( mbIDAT == sal_False ) && mbPalette ) // before the 'IDAT' and after the
ImplGetBackground(); // PLTE(if available ) chunk.
}
break;
@@ -488,27 +488,27 @@ BitmapEx PNGReaderImpl::GetBitmapEx( const Size& rPreviewSizeHint )
// ------------------------------------------------------------------------
-BOOL PNGReaderImpl::ImplReadHeader( const Size& rPreviewSizeHint )
+sal_Bool PNGReaderImpl::ImplReadHeader( const Size& rPreviewSizeHint )
{
if( mnChunkLen < 13 )
- return FALSE;
+ return sal_False;
maOrigSize.Width() = ImplReadsal_uInt32();
maOrigSize.Height() = ImplReadsal_uInt32();
if ( !maOrigSize.Width() || !maOrigSize.Height() )
- return FALSE;
+ return sal_False;
mnPngDepth = *(maDataIter++);
mnColorType = *(maDataIter++);
mnCompressionType = *(maDataIter++);
if( mnCompressionType != 0 ) // unknown compression type
- return FALSE;
+ return sal_False;
mnFilterType = *(maDataIter++);
if( mnFilterType != 0 ) // unknown filter type
- return FALSE;
+ return sal_False;
mnInterlaceType = *(maDataIter++);
switch ( mnInterlaceType ) // filter type valid ?
@@ -520,12 +520,12 @@ BOOL PNGReaderImpl::ImplReadHeader( const Size& rPreviewSizeHint )
mnPass = 0;
break;
default:
- return FALSE;
+ return sal_False;
}
- mbPalette = TRUE;
- mbIDAT = mbAlphaChannel = mbTransparent = FALSE;
- mbGrayScale = mbRGBTriple = FALSE;
+ mbPalette = sal_True;
+ mbIDAT = mbAlphaChannel = mbTransparent = sal_False;
+ mbGrayScale = mbRGBTriple = sal_False;
mnTargetDepth = mnPngDepth;
mnScansize = ( ( maOrigSize.Width() * mnPngDepth ) + 7 ) >> 3;
@@ -538,7 +538,7 @@ BOOL PNGReaderImpl::ImplReadHeader( const Size& rPreviewSizeHint )
{
case 2 : // 2bit target not available -> use four bits
mnTargetDepth = 4; // we have to expand the bitmap
- mbGrayScale = TRUE;
+ mbGrayScale = sal_True;
break;
case 16 :
mnTargetDepth = 8; // we have to reduce the bitmap
@@ -546,17 +546,17 @@ BOOL PNGReaderImpl::ImplReadHeader( const Size& rPreviewSizeHint )
case 1 :
case 4 :
case 8 :
- mbGrayScale = TRUE;
+ mbGrayScale = sal_True;
break;
default :
- return FALSE;
+ return sal_False;
}
}
break;
case 2 : // each pixel is an RGB triple
{
- mbRGBTriple = TRUE;
+ mbRGBTriple = sal_True;
mnScansize *= 3;
switch ( mnPngDepth )
{
@@ -565,7 +565,7 @@ BOOL PNGReaderImpl::ImplReadHeader( const Size& rPreviewSizeHint )
mnTargetDepth = 24;
break;
default :
- return FALSE;
+ return sal_False;
}
}
break;
@@ -580,10 +580,10 @@ BOOL PNGReaderImpl::ImplReadHeader( const Size& rPreviewSizeHint )
case 1 :
case 4 :
case 8 :
- mbPalette = FALSE;
+ mbPalette = sal_False;
break;
default :
- return FALSE;
+ return sal_False;
}
}
break;
@@ -591,25 +591,25 @@ BOOL PNGReaderImpl::ImplReadHeader( const Size& rPreviewSizeHint )
case 4 : // each pixel is a grayscale sample followed by an alpha sample
{
mnScansize *= 2;
- mbAlphaChannel = TRUE;
+ mbAlphaChannel = sal_True;
switch ( mnPngDepth )
{
case 16 :
mnTargetDepth = 8; // we have to reduce the bitmap
case 8 :
- mbGrayScale = TRUE;
+ mbGrayScale = sal_True;
break;
default :
- return FALSE;
+ return sal_False;
}
}
break;
case 6 : // each pixel is an RGB triple followed by an alpha sample
{
- mbRGBTriple = TRUE;
+ mbRGBTriple = sal_True;
mnScansize *= 4;
- mbAlphaChannel = TRUE;
+ mbAlphaChannel = sal_True;
switch (mnPngDepth )
{
case 16 : // we have to reduce the bitmap
@@ -617,13 +617,13 @@ BOOL PNGReaderImpl::ImplReadHeader( const Size& rPreviewSizeHint )
mnTargetDepth = 24;
break;
default :
- return FALSE;
+ return sal_False;
}
}
break;
default :
- return FALSE;
+ return sal_False;
}
mnBPP = mnScansize / maOrigSize.Width();
@@ -633,9 +633,9 @@ BOOL PNGReaderImpl::ImplReadHeader( const Size& rPreviewSizeHint )
mnScansize++; // each scanline includes one filterbyte
// TODO: switch between both scanlines instead of copying
- mpInflateInBuf = new BYTE[ mnScansize ];
+ mpInflateInBuf = new sal_uInt8[ mnScansize ];
mpScanCurrent = mpInflateInBuf;
- mpScanPrior = new BYTE[ mnScansize ];
+ mpScanPrior = new sal_uInt8[ mnScansize ];
// calculate target size from original size and the preview hint
if( rPreviewSizeHint.Width() || rPreviewSizeHint.Height() )
@@ -674,7 +674,7 @@ BOOL PNGReaderImpl::ImplReadHeader( const Size& rPreviewSizeHint )
mpBmp = new Bitmap( maTargetSize, mnTargetDepth );
mpAcc = mpBmp->AcquireWriteAccess();
if( !mpAcc )
- return FALSE;
+ return sal_False;
mpBmp->SetSourceSizePixel( maOrigSize );
@@ -684,7 +684,7 @@ BOOL PNGReaderImpl::ImplReadHeader( const Size& rPreviewSizeHint )
mpAlphaMask->Erase( 128 );
mpMaskAcc = mpAlphaMask->AcquireWriteAccess();
if( !mpMaskAcc )
- return FALSE;
+ return sal_False;
}
if ( mbGrayScale )
@@ -692,7 +692,7 @@ BOOL PNGReaderImpl::ImplReadHeader( const Size& rPreviewSizeHint )
ImplPreparePass();
- return TRUE;
+ return sal_True;
}
// ------------------------------------------------------------------------
@@ -712,38 +712,38 @@ void PNGReaderImpl::ImplGetGrayPalette( sal_uInt16 nBitDepth )
mpAcc->SetPaletteEntryCount( nPaletteEntryCount );
for ( sal_uInt32 i = 0, nStart = 0; nStart < 256; i++, nStart += nAdd )
- mpAcc->SetPaletteColor( (USHORT)i, BitmapColor( mpColorTable[ nStart ],
+ mpAcc->SetPaletteColor( (sal_uInt16)i, BitmapColor( mpColorTable[ nStart ],
mpColorTable[ nStart ], mpColorTable[ nStart ] ) );
}
// ------------------------------------------------------------------------
-BOOL PNGReaderImpl::ImplReadPalette()
+sal_Bool PNGReaderImpl::ImplReadPalette()
{
sal_uInt16 nCount = static_cast<sal_uInt16>( mnChunkLen / 3 );
if ( ( ( mnChunkLen % 3 ) == 0 ) && ( ( 0 < nCount ) && ( nCount <= 256 ) ) && mpAcc )
{
- mbPalette = TRUE;
- mpAcc->SetPaletteEntryCount( (USHORT) nCount );
+ mbPalette = sal_True;
+ mpAcc->SetPaletteEntryCount( (sal_uInt16) nCount );
for ( sal_uInt16 i = 0; i < nCount; i++ )
{
- BYTE nRed = mpColorTable[ *maDataIter++ ];
- BYTE nGreen = mpColorTable[ *maDataIter++ ];
- BYTE nBlue = mpColorTable[ *maDataIter++ ];
+ sal_uInt8 nRed = mpColorTable[ *maDataIter++ ];
+ sal_uInt8 nGreen = mpColorTable[ *maDataIter++ ];
+ sal_uInt8 nBlue = mpColorTable[ *maDataIter++ ];
mpAcc->SetPaletteColor( i, Color( nRed, nGreen, nBlue ) );
}
}
else
- mbStatus = FALSE;
+ mbStatus = sal_False;
return mbStatus;
}
// ------------------------------------------------------------------------
-BOOL PNGReaderImpl::ImplReadTransparent()
+sal_Bool PNGReaderImpl::ImplReadTransparent()
{
bool bNeedAlpha = false;
@@ -782,7 +782,7 @@ BOOL PNGReaderImpl::ImplReadTransparent()
{
if ( mnChunkLen <= 256 )
{
- mpTransTab = new BYTE [ 256 ];
+ mpTransTab = new sal_uInt8 [ 256 ];
rtl_fillMemory( mpTransTab, 256, 0xff );
rtl_copyMemory( mpTransTab, &(*maDataIter), mnChunkLen );
maDataIter += mnChunkLen;
@@ -810,13 +810,13 @@ BOOL PNGReaderImpl::ImplReadTransparent()
}
mbTransparent = (mpMaskAcc != NULL);
if( !mbTransparent )
- return FALSE;
+ return sal_False;
mcOpaqueColor = BitmapColor( 0x00 );
mcTranspColor = BitmapColor( 0xFF );
mpMaskAcc->Erase( 0x00 );
}
- return TRUE;
+ return sal_True;
}
// ------------------------------------------------------------------------
@@ -832,7 +832,7 @@ void PNGReaderImpl::ImplGetGamma()
if ( fInvGamma != 1.0 )
{
- mbGamma = TRUE;
+ mbGamma = sal_True;
if ( mpColorTable == mpDefaultColorTable )
mpColorTable = new sal_uInt8[ 256 ];
@@ -855,10 +855,10 @@ void PNGReaderImpl::ImplGetBackground()
{
if ( mnChunkLen == 1 )
{
- UINT16 nCol = *maDataIter++;
+ sal_uInt16 nCol = *maDataIter++;
if ( nCol < mpAcc->GetPaletteEntryCount() )
{
- mpAcc->Erase( mpAcc->GetPaletteColor( (BYTE)nCol ) );
+ mpAcc->Erase( mpAcc->GetPaletteColor( (sal_uInt8)nCol ) );
break;
}
}
@@ -917,9 +917,9 @@ void PNGReaderImpl::ImplReadIDAT()
{
if( mnChunkLen > 0 )
{
- if ( mbzCodecInUse == FALSE )
+ if ( mbzCodecInUse == sal_False )
{
- mbzCodecInUse = TRUE;
+ mbzCodecInUse = sal_True;
mpZCodec->BeginCompression( ZCODEC_PNG_DEFAULT );
}
mpZCodec->SetBreak( mnChunkLen );
@@ -932,7 +932,7 @@ void PNGReaderImpl::ImplReadIDAT()
sal_Int32 nRead = mpZCodec->ReadAsynchron( aIStrm, mpScanCurrent, nToRead );
if ( nRead < 0 )
{
- mbStatus = FALSE;
+ mbStatus = sal_False;
break;
}
if ( nRead < nToRead )
@@ -963,7 +963,7 @@ void PNGReaderImpl::ImplReadIDAT()
if( mbIDAT )
{
mpZCodec->EndCompression();
- mbzCodecInUse = FALSE;
+ mbzCodecInUse = sal_False;
}
}
@@ -1038,9 +1038,9 @@ bool PNGReaderImpl::ImplPreparePass()
void PNGReaderImpl::ImplApplyFilter()
{
OSL_ASSERT( mnScansize >= mnBPP + 1 );
- const BYTE* const pScanEnd = mpInflateInBuf + mnScansize;
+ const sal_uInt8* const pScanEnd = mpInflateInBuf + mnScansize;
- BYTE nFilterType = *mpInflateInBuf; // the filter type may change each scanline
+ sal_uInt8 nFilterType = *mpInflateInBuf; // the filter type may change each scanline
switch ( nFilterType )
{
default: // unknown Scanline Filter Type
@@ -1050,26 +1050,26 @@ void PNGReaderImpl::ImplApplyFilter()
case 1: // Scanline Filter Type "Sub"
{
- BYTE* p1 = mpInflateInBuf + 1;
- const BYTE* p2 = p1;
+ sal_uInt8* p1 = mpInflateInBuf + 1;
+ const sal_uInt8* p2 = p1;
p1 += mnBPP;
// use left pixels
do
- *p1 = static_cast<BYTE>( *p1 + *(p2++) );
+ *p1 = static_cast<sal_uInt8>( *p1 + *(p2++) );
while( ++p1 < pScanEnd );
}
break;
case 2: // Scanline Filter Type "Up"
{
- BYTE* p1 = mpInflateInBuf + 1;
- const BYTE* p2 = mpScanPrior + 1;
+ sal_uInt8* p1 = mpInflateInBuf + 1;
+ const sal_uInt8* p2 = mpScanPrior + 1;
// use pixels from prior line
while( p1 < pScanEnd )
{
- *p1 = static_cast<BYTE>( *p1 + *(p2++) );
+ *p1 = static_cast<sal_uInt8>( *p1 + *(p2++) );
++p1;
}
}
@@ -1077,18 +1077,18 @@ void PNGReaderImpl::ImplApplyFilter()
case 3: // Scanline Filter Type "Average"
{
- BYTE* p1 = mpInflateInBuf + 1;
- const BYTE* p2 = mpScanPrior + 1;
- const BYTE* p3 = p1;
+ sal_uInt8* p1 = mpInflateInBuf + 1;
+ const sal_uInt8* p2 = mpScanPrior + 1;
+ const sal_uInt8* p3 = p1;
// use one pixel from prior line
for( int n = mnBPP; --n >= 0; ++p1, ++p2)
- *p1 = static_cast<BYTE>( *p1 + (*p2 >> 1) );
+ *p1 = static_cast<sal_uInt8>( *p1 + (*p2 >> 1) );
// predict by averaging the left and prior line pixels
while( p1 < pScanEnd )
{
- *p1 = static_cast<BYTE>( *p1 + ((*(p2++) + *(p3++)) >> 1) );
+ *p1 = static_cast<sal_uInt8>( *p1 + ((*(p2++) + *(p3++)) >> 1) );
++p1;
}
}
@@ -1096,14 +1096,14 @@ void PNGReaderImpl::ImplApplyFilter()
case 4: // Scanline Filter Type "PaethPredictor"
{
- BYTE* p1 = mpInflateInBuf + 1;
- const BYTE* p2 = mpScanPrior + 1;
- const BYTE* p3 = p1;
- const BYTE* p4 = p2;
+ sal_uInt8* p1 = mpInflateInBuf + 1;
+ const sal_uInt8* p2 = mpScanPrior + 1;
+ const sal_uInt8* p3 = p1;
+ const sal_uInt8* p4 = p2;
// use one pixel from prior line
for( int n = mnBPP; --n >= 0; ++p1)
- *p1 = static_cast<BYTE>( *p1 + *(p2++) );
+ *p1 = static_cast<sal_uInt8>( *p1 + *(p2++) );
// predict by using the left and the prior line pixels
while( p1 < pScanEnd )
@@ -1128,7 +1128,7 @@ void PNGReaderImpl::ImplApplyFilter()
if( npa > npc )
na = nc;
- *p1 = static_cast<BYTE>( *p1 + na );
+ *p1 = static_cast<sal_uInt8>( *p1 + na );
++p1;
}
}
@@ -1154,7 +1154,7 @@ void PNGReaderImpl::ImplDrawScanline( sal_uInt32 nXStart, sal_uInt32 nXAdd )
// => TODO; also do this for nX here instead of in the ImplSet*Pixel() methods
const sal_uInt32 nY = mnYpos >> mnPreviewShift;
- const BYTE* pTmp = mpInflateInBuf + 1;
+ const sal_uInt8* pTmp = mpInflateInBuf + 1;
if ( mpAcc->HasPalette() ) // alphachannel is not allowed by pictures including palette entries
{
switch ( mpAcc->GetBitCount() )
@@ -1165,12 +1165,12 @@ void PNGReaderImpl::ImplDrawScanline( sal_uInt32 nXStart, sal_uInt32 nXAdd )
{
for ( sal_Int32 nX = nXStart, nShift = 0; nX < maOrigSize.Width(); nX += nXAdd )
{
- BYTE nCol;
+ sal_uInt8 nCol;
nShift = (nShift - 1) & 7;
if ( nShift == 0 )
nCol = *(pTmp++);
else
- nCol = static_cast<BYTE>( *pTmp >> nShift );
+ nCol = static_cast<sal_uInt8>( *pTmp >> nShift );
nCol &= 1;
ImplSetAlphaPixel( nY, nX, nCol, mpTransTab[ nCol ] );
@@ -1182,11 +1182,11 @@ void PNGReaderImpl::ImplDrawScanline( sal_uInt32 nXStart, sal_uInt32 nXAdd )
{
nShift = (nShift - 1) & 7;
- BYTE nCol;
+ sal_uInt8 nCol;
if ( nShift == 0 )
nCol = *(pTmp++);
else
- nCol = static_cast<BYTE>( *pTmp >> nShift );
+ nCol = static_cast<sal_uInt8>( *pTmp >> nShift );
nCol &= 1;
ImplSetPixel( nY, nX, nCol );
@@ -1218,7 +1218,7 @@ void PNGReaderImpl::ImplDrawScanline( sal_uInt32 nXStart, sal_uInt32 nXAdd )
{
for ( sal_Int32 nX = nXStart, nXIndex = 0; nX < maOrigSize.Width(); nX += nXAdd, nXIndex++ )
{
- BYTE nCol;
+ sal_uInt8 nCol;
switch( nXIndex & 3 )
{
case 0 :
@@ -1340,7 +1340,7 @@ void PNGReaderImpl::ImplDrawScanline( sal_uInt32 nXStart, sal_uInt32 nXAdd )
break;
default :
- mbStatus = FALSE;
+ mbStatus = sal_False;
break;
}
}
@@ -1466,7 +1466,7 @@ void PNGReaderImpl::ImplSetPixel( sal_uInt32 nY, sal_uInt32 nX, const BitmapColo
// ------------------------------------------------------------------------
-void PNGReaderImpl::ImplSetPixel( sal_uInt32 nY, sal_uInt32 nX, BYTE nPalIndex )
+void PNGReaderImpl::ImplSetPixel( sal_uInt32 nY, sal_uInt32 nX, sal_uInt8 nPalIndex )
{
// TODO: get preview mode checks out of inner loop
if( nX & mnPreviewMask )
@@ -1478,7 +1478,7 @@ void PNGReaderImpl::ImplSetPixel( sal_uInt32 nY, sal_uInt32 nX, BYTE nPalIndex )
// ------------------------------------------------------------------------
-void PNGReaderImpl::ImplSetTranspPixel( sal_uInt32 nY, sal_uInt32 nX, const BitmapColor& rBitmapColor, BOOL bTrans )
+void PNGReaderImpl::ImplSetTranspPixel( sal_uInt32 nY, sal_uInt32 nX, const BitmapColor& rBitmapColor, sal_Bool bTrans )
{
// TODO: get preview mode checks out of inner loop
if( nX & mnPreviewMask )
@@ -1496,7 +1496,7 @@ void PNGReaderImpl::ImplSetTranspPixel( sal_uInt32 nY, sal_uInt32 nX, const Bitm
// ------------------------------------------------------------------------
void PNGReaderImpl::ImplSetAlphaPixel( sal_uInt32 nY, sal_uInt32 nX,
- BYTE nPalIndex, BYTE nAlpha )
+ sal_uInt8 nPalIndex, sal_uInt8 nAlpha )
{
// TODO: get preview mode checks out of inner loop
if( nX & mnPreviewMask )
@@ -1510,7 +1510,7 @@ void PNGReaderImpl::ImplSetAlphaPixel( sal_uInt32 nY, sal_uInt32 nX,
// ------------------------------------------------------------------------
void PNGReaderImpl::ImplSetAlphaPixel( sal_uInt32 nY, sal_uInt32 nX,
- const BitmapColor& rBitmapColor, BYTE nAlpha )
+ const BitmapColor& rBitmapColor, sal_uInt8 nAlpha )
{
// TODO: get preview mode checks out of inner loop
if( nX & mnPreviewMask )
diff --git a/vcl/source/gdi/pngwrite.cxx b/vcl/source/gdi/pngwrite.cxx
index 47152ea6ac11..1d3dc5d15842 100644
--- a/vcl/source/gdi/pngwrite.cxx
+++ b/vcl/source/gdi/pngwrite.cxx
@@ -88,35 +88,35 @@ private:
sal_Int32 mnCompLevel;
sal_Int32 mnInterlaced;
sal_uInt32 mnMaxChunkSize;
- BOOL mbStatus;
+ sal_Bool mbStatus;
BitmapReadAccess* mpAccess;
BitmapReadAccess* mpMaskAccess;
ZCodec* mpZCodec;
- BYTE* mpDeflateInBuf; // as big as the size of a scanline + alphachannel + 1
- BYTE* mpPreviousScan; // as big as mpDeflateInBuf
- BYTE* mpCurrentScan;
- ULONG mnDeflateInSize;
-
- ULONG mnWidth, mnHeight;
- BYTE mnBitsPerPixel;
- BYTE mnFilterType; // 0 oder 4;
- ULONG mnBBP; // bytes per pixel ( needed for filtering )
- BOOL mbTrueAlpha;
- ULONG mnCRC;
+ sal_uInt8* mpDeflateInBuf; // as big as the size of a scanline + alphachannel + 1
+ sal_uInt8* mpPreviousScan; // as big as mpDeflateInBuf
+ sal_uInt8* mpCurrentScan;
+ sal_uIntPtr mnDeflateInSize;
+
+ sal_uIntPtr mnWidth, mnHeight;
+ sal_uInt8 mnBitsPerPixel;
+ sal_uInt8 mnFilterType; // 0 oder 4;
+ sal_uIntPtr mnBBP; // bytes per pixel ( needed for filtering )
+ sal_Bool mbTrueAlpha;
+ sal_uIntPtr mnCRC;
long mnChunkDatSize;
- ULONG mnLastPercent;
+ sal_uIntPtr mnLastPercent;
void ImplWritepHYs( const BitmapEx& rBitmapEx );
void ImplWriteIDAT();
- ULONG ImplGetFilter( ULONG nY, ULONG nXStart=0, ULONG nXAdd=1 );
+ sal_uIntPtr ImplGetFilter( sal_uIntPtr nY, sal_uIntPtr nXStart=0, sal_uIntPtr nXAdd=1 );
void ImplClearFirstScanline();
void ImplWriteTransparent();
- BOOL ImplWriteHeader();
+ sal_Bool ImplWriteHeader();
void ImplWritePalette();
- void ImplOpenChunk( ULONG nChunkType );
- void ImplWriteChunk( BYTE nNumb );
+ void ImplOpenChunk( sal_uIntPtr nChunkType );
+ void ImplWriteChunk( sal_uInt8 nNumb );
void ImplWriteChunk( sal_uInt32 nNumb );
void ImplWriteChunk( unsigned char* pSource, sal_uInt32 nDatSize );
void ImplCloseChunk( void );
@@ -127,7 +127,7 @@ private:
PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx,
const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >* pFilterData ) :
mnCompLevel ( PNG_DEF_COMPRESSION ),
- mbStatus ( TRUE ),
+ mbStatus ( sal_True ),
mpAccess ( NULL ),
mpMaskAccess ( NULL ),
mpZCodec ( new ZCodec( DEFAULT_IN_BUFSIZE, DEFAULT_OUT_BUFSIZE, MAX_MEM_USAGE ) ),
@@ -160,7 +160,7 @@ PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx,
}
}
}
- mnBitsPerPixel = (BYTE)aBmp.GetBitCount();
+ mnBitsPerPixel = (sal_uInt8)aBmp.GetBitCount();
if( rBmpEx.IsTransparent() )
{
@@ -188,14 +188,14 @@ PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx,
aBmp.ReleaseAccess( mpAccess );
}
else
- mbStatus = FALSE;
+ mbStatus = sal_False;
}
else
{
- mpAccess = aBmp.AcquireReadAccess(); // TRUE RGB with alphachannel
+ mpAccess = aBmp.AcquireReadAccess(); // sal_True RGB with alphachannel
if( mpAccess )
{
- if ( ( mbTrueAlpha = rBmpEx.IsAlpha() ) != FALSE )
+ if ( ( mbTrueAlpha = rBmpEx.IsAlpha() ) != sal_False )
{
AlphaMask aMask( rBmpEx.GetAlpha() );
mpMaskAccess = aMask.AcquireReadAccess();
@@ -209,7 +209,7 @@ PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx,
aMask.ReleaseAccess( mpMaskAccess );
}
else
- mbStatus = FALSE;
+ mbStatus = sal_False;
}
else
{
@@ -225,12 +225,12 @@ PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx,
aMask.ReleaseAccess( mpMaskAccess );
}
else
- mbStatus = FALSE;
+ mbStatus = sal_False;
}
aBmp.ReleaseAccess( mpAccess );
}
else
- mbStatus = FALSE;
+ mbStatus = sal_False;
}
}
else
@@ -249,7 +249,7 @@ PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx,
aBmp.ReleaseAccess( mpAccess );
}
else
- mbStatus = FALSE;
+ mbStatus = sal_False;
}
if ( mbStatus )
{
@@ -308,7 +308,7 @@ std::vector< vcl::PNGWriter::ChunkData >& PNGWriterImpl::GetChunks()
// ------------------------------------------------------------------------
-BOOL PNGWriterImpl::ImplWriteHeader()
+sal_Bool PNGWriterImpl::ImplWriteHeader()
{
ImplOpenChunk(PNGCHUNK_IHDR);
ImplWriteChunk( sal_uInt32( mnWidth = mpAccess->Width() ) );
@@ -316,13 +316,13 @@ BOOL PNGWriterImpl::ImplWriteHeader()
if ( mnWidth && mnHeight && mnBitsPerPixel && mbStatus )
{
- BYTE nBitDepth = mnBitsPerPixel;
+ sal_uInt8 nBitDepth = mnBitsPerPixel;
if ( mnBitsPerPixel <= 8 )
mnFilterType = 0;
else
mnFilterType = 4;
- BYTE nColorType = 2; // colortype:
+ sal_uInt8 nColorType = 2; // colortype:
// bit 0 -> palette is used
if ( mpAccess->HasPalette() ) // bit 1 -> color is used
nColorType |= 1; // bit 2 -> alpha channel is used
@@ -334,13 +334,13 @@ BOOL PNGWriterImpl::ImplWriteHeader()
ImplWriteChunk( nBitDepth );
ImplWriteChunk( nColorType ); // colortype
- ImplWriteChunk((BYTE) 0 ); // compression type
- ImplWriteChunk((BYTE) 0 ); // filter type - is not supported in this version
- ImplWriteChunk((BYTE) mnInterlaced ); // interlace type
+ ImplWriteChunk((sal_uInt8) 0 ); // compression type
+ ImplWriteChunk((sal_uInt8) 0 ); // filter type - is not supported in this version
+ ImplWriteChunk((sal_uInt8) mnInterlaced ); // interlace type
ImplCloseChunk();
}
else
- mbStatus = FALSE;
+ mbStatus = sal_False;
return mbStatus;
}
@@ -348,13 +348,13 @@ BOOL PNGWriterImpl::ImplWriteHeader()
void PNGWriterImpl::ImplWritePalette()
{
- const ULONG nCount = mpAccess->GetPaletteEntryCount();
- BYTE* pTempBuf = new BYTE[ nCount*3 ];
- BYTE* pTmp = pTempBuf;
+ const sal_uIntPtr nCount = mpAccess->GetPaletteEntryCount();
+ sal_uInt8* pTempBuf = new sal_uInt8[ nCount*3 ];
+ sal_uInt8* pTmp = pTempBuf;
ImplOpenChunk( PNGCHUNK_PLTE );
- for ( USHORT i = 0; i < nCount; i++ )
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
{
const BitmapColor& rColor = mpAccess->GetPaletteColor( i );
*pTmp++ = rColor.GetRed();
@@ -370,12 +370,12 @@ void PNGWriterImpl::ImplWritePalette()
void PNGWriterImpl::ImplWriteTransparent ()
{
- const ULONG nTransIndex = mpAccess->GetBestMatchingColor( BMP_COL_TRANS );
+ const sal_uIntPtr nTransIndex = mpAccess->GetBestMatchingColor( BMP_COL_TRANS );
ImplOpenChunk( PNGCHUNK_tRNS );
- for ( ULONG n = 0UL; n <= nTransIndex; n++ )
- ImplWriteChunk( ( nTransIndex == n ) ? (BYTE) 0x0 : (BYTE) 0xff );
+ for ( sal_uIntPtr n = 0UL; n <= nTransIndex; n++ )
+ ImplWriteChunk( ( nTransIndex == n ) ? (sal_uInt8) 0x0 : (sal_uInt8) 0xff );
ImplCloseChunk();
}
@@ -414,12 +414,12 @@ void PNGWriterImpl::ImplWriteIDAT ()
mnDeflateInSize = mnBBP * mnWidth + 1;
- mpDeflateInBuf = new BYTE[ mnDeflateInSize ];
+ mpDeflateInBuf = new sal_uInt8[ mnDeflateInSize ];
if ( mnFilterType ) // using filter type 4 we need memory for the scanline 3 times
{
- mpPreviousScan = new BYTE[ mnDeflateInSize ];
- mpCurrentScan = new BYTE[ mnDeflateInSize ];
+ mpPreviousScan = new sal_uInt8[ mnDeflateInSize ];
+ mpCurrentScan = new sal_uInt8[ mnDeflateInSize ];
ImplClearFirstScanline();
}
mpZCodec->BeginCompression( ZCODEC_PNG_DEFAULT + mnCompLevel );
@@ -427,13 +427,13 @@ void PNGWriterImpl::ImplWriteIDAT ()
SvMemoryStream aOStm;
if ( mnInterlaced == 0 )
{
- for ( ULONG nY = 0; nY < mnHeight; nY++ )
+ for ( sal_uIntPtr nY = 0; nY < mnHeight; nY++ )
mpZCodec->Write( aOStm, mpDeflateInBuf, ImplGetFilter( nY ) );
}
else
{
// interlace mode
- ULONG nY;
+ sal_uIntPtr nY;
for ( nY = 0; nY < mnHeight; nY+=8 ) // pass 1
mpZCodec->Write( aOStm, mpDeflateInBuf, ImplGetFilter ( nY, 0, 8 ) );
ImplClearFirstScanline();
@@ -497,9 +497,9 @@ void PNGWriterImpl::ImplWriteIDAT ()
// appends to the currently used pass
// the complete size of scanline will be returned - in interlace mode zero is possible!
-ULONG PNGWriterImpl::ImplGetFilter ( ULONG nY, ULONG nXStart, ULONG nXAdd )
+sal_uIntPtr PNGWriterImpl::ImplGetFilter ( sal_uIntPtr nY, sal_uIntPtr nXStart, sal_uIntPtr nXAdd )
{
- BYTE* pDest;
+ sal_uInt8* pDest;
if ( mnFilterType )
pDest = mpCurrentScan;
@@ -516,16 +516,16 @@ ULONG PNGWriterImpl::ImplGetFilter ( ULONG nY, ULONG nXStart, ULONG nXAdd )
{
case( 1 ):
{
- ULONG nX, nXIndex;
+ sal_uIntPtr nX, nXIndex;
for ( nX = nXStart, nXIndex = 0; nX < mnWidth; nX+=nXAdd, nXIndex++ )
{
- ULONG nShift = ( nXIndex & 7 ) ^ 7;
+ sal_uIntPtr nShift = ( nXIndex & 7 ) ^ 7;
if ( nShift == 7)
- *pDest = (BYTE)(mpAccess->GetPixel( nY, nX ) << nShift);
+ *pDest = (sal_uInt8)(mpAccess->GetPixel( nY, nX ) << nShift);
else if ( nShift == 0 )
- *pDest++ |= (BYTE) mpAccess->GetPixel( nY, nX ) << nShift;
+ *pDest++ |= (sal_uInt8) mpAccess->GetPixel( nY, nX ) << nShift;
else
- *pDest |= (BYTE) mpAccess->GetPixel( nY, nX ) << nShift;
+ *pDest |= (sal_uInt8) mpAccess->GetPixel( nY, nX ) << nShift;
}
if ( ( nXIndex & 7 ) != 0 ) pDest++; // byte is not completely used, so the
} // bufferpointer is to correct
@@ -533,13 +533,13 @@ ULONG PNGWriterImpl::ImplGetFilter ( ULONG nY, ULONG nXStart, ULONG nXAdd )
case( 4 ):
{
- ULONG nX, nXIndex;
+ sal_uIntPtr nX, nXIndex;
for ( nX = nXStart, nXIndex = 0; nX < mnWidth; nX+= nXAdd, nXIndex++ )
{
if( nXIndex & 1 )
- *pDest++ |= (BYTE) mpAccess->GetPixel( nY, nX );
+ *pDest++ |= (sal_uInt8) mpAccess->GetPixel( nY, nX );
else
- *pDest = (BYTE) mpAccess->GetPixel( nY, nX ) << 4;
+ *pDest = (sal_uInt8) mpAccess->GetPixel( nY, nX ) << 4;
}
if ( nXIndex & 1 ) pDest++;
}
@@ -547,13 +547,13 @@ ULONG PNGWriterImpl::ImplGetFilter ( ULONG nY, ULONG nXStart, ULONG nXAdd )
case( 8 ):
{
- for ( ULONG nX = nXStart; nX < mnWidth; nX+=nXAdd )
+ for ( sal_uIntPtr nX = nXStart; nX < mnWidth; nX+=nXAdd )
*pDest++ = mpAccess->GetPixel( nY, nX );
}
break;
default :
- mbStatus = FALSE;
+ mbStatus = sal_False;
break;
}
}
@@ -563,7 +563,7 @@ ULONG PNGWriterImpl::ImplGetFilter ( ULONG nY, ULONG nXStart, ULONG nXAdd )
{
if ( mbTrueAlpha )
{
- for ( ULONG nX = nXStart; nX < mnWidth; nX += nXAdd )
+ for ( sal_uIntPtr nX = nXStart; nX < mnWidth; nX += nXAdd )
{
const BitmapColor& rColor = mpAccess->GetPixel( nY, nX );
*pDest++ = rColor.GetRed();
@@ -576,7 +576,7 @@ ULONG PNGWriterImpl::ImplGetFilter ( ULONG nY, ULONG nXStart, ULONG nXAdd )
{
const BitmapColor aTrans( mpMaskAccess->GetBestMatchingColor( Color( COL_WHITE ) ) );
- for ( ULONG nX = nXStart; nX < mnWidth; nX+=nXAdd )
+ for ( sal_uIntPtr nX = nXStart; nX < mnWidth; nX+=nXAdd )
{
const BitmapColor& rColor = mpAccess->GetPixel( nY, nX );
*pDest++ = rColor.GetRed();
@@ -592,7 +592,7 @@ ULONG PNGWriterImpl::ImplGetFilter ( ULONG nY, ULONG nXStart, ULONG nXAdd )
}
else
{
- for ( ULONG nX = nXStart; nX < mnWidth; nX+=nXAdd )
+ for ( sal_uIntPtr nX = nXStart; nX < mnWidth; nX+=nXAdd )
{
const BitmapColor& rColor = mpAccess->GetPixel( nY, nX );
*pDest++ = rColor.GetRed();
@@ -609,13 +609,13 @@ ULONG PNGWriterImpl::ImplGetFilter ( ULONG nY, ULONG nXStart, ULONG nXAdd )
pDest = mpDeflateInBuf;
*pDest++ = 4; // filter type
- ULONG na, nb, nc;
+ sal_uIntPtr na, nb, nc;
long np, npa, npb, npc;
- BYTE* p1 = mpCurrentScan + 1; // Current Pixel
- BYTE* p2 = p1 - mnBBP; // left pixel
- BYTE* p3 = mpPreviousScan; // upper pixel
- BYTE* p4 = p3 - mnBBP; // upperleft Pixel;
+ sal_uInt8* p1 = mpCurrentScan + 1; // Current Pixel
+ sal_uInt8* p2 = p1 - mnBBP; // left pixel
+ sal_uInt8* p3 = mpPreviousScan; // upper pixel
+ sal_uInt8* p4 = p3 - mnBBP; // upperleft Pixel;
while ( pDest < mpDeflateInBuf + mnDeflateInSize )
{
@@ -639,9 +639,9 @@ ULONG PNGWriterImpl::ImplGetFilter ( ULONG nY, ULONG nXStart, ULONG nXAdd )
npb =-npb;
if ( npc < 0 )
npc =-npc;
- if ( ( npa <= npb ) && ( npa <= npc ) ) *pDest++ = *p1++ - (BYTE)na;
- else if ( npb <= npc ) *pDest++ = *p1++ - (BYTE)nb;
- else *pDest++ = *p1++ - (BYTE)nc;
+ if ( ( npa <= npb ) && ( npa <= npc ) ) *pDest++ = *p1++ - (sal_uInt8)na;
+ else if ( npb <= npc ) *pDest++ = *p1++ - (sal_uInt8)nb;
+ else *pDest++ = *p1++ - (sal_uInt8)nc;
p4++;
p2++;
}
@@ -663,7 +663,7 @@ void PNGWriterImpl::ImplClearFirstScanline()
// ------------------------------------------------------------------------
-void PNGWriterImpl::ImplOpenChunk ( ULONG nChunkType )
+void PNGWriterImpl::ImplOpenChunk ( sal_uIntPtr nChunkType )
{
maChunkSeq.resize( maChunkSeq.size() + 1 );
maChunkSeq.back().nType = nChunkType;
@@ -671,7 +671,7 @@ void PNGWriterImpl::ImplOpenChunk ( ULONG nChunkType )
// ------------------------------------------------------------------------
-void PNGWriterImpl::ImplWriteChunk ( BYTE nSource )
+void PNGWriterImpl::ImplWriteChunk ( sal_uInt8 nSource )
{
maChunkSeq.back().aData.push_back( nSource );
}
diff --git a/vcl/source/gdi/polyscan.cxx b/vcl/source/gdi/polyscan.cxx
index eb329f8c6869..399adf6edfb8 100644
--- a/vcl/source/gdi/polyscan.cxx
+++ b/vcl/source/gdi/polyscan.cxx
@@ -121,9 +121,9 @@ void PolyScanline::Set( long nStart, long nEnd )
// ------------------------------------------------------------------------
-BOOL PolyScanline::GetFirstSegment( PolyScanSegment& rSegment )
+sal_Bool PolyScanline::GetFirstSegment( PolyScanSegment& rSegment )
{
- BOOL bRet = GetFirstX( rSegment.mnStart );
+ sal_Bool bRet = GetFirstX( rSegment.mnStart );
if( bRet && !GetNextX( rSegment.mnEnd ) )
rSegment.mnEnd = rSegment.mnStart;
@@ -133,9 +133,9 @@ BOOL PolyScanline::GetFirstSegment( PolyScanSegment& rSegment )
// ------------------------------------------------------------------------
-BOOL PolyScanline::GetNextSegment( PolyScanSegment& rSegment )
+sal_Bool PolyScanline::GetNextSegment( PolyScanSegment& rSegment )
{
- BOOL bRet = GetNextX( rSegment.mnStart );
+ sal_Bool bRet = GetNextX( rSegment.mnStart );
if( bRet && !GetNextX( rSegment.mnEnd ) )
rSegment.mnEnd = rSegment.mnStart;
@@ -152,7 +152,7 @@ PolyScanner::PolyScanner( const Rectangle& rRect )
if( !rRect.IsEmpty() )
{
Rectangle aRect( rRect );
- ULONG nHeight;
+ sal_uIntPtr nHeight;
aRect.Justify();
mnLeft = aRect.Left();
@@ -161,7 +161,7 @@ PolyScanner::PolyScanner( const Rectangle& rRect )
mnBottom = aRect.Bottom();
mpArray = new PolyScanline[ nHeight = Height() ];
- for( ULONG i = 0UL; i < nHeight; i++ )
+ for( sal_uIntPtr i = 0UL; i < nHeight; i++ )
mpArray[ i ].Set( mnLeft, mnRight );
}
else
@@ -181,10 +181,10 @@ PolyScanner::PolyScanner( const Polygon& rPoly )
{
long nLast = nCount - 1;
Point aFirst( rPoly[ 0 ] );
- Point aLast( rPoly[ (USHORT) nLast ] );
+ Point aLast( rPoly[ (sal_uInt16) nLast ] );
while( nLast && ( aLast == aFirst ) )
- aLast = rPoly[ (USHORT) --nLast ];
+ aLast = rPoly[ (sal_uInt16) --nLast ];
if( !nLast )
{
@@ -197,7 +197,7 @@ PolyScanner::PolyScanner( const Polygon& rPoly )
else
{
const Rectangle aRect( rPoly.GetBoundRect() );
- ULONG nHeight;
+ sal_uIntPtr nHeight;
mnLeft = aRect.Left();
mnTop = aRect.Top();
@@ -208,7 +208,7 @@ PolyScanner::PolyScanner( const Polygon& rPoly )
for( long i = 1L; i <= nLast; i++ )
{
- const Point& rPt = rPoly[ (USHORT) i ];
+ const Point& rPt = rPoly[ (sal_uInt16) i ];
if( rPt != aLast )
{
@@ -240,7 +240,7 @@ PolyScanner::~PolyScanner()
// ------------------------------------------------------------------------
-PolyScanline* PolyScanner::operator[]( ULONG nPos ) const
+PolyScanline* PolyScanner::operator[]( sal_uIntPtr nPos ) const
{
DBG_ASSERT( nPos < Count(), "nPos out of range!" );
return( mpArray ? ( mpArray + nPos ) : NULL );
@@ -281,7 +281,7 @@ void PolyScanner::InsertLine( const Point& rStart, const Point& rEnd )
const long nYInc = ( nStartY < nEndY ) ? 1L : -1L;
long nLastX = nStartX;
long nLastY = nStartY;
- BOOL bLast = FALSE;
+ sal_Bool bLast = sal_False;
mpArray[ nStartY - mnTop ].Insert( nStartX );
@@ -299,10 +299,10 @@ void PolyScanner::InsertLine( const Point& rStart, const Point& rEnd )
mpArray[ nLastY - mnTop ].Insert( nLastX );
mpArray[ nY - mnTop ].Insert( nX );
- bLast = FALSE;
+ bLast = sal_False;
}
else
- bLast = TRUE;
+ bLast = sal_True;
nLastX = nX;
nLastY = nY;
@@ -332,10 +332,10 @@ void PolyScanner::InsertLine( const Point& rStart, const Point& rEnd )
mpArray[ nLastY - mnTop ].Insert( nLastX );
mpArray[ nY - mnTop ].Insert( nX );
- bLast = FALSE;
+ bLast = sal_False;
}
else
- bLast = TRUE;
+ bLast = sal_True;
nLastX = nX;
nLastY = nY;
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 2ea9bfcc4c11..19bd3d3c7ad8 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -111,16 +111,16 @@ void ImplUpdateJobSetupPaper( JobSetup& rJobSetup )
// ------------------
PrinterOptions::PrinterOptions() :
- mbReduceTransparency( FALSE ),
+ mbReduceTransparency( sal_False ),
meReducedTransparencyMode( PRINTER_TRANSPARENCY_AUTO ),
- mbReduceGradients( FALSE ),
+ mbReduceGradients( sal_False ),
meReducedGradientsMode( PRINTER_GRADIENT_STRIPES ),
mnReducedGradientStepCount( 64 ),
- mbReduceBitmaps( FALSE ),
+ mbReduceBitmaps( sal_False ),
meReducedBitmapMode( PRINTER_BITMAP_NORMAL ),
mnReducedBitmapResolution( 200 ),
- mbReducedBitmapsIncludeTransparency( TRUE ),
- mbConvertToGreyscales( FALSE )
+ mbReducedBitmapsIncludeTransparency( sal_True ),
+ mbConvertToGreyscales( sal_False )
{
}
@@ -349,24 +349,24 @@ XubString Printer::GetDefaultPrinterName()
void Printer::ImplInitData()
{
- mbDevOutput = FALSE;
+ mbDevOutput = sal_False;
meOutDevType = OUTDEV_PRINTER;
- mbDefPrinter = FALSE;
+ mbDefPrinter = sal_False;
mnError = 0;
mnCurPage = 0;
mnCurPrintPage = 0;
mnPageQueueSize = 0;
mnCopyCount = 1;
- mbCollateCopy = FALSE;
- mbPrinting = FALSE;
- mbJobActive = FALSE;
- mbPrintFile = FALSE;
- mbInPrintPage = FALSE;
- mbNewJobSetup = FALSE;
+ mbCollateCopy = sal_False;
+ mbPrinting = sal_False;
+ mbJobActive = sal_False;
+ mbPrintFile = sal_False;
+ mbInPrintPage = sal_False;
+ mbNewJobSetup = sal_False;
mpInfoPrinter = NULL;
mpPrinter = NULL;
mpDisplayDev = NULL;
- mbIsQueuePrinter = FALSE;
+ mbIsQueuePrinter = sal_False;
mpPrinterOptions = new PrinterOptions;
// Printer in die Liste eintragen
@@ -431,7 +431,7 @@ void Printer::ImplInit( SalPrinterQueueInfo* pInfo )
// Daten initialisieren
ImplUpdatePageData();
mpFontList = new ImplDevFontList();
- mpFontCache = new ImplFontCache( TRUE );
+ mpFontCache = new ImplFontCache( sal_True );
mpGraphics->GetDevFontList( mpFontList );
}
@@ -540,7 +540,7 @@ void Printer::ImplUpdatePageData()
void Printer::ImplUpdateFontList()
{
- ImplUpdateFontData( TRUE );
+ ImplUpdateFontData( sal_True );
}
// -----------------------------------------------------------------------
@@ -553,7 +553,7 @@ Printer::Printer()
{
ImplInit( pInfo );
if ( !IsDisplayPrinter() )
- mbDefPrinter = TRUE;
+ mbDefPrinter = sal_True;
}
else
ImplInitDisplay( NULL );
@@ -671,57 +671,57 @@ void Printer::Compat_OldPrinterMetrics( bool bSet )
mpInfoPrinter->m_bCompatMetrics = bSet;
// get new font data
- ImplUpdateFontData( TRUE );
+ ImplUpdateFontData( sal_True );
}
// -----------------------------------------------------------------------
-ULONG Printer::GetCapabilities( USHORT nType ) const
+sal_uIntPtr Printer::GetCapabilities( sal_uInt16 nType ) const
{
if ( IsDisplayPrinter() )
- return FALSE;
+ return sal_False;
if( mpInfoPrinter )
return mpInfoPrinter->GetCapabilities( maJobSetup.ImplGetConstData(), nType );
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL Printer::HasSupport( PrinterSupport eFeature ) const
+sal_Bool Printer::HasSupport( PrinterSupport eFeature ) const
{
switch ( eFeature )
{
case SUPPORT_SET_ORIENTATION:
- return (BOOL)GetCapabilities( PRINTER_CAPABILITIES_SETORIENTATION );
+ return (sal_Bool)GetCapabilities( PRINTER_CAPABILITIES_SETORIENTATION );
case SUPPORT_SET_PAPERBIN:
- return (BOOL)GetCapabilities( PRINTER_CAPABILITIES_SETPAPERBIN );
+ return (sal_Bool)GetCapabilities( PRINTER_CAPABILITIES_SETPAPERBIN );
case SUPPORT_SET_PAPERSIZE:
- return (BOOL)GetCapabilities( PRINTER_CAPABILITIES_SETPAPERSIZE );
+ return (sal_Bool)GetCapabilities( PRINTER_CAPABILITIES_SETPAPERSIZE );
case SUPPORT_SET_PAPER:
- return (BOOL)GetCapabilities( PRINTER_CAPABILITIES_SETPAPER );
+ return (sal_Bool)GetCapabilities( PRINTER_CAPABILITIES_SETPAPER );
case SUPPORT_COPY:
return (GetCapabilities( PRINTER_CAPABILITIES_COPIES ) != 0);
case SUPPORT_COLLATECOPY:
return (GetCapabilities( PRINTER_CAPABILITIES_COLLATECOPIES ) != 0);
case SUPPORT_SETUPDIALOG:
- return (BOOL)GetCapabilities( PRINTER_CAPABILITIES_SUPPORTDIALOG );
+ return (sal_Bool)GetCapabilities( PRINTER_CAPABILITIES_SUPPORTDIALOG );
case SUPPORT_FAX:
- return (BOOL) GetCapabilities( PRINTER_CAPABILITIES_FAX );
+ return (sal_Bool) GetCapabilities( PRINTER_CAPABILITIES_FAX );
case SUPPORT_PDF:
- return (BOOL) GetCapabilities( PRINTER_CAPABILITIES_PDF );
+ return (sal_Bool) GetCapabilities( PRINTER_CAPABILITIES_PDF );
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-BOOL Printer::SetJobSetup( const JobSetup& rSetup )
+sal_Bool Printer::SetJobSetup( const JobSetup& rSetup )
{
if ( IsDisplayPrinter() || mbInPrintPage )
- return FALSE;
+ return sal_False;
JobSetup aJobSetup = rSetup;
@@ -729,60 +729,60 @@ BOOL Printer::SetJobSetup( const JobSetup& rSetup )
if ( mpInfoPrinter->SetPrinterData( aJobSetup.ImplGetData() ) )
{
ImplUpdateJobSetupPaper( aJobSetup );
- mbNewJobSetup = TRUE;
+ mbNewJobSetup = sal_True;
maJobSetup = aJobSetup;
ImplUpdatePageData();
ImplUpdateFontList();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL Printer::Setup( Window* pWindow )
+sal_Bool Printer::Setup( Window* pWindow )
{
if ( IsDisplayPrinter() )
- return FALSE;
+ return sal_False;
if ( IsJobActive() || IsPrinting() )
- return FALSE;
+ return sal_False;
JobSetup aJobSetup = maJobSetup;
SalFrame* pFrame;
if ( !pWindow )
pWindow = ImplGetDefaultWindow();
if( !pWindow )
- return FALSE;
+ return sal_False;
pFrame = pWindow->ImplGetFrame();
ImplReleaseGraphics();
ImplSVData* pSVData = ImplGetSVData();
pSVData->maAppData.mnModalMode++;
nImplSysDialog++;
- BOOL bSetup = mpInfoPrinter->Setup( pFrame, aJobSetup.ImplGetData() );
+ sal_Bool bSetup = mpInfoPrinter->Setup( pFrame, aJobSetup.ImplGetData() );
pSVData->maAppData.mnModalMode--;
nImplSysDialog--;
if ( bSetup )
{
ImplUpdateJobSetupPaper( aJobSetup );
- mbNewJobSetup = TRUE;
+ mbNewJobSetup = sal_True;
maJobSetup = aJobSetup;
ImplUpdatePageData();
ImplUpdateFontList();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL Printer::SetPrinterProps( const Printer* pPrinter )
+sal_Bool Printer::SetPrinterProps( const Printer* pPrinter )
{
if ( IsJobActive() || IsPrinting() )
- return FALSE;
+ return sal_False;
ImplSVData* pSVData = ImplGetSVData();
@@ -822,14 +822,14 @@ BOOL Printer::SetPrinterProps( const Printer* pPrinter )
mpFontCache = NULL;
mpFontList = NULL;
- mbInitFont = TRUE;
- mbNewFont = TRUE;
+ mbInitFont = sal_True;
+ mbNewFont = sal_True;
mpInfoPrinter = NULL;
}
// Neuen Printer bauen
ImplInitDisplay( NULL );
- return TRUE;
+ return sal_True;
}
// Alten Printer zerstoeren?
@@ -864,8 +864,8 @@ BOOL Printer::SetPrinterProps( const Printer* pPrinter )
delete mpFontList;
mpFontCache = NULL;
mpFontList = NULL;
- mbInitFont = TRUE;
- mbNewFont = TRUE;
+ mbInitFont = sal_True;
+ mbNewFont = sal_True;
mpInfoPrinter = NULL;
}
@@ -883,15 +883,15 @@ BOOL Printer::SetPrinterProps( const Printer* pPrinter )
else
SetJobSetup( pPrinter->GetJobSetup() );
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL Printer::SetOrientation( Orientation eOrientation )
+sal_Bool Printer::SetOrientation( Orientation eOrientation )
{
if ( mbInPrintPage )
- return FALSE;
+ return sal_False;
if ( maJobSetup.ImplGetConstData()->meOrientation != eOrientation )
{
@@ -901,26 +901,26 @@ BOOL Printer::SetOrientation( Orientation eOrientation )
if ( IsDisplayPrinter() )
{
- mbNewJobSetup = TRUE;
+ mbNewJobSetup = sal_True;
maJobSetup = aJobSetup;
- return TRUE;
+ return sal_True;
}
ImplReleaseGraphics();
if ( mpInfoPrinter->SetData( SAL_JOBSET_ORIENTATION, pSetupData ) )
{
ImplUpdateJobSetupPaper( aJobSetup );
- mbNewJobSetup = TRUE;
+ mbNewJobSetup = sal_True;
maJobSetup = aJobSetup;
ImplUpdatePageData();
ImplUpdateFontList();
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -932,10 +932,10 @@ Orientation Printer::GetOrientation() const
// -----------------------------------------------------------------------
-BOOL Printer::SetPaperBin( USHORT nPaperBin )
+sal_Bool Printer::SetPaperBin( sal_uInt16 nPaperBin )
{
if ( mbInPrintPage )
- return FALSE;
+ return sal_False;
if ( (maJobSetup.ImplGetConstData()->mnPaperBin != nPaperBin) &&
(nPaperBin < GetPaperBinCount()) )
@@ -946,31 +946,31 @@ BOOL Printer::SetPaperBin( USHORT nPaperBin )
if ( IsDisplayPrinter() )
{
- mbNewJobSetup = TRUE;
+ mbNewJobSetup = sal_True;
maJobSetup = aJobSetup;
- return TRUE;
+ return sal_True;
}
ImplReleaseGraphics();
if ( mpInfoPrinter->SetData( SAL_JOBSET_PAPERBIN, pSetupData ) )
{
ImplUpdateJobSetupPaper( aJobSetup );
- mbNewJobSetup = TRUE;
+ mbNewJobSetup = sal_True;
maJobSetup = aJobSetup;
ImplUpdatePageData();
ImplUpdateFontList();
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-USHORT Printer::GetPaperBin() const
+sal_uInt16 Printer::GetPaperBin() const
{
return maJobSetup.ImplGetConstData()->mnPaperBin;
}
@@ -1068,10 +1068,10 @@ void Printer::ImplFindPaperFormatForUserSize( JobSetup& aJobSetup, bool bMatchNe
// -----------------------------------------------------------------------
-BOOL Printer::SetPaper( Paper ePaper )
+sal_Bool Printer::SetPaper( Paper ePaper )
{
if ( mbInPrintPage )
- return FALSE;
+ return sal_False;
if ( maJobSetup.ImplGetConstData()->mePaperFormat != ePaper )
{
@@ -1087,9 +1087,9 @@ BOOL Printer::SetPaper( Paper ePaper )
if ( IsDisplayPrinter() )
{
- mbNewJobSetup = TRUE;
+ mbNewJobSetup = sal_True;
maJobSetup = aJobSetup;
- return TRUE;
+ return sal_True;
}
ImplReleaseGraphics();
@@ -1098,30 +1098,30 @@ BOOL Printer::SetPaper( Paper ePaper )
if ( mpInfoPrinter->SetData( SAL_JOBSET_PAPERSIZE|SAL_JOBSET_ORIENTATION, pSetupData ) )
{
ImplUpdateJobSetupPaper( aJobSetup );
- mbNewJobSetup = TRUE;
+ mbNewJobSetup = sal_True;
maJobSetup = aJobSetup;
ImplUpdatePageData();
ImplUpdateFontList();
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-BOOL Printer::SetPaperSizeUser( const Size& rSize )
+sal_Bool Printer::SetPaperSizeUser( const Size& rSize )
{
return SetPaperSizeUser( rSize, false );
}
-BOOL Printer::SetPaperSizeUser( const Size& rSize, bool bMatchNearest )
+sal_Bool Printer::SetPaperSizeUser( const Size& rSize, bool bMatchNearest )
{
if ( mbInPrintPage )
- return FALSE;
+ return sal_False;
Size aPixSize = LogicToPixel( rSize );
Size aPageSize = PixelToLogic( aPixSize, MAP_100TH_MM );
@@ -1137,9 +1137,9 @@ BOOL Printer::SetPaperSizeUser( const Size& rSize, bool bMatchNearest )
if ( IsDisplayPrinter() )
{
- mbNewJobSetup = TRUE;
+ mbNewJobSetup = sal_True;
maJobSetup = aJobSetup;
- return TRUE;
+ return sal_True;
}
ImplReleaseGraphics();
@@ -1149,17 +1149,17 @@ BOOL Printer::SetPaperSizeUser( const Size& rSize, bool bMatchNearest )
if ( mpInfoPrinter->SetData( SAL_JOBSET_PAPERSIZE|SAL_JOBSET_ORIENTATION, pSetupData ) )
{
ImplUpdateJobSetupPaper( aJobSetup );
- mbNewJobSetup = TRUE;
+ mbNewJobSetup = sal_True;
maJobSetup = aJobSetup;
ImplUpdatePageData();
ImplUpdateFontList();
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -1195,10 +1195,10 @@ DuplexMode Printer::GetDuplexMode() const
// -----------------------------------------------------------------------
-BOOL Printer::SetDuplexMode( DuplexMode eDuplex )
+sal_Bool Printer::SetDuplexMode( DuplexMode eDuplex )
{
if ( mbInPrintPage )
- return FALSE;
+ return sal_False;
if ( maJobSetup.ImplGetConstData()->meDuplexMode != eDuplex )
{
@@ -1208,26 +1208,26 @@ BOOL Printer::SetDuplexMode( DuplexMode eDuplex )
if ( IsDisplayPrinter() )
{
- mbNewJobSetup = TRUE;
+ mbNewJobSetup = sal_True;
maJobSetup = aJobSetup;
- return TRUE;
+ return sal_True;
}
ImplReleaseGraphics();
if ( mpInfoPrinter->SetData( SAL_JOBSET_DUPLEXMODE, pSetupData ) )
{
ImplUpdateJobSetupPaper( aJobSetup );
- mbNewJobSetup = TRUE;
+ mbNewJobSetup = sal_True;
maJobSetup = aJobSetup;
ImplUpdatePageData();
ImplUpdateFontList();
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -1246,17 +1246,17 @@ Paper Printer::GetPaper() const
// -----------------------------------------------------------------------
-USHORT Printer::GetPaperBinCount() const
+sal_uInt16 Printer::GetPaperBinCount() const
{
if ( IsDisplayPrinter() )
return 0;
- return (USHORT)mpInfoPrinter->GetPaperBinCount( maJobSetup.ImplGetConstData() );
+ return (sal_uInt16)mpInfoPrinter->GetPaperBinCount( maJobSetup.ImplGetConstData() );
}
// -----------------------------------------------------------------------
-XubString Printer::GetPaperBinName( USHORT nPaperBin ) const
+XubString Printer::GetPaperBinName( sal_uInt16 nPaperBin ) const
{
if ( IsDisplayPrinter() )
return ImplGetSVEmptyStr();
@@ -1269,11 +1269,11 @@ XubString Printer::GetPaperBinName( USHORT nPaperBin ) const
// -----------------------------------------------------------------------
-BOOL Printer::SetCopyCount( USHORT nCopy, BOOL bCollate )
+sal_Bool Printer::SetCopyCount( sal_uInt16 nCopy, sal_Bool bCollate )
{
mnCopyCount = nCopy;
mbCollateCopy = bCollate;
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -1286,9 +1286,9 @@ void Printer::Error()
// -----------------------------------------------------------------------
-ULONG Printer::ImplSalPrinterErrorCodeToVCL( ULONG nError )
+sal_uIntPtr Printer::ImplSalPrinterErrorCodeToVCL( sal_uIntPtr nError )
{
- ULONG nVCLError;
+ sal_uIntPtr nVCLError;
switch ( nError )
{
case 0:
@@ -1309,7 +1309,7 @@ ULONG Printer::ImplSalPrinterErrorCodeToVCL( ULONG nError )
void Printer::ImplEndPrint()
{
- mbPrinting = FALSE;
+ mbPrinting = sal_False;
mnCurPrintPage = 0;
maJobName.Erase();
}
@@ -1326,15 +1326,15 @@ IMPL_LINK( Printer, ImplDestroyPrinterAsync, void*, pSalPrinter )
// -----------------------------------------------------------------------
-BOOL Printer::EndJob()
+sal_Bool Printer::EndJob()
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( !IsJobActive() )
return bRet;
DBG_ASSERT( !mbInPrintPage, "Printer::EndJob() - StartPage() without EndPage() called" );
- mbJobActive = FALSE;
+ mbJobActive = sal_False;
if ( mpPrinter )
{
@@ -1342,13 +1342,13 @@ BOOL Printer::EndJob()
mnCurPage = 0;
- bRet = TRUE;
+ bRet = sal_True;
- mbPrinting = FALSE;
+ mbPrinting = sal_False;
mnCurPrintPage = 0;
maJobName.Erase();
- mbDevOutput = FALSE;
+ mbDevOutput = sal_False;
bRet = mpPrinter->EndJob();
// Hier den Drucker nicht asyncron zerstoeren, da es
// W95 nicht verkraftet, wenn gleichzeitig gedruckt wird
@@ -1362,34 +1362,34 @@ BOOL Printer::EndJob()
// -----------------------------------------------------------------------
-BOOL Printer::AbortJob()
+sal_Bool Printer::AbortJob()
{
// Wenn wir einen Queue-Printer haben, kann man diesen noch mit
// AbortJob() abbrechen, solange dieser noch am Drucken ist
if ( !IsJobActive() && !IsPrinting() )
- return FALSE;
+ return sal_False;
- mbJobActive = FALSE;
- mbInPrintPage = FALSE;
+ mbJobActive = sal_False;
+ mbInPrintPage = sal_False;
mpJobGraphics = NULL;
if ( mpPrinter )
{
- mbPrinting = FALSE;
+ mbPrinting = sal_False;
mnCurPage = 0;
mnCurPrintPage = 0;
maJobName.Erase();
ImplReleaseGraphics();
- mbDevOutput = FALSE;
+ mbDevOutput = sal_False;
mpPrinter->AbortJob();
Application::PostUserEvent( LINK( this, Printer, ImplDestroyPrinterAsync ), mpPrinter );
mpPrinter = NULL;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -1407,12 +1407,12 @@ void Printer::ImplStartPage()
ImplReleaseGraphics();
mpJobGraphics = pGraphics;
}
- mbDevOutput = TRUE;
+ mbDevOutput = sal_True;
// PrintJob not aborted ???
if ( IsJobActive() )
{
- mbInPrintPage = TRUE;
+ mbInPrintPage = sal_True;
mnCurPage++;
mnCurPrintPage++;
}
@@ -1426,16 +1426,16 @@ void Printer::ImplEndPage()
if ( !IsJobActive() )
return;
- mbInPrintPage = FALSE;
+ mbInPrintPage = sal_False;
if ( mpPrinter )
{
mpPrinter->EndPage();
ImplReleaseGraphics();
- mbDevOutput = FALSE;
+ mbDevOutput = sal_False;
mpJobGraphics = NULL;
- mbNewJobSetup = FALSE;
+ mbNewJobSetup = sal_False;
}
}
diff --git a/vcl/source/gdi/print2.cxx b/vcl/source/gdi/print2.cxx
index d560b0b6e7cc..5c2358ca667d 100644
--- a/vcl/source/gdi/print2.cxx
+++ b/vcl/source/gdi/print2.cxx
@@ -154,7 +154,7 @@ static void ImplConvertTransparentAction( GDIMetaFile& o_rMtf,
if( rAct.GetType() == META_TRANSPARENT_ACTION )
{
const MetaTransparentAction* pTransAct = static_cast<const MetaTransparentAction*>(&rAct);
- USHORT nTransparency( pTransAct->GetTransparence() );
+ sal_uInt16 nTransparency( pTransAct->GetTransparence() );
// #i10613# Respect transparency for draw color
if( nTransparency )
@@ -163,16 +163,16 @@ static void ImplConvertTransparentAction( GDIMetaFile& o_rMtf,
// assume white background for alpha blending
Color aLineColor( rStateOutDev.GetLineColor() );
- aLineColor.SetRed( static_cast<UINT8>( (255L*nTransparency + (100L - nTransparency)*aLineColor.GetRed()) / 100L ) );
- aLineColor.SetGreen( static_cast<UINT8>( (255L*nTransparency + (100L - nTransparency)*aLineColor.GetGreen()) / 100L ) );
- aLineColor.SetBlue( static_cast<UINT8>( (255L*nTransparency + (100L - nTransparency)*aLineColor.GetBlue()) / 100L ) );
- o_rMtf.AddAction( new MetaLineColorAction(aLineColor, TRUE) );
+ aLineColor.SetRed( static_cast<sal_uInt8>( (255L*nTransparency + (100L - nTransparency)*aLineColor.GetRed()) / 100L ) );
+ aLineColor.SetGreen( static_cast<sal_uInt8>( (255L*nTransparency + (100L - nTransparency)*aLineColor.GetGreen()) / 100L ) );
+ aLineColor.SetBlue( static_cast<sal_uInt8>( (255L*nTransparency + (100L - nTransparency)*aLineColor.GetBlue()) / 100L ) );
+ o_rMtf.AddAction( new MetaLineColorAction(aLineColor, sal_True) );
Color aFillColor( rStateOutDev.GetFillColor() );
- aFillColor.SetRed( static_cast<UINT8>( (255L*nTransparency + (100L - nTransparency)*aFillColor.GetRed()) / 100L ) );
- aFillColor.SetGreen( static_cast<UINT8>( (255L*nTransparency + (100L - nTransparency)*aFillColor.GetGreen()) / 100L ) );
- aFillColor.SetBlue( static_cast<UINT8>( (255L*nTransparency + (100L - nTransparency)*aFillColor.GetBlue()) / 100L ) );
- o_rMtf.AddAction( new MetaFillColorAction(aFillColor, TRUE) );
+ aFillColor.SetRed( static_cast<sal_uInt8>( (255L*nTransparency + (100L - nTransparency)*aFillColor.GetRed()) / 100L ) );
+ aFillColor.SetGreen( static_cast<sal_uInt8>( (255L*nTransparency + (100L - nTransparency)*aFillColor.GetGreen()) / 100L ) );
+ aFillColor.SetBlue( static_cast<sal_uInt8>( (255L*nTransparency + (100L - nTransparency)*aFillColor.GetBlue()) / 100L ) );
+ o_rMtf.AddAction( new MetaFillColorAction(aFillColor, sal_True) );
}
o_rMtf.AddAction( new MetaPolyPolygonAction(pTransAct->GetPolyPolygon()) );
@@ -723,7 +723,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
VirtualDevice aMapModeVDev;
aMapModeVDev.mnDPIX = mnDPIX;
aMapModeVDev.mnDPIY = mnDPIY;
- aMapModeVDev.EnableOutput(FALSE);
+ aMapModeVDev.EnableOutput(sal_False);
int nLastBgAction, nActionNum;
@@ -837,7 +837,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
VirtualDevice aMapModeVDev2;
aMapModeVDev2.mnDPIX = mnDPIX;
aMapModeVDev2.mnDPIY = mnDPIY;
- aMapModeVDev2.EnableOutput(FALSE);
+ aMapModeVDev2.EnableOutput(sal_False);
// fast-forward until one after the last background action
// (need to reconstruct map mode vdev state)
@@ -1169,7 +1169,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
Size aDstSzPix;
VirtualDevice aMapVDev; // here, we record only mapmode information
- aMapVDev.EnableOutput(FALSE);
+ aMapVDev.EnableOutput(sal_False);
VirtualDevice aPaintVDev; // into this one, we render.
@@ -1200,7 +1200,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
aMapVDev.mnDPIX = aPaintVDev.mnDPIX = mnDPIX;
aMapVDev.mnDPIY = aPaintVDev.mnDPIY = mnDPIY;
- aPaintVDev.EnableOutput(FALSE);
+ aPaintVDev.EnableOutput(sal_False);
// iterate over all actions
for( pCurrAct=const_cast<GDIMetaFile&>(rInMtf).FirstAction(), nActionNum=0;
@@ -1212,10 +1212,10 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
// the current aCCList element
// (aCurr)
if( aCCList_MemberMap[nActionNum] == &(*aCurr) )
- aPaintVDev.EnableOutput(TRUE);
+ aPaintVDev.EnableOutput(sal_True);
// but process every action
- const USHORT nType( pCurrAct->GetType() );
+ const sal_uInt16 nType( pCurrAct->GetType() );
if( META_MAPMODE_ACTION == nType )
{
@@ -1250,8 +1250,8 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
Application::Reschedule();
}
- const BOOL bOldMap = mbMap;
- mbMap = aPaintVDev.mbMap = FALSE;
+ const sal_Bool bOldMap = mbMap;
+ mbMap = aPaintVDev.mbMap = sal_False;
Bitmap aBandBmp( aPaintVDev.GetBitmap( Point(), aDstSzPix ) );
@@ -1267,7 +1267,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
rOutMtf.AddAction( new MetaBmpScaleAction( aDstPtPix, aDstSzPix, aBandBmp ) );
rOutMtf.AddAction( new MetaCommentAction( "PRNSPOOL_TRANSPARENTBITMAP_END" ) );
- aPaintVDev.mbMap = TRUE;
+ aPaintVDev.mbMap = sal_True;
mbMap = bOldMap;
aMapVDev.Pop();
aPaintVDev.Pop();
@@ -1297,7 +1297,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
VirtualDevice aMapModeVDev3;
aMapModeVDev3.mnDPIX = mnDPIX;
aMapModeVDev3.mnDPIY = mnDPIY;
- aMapModeVDev3.EnableOutput(FALSE);
+ aMapModeVDev3.EnableOutput(sal_False);
// iterate over all actions and duplicate the ones not in a
// special aCCList member into rOutMtf
@@ -1513,7 +1513,7 @@ void Printer::DrawGradientEx( OutputDevice* pOut, const Rectangle& rRect, const
( (long) rEndColor.GetGreen() * rGradient.GetEndIntensity() ) / 100L ) >> 1;
const long nB = ( ( (long) rStartColor.GetBlue() * rGradient.GetStartIntensity() ) / 100L +
( (long) rEndColor.GetBlue() * rGradient.GetEndIntensity() ) / 100L ) >> 1;
- const Color aColor( (BYTE) nR, (BYTE) nG, (BYTE) nB );
+ const Color aColor( (sal_uInt8) nR, (sal_uInt8) nG, (sal_uInt8) nB );
pOut->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
pOut->SetLineColor( aColor );
@@ -1556,7 +1556,7 @@ void Printer::DrawGradientEx( OutputDevice* pOut, const PolyPolygon& rPolyPoly,
( (long) rEndColor.GetGreen() * rGradient.GetEndIntensity() ) / 100L ) >> 1;
const long nB = ( ( (long) rStartColor.GetBlue() * rGradient.GetStartIntensity() ) / 100L +
( (long) rEndColor.GetBlue() * rGradient.GetEndIntensity() ) / 100L ) >> 1;
- const Color aColor( (BYTE) nR, (BYTE) nG, (BYTE) nB );
+ const Color aColor( (sal_uInt8) nR, (sal_uInt8) nG, (sal_uInt8) nB );
pOut->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
pOut->SetLineColor( aColor );
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index 191f8f26dc75..ecb403117b6b 100644
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -489,18 +489,18 @@ bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptr<vcl::
mnError = PRINTER_OK;
if ( IsDisplayPrinter() )
- return FALSE;
+ return sal_False;
if ( IsJobActive() || IsPrinting() )
- return FALSE;
+ return sal_False;
- ULONG nCopies = mnCopyCount;
+ sal_uIntPtr nCopies = mnCopyCount;
bool bCollateCopy = mbCollateCopy;
- bool bUserCopy = FALSE;
+ bool bUserCopy = sal_False;
if ( nCopies > 1 )
{
- ULONG nDevCopy;
+ sal_uIntPtr nDevCopy;
if ( bCollateCopy )
nDevCopy = GetCapabilities( PRINTER_CAPABILITIES_COLLATECOPIES );
@@ -510,20 +510,20 @@ bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptr<vcl::
// need to do copies by hand ?
if ( nCopies > nDevCopy )
{
- bUserCopy = TRUE;
+ bUserCopy = sal_True;
nCopies = 1;
- bCollateCopy = FALSE;
+ bCollateCopy = sal_False;
}
}
else
- bCollateCopy = FALSE;
+ bCollateCopy = sal_False;
ImplSVData* pSVData = ImplGetSVData();
mpPrinter = pSVData->mpDefInst->CreatePrinter( mpInfoPrinter );
if ( !mpPrinter )
- return FALSE;
+ return sal_False;
sal_Bool bSinglePrintJobs = sal_False;
beans::PropertyValue* pSingleValue = i_pController->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintCollateAsSingleJobs" ) ) );
@@ -543,7 +543,7 @@ bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptr<vcl::
pFileValue->Value >>= aFile;
if( aFile.getLength() )
{
- mbPrintFile = TRUE;
+ mbPrintFile = sal_True;
maPrintFile = aFile;
bSinglePrintJobs = sal_False;
}
@@ -556,10 +556,10 @@ bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptr<vcl::
maJobName = i_rJobName;
mnCurPage = 1;
mnCurPrintPage = 1;
- mbPrinting = TRUE;
+ mbPrinting = sal_True;
if( ImplGetSVData()->maGDIData.mbPrinterPullModel )
{
- mbJobActive = TRUE;
+ mbJobActive = sal_True;
// sallayer does all necessary page printing
// and also handles showing a dialog
// that also means it must call jobStarted when the dialog is finished
@@ -580,7 +580,7 @@ bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptr<vcl::
pSVData->mpDefInst->DestroyPrinter( mpPrinter );
mnCurPage = 0;
mnCurPrintPage = 0;
- mbPrinting = FALSE;
+ mbPrinting = sal_False;
mpPrinter = NULL;
return false;
@@ -613,7 +613,7 @@ bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptr<vcl::
i_pController->isDirectPrint(),
maJobSetup.ImplGetConstData() ) )
{
- mbJobActive = TRUE;
+ mbJobActive = sal_True;
i_pController->createProgressDialog();
int nPages = i_pController->getFilteredPageCount();
for( int nIteration = 0; nIteration < nRepeatCount; nIteration++ )
@@ -637,7 +637,7 @@ bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptr<vcl::
maJobName = i_rJobName;
mnCurPage = 1;
mnCurPrintPage = 1;
- mbPrinting = TRUE;
+ mbPrinting = sal_True;
}
else
bError = true;
@@ -658,7 +658,7 @@ bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptr<vcl::
pSVData->mpDefInst->DestroyPrinter( mpPrinter );
mnCurPage = 0;
mnCurPrintPage = 0;
- mbPrinting = FALSE;
+ mbPrinting = sal_False;
mpPrinter = NULL;
return false;
@@ -854,7 +854,7 @@ PrinterController::PageSize PrinterController::getPageFile( int i_nUnfilteredPag
o_rMtf.SetPrefSize( aPageSize.aSize );
o_rMtf.SetPrefMapMode( aMapMode );
- mpImplData->mpPrinter->EnableOutput( FALSE );
+ mpImplData->mpPrinter->EnableOutput( sal_False );
o_rMtf.Record( mpImplData->mpPrinter.get() );
@@ -883,7 +883,7 @@ static void appendSubPage( GDIMetaFile& o_rMtf, const Rectangle& i_rClipRect, GD
o_rMtf.AddAction( new MetaPushAction( PUSH_ALL ) );
// clip to page rect
- o_rMtf.AddAction( new MetaClipRegionAction( Region( i_rClipRect ), TRUE ) );
+ o_rMtf.AddAction( new MetaClipRegionAction( Region( i_rClipRect ), sal_True ) );
// append the subpage
io_rSubPage.WindStart();
@@ -900,8 +900,8 @@ static void appendSubPage( GDIMetaFile& o_rMtf, const Rectangle& i_rClipRect, GD
o_rMtf.AddAction( new MetaMapModeAction( MapMode( MAP_100TH_MM ) ) );
Rectangle aBorderRect( i_rClipRect );
- o_rMtf.AddAction( new MetaLineColorAction( Color( COL_BLACK ), TRUE ) );
- o_rMtf.AddAction( new MetaFillColorAction( Color( COL_TRANSPARENT ), FALSE ) );
+ o_rMtf.AddAction( new MetaLineColorAction( Color( COL_BLACK ), sal_True ) );
+ o_rMtf.AddAction( new MetaFillColorAction( Color( COL_TRANSPARENT ), sal_False ) );
o_rMtf.AddAction( new MetaRectAction( aBorderRect ) );
// restore gstate
@@ -1044,9 +1044,9 @@ int PrinterController::getFilteredPageCount()
return (getPageCountProtected() * mpImplData->maMultiPage.nRepeat + (nDiv-1)) / nDiv;
}
-ULONG PrinterController::removeTransparencies( GDIMetaFile& i_rIn, GDIMetaFile& o_rOut )
+sal_uIntPtr PrinterController::removeTransparencies( GDIMetaFile& i_rIn, GDIMetaFile& o_rOut )
{
- ULONG nRestoreDrawMode = mpImplData->mpPrinter->GetDrawMode();
+ sal_uIntPtr nRestoreDrawMode = mpImplData->mpPrinter->GetDrawMode();
sal_Int32 nMaxBmpDPIX = mpImplData->mpPrinter->ImplGetDPIX();
sal_Int32 nMaxBmpDPIY = mpImplData->mpPrinter->ImplGetDPIY();
@@ -1139,9 +1139,9 @@ void PrinterController::printFilteredPage( int i_nPage )
}
GDIMetaFile aCleanedFile;
- ULONG nRestoreDrawMode = removeTransparencies( aPageFile, aCleanedFile );
+ sal_uIntPtr nRestoreDrawMode = removeTransparencies( aPageFile, aCleanedFile );
- mpImplData->mpPrinter->EnableOutput( TRUE );
+ mpImplData->mpPrinter->EnableOutput( sal_True );
// actually print the page
mpImplData->mpPrinter->ImplStartPage();
@@ -1520,7 +1520,7 @@ void PrinterController::pushPropertiesToPrinter()
pVal = getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Collate" ) ) );
if( pVal )
pVal->Value >>= bCollate;
- mpImplData->mpPrinter->SetCopyCount( static_cast<USHORT>(nCopyCount), bCollate );
+ mpImplData->mpPrinter->SetCopyCount( static_cast<sal_uInt16>(nCopyCount), bCollate );
// duplex mode
pVal = getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DuplexMode" ) ) );
diff --git a/vcl/source/gdi/regband.cxx b/vcl/source/gdi/regband.cxx
index 14f45b4beafd..08c94bc2ebc6 100644
--- a/vcl/source/gdi/regband.cxx
+++ b/vcl/source/gdi/regband.cxx
@@ -63,7 +63,7 @@ ImplRegionBand::ImplRegionBand( long nTop, long nBottom )
mpPrevBand = NULL;
mpFirstSep = NULL;
mpFirstBandPoint = NULL;
- mbTouched = FALSE;
+ mbTouched = sal_False;
}
// -----------------------------------------------------------------------
@@ -212,8 +212,8 @@ void ImplRegionBand::ProcessPoints()
// generate separations from lines and process union with existing
// separations
-BOOL ImplRegionBand::InsertPoint( long nX, long nLineId,
- BOOL bEndPoint, LineType eLineType )
+sal_Bool ImplRegionBand::InsertPoint( long nX, long nLineId,
+ sal_Bool bEndPoint, LineType eLineType )
{
if ( !mpFirstBandPoint )
{
@@ -223,7 +223,7 @@ BOOL ImplRegionBand::InsertPoint( long nX, long nLineId,
mpFirstBandPoint->mbEndPoint = bEndPoint;
mpFirstBandPoint->meLineType = eLineType;
mpFirstBandPoint->mpNextBandPoint = NULL;
- return TRUE;
+ return sal_True;
}
// look if line allready touched the band
@@ -242,8 +242,8 @@ BOOL ImplRegionBand::InsertPoint( long nX, long nLineId,
{
// if we've only got one point => replace first point
pRegionBandPoint->mnX = nX;
- pRegionBandPoint->mbEndPoint = TRUE;
- return TRUE;
+ pRegionBandPoint->mbEndPoint = sal_True;
+ return sal_True;
}
else
{
@@ -267,7 +267,7 @@ BOOL ImplRegionBand::InsertPoint( long nX, long nLineId,
}
}
else
- return FALSE;
+ return sal_False;
}
// use next element
@@ -298,7 +298,7 @@ BOOL ImplRegionBand::InsertPoint( long nX, long nLineId,
else
pLastTestedRegionBandPoint->mpNextBandPoint = pNewRegionBandPoint;
- return TRUE;
+ return sal_True;
}
// use next element
@@ -317,7 +317,7 @@ BOOL ImplRegionBand::InsertPoint( long nX, long nLineId,
// connections to the new point
pLastTestedRegionBandPoint->mpNextBandPoint = pNewRegionBandPoint;
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -351,7 +351,7 @@ void ImplRegionBand::ScaleX( double fHorzScale )
//
// combine overlaping sparations
-BOOL ImplRegionBand::OptimizeBand()
+sal_Bool ImplRegionBand::OptimizeBand()
{
ImplRegionBandSep* pPrevSep = 0;
ImplRegionBandSep* pSep = mpFirstSep;
@@ -389,7 +389,7 @@ BOOL ImplRegionBand::OptimizeBand()
pSep = pSep->mpNextSep;
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -404,7 +404,7 @@ void ImplRegionBand::Union( long nXLeft, long nXRight )
mpFirstSep = new ImplRegionBandSep;
mpFirstSep->mnXLeft = nXLeft;
mpFirstSep->mnXRight = nXRight;
- mpFirstSep->mbRemoved = FALSE;
+ mpFirstSep->mbRemoved = sal_False;
mpFirstSep->mpNextSep = NULL;
return;
}
@@ -425,7 +425,7 @@ void ImplRegionBand::Union( long nXLeft, long nXRight )
pNewSep = new ImplRegionBandSep;
pNewSep->mnXLeft = nXLeft;
pNewSep->mnXRight = nXRight;
- pNewSep->mbRemoved = FALSE;
+ pNewSep->mbRemoved = sal_False;
pNewSep->mpNextSep = pSep;
if ( pSep == mpFirstSep )
@@ -452,7 +452,7 @@ void ImplRegionBand::Union( long nXLeft, long nXRight )
pNewSep = new ImplRegionBandSep;
pNewSep->mnXLeft = nXLeft;
pNewSep->mnXRight = nXRight;
- pNewSep->mbRemoved = FALSE;
+ pNewSep->mbRemoved = sal_False;
pSep->mpNextSep = pNewSep;
pNewSep->mpNextSep = NULL;
@@ -473,7 +473,7 @@ void ImplRegionBand::Intersect( long nXLeft, long nXRight )
DBG_ASSERT( nXLeft <= nXRight, "ImplRegionBand::Intersect(): nxLeft > nXRight" );
// band has been touched
- mbTouched = TRUE;
+ mbTouched = sal_True;
// band empty? -> nothing to do
if ( !mpFirstSep )
@@ -486,7 +486,7 @@ void ImplRegionBand::Intersect( long nXLeft, long nXRight )
// new separation completly outside? -> remove separation
if ( (nXRight < pSep->mnXLeft) || (nXLeft > pSep->mnXRight) )
// will be removed from the optimizer
- pSep->mbRemoved = TRUE;
+ pSep->mbRemoved = sal_True;
// new separation overlaping from left? -> reduce right boundary
if ( (nXLeft <= pSep->mnXLeft) &&
@@ -520,7 +520,7 @@ void ImplRegionBand::Exclude( long nXLeft, long nXRight )
DBG_ASSERT( nXLeft <= nXRight, "ImplRegionBand::Exclude(): nxLeft > nXRight" );
// band has been touched
- mbTouched = TRUE;
+ mbTouched = sal_True;
// band empty? -> nothing to do
if ( !mpFirstSep )
@@ -532,14 +532,14 @@ void ImplRegionBand::Exclude( long nXLeft, long nXRight )
ImplRegionBandSep* pSep = mpFirstSep;
while ( pSep )
{
- BOOL bSepProcessed = FALSE;
+ sal_Bool bSepProcessed = sal_False;
// new separation completely overlapping? -> remove separation
if ( (nXLeft <= pSep->mnXLeft) && (nXRight >= pSep->mnXRight) )
{
// will be removed from the optimizer
- pSep->mbRemoved = TRUE;
- bSepProcessed = TRUE;
+ pSep->mbRemoved = sal_True;
+ bSepProcessed = sal_True;
}
// new separation overlaping from left? -> reduce boundary
@@ -548,7 +548,7 @@ void ImplRegionBand::Exclude( long nXLeft, long nXRight )
if ( (nXRight >= pSep->mnXLeft) && (nXLeft <= pSep->mnXLeft) )
{
pSep->mnXLeft = nXRight+1;
- bSepProcessed = TRUE;
+ bSepProcessed = sal_True;
}
}
@@ -558,7 +558,7 @@ void ImplRegionBand::Exclude( long nXLeft, long nXRight )
if ( (nXLeft <= pSep->mnXRight) && (nXRight > pSep->mnXRight) )
{
pSep->mnXRight = nXLeft-1;
- bSepProcessed = TRUE;
+ bSepProcessed = sal_True;
}
}
@@ -571,7 +571,7 @@ void ImplRegionBand::Exclude( long nXLeft, long nXRight )
pNewSep = new ImplRegionBandSep;
pNewSep->mnXLeft = pSep->mnXLeft;
pNewSep->mnXRight = nXLeft-1;
- pNewSep->mbRemoved = FALSE;
+ pNewSep->mbRemoved = sal_False;
pSep->mnXLeft = nXRight+1;
@@ -651,7 +651,7 @@ void ImplRegionBand::XOr( long nXLeft, long nXRight )
mpFirstSep = new ImplRegionBandSep;
mpFirstSep->mnXLeft = nXLeft;
mpFirstSep->mnXRight = nXRight;
- mpFirstSep->mbRemoved = FALSE;
+ mpFirstSep->mbRemoved = sal_False;
mpFirstSep->mpNextSep = NULL;
return;
}
@@ -680,7 +680,7 @@ void ImplRegionBand::XOr( long nXLeft, long nXRight )
pNewSep->mnXLeft = nXLeft;
pNewSep->mnXRight = nXRight;
pNewSep->mpNextSep = pSep;
- pNewSep->mbRemoved = FALSE;
+ pNewSep->mbRemoved = sal_False;
// connections from the new separation
pNewSep->mpNextSep = pSep;
@@ -696,7 +696,7 @@ void ImplRegionBand::XOr( long nXLeft, long nXRight )
else if( nXLeft == nOldLeft && nXRight == nOldRight )
{
// #3
- pSep->mbRemoved = TRUE;
+ pSep->mbRemoved = sal_True;
pPrevSep = NULL; // do not run accidentally into the "right" case when breaking the loop
break;
}
@@ -729,7 +729,7 @@ void ImplRegionBand::XOr( long nXLeft, long nXRight )
// cannot break here, simply mark segment as removed,
// and go on with adapted nXLeft/nXRight
- pSep->mbRemoved = TRUE;
+ pSep->mbRemoved = sal_True;
}
else
{
@@ -809,7 +809,7 @@ void ImplRegionBand::XOr( long nXLeft, long nXRight )
pNewSep->mnXLeft = nXLeft;
pNewSep->mnXRight = nXRight;
pNewSep->mpNextSep = pSep->mpNextSep;
- pNewSep->mbRemoved = FALSE;
+ pNewSep->mbRemoved = sal_False;
// connections from the new separation
pSep->mpNextSep = pNewSep;
@@ -831,7 +831,7 @@ void ImplRegionBand::XOr( long nXLeft, long nXRight )
pNewSep->mnXLeft = nXLeft;
pNewSep->mnXRight = nXRight;
pNewSep->mpNextSep = NULL;
- pNewSep->mbRemoved = FALSE;
+ pNewSep->mbRemoved = sal_False;
// connections from the new separation
pPrevSep->mpNextSep = pNewSep;
@@ -842,50 +842,50 @@ void ImplRegionBand::XOr( long nXLeft, long nXRight )
// -----------------------------------------------------------------------
-BOOL ImplRegionBand::IsInside( long nX )
+sal_Bool ImplRegionBand::IsInside( long nX )
{
ImplRegionBandSep* pSep = mpFirstSep;
while ( pSep )
{
if ( (pSep->mnXLeft <= nX) && (pSep->mnXRight >= nX) )
- return TRUE;
+ return sal_True;
pSep = pSep->mpNextSep;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL ImplRegionBand::IsOver( long nLeft, long nRight )
+sal_Bool ImplRegionBand::IsOver( long nLeft, long nRight )
{
ImplRegionBandSep* pSep = mpFirstSep;
while ( pSep )
{
if ( (pSep->mnXLeft < nRight) && (pSep->mnXRight > nLeft) )
- return TRUE;
+ return sal_True;
pSep = pSep->mpNextSep;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL ImplRegionBand::IsInside( long nLeft, long nRight )
+sal_Bool ImplRegionBand::IsInside( long nLeft, long nRight )
{
ImplRegionBandSep* pSep = mpFirstSep;
while ( pSep )
{
if ( (pSep->mnXLeft >= nLeft) && (nRight <= pSep->mnXRight) )
- return TRUE;
+ return sal_True;
pSep = pSep->mpNextSep;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -912,7 +912,7 @@ long ImplRegionBand::GetXRightBoundary() const
// -----------------------------------------------------------------------
-BOOL ImplRegionBand::operator==( const ImplRegionBand& rRegionBand ) const
+sal_Bool ImplRegionBand::operator==( const ImplRegionBand& rRegionBand ) const
{
ImplRegionBandSep* pOwnRectBandSep = mpFirstSep;
ImplRegionBandSep* pSecondRectBandSep = rRegionBand.mpFirstSep;
@@ -922,12 +922,12 @@ BOOL ImplRegionBand::operator==( const ImplRegionBand& rRegionBand ) const
long nOwnXLeft = pOwnRectBandSep->mnXLeft;
long nSecondXLeft = pSecondRectBandSep->mnXLeft;
if ( nOwnXLeft != nSecondXLeft )
- return FALSE;
+ return sal_False;
long nOwnXRight = pOwnRectBandSep->mnXRight;
long nSecondXRight = pSecondRectBandSep->mnXRight;
if ( nOwnXRight != nSecondXRight )
- return FALSE;
+ return sal_False;
// get next separation from current band
pOwnRectBandSep = pOwnRectBandSep->mpNextSep;
@@ -938,9 +938,9 @@ BOOL ImplRegionBand::operator==( const ImplRegionBand& rRegionBand ) const
// differnt number of separations?
if ( pOwnRectBandSep || pSecondRectBandSep )
- return FALSE;
+ return sal_False;
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx
index 4931ee66e93f..e6970b9c5d02 100644
--- a/vcl/source/gdi/region.cxx
+++ b/vcl/source/gdi/region.cxx
@@ -78,25 +78,25 @@ DBG_NAMEEX( PolyPolygon )
namespace {
-/** Return <TRUE/> when the given polygon is rectiliner and oriented so that
+/** Return <sal_True/> when the given polygon is rectiliner and oriented so that
all sides are either horizontal or vertical.
*/
bool ImplIsPolygonRectilinear (const PolyPolygon& rPolyPoly)
{
// Iterate over all polygons.
- const USHORT nPolyCount = rPolyPoly.Count();
- for (USHORT nPoly = 0; nPoly < nPolyCount; ++nPoly)
+ const sal_uInt16 nPolyCount = rPolyPoly.Count();
+ for (sal_uInt16 nPoly = 0; nPoly < nPolyCount; ++nPoly)
{
const Polygon& aPoly = rPolyPoly.GetObject(nPoly);
// Iterate over all edges of the current polygon.
- const USHORT nSize = aPoly.GetSize();
+ const sal_uInt16 nSize = aPoly.GetSize();
if (nSize < 2)
continue;
Point aPoint (aPoly.GetPoint(0));
const Point aLastPoint (aPoint);
- for (USHORT nPoint = 1; nPoint < nSize; ++nPoint)
+ for (sal_uInt16 nPoint = 1; nPoint < nSize; ++nPoint)
{
const Point aNextPoint (aPoly.GetPoint(nPoint));
// When there is at least one edge that is neither vertical nor
@@ -188,20 +188,20 @@ ImplRegion* ImplRectilinearPolygonToBands (const PolyPolygon& rPolyPoly)
long nLineId = 0L;
// Iterate over all polygons.
- const USHORT nPolyCount = rPolyPoly.Count();
- for (USHORT nPoly = 0; nPoly < nPolyCount; ++nPoly)
+ const sal_uInt16 nPolyCount = rPolyPoly.Count();
+ for (sal_uInt16 nPoly = 0; nPoly < nPolyCount; ++nPoly)
{
const Polygon& aPoly = rPolyPoly.GetObject(nPoly);
// Iterate over all edges of the current polygon.
- const USHORT nSize = aPoly.GetSize();
+ const sal_uInt16 nSize = aPoly.GetSize();
if (nSize < 2)
continue;
// Avoid fetching every point twice (each point is the start point
// of one and the end point of another edge.)
Point aStart (aPoly.GetPoint(0));
Point aEnd;
- for (USHORT nPoint = 1; nPoint <= nSize; ++nPoint, aStart=aEnd)
+ for (sal_uInt16 nPoint = 1; nPoint <= nSize; ++nPoint, aStart=aEnd)
{
// We take the implicit closing edge into account by mapping
// index nSize to 0.
@@ -267,7 +267,7 @@ ImplRegion* ImplRectilinearPolygonToBands (const PolyPolygon& rPolyPoly)
// Add the x-value as point to all bands in the nTop->nBottom range.
for (pBand=pTopBand; pBand!=NULL&&pBand->mnYTop<=nBottom; pBand=pBand->mpNextBand)
- pBand->InsertPoint(aStart.X(), nLineId++, TRUE, eLineType);
+ pBand->InsertPoint(aStart.X(), nLineId++, sal_True, eLineType);
}
}
@@ -278,7 +278,7 @@ ImplRegion* ImplRectilinearPolygonToBands (const PolyPolygon& rPolyPoly)
/** Convert a general polygon (one for which ImplIsPolygonRectilinear()
- returns <FALSE/>) to bands.
+ returns <sal_False/>) to bands.
*/
ImplRegion* ImplGeneralPolygonToBands (
const PolyPolygon& rPolyPoly,
@@ -291,19 +291,19 @@ ImplRegion* ImplGeneralPolygonToBands (
pImplRegion->CreateBandRange( rPolygonBoundingBox.Top(), rPolygonBoundingBox.Bottom() );
// insert polygons
- const USHORT nPolyCount = rPolyPoly.Count();
- for ( USHORT nPoly = 0; nPoly < nPolyCount; nPoly++ )
+ const sal_uInt16 nPolyCount = rPolyPoly.Count();
+ for ( sal_uInt16 nPoly = 0; nPoly < nPolyCount; nPoly++ )
{
// get reference to current polygon
const Polygon& aPoly = rPolyPoly.GetObject( nPoly );
- const USHORT nSize = aPoly.GetSize();
+ const sal_uInt16 nSize = aPoly.GetSize();
// not enough points ( <= 2 )? -> nothing to do!
if ( nSize <= 2 )
continue;
// band the polygon
- for ( USHORT nPoint = 1; nPoint < nSize; nPoint++ )
+ for ( sal_uInt16 nPoint = 1; nPoint < nSize; nPoint++ )
pImplRegion->InsertLine( aPoly.GetPoint(nPoint-1), aPoly.GetPoint(nPoint), nLineID++ );
// close polygon with line from first point to last point, if neccesary
@@ -343,7 +343,7 @@ const char* ImplDbgTestRegion( const void* pObj )
if ( (pImplRegion != &aImplEmptyRegion) && (pImplRegion != &aImplNullRegion) )
{
- ULONG nCount = 0;
+ sal_uIntPtr nCount = 0;
const ImplRegionBand* pBand = pImplRegion->ImplGetFirstRegionBand();
while ( pBand )
{
@@ -541,14 +541,14 @@ void ImplRegion::CreateBandRange( long nYTop, long nYBottom )
// -----------------------------------------------------------------------
-BOOL ImplRegion::InsertLine( const Point& rStartPt, const Point& rEndPt,
+sal_Bool ImplRegion::InsertLine( const Point& rStartPt, const Point& rEndPt,
long nLineId )
{
long nX, nY;
// lines consisting of a single point do not interest here
if ( rStartPt == rEndPt )
- return TRUE;
+ return sal_True;
LineType eLineType = (rStartPt.Y() > rEndPt.Y()) ? LINE_DESCENDING : LINE_ASCENDING;
if ( rStartPt.X() == rEndPt.X() )
@@ -625,25 +625,25 @@ BOOL ImplRegion::InsertLine( const Point& rStartPt, const Point& rEndPt,
}
// last point
- InsertPoint( Point( nEndX, nEndY ), nLineId, TRUE, eLineType );
+ InsertPoint( Point( nEndX, nEndY ), nLineId, sal_True, eLineType );
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
//
// search for appropriate place for the new point
-BOOL ImplRegion::InsertPoint( const Point &rPoint, long nLineID,
- BOOL bEndPoint, LineType eLineType )
+sal_Bool ImplRegion::InsertPoint( const Point &rPoint, long nLineID,
+ sal_Bool bEndPoint, LineType eLineType )
{
DBG_ASSERT( mpFirstBand != NULL, "ImplRegion::InsertPoint - no bands available!" );
if ( rPoint.Y() == mpLastCheckedBand->mnYTop )
{
mpLastCheckedBand->InsertPoint( rPoint.X(), nLineID, bEndPoint, eLineType );
- return TRUE;
+ return sal_True;
}
if ( rPoint.Y() > mpLastCheckedBand->mnYTop )
@@ -655,7 +655,7 @@ BOOL ImplRegion::InsertPoint( const Point &rPoint, long nLineID,
if ( rPoint.Y() == mpLastCheckedBand->mnYTop )
{
mpLastCheckedBand->InsertPoint( rPoint.X(), nLineID, bEndPoint, eLineType );
- return TRUE;
+ return sal_True;
}
mpLastCheckedBand = mpLastCheckedBand->mpNextBand;
@@ -672,7 +672,7 @@ BOOL ImplRegion::InsertPoint( const Point &rPoint, long nLineID,
if ( rPoint.Y() == mpLastCheckedBand->mnYTop )
{
mpLastCheckedBand->InsertPoint( rPoint.X(), nLineID, bEndPoint, eLineType );
- return TRUE;
+ return sal_True;
}
mpLastCheckedBand = mpLastCheckedBand->mpPrevBand;
@@ -686,7 +686,7 @@ BOOL ImplRegion::InsertPoint( const Point &rPoint, long nLineID,
// reinitialize pointer (should never be reached!)
mpLastCheckedBand = mpFirstBand;
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -704,9 +704,9 @@ void ImplRegion::InsertBands( long nTop, long nBottom )
}
// find/insert bands for the boundaries of the rectangle
- BOOL bTopBoundaryInserted = FALSE;
- BOOL bTop2BoundaryInserted = FALSE;
- BOOL bBottomBoundaryInserted = FALSE;
+ sal_Bool bTopBoundaryInserted = sal_False;
+ sal_Bool bTop2BoundaryInserted = sal_False;
+ sal_Bool bBottomBoundaryInserted = sal_False;
// special case: top boundary is above the first band
ImplRegionBand* pNewBand;
@@ -721,7 +721,7 @@ void ImplRegion::InsertBands( long nTop, long nBottom )
pNewBand->mpNextBand = mpFirstBand;
mpFirstBand = pNewBand;
- bTopBoundaryInserted = TRUE;
+ bTopBoundaryInserted = sal_True;
}
// insert band(s) into the list
@@ -765,13 +765,13 @@ void ImplRegion::InsertBands( long nTop, long nBottom )
//
// create new band and insert it into the list
-BOOL ImplRegion::InsertSingleBand( ImplRegionBand* pBand,
+sal_Bool ImplRegion::InsertSingleBand( ImplRegionBand* pBand,
long nYBandPosition )
{
// boundary already included in band with height 1? -> nothing to do!
if ( (pBand->mnYTop == pBand->mnYBottom) &&
(nYBandPosition == pBand->mnYTop) )
- return TRUE;
+ return sal_True;
// insert single height band on top?
ImplRegionBand* pNewBand;
@@ -786,7 +786,7 @@ BOOL ImplRegion::InsertSingleBand( ImplRegionBand* pBand,
pBand->mnYBottom = nYBandPosition;
pBand->mpNextBand = pNewBand;
- return TRUE;
+ return sal_True;
}
// top of new rectangle within the current band? -> insert new band and copy data
@@ -813,7 +813,7 @@ BOOL ImplRegion::InsertSingleBand( ImplRegionBand* pBand,
pBand->mnYBottom = nYBandPosition - 1;
pBand->mpNextBand = pNewBand;
- return TRUE;
+ return sal_True;
}
// create new band behind the current in the list
@@ -830,7 +830,7 @@ BOOL ImplRegion::InsertSingleBand( ImplRegionBand* pBand,
// append band to the list
pBand->mpNextBand = pNewBand;
- return TRUE;
+ return sal_True;
}
if ( nYBandPosition > pBand->mnYBottom )
@@ -840,11 +840,11 @@ BOOL ImplRegion::InsertSingleBand( ImplRegionBand* pBand,
// append band to the list
pBand->mpNextBand = pNewBand;
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
// ------------------------------------------------------------------------
@@ -985,7 +985,7 @@ void ImplRegion::XOr( long nLeft, long nTop, long nRight, long nBottom )
//
// remove empty bands
-BOOL ImplRegion::OptimizeBandList()
+sal_Bool ImplRegion::OptimizeBandList()
{
DBG_ASSERT( (this != &aImplNullRegion) && (this != &aImplEmptyRegion),
"ImplRegion::OptimizeBandList() - Empty oder NULL-Region" );
@@ -996,7 +996,7 @@ BOOL ImplRegion::OptimizeBandList()
ImplRegionBand* pBand = mpFirstBand;
while ( pBand )
{
- const BOOL bBTEqual = pBand->mpNextBand &&
+ const sal_Bool bBTEqual = pBand->mpNextBand &&
(pBand->mnYBottom == pBand->mpNextBand->mnYTop);
// no separation? -> remove!
@@ -1204,7 +1204,7 @@ void Region::ImplCreateRectRegion( const Rectangle& rRect )
void Region::ImplCreatePolyPolyRegion( const PolyPolygon& rPolyPoly )
{
- const USHORT nPolyCount = rPolyPoly.Count();
+ const sal_uInt16 nPolyCount = rPolyPoly.Count();
if ( nPolyCount )
{
// polypolygon empty? -> empty region
@@ -1368,13 +1368,13 @@ void Region::Scale( double fScaleX, double fScaleY )
// -----------------------------------------------------------------------
-BOOL Region::Union( const Rectangle& rRect )
+sal_Bool Region::Union( const Rectangle& rRect )
{
DBG_CHKTHIS( Region, ImplDbgTestRegion );
// is rectangle empty? -> nothing to do
if ( rRect.IsEmpty() )
- return TRUE;
+ return sal_True;
ImplPolyPolyRegionToBandRegion();
@@ -1405,12 +1405,12 @@ BOOL Region::Union( const Rectangle& rRect )
mpImplRegion = (ImplRegion*)(&aImplEmptyRegion);
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-BOOL Region::Intersect( const Rectangle& rRect )
+sal_Bool Region::Intersect( const Rectangle& rRect )
{
DBG_CHKTHIS( Region, ImplDbgTestRegion );
@@ -1426,7 +1426,7 @@ BOOL Region::Intersect( const Rectangle& rRect )
delete mpImplRegion;
}
mpImplRegion = (ImplRegion*)(&aImplEmptyRegion);
- return TRUE;
+ return sal_True;
}
// #103137# Avoid banding for special cases
@@ -1444,14 +1444,14 @@ BOOL Region::Intersect( const Rectangle& rRect )
// unnecessary banding
mpImplRegion->mpPolyPoly->Clip( rRect );
- return TRUE;
+ return sal_True;
}
else
ImplPolyPolyRegionToBandRegion();
// is region empty? -> nothing to do!
if ( mpImplRegion == &aImplEmptyRegion )
- return TRUE;
+ return sal_True;
// get justified rectangle
long nLeft = Min( rRect.Left(), rRect.Right() );
@@ -1472,7 +1472,7 @@ BOOL Region::Intersect( const Rectangle& rRect )
mpImplRegion->mpFirstBand->Union( nLeft, nRight );
mpImplRegion->mnRectCount = 1;
- return TRUE;
+ return sal_True;
}
// no own instance data? -> make own copy!
@@ -1516,24 +1516,24 @@ BOOL Region::Intersect( const Rectangle& rRect )
mpImplRegion = (ImplRegion*)(&aImplEmptyRegion);
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-BOOL Region::Exclude( const Rectangle& rRect )
+sal_Bool Region::Exclude( const Rectangle& rRect )
{
DBG_CHKTHIS( Region, ImplDbgTestRegion );
// is rectangle empty? -> nothing to do
if ( rRect.IsEmpty() )
- return TRUE;
+ return sal_True;
ImplPolyPolyRegionToBandRegion();
// no instance data? -> create!
if ( (mpImplRegion == &aImplEmptyRegion) || (mpImplRegion == &aImplNullRegion) )
- return TRUE;
+ return sal_True;
// no own instance data? -> make own copy!
if ( mpImplRegion->mnRefCount > 1 )
@@ -1558,18 +1558,18 @@ BOOL Region::Exclude( const Rectangle& rRect )
mpImplRegion = (ImplRegion*)(&aImplEmptyRegion);
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-BOOL Region::XOr( const Rectangle& rRect )
+sal_Bool Region::XOr( const Rectangle& rRect )
{
DBG_CHKTHIS( Region, ImplDbgTestRegion );
// is rectangle empty? -> nothing to do
if ( rRect.IsEmpty() )
- return TRUE;
+ return sal_True;
ImplPolyPolyRegionToBandRegion();
@@ -1600,12 +1600,12 @@ BOOL Region::XOr( const Rectangle& rRect )
mpImplRegion = (ImplRegion*)(&aImplEmptyRegion);
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-BOOL Region::Union( const Region& rRegion )
+sal_Bool Region::Union( const Region& rRegion )
{
DBG_CHKTHIS( Region, ImplDbgTestRegion );
@@ -1614,7 +1614,7 @@ BOOL Region::Union( const Region& rRegion )
// is region empty or null? -> nothing to do
if ( (rRegion.mpImplRegion == &aImplEmptyRegion) || (rRegion.mpImplRegion == &aImplNullRegion) )
- return TRUE;
+ return sal_True;
// no instance data? -> create!
if ( (mpImplRegion == &aImplEmptyRegion) || (mpImplRegion == &aImplNullRegion) )
@@ -1650,28 +1650,28 @@ BOOL Region::Union( const Region& rRegion )
mpImplRegion = (ImplRegion*)(&aImplEmptyRegion);
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-BOOL Region::Intersect( const Region& rRegion )
+sal_Bool Region::Intersect( const Region& rRegion )
{
DBG_CHKTHIS( Region, ImplDbgTestRegion );
// same instance data? -> nothing to do!
if ( mpImplRegion == rRegion.mpImplRegion )
- return TRUE;
+ return sal_True;
ImplPolyPolyRegionToBandRegion();
((Region*)&rRegion)->ImplPolyPolyRegionToBandRegion();
if ( mpImplRegion == &aImplEmptyRegion )
- return TRUE;
+ return sal_True;
// is region null? -> nothing to do
if ( rRegion.mpImplRegion == &aImplNullRegion )
- return TRUE;
+ return sal_True;
// is rectangle empty? -> nothing to do
if ( rRegion.mpImplRegion == &aImplEmptyRegion )
@@ -1685,7 +1685,7 @@ BOOL Region::Intersect( const Region& rRegion )
delete mpImplRegion;
}
mpImplRegion = (ImplRegion*)(&aImplEmptyRegion);
- return TRUE;
+ return sal_True;
}
// is own region NULL-region? -> copy data!
@@ -1693,7 +1693,7 @@ BOOL Region::Intersect( const Region& rRegion )
{
mpImplRegion = rRegion.mpImplRegion;
rRegion.mpImplRegion->mnRefCount++;
- return TRUE;
+ return sal_True;
}
// Wenn wir weniger Rechtecke haben, drehen wir den Intersect-Aufruf um
@@ -1713,7 +1713,7 @@ BOOL Region::Intersect( const Region& rRegion )
ImplRegionBand* pBand = mpImplRegion->mpFirstBand;
while ( pBand )
{
- pBand->mbTouched = FALSE;
+ pBand->mbTouched = sal_False;
pBand = pBand->mpNextBand;
}
@@ -1789,12 +1789,12 @@ BOOL Region::Intersect( const Region& rRegion )
}
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-BOOL Region::Exclude( const Region& rRegion )
+sal_Bool Region::Exclude( const Region& rRegion )
{
DBG_CHKTHIS( Region, ImplDbgTestRegion );
@@ -1803,11 +1803,11 @@ BOOL Region::Exclude( const Region& rRegion )
// is region empty or null? -> nothing to do
if ( (rRegion.mpImplRegion == &aImplEmptyRegion) || (rRegion.mpImplRegion == &aImplNullRegion) )
- return TRUE;
+ return sal_True;
// no instance data? -> nothing to do
if ( (mpImplRegion == &aImplEmptyRegion) || (mpImplRegion == &aImplNullRegion) )
- return TRUE;
+ return sal_True;
// no own instance data? -> make own copy!
if ( mpImplRegion->mnRefCount > 1 )
@@ -1842,12 +1842,12 @@ BOOL Region::Exclude( const Region& rRegion )
pBand = pBand->mpNextBand;
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-BOOL Region::XOr( const Region& rRegion )
+sal_Bool Region::XOr( const Region& rRegion )
{
DBG_CHKTHIS( Region, ImplDbgTestRegion );
@@ -1856,13 +1856,13 @@ BOOL Region::XOr( const Region& rRegion )
// is region empty or null? -> nothing to do
if ( (rRegion.mpImplRegion == &aImplEmptyRegion) || (rRegion.mpImplRegion == &aImplNullRegion) )
- return TRUE;
+ return sal_True;
// no own instance data? -> XOr = copy
if ( (mpImplRegion == &aImplEmptyRegion) || (mpImplRegion == &aImplNullRegion) )
{
*this = rRegion;
- return TRUE;
+ return sal_True;
}
// no own instance data? -> make own copy!
@@ -1895,7 +1895,7 @@ BOOL Region::XOr( const Region& rRegion )
mpImplRegion = (ImplRegion*)(&aImplEmptyRegion);
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -1949,7 +1949,7 @@ Rectangle Region::GetBoundRect() const
// -----------------------------------------------------------------------
-BOOL Region::HasPolyPolygon() const
+sal_Bool Region::HasPolyPolygon() const
{
DBG_CHKTHIS( Region, ImplDbgTestRegion );
if( !mpImplRegion )
@@ -2031,7 +2031,7 @@ basegfx::B2DPolyPolygon Region::ConvertToB2DPolyPolygon()
// -----------------------------------------------------------------------
-BOOL Region::ImplGetFirstRect( ImplRegionInfo& rImplRegionInfo,
+sal_Bool Region::ImplGetFirstRect( ImplRegionInfo& rImplRegionInfo,
long& rX, long& rY,
long& rWidth, long& rHeight ) const
{
@@ -2041,11 +2041,11 @@ BOOL Region::ImplGetFirstRect( ImplRegionInfo& rImplRegionInfo,
// no internal data? -> region is empty!
if ( (mpImplRegion == &aImplEmptyRegion) || (mpImplRegion == &aImplNullRegion) )
- return FALSE;
+ return sal_False;
// no band in the list? -> region is empty!
if ( mpImplRegion->mpFirstBand == NULL )
- return FALSE;
+ return sal_False;
// initialise pointer for first access
ImplRegionBand* pCurrRectBand = mpImplRegion->mpFirstBand;
@@ -2053,7 +2053,7 @@ BOOL Region::ImplGetFirstRect( ImplRegionInfo& rImplRegionInfo,
DBG_ASSERT( pCurrRectBandSep != NULL, "Erstes Band wurde nicht optimiert." );
if ( !pCurrRectBandSep )
- return FALSE;
+ return sal_False;
// get boundaries of current rectangle
rX = pCurrRectBandSep->mnXLeft;
@@ -2065,12 +2065,12 @@ BOOL Region::ImplGetFirstRect( ImplRegionInfo& rImplRegionInfo,
rImplRegionInfo.mpVoidCurrRectBand = (void*)pCurrRectBand;
rImplRegionInfo.mpVoidCurrRectBandSep = (void*)pCurrRectBandSep;
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-BOOL Region::ImplGetNextRect( ImplRegionInfo& rImplRegionInfo,
+sal_Bool Region::ImplGetNextRect( ImplRegionInfo& rImplRegionInfo,
long& rX, long& rY,
long& rWidth, long& rHeight ) const
{
@@ -2078,7 +2078,7 @@ BOOL Region::ImplGetNextRect( ImplRegionInfo& rImplRegionInfo,
// no internal data? -> region is empty!
if ( (mpImplRegion == &aImplEmptyRegion) || (mpImplRegion == &aImplNullRegion) )
- return FALSE;
+ return sal_False;
// get last pointers
ImplRegionBand* pCurrRectBand = (ImplRegionBand*)rImplRegionInfo.mpVoidCurrRectBand;
@@ -2095,7 +2095,7 @@ BOOL Region::ImplGetNextRect( ImplRegionInfo& rImplRegionInfo,
// no band found? -> not further rectangles!
if( !pCurrRectBand )
- return FALSE;
+ return sal_False;
// get first separation in current band
pCurrRectBandSep = pCurrRectBand->mpFirstSep;
@@ -2111,7 +2111,7 @@ BOOL Region::ImplGetNextRect( ImplRegionInfo& rImplRegionInfo,
rImplRegionInfo.mpVoidCurrRectBand = (void*)pCurrRectBand;
rImplRegionInfo.mpVoidCurrRectBandSep = (void*)pCurrRectBandSep;
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -2130,7 +2130,7 @@ RegionType Region::GetType() const
// -----------------------------------------------------------------------
-BOOL Region::IsInside( const Point& rPoint ) const
+sal_Bool Region::IsInside( const Point& rPoint ) const
{
DBG_CHKTHIS( Region, ImplDbgTestRegion );
@@ -2143,7 +2143,7 @@ BOOL Region::IsInside( const Point& rPoint ) const
// no instance data? -> not inside
if ( (mpImplRegion == &aImplEmptyRegion) || (mpImplRegion == &aImplNullRegion) )
- return FALSE;
+ return sal_False;
// search band list
ImplRegionBand* pBand = mpImplRegion->mpFirstBand;
@@ -2155,30 +2155,30 @@ BOOL Region::IsInside( const Point& rPoint ) const
{
// is point within separation of the band?
if ( pBand->IsInside( rPoint.X() ) )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
pBand = pBand->mpNextBand;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL Region::IsInside( const Rectangle& rRect ) const
+sal_Bool Region::IsInside( const Rectangle& rRect ) const
{
DBG_CHKTHIS( Region, ImplDbgTestRegion );
// is rectangle empty? -> not inside
if ( rRect.IsEmpty() )
- return FALSE;
+ return sal_False;
// no instance data? -> not inside
if ( (mpImplRegion == &aImplEmptyRegion) || (mpImplRegion == &aImplNullRegion) )
- return FALSE;
+ return sal_False;
// create region from rectangle and intersect own region
Region aRegion = rRect;
@@ -2190,12 +2190,12 @@ BOOL Region::IsInside( const Rectangle& rRect ) const
// -----------------------------------------------------------------------
-BOOL Region::IsOver( const Rectangle& rRect ) const
+sal_Bool Region::IsOver( const Rectangle& rRect ) const
{
DBG_CHKTHIS( Region, ImplDbgTestRegion );
if ( (mpImplRegion == &aImplEmptyRegion) || (mpImplRegion == &aImplNullRegion) )
- return FALSE;
+ return sal_False;
// Can we optimize this ??? - is used in StarDraw for brushes pointers
// Why we have no IsOver for Regions ???
@@ -2292,20 +2292,20 @@ Region& Region::operator=( const Rectangle& rRect )
// -----------------------------------------------------------------------
-BOOL Region::operator==( const Region& rRegion ) const
+sal_Bool Region::operator==( const Region& rRegion ) const
{
DBG_CHKTHIS( Region, ImplDbgTestRegion );
DBG_CHKOBJ( &rRegion, Region, ImplDbgTestRegion );
// reference to same object? -> equal!
if ( mpImplRegion == rRegion.mpImplRegion )
- return TRUE;
+ return sal_True;
if ( (mpImplRegion == &aImplEmptyRegion) || (mpImplRegion == &aImplNullRegion) )
- return FALSE;
+ return sal_False;
if ( (rRegion.mpImplRegion == &aImplEmptyRegion) || (rRegion.mpImplRegion == &aImplNullRegion) )
- return FALSE;
+ return sal_False;
if ( rRegion.mpImplRegion->mpPolyPoly && mpImplRegion->mpPolyPoly )
return *rRegion.mpImplRegion->mpPolyPoly == *mpImplRegion->mpPolyPoly;
@@ -2316,13 +2316,13 @@ BOOL Region::operator==( const Region& rRegion ) const
// Eine der beiden Regions kann jetzt Empty sein
if ( mpImplRegion == rRegion.mpImplRegion )
- return TRUE;
+ return sal_True;
if ( mpImplRegion == &aImplEmptyRegion )
- return FALSE;
+ return sal_False;
if ( rRegion.mpImplRegion == &aImplEmptyRegion )
- return FALSE;
+ return sal_False;
}
// initialise pointers
@@ -2336,22 +2336,22 @@ BOOL Region::operator==( const Region& rRegion ) const
long nOwnXLeft = pOwnRectBandSep->mnXLeft;
long nSecondXLeft = pSecondRectBandSep->mnXLeft;
if ( nOwnXLeft != nSecondXLeft )
- return FALSE;
+ return sal_False;
long nOwnYTop = pOwnRectBand->mnYTop;
long nSecondYTop = pSecondRectBand->mnYTop;
if ( nOwnYTop != nSecondYTop )
- return FALSE;
+ return sal_False;
long nOwnXRight = pOwnRectBandSep->mnXRight;
long nSecondXRight = pSecondRectBandSep->mnXRight;
if ( nOwnXRight != nSecondXRight )
- return FALSE;
+ return sal_False;
long nOwnYBottom = pOwnRectBand->mnYBottom;
long nSecondYBottom = pSecondRectBand->mnYBottom;
if ( nOwnYBottom != nSecondYBottom )
- return FALSE;
+ return sal_False;
// get next separation from current band
pOwnRectBandSep = pOwnRectBandSep->mpNextSep;
@@ -2382,13 +2382,13 @@ BOOL Region::operator==( const Region& rRegion ) const
}
if ( pOwnRectBandSep && !pSecondRectBandSep )
- return FALSE;
+ return sal_False;
if ( !pOwnRectBandSep && pSecondRectBandSep )
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -2400,8 +2400,8 @@ SvStream& operator>>( SvStream& rIStrm, Region& rRegion )
DBG_CHKOBJ( &rRegion, Region, ImplDbgTestRegion );
VersionCompat aCompat( rIStrm, STREAM_READ );
- UINT16 nVersion;
- UINT16 nTmp16;
+ sal_uInt16 nVersion;
+ sal_uInt16 nTmp16;
// statische Object haben RefCount von 0
if ( rRegion.mpImplRegion->mnRefCount )
@@ -2494,7 +2494,7 @@ SvStream& operator>>( SvStream& rIStrm, Region& rRegion )
if( aCompat.GetVersion() >= 2 )
{
- BOOL bHasPolyPolygon;
+ sal_Bool bHasPolyPolygon;
rIStrm >> bHasPolyPolygon;
@@ -2518,7 +2518,7 @@ SvStream& operator<<( SvStream& rOStrm, const Region& rRegion )
{
DBG_CHKOBJ( &rRegion, Region, ImplDbgTestRegion );
- UINT16 nVersion = 2;
+ sal_uInt16 nVersion = 2;
VersionCompat aCompat( rOStrm, STREAM_WRITE, nVersion );
Region aTmpRegion( rRegion );
@@ -2529,7 +2529,7 @@ SvStream& operator<<( SvStream& rOStrm, const Region& rRegion )
rOStrm << nVersion;
// put type
- rOStrm << (UINT16)aTmpRegion.GetType();
+ rOStrm << (sal_uInt16)aTmpRegion.GetType();
// put all bands if not null or empty
if ( (aTmpRegion.mpImplRegion != &aImplEmptyRegion) && (aTmpRegion.mpImplRegion != &aImplNullRegion) )
@@ -2538,7 +2538,7 @@ SvStream& operator<<( SvStream& rOStrm, const Region& rRegion )
while ( pBand )
{
// put boundaries
- rOStrm << (UINT16) STREAMENTRY_BANDHEADER;
+ rOStrm << (sal_uInt16) STREAMENTRY_BANDHEADER;
rOStrm << pBand->mnYTop;
rOStrm << pBand->mnYBottom;
@@ -2547,7 +2547,7 @@ SvStream& operator<<( SvStream& rOStrm, const Region& rRegion )
while ( pSep )
{
// put separation
- rOStrm << (UINT16) STREAMENTRY_SEPARATION;
+ rOStrm << (sal_uInt16) STREAMENTRY_SEPARATION;
rOStrm << pSep->mnXLeft;
rOStrm << pSep->mnXRight;
@@ -2559,10 +2559,10 @@ SvStream& operator<<( SvStream& rOStrm, const Region& rRegion )
}
// put endmarker
- rOStrm << (UINT16) STREAMENTRY_END;
+ rOStrm << (sal_uInt16) STREAMENTRY_END;
// write polypolygon if available
- const BOOL bHasPolyPolygon = rRegion.HasPolyPolygon();
+ const sal_Bool bHasPolyPolygon = rRegion.HasPolyPolygon();
rOStrm << bHasPolyPolygon;
if( bHasPolyPolygon )
@@ -2599,12 +2599,12 @@ void Region::ImplBeginAddRect()
// -----------------------------------------------------------------------
-BOOL Region::ImplAddRect( const Rectangle& rRect )
+sal_Bool Region::ImplAddRect( const Rectangle& rRect )
{
// Hier kein CheckThis, da nicht alle Daten auf Stand
if ( rRect.IsEmpty() )
- return TRUE;
+ return sal_True;
// get justified rectangle
long nTop;
@@ -2664,7 +2664,7 @@ BOOL Region::ImplAddRect( const Rectangle& rRect )
mpImplRegion->mpLastCheckedBand->Union( nLeft, nRight );
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -2733,14 +2733,14 @@ void Region::ImplEndAddRect()
// -----------------------------------------------------------------------
-ULONG Region::GetRectCount() const
+sal_uIntPtr Region::GetRectCount() const
{
DBG_CHKTHIS( Region, ImplDbgTestRegion );
((Region*)this)->ImplPolyPolyRegionToBandRegion();
#ifdef DBG_UTIL
- ULONG nCount = 0;
+ sal_uIntPtr nCount = 0;
// all bands if not null or empty
if ( (mpImplRegion != &aImplEmptyRegion) && (mpImplRegion != &aImplNullRegion) )
@@ -2786,7 +2786,7 @@ RegionHandle Region::BeginEnumRects()
ImplRegionHandle* pData = new ImplRegionHandle;
pData->mpRegion = new Region( *this );
- pData->mbFirst = TRUE;
+ pData->mbFirst = sal_True;
// save pointers
pData->mpCurrRectBand = pData->mpRegion->mpImplRegion->mpFirstBand;
@@ -2797,16 +2797,16 @@ RegionHandle Region::BeginEnumRects()
// -----------------------------------------------------------------------
-BOOL Region::GetEnumRects( RegionHandle pVoidData, Rectangle& rRect )
+sal_Bool Region::GetEnumRects( RegionHandle pVoidData, Rectangle& rRect )
{
DBG_CHKTHIS( Region, ImplDbgTestRegion );
ImplRegionHandle* pData = (ImplRegionHandle*)pVoidData;
if ( !pData )
- return FALSE;
+ return sal_False;
if ( pData->mbFirst )
- pData->mbFirst = FALSE;
+ pData->mbFirst = sal_False;
else
{
// get next separation from current band
@@ -2820,7 +2820,7 @@ BOOL Region::GetEnumRects( RegionHandle pVoidData, Rectangle& rRect )
// no band found? -> not further rectangles!
if ( !pData->mpCurrRectBand )
- return FALSE;
+ return sal_False;
// get first separation in current band
pData->mpCurrRectBandSep = pData->mpCurrRectBand->mpFirstSep;
@@ -2832,7 +2832,7 @@ BOOL Region::GetEnumRects( RegionHandle pVoidData, Rectangle& rRect )
rRect.Bottom() = pData->mpCurrRectBand->mnYBottom;
rRect.Left() = pData->mpCurrRectBandSep->mnXLeft;
rRect.Right() = pData->mpCurrRectBandSep->mnXRight;
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -2856,7 +2856,7 @@ static inline bool ImplPolygonRectTest( const Polygon& rPoly, Rectangle* pRectOu
{
bool bIsRect = false;
const Point* pPoints = rPoly.GetConstPointAry();
- USHORT nPoints = rPoly.GetSize();
+ sal_uInt16 nPoints = rPoly.GetSize();
if( nPoints == 4 || (nPoints == 5 && pPoints[0] == pPoints[4]) )
{
long nX1 = pPoints[0].X(), nX2 = pPoints[2].X(),
@@ -2907,7 +2907,7 @@ Region Region::GetRegionFromPolyPolygon( const PolyPolygon& rPolyPoly )
int nPolygonRects = 0, nPolygonPolygons = 0;
int nPolygons = rPolyPoly.Count();
- for( USHORT i = 0; i < nPolygons; i++ )
+ for( sal_uInt16 i = 0; i < nPolygons; i++ )
{
const Polygon& rPoly = rPolyPoly[i];
if( ImplPolygonRectTest( rPoly ) )
@@ -2920,7 +2920,7 @@ Region Region::GetRegionFromPolyPolygon( const PolyPolygon& rPolyPoly )
Region aResult;
Rectangle aRect;
- for( USHORT i = 0; i < nPolygons; i++ )
+ for( sal_uInt16 i = 0; i < nPolygons; i++ )
{
const Polygon& rPoly = rPolyPoly[i];
if( ImplPolygonRectTest( rPoly, &aRect ) )
diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx
index 84e45979d679..a1156c4b0aee 100644
--- a/vcl/source/gdi/salgdilayout.cxx
+++ b/vcl/source/gdi/salgdilayout.cxx
@@ -172,7 +172,7 @@ void SalGraphics::mirror( long& x, long& nWidth, const OutputDevice *pOutDev, bo
}
}
-BOOL SalGraphics::mirror( sal_uInt32 nPoints, const SalPoint *pPtAry, SalPoint *pPtAry2, const OutputDevice *pOutDev, bool bBack ) const
+sal_Bool SalGraphics::mirror( sal_uInt32 nPoints, const SalPoint *pPtAry, SalPoint *pPtAry2, const OutputDevice *pOutDev, bool bBack ) const
{
long w;
if( pOutDev && pOutDev->GetOutDevType() == OUTDEV_VIRDEV )
@@ -245,10 +245,10 @@ BOOL SalGraphics::mirror( sal_uInt32 nPoints, const SalPoint *pPtAry, SalPoint *
pPtAry2[j].mnY = pPtAry[i].mnY;
}
}
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
void SalGraphics::mirror( Region& rRgn, const OutputDevice *pOutDev, bool bBack ) const
@@ -358,7 +358,7 @@ basegfx::B2DPolyPolygon SalGraphics::mirror( const basegfx::B2DPolyPolygon& i_rP
// ----------------------------------------------------------------------------
-BOOL SalGraphics::UnionClipRegion( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev )
+sal_Bool SalGraphics::UnionClipRegion( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
mirror( nX, nWidth, pOutDev );
@@ -370,7 +370,7 @@ bool SalGraphics::unionClipRegion( const ::basegfx::B2DPolyPolygon& )
return false;
}
-BOOL SalGraphics::UnionClipRegion( const ::basegfx::B2DPolyPolygon& rPoly, const OutputDevice* pOutDev )
+sal_Bool SalGraphics::UnionClipRegion( const ::basegfx::B2DPolyPolygon& rPoly, const OutputDevice* pOutDev )
{
(void)pOutDev;// TODO: SAL_LAYOUT_BIDI_RTL
return unionClipRegion( rPoly );
@@ -411,12 +411,12 @@ bool SalGraphics::drawPolyLine(
return false;
}
-void SalGraphics::DrawPolyLine( ULONG nPoints, const SalPoint* pPtAry, const OutputDevice *pOutDev )
+void SalGraphics::DrawPolyLine( sal_uIntPtr nPoints, const SalPoint* pPtAry, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
SalPoint* pPtAry2 = new SalPoint[nPoints];
- BOOL bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev );
+ sal_Bool bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev );
drawPolyLine( nPoints, bCopied ? pPtAry2 : pPtAry );
delete [] pPtAry2;
}
@@ -424,12 +424,12 @@ void SalGraphics::DrawPolyLine( ULONG nPoints, const SalPoint* pPtAry, const Out
drawPolyLine( nPoints, pPtAry );
}
-void SalGraphics::DrawPolygon( ULONG nPoints, const SalPoint* pPtAry, const OutputDevice *pOutDev )
+void SalGraphics::DrawPolygon( sal_uIntPtr nPoints, const SalPoint* pPtAry, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
SalPoint* pPtAry2 = new SalPoint[nPoints];
- BOOL bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev );
+ sal_Bool bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev );
drawPolygon( nPoints, bCopied ? pPtAry2 : pPtAry );
delete [] pPtAry2;
}
@@ -443,10 +443,10 @@ void SalGraphics::DrawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pPoints,
{
// TODO: optimize, reduce new/delete calls
SalPoint **pPtAry2 = new SalPoint*[nPoly];
- ULONG i;
+ sal_uIntPtr i;
for(i=0; i<nPoly; i++)
{
- ULONG nPoints = pPoints[i];
+ sal_uIntPtr nPoints = pPoints[i];
pPtAry2[i] = new SalPoint[ nPoints ];
mirror( nPoints, pPtAry[i], pPtAry2[i], pOutDev );
}
@@ -479,13 +479,13 @@ bool SalGraphics::drawPolyPolygon( const ::basegfx::B2DPolyPolygon&, double /*fT
return false;
}
-sal_Bool SalGraphics::DrawPolyLineBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry, const OutputDevice* pOutDev )
+sal_Bool SalGraphics::DrawPolyLineBezier( sal_uIntPtr nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry, const OutputDevice* pOutDev )
{
sal_Bool bResult = sal_False;
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) )
{
SalPoint* pPtAry2 = new SalPoint[nPoints];
- BOOL bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev );
+ sal_Bool bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev );
bResult = drawPolyLineBezier( nPoints, bCopied ? pPtAry2 : pPtAry, pFlgAry );
delete [] pPtAry2;
}
@@ -494,13 +494,13 @@ sal_Bool SalGraphics::DrawPolyLineBezier( ULONG nPoints, const SalPoint* pPtAry,
return bResult;
}
-sal_Bool SalGraphics::DrawPolygonBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry, const OutputDevice* pOutDev )
+sal_Bool SalGraphics::DrawPolygonBezier( sal_uIntPtr nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry, const OutputDevice* pOutDev )
{
sal_Bool bResult = sal_False;
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) )
{
SalPoint* pPtAry2 = new SalPoint[nPoints];
- BOOL bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev );
+ sal_Bool bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev );
bResult = drawPolygonBezier( nPoints, bCopied ? pPtAry2 : pPtAry, pFlgAry );
delete [] pPtAry2;
}
@@ -510,17 +510,17 @@ sal_Bool SalGraphics::DrawPolygonBezier( ULONG nPoints, const SalPoint* pPtAry,
}
sal_Bool SalGraphics::DrawPolyPolygonBezier( sal_uInt32 i_nPoly, const sal_uInt32* i_pPoints,
- const SalPoint* const* i_pPtAry, const BYTE* const* i_pFlgAry, const OutputDevice* i_pOutDev )
+ const SalPoint* const* i_pPtAry, const sal_uInt8* const* i_pFlgAry, const OutputDevice* i_pOutDev )
{
sal_Bool bRet = sal_False;
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) )
{
// TODO: optimize, reduce new/delete calls
SalPoint **pPtAry2 = new SalPoint*[i_nPoly];
- ULONG i;
+ sal_uIntPtr i;
for(i=0; i<i_nPoly; i++)
{
- ULONG nPoints = i_pPoints[i];
+ sal_uIntPtr nPoints = i_pPoints[i];
pPtAry2[i] = new SalPoint[ nPoints ];
mirror( nPoints, i_pPtAry[i], pPtAry2[i], i_pOutDev );
}
@@ -554,7 +554,7 @@ bool SalGraphics::DrawPolyLine( const ::basegfx::B2DPolygon& i_rPolygon,
void SalGraphics::CopyArea( long nDestX, long nDestY,
long nSrcX, long nSrcY,
long nSrcWidth, long nSrcHeight,
- USHORT nFlags, const OutputDevice *pOutDev )
+ sal_uInt16 nFlags, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
@@ -648,12 +648,12 @@ void SalGraphics::Invert( long nX, long nY, long nWidth, long nHeight, SalInv
mirror( nX, nWidth, pOutDev );
invert( nX, nY, nWidth, nHeight, nFlags );
}
-void SalGraphics::Invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nFlags, const OutputDevice *pOutDev )
+void SalGraphics::Invert( sal_uIntPtr nPoints, const SalPoint* pPtAry, SalInvert nFlags, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
SalPoint* pPtAry2 = new SalPoint[nPoints];
- BOOL bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev );
+ sal_Bool bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev );
invert( nPoints, bCopied ? pPtAry2 : pPtAry, nFlags );
delete [] pPtAry2;
}
@@ -661,15 +661,15 @@ void SalGraphics::Invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nF
invert( nPoints, pPtAry, nFlags );
}
-BOOL SalGraphics::DrawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize, const OutputDevice *pOutDev )
+sal_Bool SalGraphics::DrawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uIntPtr nSize, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
mirror( nX, nWidth, pOutDev );
return drawEPS( nX, nY, nWidth, nHeight, pPtr, nSize );
}
-BOOL SalGraphics::HitTestNativeControl( ControlType nType, ControlPart nPart, const Region& rControlRegion,
- const Point& aPos, BOOL& rIsInside, const OutputDevice *pOutDev )
+sal_Bool SalGraphics::HitTestNativeControl( ControlType nType, ControlPart nPart, const Region& rControlRegion,
+ const Point& aPos, sal_Bool& rIsInside, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
@@ -721,7 +721,7 @@ void SalGraphics::mirror( ControlType nType, const ImplControlValue& rVal, const
}
}
-BOOL SalGraphics::DrawNativeControl( ControlType nType, ControlPart nPart, const Region& rControlRegion,
+sal_Bool SalGraphics::DrawNativeControl( ControlType nType, ControlPart nPart, const Region& rControlRegion,
ControlState nState, const ImplControlValue& aValue,
const OUString& aCaption, const OutputDevice *pOutDev )
{
@@ -730,7 +730,7 @@ BOOL SalGraphics::DrawNativeControl( ControlType nType, ControlPart nPart, const
Region rgn( rControlRegion );
mirror( rgn, pOutDev );
mirror( nType, aValue, pOutDev );
- BOOL bRet = drawNativeControl( nType, nPart, rgn, nState, aValue, aCaption );
+ sal_Bool bRet = drawNativeControl( nType, nPart, rgn, nState, aValue, aCaption );
mirror( nType, aValue, pOutDev, true );
return bRet;
}
@@ -738,7 +738,7 @@ BOOL SalGraphics::DrawNativeControl( ControlType nType, ControlPart nPart, const
return drawNativeControl( nType, nPart, rControlRegion, nState, aValue, aCaption );
}
-BOOL SalGraphics::DrawNativeControlText( ControlType nType, ControlPart nPart, const Region& rControlRegion,
+sal_Bool SalGraphics::DrawNativeControlText( ControlType nType, ControlPart nPart, const Region& rControlRegion,
ControlState nState, const ImplControlValue& aValue,
const OUString& aCaption, const OutputDevice *pOutDev )
{
@@ -747,7 +747,7 @@ BOOL SalGraphics::DrawNativeControlText( ControlType nType, ControlPart nPart, c
Region rgn( rControlRegion );
mirror( rgn, pOutDev );
mirror( nType, aValue, pOutDev );
- BOOL bRet = drawNativeControlText( nType, nPart, rgn, nState, aValue, aCaption );
+ sal_Bool bRet = drawNativeControlText( nType, nPart, rgn, nState, aValue, aCaption );
mirror( nType, aValue, pOutDev, true );
return bRet;
}
@@ -755,7 +755,7 @@ BOOL SalGraphics::DrawNativeControlText( ControlType nType, ControlPart nPart, c
return drawNativeControlText( nType, nPart, rControlRegion, nState, aValue, aCaption );
}
-BOOL SalGraphics::GetNativeControlRegion( ControlType nType, ControlPart nPart, const Region& rControlRegion, ControlState nState,
+sal_Bool SalGraphics::GetNativeControlRegion( ControlType nType, ControlPart nPart, const Region& rControlRegion, ControlState nState,
const ImplControlValue& aValue, const OUString& aCaption,
Region &rNativeBoundingRegion, Region &rNativeContentRegion, const OutputDevice *pOutDev )
{
@@ -770,12 +770,12 @@ BOOL SalGraphics::GetNativeControlRegion( ControlType nType, ControlPart nPart,
mirror( rNativeBoundingRegion, pOutDev, true );
mirror( rNativeContentRegion, pOutDev, true );
mirror( nType, aValue, pOutDev, true );
- return TRUE;
+ return sal_True;
}
else
{
mirror( nType, aValue, pOutDev, true );
- return FALSE;
+ return sal_False;
}
}
else
@@ -815,7 +815,7 @@ bool SalGraphics::filterText( const String&, String&, xub_StrLen, xub_StrLen&, x
void SalGraphics::AddDevFontSubstitute( OutputDevice* pOutDev,
const String& rFontName,
const String& rReplaceFontName,
- USHORT nFlags )
+ sal_uInt16 nFlags )
{
pOutDev->ImplAddDevFontSubstitute( rFontName, rReplaceFontName, nFlags );
}
diff --git a/vcl/source/gdi/salmisc.cxx b/vcl/source/gdi/salmisc.cxx
index 31df581f50a2..cda28e3ff370 100644
--- a/vcl/source/gdi/salmisc.cxx
+++ b/vcl/source/gdi/salmisc.cxx
@@ -101,12 +101,12 @@ static void ImplPALToPAL( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuff
BitmapColor* pColMapBuf = aColMap.ImplGetColorBuffer();
BitmapColor aIndex( 0 );
- for( USHORT i = 0, nSrcCount = aColMap.GetEntryCount(), nDstCount = rDstBuffer.maPalette.GetEntryCount(); i < nSrcCount; i++ )
+ for( sal_uInt16 i = 0, nSrcCount = aColMap.GetEntryCount(), nDstCount = rDstBuffer.maPalette.GetEntryCount(); i < nSrcCount; i++ )
{
if( ( i < nDstCount ) && ( rSrcBuffer.maPalette[ i ] == rDstBuffer.maPalette[ i ] ) )
- aIndex.SetIndex( sal::static_int_cast<BYTE>(i) );
+ aIndex.SetIndex( sal::static_int_cast<sal_uInt8>(i) );
else
- aIndex.SetIndex( sal::static_int_cast<BYTE>(rDstBuffer.maPalette.GetBestIndex( rSrcBuffer.maPalette[ i ] )) );
+ aIndex.SetIndex( sal::static_int_cast<sal_uInt8>(rDstBuffer.maPalette.GetBestIndex( rSrcBuffer.maPalette[ i ] )) );
pColMapBuf[ i ] = aIndex;
}
@@ -212,7 +212,7 @@ static void ImplTCToTC( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffer
if( BMP_SCANLINE_FORMAT( rSrcBuffer.mnFormat ) == BMP_FORMAT_24BIT_TC_BGR )
{
BitmapColor aCol;
- BYTE* pPixel;
+ sal_uInt8* pPixel;
for( long nActY = 0, nMapY; nActY < nHeight; nActY++ )
{
@@ -253,7 +253,7 @@ static void ImplTCToPAL( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffe
const ColorMask& rSrcMask = rSrcBuffer.maColorMask;
const ColorMask& rDstMask = rDstBuffer.maColorMask;
BitmapPalette aColMap( rSrcBuffer.maPalette.GetEntryCount() );
- BYTE* pColToPalMap = new BYTE[ TC_TO_PAL_COLORS ];
+ sal_uInt8* pColToPalMap = new sal_uInt8[ TC_TO_PAL_COLORS ];
BitmapColor aIndex( 0 );
for( long nR = 0; nR < 16; nR++ )
@@ -262,10 +262,10 @@ static void ImplTCToPAL( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffe
{
for( long nB = 0; nB < 16; nB++ )
{
- BitmapColor aCol( sal::static_int_cast<BYTE>(nR << 4),
- sal::static_int_cast<BYTE>(nG << 4),
- sal::static_int_cast<BYTE>(nB << 4) );
- pColToPalMap[ ImplIndexFromColor( aCol ) ] = (BYTE) rDstBuffer.maPalette.GetBestIndex( aCol );
+ BitmapColor aCol( sal::static_int_cast<sal_uInt8>(nR << 4),
+ sal::static_int_cast<sal_uInt8>(nG << 4),
+ sal::static_int_cast<sal_uInt8>(nB << 4) );
+ pColToPalMap[ ImplIndexFromColor( aCol ) ] = (sal_uInt8) rDstBuffer.maPalette.GetBestIndex( aCol );
}
}
}
@@ -293,7 +293,7 @@ static void ImplTCToPAL( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffe
// ---------------------
BitmapBuffer* StretchAndConvert( const BitmapBuffer& rSrcBuffer, const SalTwoRect& rTwoRect,
- ULONG nDstBitmapFormat, BitmapPalette* pDstPal, ColorMask* pDstMask )
+ sal_uIntPtr nDstBitmapFormat, BitmapPalette* pDstPal, ColorMask* pDstMask )
{
FncGetPixel pFncGetPixel;
FncSetPixel pFncSetPixel;
@@ -330,7 +330,7 @@ BitmapBuffer* StretchAndConvert( const BitmapBuffer& rSrcBuffer, const SalTwoRec
}
// set function for setting pixels
- const ULONG nDstScanlineFormat = BMP_SCANLINE_FORMAT( nDstBitmapFormat );
+ const sal_uIntPtr nDstScanlineFormat = BMP_SCANLINE_FORMAT( nDstBitmapFormat );
switch( nDstScanlineFormat )
{
IMPL_CASE_SET_FORMAT( _1BIT_MSB_PAL, 1 );
@@ -367,7 +367,7 @@ BitmapBuffer* StretchAndConvert( const BitmapBuffer& rSrcBuffer, const SalTwoRec
pDstBuffer->mnScanlineSize = AlignedWidth4Bytes( pDstBuffer->mnBitCount * pDstBuffer->mnWidth );
try
{
- pDstBuffer->mpBits = new BYTE[ pDstBuffer->mnScanlineSize * pDstBuffer->mnHeight ];
+ pDstBuffer->mpBits = new sal_uInt8[ pDstBuffer->mnScanlineSize * pDstBuffer->mnHeight ];
}
catch( const std::bad_alloc& )
{
diff --git a/vcl/source/gdi/salnativewidgets-none.cxx b/vcl/source/gdi/salnativewidgets-none.cxx
index 7faf12d062fe..62007cd28d04 100644
--- a/vcl/source/gdi/salnativewidgets-none.cxx
+++ b/vcl/source/gdi/salnativewidgets-none.cxx
@@ -40,29 +40,29 @@ using namespace rtl;
/*
* IsNativeControlSupported()
*
- * Returns TRUE if the platform supports native
+ * Returns sal_True if the platform supports native
* drawing of the control defined by nPart
*/
-BOOL SalGraphics::IsNativeControlSupported( ControlType, ControlPart )
+sal_Bool SalGraphics::IsNativeControlSupported( ControlType, ControlPart )
{
- return( FALSE );
+ return( sal_False );
}
/*
* HitTestNativeControl()
*
- * If the return value is TRUE, bIsInside contains information whether
+ * If the return value is sal_True, bIsInside contains information whether
* aPos was or was not inside the native widget specified by the
* nType/nPart combination.
*/
-BOOL SalGraphics::hitTestNativeControl( ControlType,
+sal_Bool SalGraphics::hitTestNativeControl( ControlType,
ControlPart,
const Region&,
const Point&,
- BOOL& )
+ sal_Bool& )
{
- return( FALSE );
+ return( sal_False );
}
@@ -75,14 +75,14 @@ BOOL SalGraphics::hitTestNativeControl( ControlType,
* aValue: An optional value (tristate/numerical/string)
* aCaption: A caption or title string (like button text etc)
*/
-BOOL SalGraphics::drawNativeControl( ControlType,
+sal_Bool SalGraphics::drawNativeControl( ControlType,
ControlPart,
const Region&,
ControlState,
const ImplControlValue&,
const OUString& )
{
- return( FALSE );
+ return( sal_False );
}
@@ -96,22 +96,22 @@ BOOL SalGraphics::drawNativeControl( ControlType,
* aValue: An optional value (tristate/numerical/string)
* aCaption: A caption or title string (like button text etc)
*/
-BOOL SalGraphics::drawNativeControlText( ControlType,
+sal_Bool SalGraphics::drawNativeControlText( ControlType,
ControlPart,
const Region&,
ControlState,
const ImplControlValue&,
const OUString& )
{
- return( FALSE );
+ return( sal_False );
}
/*
* GetNativeControlRegion()
*
- * If the return value is TRUE, rNativeBoundingRegion
- * contains the TRUE bounding region covered by the control
+ * If the return value is sal_True, rNativeBoundingRegion
+ * contains the sal_True bounding region covered by the control
* including any adornment, while rNativeContentRegion contains the area
* within the control that can be safely drawn into without drawing over
* the borders of the control.
@@ -120,7 +120,7 @@ BOOL SalGraphics::drawNativeControlText( ControlType,
* aValue: An optional value (tristate/numerical/string)
* aCaption: A caption or title string (like button text etc)
*/
-BOOL SalGraphics::getNativeControlRegion( ControlType,
+sal_Bool SalGraphics::getNativeControlRegion( ControlType,
ControlPart,
const Region&,
ControlState,
@@ -129,6 +129,6 @@ BOOL SalGraphics::getNativeControlRegion( ControlType,
Region &,
Region & )
{
- return( FALSE );
+ return( sal_False );
}
diff --git a/vcl/source/gdi/svcompat.cxx b/vcl/source/gdi/svcompat.cxx
index 415cad128a49..be0c9cd7dcc9 100644
--- a/vcl/source/gdi/svcompat.cxx
+++ b/vcl/source/gdi/svcompat.cxx
@@ -34,7 +34,7 @@
// - ImplCompat -
// --------------
-ImplCompat::ImplCompat( SvStream& rStm, USHORT nStreamMode, USHORT nVersion ) :
+ImplCompat::ImplCompat( SvStream& rStm, sal_uInt16 nStreamMode, sal_uInt16 nVersion ) :
mpRWStm ( &rStm ),
mnStmMode ( nStreamMode ),
mnVersion ( nVersion )
@@ -62,7 +62,7 @@ ImplCompat::~ImplCompat()
{
if( STREAM_WRITE == mnStmMode )
{
- const UINT32 nEndPos = mpRWStm->Tell();
+ const sal_uInt32 nEndPos = mpRWStm->Tell();
mpRWStm->Seek( mnCompatPos );
*mpRWStm << ( nEndPos - mnTotalSize );
@@ -70,7 +70,7 @@ ImplCompat::~ImplCompat()
}
else
{
- const UINT32 nReadSize = mpRWStm->Tell() - mnCompatPos;
+ const sal_uInt32 nReadSize = mpRWStm->Tell() - mnCompatPos;
if( mnTotalSize > nReadSize )
mpRWStm->SeekRel( mnTotalSize - nReadSize );
diff --git a/vcl/source/gdi/textlayout.cxx b/vcl/source/gdi/textlayout.cxx
index 78ce197525ec..04fbd9525e4a 100644..100755
--- a/vcl/source/gdi/textlayout.cxx
+++ b/vcl/source/gdi/textlayout.cxx
@@ -109,7 +109,7 @@ namespace vcl
public:
// equivalents to the respective OutputDevice methods, which take the reference device into account
long GetTextArray( const XubString& _rText, sal_Int32* _pDXAry, xub_StrLen _nStartIndex, xub_StrLen _nLength ) const;
- Rectangle DrawText( const Rectangle& _rRect, const XubString& _rText, USHORT _nStyle, MetricVector* _pVector, String* _pDisplayText );
+ Rectangle DrawText( const Rectangle& _rRect, const XubString& _rText, sal_uInt16 _nStyle, MetricVector* _pVector, String* _pDisplayText );
protected:
void onBeginDrawText()
@@ -309,13 +309,13 @@ namespace vcl
}
//--------------------------------------------------------------------
- Rectangle ReferenceDeviceTextLayout::DrawText( const Rectangle& _rRect, const XubString& _rText, USHORT _nStyle, MetricVector* _pVector, String* _pDisplayText )
+ Rectangle ReferenceDeviceTextLayout::DrawText( const Rectangle& _rRect, const XubString& _rText, sal_uInt16 _nStyle, MetricVector* _pVector, String* _pDisplayText )
{
if ( !_rText.Len() )
return Rectangle();
// determine text layout mode from the RTL-ness of the control whose text we render
- ULONG nTextLayoutMode = m_bRTLEnabled ? TEXT_LAYOUT_BIDI_RTL : TEXT_LAYOUT_BIDI_LTR;
+ sal_uIntPtr nTextLayoutMode = m_bRTLEnabled ? TEXT_LAYOUT_BIDI_RTL : TEXT_LAYOUT_BIDI_LTR;
m_rReferenceDevice.SetLayoutMode( nTextLayoutMode );
m_rTargetDevice.SetLayoutMode( nTextLayoutMode | TEXT_LAYOUT_TEXTORIGIN_LEFT );
// TEXT_LAYOUT_TEXTORIGIN_LEFT is because when we do actually draw the text (in DrawText( Point, ... )), then
@@ -375,7 +375,7 @@ namespace vcl
}
//--------------------------------------------------------------------
- Rectangle ControlTextRenderer::DrawText( const Rectangle& _rRect, const XubString& _rText, USHORT _nStyle,
+ Rectangle ControlTextRenderer::DrawText( const Rectangle& _rRect, const XubString& _rText, sal_uInt16 _nStyle,
MetricVector* _pVector, String* _pDisplayText )
{
return m_pImpl->DrawText( _rRect, _rText, _nStyle, _pVector, _pDisplayText );
diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx
index 4c1439ffe6f4..e6e100072679 100644
--- a/vcl/source/gdi/virdev.cxx
+++ b/vcl/source/gdi/virdev.cxx
@@ -48,7 +48,7 @@ using namespace ::com::sun::star::uno;
// =======================================================================
void VirtualDevice::ImplInitVirDev( const OutputDevice* pOutDev,
- long nDX, long nDY, USHORT nBitCount, const SystemGraphicsData *pData )
+ long nDX, long nDY, sal_uInt16 nBitCount, const SystemGraphicsData *pData )
{
DBG_ASSERT( nBitCount <= 1,
"VirtualDevice::VirtualDevice(): Only 0 or 1 is for BitCount allowed" );
@@ -86,7 +86,7 @@ void VirtualDevice::ImplInitVirDev( const OutputDevice* pOutDev,
mnBitCount = ( nBitCount ? nBitCount : pOutDev->GetBitCount() );
mnOutWidth = nDX;
mnOutHeight = nDY;
- mbScreenComp = TRUE;
+ mbScreenComp = sal_True;
mnAlphaDepth = -1;
// #i59315# init vdev size from system object, when passed a
@@ -99,12 +99,12 @@ void VirtualDevice::ImplInitVirDev( const OutputDevice* pOutDev,
SetAntialiasing( ANTIALIASING_DISABLE_TEXT );
if ( pOutDev->GetOutDevType() == OUTDEV_PRINTER )
- mbScreenComp = FALSE;
+ mbScreenComp = sal_False;
else if ( pOutDev->GetOutDevType() == OUTDEV_VIRDEV )
mbScreenComp = ((VirtualDevice*)pOutDev)->mbScreenComp;
meOutDevType = OUTDEV_VIRDEV;
- mbDevOutput = TRUE;
+ mbDevOutput = sal_True;
mpFontList = pSVData->maGDIData.mpScreenFontList;
mpFontCache = pSVData->maGDIData.mpScreenFontCache;
mnDPIX = pOutDev->mnDPIX;
@@ -136,7 +136,7 @@ void VirtualDevice::ImplInitVirDev( const OutputDevice* pOutDev,
// -----------------------------------------------------------------------
-VirtualDevice::VirtualDevice( USHORT nBitCount )
+VirtualDevice::VirtualDevice( sal_uInt16 nBitCount )
: mpVirDev( NULL ),
meRefDevMode( REFDEV_NONE )
{
@@ -147,7 +147,7 @@ VirtualDevice::VirtualDevice( USHORT nBitCount )
// -----------------------------------------------------------------------
-VirtualDevice::VirtualDevice( const OutputDevice& rCompDev, USHORT nBitCount )
+VirtualDevice::VirtualDevice( const OutputDevice& rCompDev, sal_uInt16 nBitCount )
: mpVirDev( NULL ),
meRefDevMode( REFDEV_NONE )
{
@@ -158,7 +158,7 @@ VirtualDevice::VirtualDevice( const OutputDevice& rCompDev, USHORT nBitCount )
// -----------------------------------------------------------------------
-VirtualDevice::VirtualDevice( const OutputDevice& rCompDev, USHORT nBitCount, USHORT nAlphaBitCount )
+VirtualDevice::VirtualDevice( const OutputDevice& rCompDev, sal_uInt16 nBitCount, sal_uInt16 nAlphaBitCount )
: mpVirDev( NULL ),
meRefDevMode( REFDEV_NONE )
{
@@ -172,7 +172,7 @@ VirtualDevice::VirtualDevice( const OutputDevice& rCompDev, USHORT nBitCount, US
// -----------------------------------------------------------------------
-VirtualDevice::VirtualDevice( const SystemGraphicsData *pData, USHORT nBitCount )
+VirtualDevice::VirtualDevice( const SystemGraphicsData *pData, sal_uInt16 nBitCount )
: mpVirDev( NULL ),
meRefDevMode( REFDEV_NONE )
{
@@ -208,20 +208,20 @@ VirtualDevice::~VirtualDevice()
// -----------------------------------------------------------------------
-BOOL VirtualDevice::ImplSetOutputSizePixel( const Size& rNewSize, BOOL bErase )
+sal_Bool VirtualDevice::ImplSetOutputSizePixel( const Size& rNewSize, sal_Bool bErase )
{
DBG_TRACE3( "VirtualDevice::ImplSetOutputSizePixel( %ld, %ld, %d )", rNewSize.Width(), rNewSize.Height(), (int)bErase );
if ( !mpVirDev )
- return FALSE;
+ return sal_False;
else if ( rNewSize == GetOutputSizePixel() )
{
if ( bErase )
Erase();
- return TRUE;
+ return sal_True;
}
- BOOL bRet;
+ sal_Bool bRet;
long nNewWidth = rNewSize.Width(), nNewHeight = rNewSize.Height();
if ( nNewWidth < 1 )
@@ -250,7 +250,7 @@ BOOL VirtualDevice::ImplSetOutputSizePixel( const Size& rNewSize, BOOL bErase )
if ( !mpGraphics )
{
if ( !ImplGetGraphics() )
- return FALSE;
+ return sal_False;
}
pNewVirDev = pSVData->mpDefInst->CreateVirtualDevice( mpGraphics, nNewWidth, nNewHeight, mnBitCount );
@@ -286,16 +286,16 @@ BOOL VirtualDevice::ImplSetOutputSizePixel( const Size& rNewSize, BOOL bErase )
mpVirDev = pNewVirDev;
mnOutWidth = rNewSize.Width();
mnOutHeight = rNewSize.Height();
- bRet = TRUE;
+ bRet = sal_True;
}
else
{
- bRet = FALSE;
+ bRet = sal_False;
pSVData->mpDefInst->DestroyVirtualDevice( pNewVirDev );
}
}
else
- bRet = FALSE;
+ bRet = sal_False;
}
return bRet;
@@ -319,7 +319,7 @@ void VirtualDevice::ImplFillOpaqueRectangle( const Rectangle& rRect )
// -----------------------------------------------------------------------
-BOOL VirtualDevice::SetOutputSizePixel( const Size& rNewSize, BOOL bErase )
+sal_Bool VirtualDevice::SetOutputSizePixel( const Size& rNewSize, sal_Bool bErase )
{
if( ImplSetOutputSizePixel(rNewSize, bErase) )
{
@@ -348,10 +348,10 @@ BOOL VirtualDevice::SetOutputSizePixel( const Size& rNewSize, BOOL bErase )
mpAlphaVDev->SetMapMode( GetMapMode() );
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -363,7 +363,7 @@ void VirtualDevice::SetReferenceDevice( RefDevMode i_eRefDevMode )
{
case REFDEV_NONE:
default:
- DBG_ASSERT( FALSE, "VDev::SetRefDev illegal argument!" );
+ DBG_ASSERT( sal_False, "VDev::SetRefDev illegal argument!" );
break;
case REFDEV_MODE06:
nDPIX = nDPIY = 600;
@@ -391,17 +391,17 @@ void VirtualDevice::ImplSetReferenceDevice( RefDevMode i_eRefDevMode, sal_Int32
mnDPIX = i_nDPIX;
mnDPIY = i_nDPIY;
- EnableOutput( FALSE ); // prevent output on reference device
- mbScreenComp = FALSE;
+ EnableOutput( sal_False ); // prevent output on reference device
+ mbScreenComp = sal_False;
// invalidate currently selected fonts
- mbInitFont = TRUE;
- mbNewFont = TRUE;
+ mbInitFont = sal_True;
+ mbNewFont = sal_True;
// avoid adjusting font lists when already in refdev mode
- BYTE nOldRefDevMode = meRefDevMode;
- BYTE nOldCompatFlag = (BYTE)meRefDevMode & REFDEV_FORCE_ZERO_EXTLEAD;
- meRefDevMode = (BYTE)(i_eRefDevMode | nOldCompatFlag);
+ sal_uInt8 nOldRefDevMode = meRefDevMode;
+ sal_uInt8 nOldCompatFlag = (sal_uInt8)meRefDevMode & REFDEV_FORCE_ZERO_EXTLEAD;
+ meRefDevMode = (sal_uInt8)(i_eRefDevMode | nOldCompatFlag);
if( (nOldRefDevMode ^ nOldCompatFlag) != REFDEV_NONE )
return;
@@ -442,7 +442,7 @@ void VirtualDevice::ImplSetReferenceDevice( RefDevMode i_eRefDevMode, sal_Int32
void VirtualDevice::Compat_ZeroExtleadBug()
{
- meRefDevMode = (BYTE)meRefDevMode | REFDEV_FORCE_ZERO_EXTLEAD;
+ meRefDevMode = (sal_uInt8)meRefDevMode | REFDEV_FORCE_ZERO_EXTLEAD;
}
// -----------------------------------------------------------------------
diff --git a/vcl/source/gdi/wall.cxx b/vcl/source/gdi/wall.cxx
index 10aa4431f69d..5b865038bb2b 100644
--- a/vcl/source/gdi/wall.cxx
+++ b/vcl/source/gdi/wall.cxx
@@ -111,7 +111,7 @@ void ImplWallpaper::ImplReleaseCachedBitmap()
SvStream& operator>>( SvStream& rIStm, ImplWallpaper& rImplWallpaper )
{
VersionCompat aCompat( rIStm, STREAM_READ );
- UINT16 nTmp16;
+ sal_uInt16 nTmp16;
delete rImplWallpaper.mpRect;
rImplWallpaper.mpRect = NULL;
@@ -129,7 +129,7 @@ SvStream& operator>>( SvStream& rIStm, ImplWallpaper& rImplWallpaper )
// version 2
if( aCompat.GetVersion() >= 2 )
{
- BOOL bRect, bGrad, bBmp, bDummy;
+ sal_Bool bRect, bGrad, bBmp, bDummy;
rIStm >> bRect >> bGrad >> bBmp >> bDummy >> bDummy >> bDummy;
@@ -154,7 +154,7 @@ SvStream& operator>>( SvStream& rIStm, ImplWallpaper& rImplWallpaper )
// version 3 (new color format)
if( aCompat.GetVersion() >= 3 )
{
- rImplWallpaper.maColor.Read( rIStm, TRUE );
+ rImplWallpaper.maColor.Read( rIStm, sal_True );
}
}
@@ -166,13 +166,13 @@ SvStream& operator>>( SvStream& rIStm, ImplWallpaper& rImplWallpaper )
SvStream& operator<<( SvStream& rOStm, const ImplWallpaper& rImplWallpaper )
{
VersionCompat aCompat( rOStm, STREAM_WRITE, 3 );
- BOOL bRect = ( rImplWallpaper.mpRect != NULL );
- BOOL bGrad = ( rImplWallpaper.mpGradient != NULL );
- BOOL bBmp = ( rImplWallpaper.mpBitmap != NULL );
- BOOL bDummy = FALSE;
+ sal_Bool bRect = ( rImplWallpaper.mpRect != NULL );
+ sal_Bool bGrad = ( rImplWallpaper.mpGradient != NULL );
+ sal_Bool bBmp = ( rImplWallpaper.mpBitmap != NULL );
+ sal_Bool bDummy = sal_False;
// version 1
- rOStm << rImplWallpaper.maColor << (UINT16) rImplWallpaper.meStyle;
+ rOStm << rImplWallpaper.maColor << (sal_uInt16) rImplWallpaper.meStyle;
// version 2
rOStm << bRect << bGrad << bBmp << bDummy << bDummy << bDummy;
@@ -187,14 +187,14 @@ SvStream& operator<<( SvStream& rOStm, const ImplWallpaper& rImplWallpaper )
rOStm << *rImplWallpaper.mpBitmap;
// version 3 (new color format)
- ( (Color&) rImplWallpaper.maColor ).Write( rOStm, TRUE );
+ ( (Color&) rImplWallpaper.maColor ).Write( rOStm, sal_True );
return rOStm;
}
// -----------------------------------------------------------------------
-inline void Wallpaper::ImplMakeUnique( BOOL bReleaseCache )
+inline void Wallpaper::ImplMakeUnique( sal_Bool bReleaseCache )
{
// Falls noch andere Referenzen bestehen, dann kopieren
if ( mpImplWallpaper->mnRefCount != 1 )
@@ -313,7 +313,7 @@ void Wallpaper::SetStyle( WallpaperStyle eStyle )
{
DBG_CHKTHIS( Wallpaper, NULL );
- ImplMakeUnique( FALSE );
+ ImplMakeUnique( sal_False );
if( eStyle == WALLPAPER_APPLICATIONGRADIENT )
// set a dummy gradient, the correct gradient
@@ -391,7 +391,7 @@ BitmapEx Wallpaper::GetBitmap() const
// -----------------------------------------------------------------------
-BOOL Wallpaper::IsBitmap() const
+sal_Bool Wallpaper::IsBitmap() const
{
DBG_CHKTHIS( Wallpaper, NULL );
@@ -449,7 +449,7 @@ Gradient Wallpaper::GetGradient() const
// -----------------------------------------------------------------------
-BOOL Wallpaper::IsGradient() const
+sal_Bool Wallpaper::IsGradient() const
{
DBG_CHKTHIS( Wallpaper, NULL );
@@ -479,7 +479,7 @@ void Wallpaper::SetRect( const Rectangle& rRect )
{
DBG_CHKTHIS( Wallpaper, NULL );
- ImplMakeUnique( FALSE );
+ ImplMakeUnique( sal_False );
if ( rRect.IsEmpty() )
{
@@ -506,7 +506,7 @@ void Wallpaper::SetRect()
if ( mpImplWallpaper->mpRect )
{
- ImplMakeUnique( FALSE );
+ ImplMakeUnique( sal_False );
delete mpImplWallpaper->mpRect;
mpImplWallpaper->mpRect = NULL;
}
@@ -529,7 +529,7 @@ Rectangle Wallpaper::GetRect() const
// -----------------------------------------------------------------------
-BOOL Wallpaper::IsRect() const
+sal_Bool Wallpaper::IsRect() const
{
DBG_CHKTHIS( Wallpaper, NULL );
@@ -539,26 +539,26 @@ BOOL Wallpaper::IsRect() const
// -----------------------------------------------------------------------
-BOOL Wallpaper::IsFixed() const
+sal_Bool Wallpaper::IsFixed() const
{
if ( mpImplWallpaper->meStyle == WALLPAPER_NULL )
- return FALSE;
+ return sal_False;
else
return (!mpImplWallpaper->mpBitmap && !mpImplWallpaper->mpGradient);
}
// -----------------------------------------------------------------------
-BOOL Wallpaper::IsScrollable() const
+sal_Bool Wallpaper::IsScrollable() const
{
if ( mpImplWallpaper->meStyle == WALLPAPER_NULL )
- return FALSE;
+ return sal_False;
else if ( !mpImplWallpaper->mpBitmap && !mpImplWallpaper->mpGradient )
- return TRUE;
+ return sal_True;
else if ( mpImplWallpaper->mpBitmap )
return (mpImplWallpaper->meStyle == WALLPAPER_TILE);
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -590,37 +590,37 @@ Wallpaper& Wallpaper::operator=( const Wallpaper& rWallpaper )
// -----------------------------------------------------------------------
-BOOL Wallpaper::operator==( const Wallpaper& rWallpaper ) const
+sal_Bool Wallpaper::operator==( const Wallpaper& rWallpaper ) const
{
DBG_CHKTHIS( Wallpaper, NULL );
DBG_CHKOBJ( &rWallpaper, Wallpaper, NULL );
if ( mpImplWallpaper == rWallpaper.mpImplWallpaper )
- return TRUE;
+ return sal_True;
if ( ( mpImplWallpaper->meStyle != rWallpaper.mpImplWallpaper->meStyle ) ||
( mpImplWallpaper->maColor != rWallpaper.mpImplWallpaper->maColor ) )
- return FALSE;
+ return sal_False;
if ( mpImplWallpaper->mpRect != rWallpaper.mpImplWallpaper->mpRect
&& ( !mpImplWallpaper->mpRect
|| !rWallpaper.mpImplWallpaper->mpRect
|| *(mpImplWallpaper->mpRect) != *(rWallpaper.mpImplWallpaper->mpRect) ) )
- return FALSE;
+ return sal_False;
if ( mpImplWallpaper->mpBitmap != rWallpaper.mpImplWallpaper->mpBitmap
&& ( !mpImplWallpaper->mpBitmap
|| !rWallpaper.mpImplWallpaper->mpBitmap
|| *(mpImplWallpaper->mpBitmap) != *(rWallpaper.mpImplWallpaper->mpBitmap) ) )
- return FALSE;
+ return sal_False;
if ( mpImplWallpaper->mpGradient != rWallpaper.mpImplWallpaper->mpGradient
&& ( !mpImplWallpaper->mpGradient
|| !rWallpaper.mpImplWallpaper->mpGradient
|| *(mpImplWallpaper->mpGradient) != *(rWallpaper.mpImplWallpaper->mpGradient) ) )
- return FALSE;
+ return sal_False;
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
diff --git a/vcl/source/glyphs/gcach_ftyp.cxx b/vcl/source/glyphs/gcach_ftyp.cxx
index ebdd59f517af..e3dd47c30085 100644
--- a/vcl/source/glyphs/gcach_ftyp.cxx
+++ b/vcl/source/glyphs/gcach_ftyp.cxx
@@ -404,7 +404,7 @@ static unsigned GetUShort( const unsigned char* p ){ return((p[0]<<8)+p[1]);}
// -----------------------------------------------------------------------
-const unsigned char* FtFontInfo::GetTable( const char* pTag, ULONG* pLength ) const
+const unsigned char* FtFontInfo::GetTable( const char* pTag, sal_uIntPtr* pLength ) const
{
const unsigned char* pBuffer = mpFontFile->GetBuffer();
int nFileSize = mpFontFile->GetFileSize();
@@ -427,7 +427,7 @@ const unsigned char* FtFontInfo::GetTable( const char* pTag, ULONG* pLength ) co
{
if( p[0]==pTag[0] && p[1]==pTag[1] && p[2]==pTag[2] && p[3]==pTag[3] )
{
- ULONG nLength = GetUInt( p + 12 );
+ sal_uIntPtr nLength = GetUInt( p + 12 );
if( pLength != NULL )
*pLength = nLength;
const unsigned char* pTable = pBuffer + GetUInt( p + 8 );
@@ -1022,7 +1022,7 @@ void FreetypeServerFont::FetchFontMetric( ImplFontMetricData& rTo, long& rFactor
// Check for CJK capabilities of the current font
// #107888# workaround for Asian...
// TODO: remove when ExtLeading fully implemented
- BOOL bCJKCapable = ((pOS2->ulUnicodeRange2 & 0x2DF00000) != 0);
+ sal_Bool bCJKCapable = ((pOS2->ulUnicodeRange2 & 0x2DF00000) != 0);
if ( bCJKCapable && (pOS2->usWinAscent || pOS2->usWinDescent) )
{
@@ -1465,7 +1465,7 @@ bool FreetypeServerFont::GetGlyphBitmap1( int nGlyphIndex, RawBitmap& rRawBitmap
// #i15743# freetype API 2.1.3 changed the FT_RENDER_MODE_MONO constant
FT_Render_Mode nRenderMode = (FT_Render_Mode)((nFTVERSION<2103) ? 1 : FT_RENDER_MODE_MONO);
- rc = FT_Glyph_To_Bitmap( &pGlyphFT, nRenderMode, NULL, TRUE );
+ rc = FT_Glyph_To_Bitmap( &pGlyphFT, nRenderMode, NULL, sal_True );
if( rc != FT_Err_Ok )
{
FT_Done_Glyph( pGlyphFT );
@@ -1493,7 +1493,7 @@ bool FreetypeServerFont::GetGlyphBitmap1( int nGlyphIndex, RawBitmap& rRawBitmap
rRawBitmap.mnScanlineSize = rBitmapFT.pitch;
}
- const ULONG nNeededSize = rRawBitmap.mnScanlineSize * rRawBitmap.mnHeight;
+ const sal_uIntPtr nNeededSize = rRawBitmap.mnScanlineSize * rRawBitmap.mnHeight;
if( rRawBitmap.mnAllocated < nNeededSize )
{
@@ -1519,10 +1519,10 @@ bool FreetypeServerFont::GetGlyphBitmap1( int nGlyphIndex, RawBitmap& rRawBitmap
}
unsigned char* p = rRawBitmap.mpBits;
- for( ULONG y=0; y < rRawBitmap.mnHeight; y++ )
+ for( sal_uIntPtr y=0; y < rRawBitmap.mnHeight; y++ )
{
unsigned char nLastByte = 0;
- for( ULONG x=0; x < rRawBitmap.mnScanlineSize; x++ )
+ for( sal_uIntPtr x=0; x < rRawBitmap.mnScanlineSize; x++ )
{
unsigned char nTmp = p[x] << 7;
p[x] |= (p[x] >> 1) | nLastByte;
@@ -1620,7 +1620,7 @@ bool FreetypeServerFont::GetGlyphBitmap8( int nGlyphIndex, RawBitmap& rRawBitmap
bool bEmbedded = (pGlyphFT->format == FT_GLYPH_FORMAT_BITMAP);
if( !bEmbedded )
{
- rc = FT_Glyph_To_Bitmap( &pGlyphFT, FT_RENDER_MODE_NORMAL, NULL, TRUE );
+ rc = FT_Glyph_To_Bitmap( &pGlyphFT, FT_RENDER_MODE_NORMAL, NULL, sal_True );
if( rc != FT_Err_Ok )
{
FT_Done_Glyph( pGlyphFT );
@@ -1644,7 +1644,7 @@ bool FreetypeServerFont::GetGlyphBitmap8( int nGlyphIndex, RawBitmap& rRawBitmap
}
rRawBitmap.mnScanlineSize = (rRawBitmap.mnScanlineSize + 3) & -4;
- const ULONG nNeededSize = rRawBitmap.mnScanlineSize * rRawBitmap.mnHeight;
+ const sal_uIntPtr nNeededSize = rRawBitmap.mnScanlineSize * rRawBitmap.mnHeight;
if( rRawBitmap.mnAllocated < nNeededSize )
{
delete[] rRawBitmap.mpBits;
@@ -1684,10 +1684,10 @@ bool FreetypeServerFont::GetGlyphBitmap8( int nGlyphIndex, RawBitmap& rRawBitmap
{
// overlay with glyph image shifted by one left pixel
unsigned char* p = rRawBitmap.mpBits;
- for( ULONG y=0; y < rRawBitmap.mnHeight; y++ )
+ for( sal_uIntPtr y=0; y < rRawBitmap.mnHeight; y++ )
{
unsigned char nLastByte = 0;
- for( ULONG x=0; x < rRawBitmap.mnWidth; x++ )
+ for( sal_uIntPtr x=0; x < rRawBitmap.mnWidth; x++ )
{
unsigned char nTmp = p[x];
p[x] |= p[x] | nLastByte;
@@ -1700,9 +1700,9 @@ bool FreetypeServerFont::GetGlyphBitmap8( int nGlyphIndex, RawBitmap& rRawBitmap
if( !bEmbedded && mbUseGamma )
{
unsigned char* p = rRawBitmap.mpBits;
- for( ULONG y=0; y < rRawBitmap.mnHeight; y++ )
+ for( sal_uIntPtr y=0; y < rRawBitmap.mnHeight; y++ )
{
- for( ULONG x=0; x < rRawBitmap.mnWidth; x++ )
+ for( sal_uIntPtr x=0; x < rRawBitmap.mnWidth; x++ )
{
p[x] = aGammaTable[ p[x] ];
}
@@ -1738,7 +1738,7 @@ bool FreetypeServerFont::GetFontCodeRanges( CmapResult& rResult ) const
// TODO: is the full CmapResult needed on platforms calling this?
if( FT_IS_SFNT( maFaceFT ) )
{
- ULONG nLength = 0;
+ sal_uIntPtr nLength = 0;
const unsigned char* pCmap = mpFontInfo->GetTable( "cmap", &nLength );
if( pCmap && (nLength > 0) )
if( ParseCMAP( pCmap, nLength, rResult ) )
@@ -1814,7 +1814,7 @@ int FreetypeServerFont::GetGlyphKernValue( int nGlyphLeft, int nGlyphRight ) con
// -----------------------------------------------------------------------
-ULONG FreetypeServerFont::GetKernPairs( ImplKernPairData** ppKernPairs ) const
+sal_uIntPtr FreetypeServerFont::GetKernPairs( ImplKernPairData** ppKernPairs ) const
{
// if no kerning info is available in the font file
*ppKernPairs = NULL;
@@ -1840,7 +1840,7 @@ ULONG FreetypeServerFont::GetKernPairs( ImplKernPairData** ppKernPairs ) const
pFTActivateSize( maSizeFT );
// first figure out which glyph pairs are involved in kerning
- ULONG nKernLength = 0;
+ sal_uIntPtr nKernLength = 0;
const FT_Byte* const pKern = mpFontInfo->GetTable( "kern", &nKernLength );
if( !pKern )
return 0;
@@ -1858,19 +1858,19 @@ ULONG FreetypeServerFont::GetKernPairs( ImplKernPairData** ppKernPairs ) const
aKernPair.mnKern = 0; // To prevent "is used uninitialized" warning...
const FT_Byte* pBuffer = pKern;
- ULONG nVersion = GetUShort( pBuffer+0 );
- USHORT nTableCnt = GetUShort( pBuffer+2 );
+ sal_uIntPtr nVersion = GetUShort( pBuffer+0 );
+ sal_uInt16 nTableCnt = GetUShort( pBuffer+2 );
// Microsoft/Old TrueType style kern table
if ( nVersion == 0 )
{
pBuffer += 4;
- for( USHORT nTableIdx = 0; nTableIdx < nTableCnt; ++nTableIdx )
+ for( sal_uInt16 nTableIdx = 0; nTableIdx < nTableCnt; ++nTableIdx )
{
- // USHORT nSubVersion = GetUShort( pBuffer+0 );
- // USHORT nSubLength = GetUShort( pBuffer+2 );
- USHORT nSubCoverage = GetUShort( pBuffer+4 );
+ // sal_uInt16 nSubVersion = GetUShort( pBuffer+0 );
+ // sal_uInt16 nSubLength = GetUShort( pBuffer+2 );
+ sal_uInt16 nSubCoverage = GetUShort( pBuffer+4 );
pBuffer += 6;
if( (nSubCoverage&0x03) != 0x01 ) // no interest in minimum info here
continue;
@@ -1878,7 +1878,7 @@ ULONG FreetypeServerFont::GetKernPairs( ImplKernPairData** ppKernPairs ) const
{
case 0: // version 0, kerning format 0
{
- USHORT nPairs = GetUShort( pBuffer );
+ sal_uInt16 nPairs = GetUShort( pBuffer );
pBuffer += 8; // skip search hints
aKernGlyphVector.reserve( aKernGlyphVector.size() + nPairs );
for( int i = 0; i < nPairs; ++i )
@@ -1895,21 +1895,21 @@ ULONG FreetypeServerFont::GetKernPairs( ImplKernPairData** ppKernPairs ) const
case 2: // version 0, kerning format 2
{
const FT_Byte* pSubTable = pBuffer;
- //USHORT nRowWidth = GetUShort( pBuffer+0 );
- USHORT nOfsLeft = GetUShort( pBuffer+2 );
- USHORT nOfsRight = GetUShort( pBuffer+4 );
- USHORT nOfsArray = GetUShort( pBuffer+6 );
+ //sal_uInt16 nRowWidth = GetUShort( pBuffer+0 );
+ sal_uInt16 nOfsLeft = GetUShort( pBuffer+2 );
+ sal_uInt16 nOfsRight = GetUShort( pBuffer+4 );
+ sal_uInt16 nOfsArray = GetUShort( pBuffer+6 );
pBuffer += 8;
const FT_Byte* pTmp = pSubTable + nOfsLeft;
- USHORT nFirstLeft = GetUShort( pTmp+0 );
- USHORT nLastLeft = GetUShort( pTmp+2 ) + nFirstLeft - 1;
+ sal_uInt16 nFirstLeft = GetUShort( pTmp+0 );
+ sal_uInt16 nLastLeft = GetUShort( pTmp+2 ) + nFirstLeft - 1;
pTmp = pSubTable + nOfsRight;
- USHORT nFirstRight = GetUShort( pTmp+0 );
- USHORT nLastRight = GetUShort( pTmp+2 ) + nFirstRight - 1;
+ sal_uInt16 nFirstRight = GetUShort( pTmp+0 );
+ sal_uInt16 nLastRight = GetUShort( pTmp+2 ) + nFirstRight - 1;
- ULONG nPairs = (ULONG)(nLastLeft - nFirstLeft + 1) * (nLastRight - nFirstRight + 1);
+ sal_uIntPtr nPairs = (sal_uIntPtr)(nLastLeft - nFirstLeft + 1) * (nLastRight - nFirstRight + 1);
aKernGlyphVector.reserve( aKernGlyphVector.size() + nPairs );
pTmp = pSubTable + nOfsArray;
@@ -1938,11 +1938,11 @@ ULONG FreetypeServerFont::GetKernPairs( ImplKernPairData** ppKernPairs ) const
nTableCnt = NEXT_U32( pBuffer );
if ( nVersion == 0x00010000 )
{
- for( USHORT nTableIdx = 0; nTableIdx < nTableCnt; ++nTableIdx )
+ for( sal_uInt16 nTableIdx = 0; nTableIdx < nTableCnt; ++nTableIdx )
{
- /*ULONG nLength =*/ NEXT_U32( pBuffer );
- USHORT nCoverage = NEXT_U16( pBuffer );
- /*USHORT nTupleIndex =*/ NEXT_U16( pBuffer );
+ /*sal_uIntPtr nLength =*/ NEXT_U32( pBuffer );
+ sal_uInt16 nCoverage = NEXT_U16( pBuffer );
+ /*sal_uInt16 nTupleIndex =*/ NEXT_U16( pBuffer );
// Kerning sub-table format, 0 through 3
sal_uInt8 nSubTableFormat = nCoverage & 0x00FF;
@@ -1951,7 +1951,7 @@ ULONG FreetypeServerFont::GetKernPairs( ImplKernPairData** ppKernPairs ) const
{
case 0: // version 0, kerning format 0
{
- USHORT nPairs = NEXT_U16( pBuffer );
+ sal_uInt16 nPairs = NEXT_U16( pBuffer );
pBuffer += 6; // skip search hints
aKernGlyphVector.reserve( aKernGlyphVector.size() + nPairs );
for( int i = 0; i < nPairs; ++i )
@@ -1967,20 +1967,20 @@ ULONG FreetypeServerFont::GetKernPairs( ImplKernPairData** ppKernPairs ) const
case 2: // version 0, kerning format 2
{
const FT_Byte* pSubTable = pBuffer;
- /*USHORT nRowWidth =*/ NEXT_U16( pBuffer );
- USHORT nOfsLeft = NEXT_U16( pBuffer );
- USHORT nOfsRight = NEXT_U16( pBuffer );
- USHORT nOfsArray = NEXT_U16( pBuffer );
+ /*sal_uInt16 nRowWidth =*/ NEXT_U16( pBuffer );
+ sal_uInt16 nOfsLeft = NEXT_U16( pBuffer );
+ sal_uInt16 nOfsRight = NEXT_U16( pBuffer );
+ sal_uInt16 nOfsArray = NEXT_U16( pBuffer );
const FT_Byte* pTmp = pSubTable + nOfsLeft;
- USHORT nFirstLeft = NEXT_U16( pTmp );
- USHORT nLastLeft = NEXT_U16( pTmp ) + nFirstLeft - 1;
+ sal_uInt16 nFirstLeft = NEXT_U16( pTmp );
+ sal_uInt16 nLastLeft = NEXT_U16( pTmp ) + nFirstLeft - 1;
pTmp = pSubTable + nOfsRight;
- USHORT nFirstRight = NEXT_U16( pTmp );
- USHORT nLastRight = NEXT_U16( pTmp ) + nFirstRight - 1;
+ sal_uInt16 nFirstRight = NEXT_U16( pTmp );
+ sal_uInt16 nLastRight = NEXT_U16( pTmp ) + nFirstRight - 1;
- ULONG nPairs = (ULONG)(nLastLeft - nFirstLeft + 1) * (nLastRight - nFirstRight + 1);
+ sal_uIntPtr nPairs = (sal_uIntPtr)(nLastLeft - nFirstLeft + 1) * (nLastRight - nFirstRight + 1);
aKernGlyphVector.reserve( aKernGlyphVector.size() + nPairs );
pTmp = pSubTable + nOfsArray;
@@ -2007,17 +2007,17 @@ ULONG FreetypeServerFont::GetKernPairs( ImplKernPairData** ppKernPairs ) const
}
// now create VCL's ImplKernPairData[] format for all glyph pairs
- ULONG nKernCount = aKernGlyphVector.size();
+ sal_uIntPtr nKernCount = aKernGlyphVector.size();
if( nKernCount )
{
// prepare glyphindex to character mapping
// TODO: this is needed to support VCL's existing kerning infrastructure,
// eliminate it up by redesigning kerning infrastructure to work with glyph indizes
- typedef std::hash_multimap<USHORT,sal_Unicode> Cmap;
+ typedef std::hash_multimap<sal_uInt16,sal_Unicode> Cmap;
Cmap aCmap;
for( sal_Unicode aChar = 0x0020; aChar < 0xFFFE; ++aChar )
{
- USHORT nGlyphIndex = GetGlyphIndex( aChar );
+ sal_uInt16 nGlyphIndex = GetGlyphIndex( aChar );
if( nGlyphIndex )
aCmap.insert( Cmap::value_type( nGlyphIndex, aChar ) );
}
@@ -2072,7 +2072,7 @@ ULONG FreetypeServerFont::GetKernPairs( ImplKernPairData** ppKernPairs ) const
class PolyArgs
{
public:
- PolyArgs( PolyPolygon& rPolyPoly, USHORT nMaxPoints );
+ PolyArgs( PolyPolygon& rPolyPoly, sal_uInt16 nMaxPoints );
~PolyArgs();
void AddPoint( long nX, long nY, PolyFlags);
@@ -2085,19 +2085,19 @@ private:
PolyPolygon& mrPolyPoly;
Point* mpPointAry;
- BYTE* mpFlagAry;
+ sal_uInt8* mpFlagAry;
FT_Vector maPosition;
- USHORT mnMaxPoints;
- USHORT mnPoints;
- USHORT mnPoly;
+ sal_uInt16 mnMaxPoints;
+ sal_uInt16 mnPoints;
+ sal_uInt16 mnPoly;
long mnHeight;
bool bHasOffline;
};
// -----------------------------------------------------------------------
-PolyArgs::PolyArgs( PolyPolygon& rPolyPoly, USHORT nMaxPoints )
+PolyArgs::PolyArgs( PolyPolygon& rPolyPoly, sal_uInt16 nMaxPoints )
: mrPolyPoly(rPolyPoly),
mnMaxPoints(nMaxPoints),
mnPoints(0),
@@ -2105,7 +2105,7 @@ PolyArgs::PolyArgs( PolyPolygon& rPolyPoly, USHORT nMaxPoints )
bHasOffline(false)
{
mpPointAry = new Point[ mnMaxPoints ];
- mpFlagAry = new BYTE [ mnMaxPoints ];
+ mpFlagAry = new sal_uInt8 [ mnMaxPoints ];
}
// -----------------------------------------------------------------------
@@ -2313,56 +2313,56 @@ bool FreetypeServerFont::ApplyGSUB( const ImplFontSelectData& rFSD )
{
#define MKTAG(s) ((((((s[0]<<8)+s[1])<<8)+s[2])<<8)+s[3])
- typedef std::vector<ULONG> ReqFeatureTagList;
+ typedef std::vector<sal_uIntPtr> ReqFeatureTagList;
ReqFeatureTagList aReqFeatureTagList;
if( rFSD.mbVertical )
aReqFeatureTagList.push_back( MKTAG("vert") );
- ULONG nRequestedScript = 0; //MKTAG("hani");//### TODO: where to get script?
- ULONG nRequestedLangsys = 0; //MKTAG("ZHT"); //### TODO: where to get langsys?
+ sal_uIntPtr nRequestedScript = 0; //MKTAG("hani");//### TODO: where to get script?
+ sal_uIntPtr nRequestedLangsys = 0; //MKTAG("ZHT"); //### TODO: where to get langsys?
// TODO: request more features depending on script and language system
if( aReqFeatureTagList.size() == 0) // nothing to do
return true;
// load GSUB table into memory
- ULONG nLength = 0;
+ sal_uIntPtr nLength = 0;
const FT_Byte* const pGsubBase = mpFontInfo->GetTable( "GSUB", &nLength );
if( !pGsubBase )
return false;
// parse GSUB header
const FT_Byte* pGsubHeader = pGsubBase;
- const USHORT nOfsScriptList = GetUShort( pGsubHeader+4 );
- const USHORT nOfsFeatureTable = GetUShort( pGsubHeader+6 );
- const USHORT nOfsLookupList = GetUShort( pGsubHeader+8 );
+ const sal_uInt16 nOfsScriptList = GetUShort( pGsubHeader+4 );
+ const sal_uInt16 nOfsFeatureTable = GetUShort( pGsubHeader+6 );
+ const sal_uInt16 nOfsLookupList = GetUShort( pGsubHeader+8 );
pGsubHeader += 10;
- typedef std::vector<USHORT> UshortList;
+ typedef std::vector<sal_uInt16> UshortList;
UshortList aFeatureIndexList;
UshortList aFeatureOffsetList;
// parse Script Table
const FT_Byte* pScriptHeader = pGsubBase + nOfsScriptList;
- const USHORT nCntScript = GetUShort( pScriptHeader+0 );
+ const sal_uInt16 nCntScript = GetUShort( pScriptHeader+0 );
pScriptHeader += 2;
- for( USHORT nScriptIndex = 0; nScriptIndex < nCntScript; ++nScriptIndex )
+ for( sal_uInt16 nScriptIndex = 0; nScriptIndex < nCntScript; ++nScriptIndex )
{
- const ULONG nScriptTag = GetUInt( pScriptHeader+0 ); // e.g. hani/arab/kana/hang
- const USHORT nOfsScriptTable= GetUShort( pScriptHeader+4 );
+ const sal_uIntPtr nScriptTag = GetUInt( pScriptHeader+0 ); // e.g. hani/arab/kana/hang
+ const sal_uInt16 nOfsScriptTable= GetUShort( pScriptHeader+4 );
pScriptHeader += 6; //###
if( (nScriptTag != nRequestedScript) && (nRequestedScript != 0) )
continue;
const FT_Byte* pScriptTable = pGsubBase + nOfsScriptList + nOfsScriptTable;
- const USHORT nDefaultLangsysOfs = GetUShort( pScriptTable+0 );
- const USHORT nCntLangSystem = GetUShort( pScriptTable+2 );
+ const sal_uInt16 nDefaultLangsysOfs = GetUShort( pScriptTable+0 );
+ const sal_uInt16 nCntLangSystem = GetUShort( pScriptTable+2 );
pScriptTable += 4;
- USHORT nLangsysOffset = 0;
+ sal_uInt16 nLangsysOffset = 0;
- for( USHORT nLangsysIndex = 0; nLangsysIndex < nCntLangSystem; ++nLangsysIndex )
+ for( sal_uInt16 nLangsysIndex = 0; nLangsysIndex < nCntLangSystem; ++nLangsysIndex )
{
- const ULONG nTag = GetUInt( pScriptTable+0 ); // e.g. KOR/ZHS/ZHT/JAN
- const USHORT nOffset= GetUShort( pScriptTable+4 );
+ const sal_uIntPtr nTag = GetUInt( pScriptTable+0 ); // e.g. KOR/ZHS/ZHT/JAN
+ const sal_uInt16 nOffset= GetUShort( pScriptTable+4 );
pScriptTable += 6;
if( (nTag != nRequestedLangsys) && (nRequestedLangsys != 0) )
continue;
@@ -2373,13 +2373,13 @@ bool FreetypeServerFont::ApplyGSUB( const ImplFontSelectData& rFSD )
if( (nDefaultLangsysOfs != 0) && (nDefaultLangsysOfs != nLangsysOffset) )
{
const FT_Byte* pLangSys = pGsubBase + nOfsScriptList + nOfsScriptTable + nDefaultLangsysOfs;
- const USHORT nReqFeatureIdx = GetUShort( pLangSys+2 );
- const USHORT nCntFeature = GetUShort( pLangSys+4 );
+ const sal_uInt16 nReqFeatureIdx = GetUShort( pLangSys+2 );
+ const sal_uInt16 nCntFeature = GetUShort( pLangSys+4 );
pLangSys += 6;
aFeatureIndexList.push_back( nReqFeatureIdx );
- for( USHORT i = 0; i < nCntFeature; ++i )
+ for( sal_uInt16 i = 0; i < nCntFeature; ++i )
{
- const USHORT nFeatureIndex = GetUShort( pLangSys );
+ const sal_uInt16 nFeatureIndex = GetUShort( pLangSys );
pLangSys += 2;
aFeatureIndexList.push_back( nFeatureIndex );
}
@@ -2388,13 +2388,13 @@ bool FreetypeServerFont::ApplyGSUB( const ImplFontSelectData& rFSD )
if( nLangsysOffset != 0 )
{
const FT_Byte* pLangSys = pGsubBase + nOfsScriptList + nOfsScriptTable + nLangsysOffset;
- const USHORT nReqFeatureIdx = GetUShort( pLangSys+2 );
- const USHORT nCntFeature = GetUShort( pLangSys+4 );
+ const sal_uInt16 nReqFeatureIdx = GetUShort( pLangSys+2 );
+ const sal_uInt16 nCntFeature = GetUShort( pLangSys+4 );
pLangSys += 6;
aFeatureIndexList.push_back( nReqFeatureIdx );
- for( USHORT i = 0; i < nCntFeature; ++i )
+ for( sal_uInt16 i = 0; i < nCntFeature; ++i )
{
- const USHORT nFeatureIndex = GetUShort( pLangSys );
+ const sal_uInt16 nFeatureIndex = GetUShort( pLangSys );
pLangSys += 2;
aFeatureIndexList.push_back( nFeatureIndex );
}
@@ -2409,12 +2409,12 @@ bool FreetypeServerFont::ApplyGSUB( const ImplFontSelectData& rFSD )
// parse Feature Table
const FT_Byte* pFeatureHeader = pGsubBase + nOfsFeatureTable;
- const USHORT nCntFeature = GetUShort( pFeatureHeader );
+ const sal_uInt16 nCntFeature = GetUShort( pFeatureHeader );
pFeatureHeader += 2;
- for( USHORT nFeatureIndex = 0; nFeatureIndex < nCntFeature; ++nFeatureIndex )
+ for( sal_uInt16 nFeatureIndex = 0; nFeatureIndex < nCntFeature; ++nFeatureIndex )
{
- const ULONG nTag = GetUInt( pFeatureHeader+0 ); // e.g. locl/vert/trad/smpl/liga/fina/...
- const USHORT nOffset= GetUShort( pFeatureHeader+4 );
+ const sal_uIntPtr nTag = GetUInt( pFeatureHeader+0 ); // e.g. locl/vert/trad/smpl/liga/fina/...
+ const sal_uInt16 nOffset= GetUShort( pFeatureHeader+4 );
pFeatureHeader += 6;
// short circuit some feature lookups
@@ -2429,11 +2429,11 @@ bool FreetypeServerFont::ApplyGSUB( const ImplFontSelectData& rFSD )
}
const FT_Byte* pFeatureTable = pGsubBase + nOfsFeatureTable + nOffset;
- const USHORT nCntLookups = GetUShort( pFeatureTable+0 );
+ const sal_uInt16 nCntLookups = GetUShort( pFeatureTable+0 );
pFeatureTable += 2;
- for( USHORT i = 0; i < nCntLookups; ++i )
+ for( sal_uInt16 i = 0; i < nCntLookups; ++i )
{
- const USHORT nLookupIndex = GetUShort( pFeatureTable );
+ const sal_uInt16 nLookupIndex = GetUShort( pFeatureTable );
pFeatureTable += 2;
aLookupIndexList.push_back( nLookupIndex );
}
@@ -2443,11 +2443,11 @@ bool FreetypeServerFont::ApplyGSUB( const ImplFontSelectData& rFSD )
// parse Lookup List
const FT_Byte* pLookupHeader = pGsubBase + nOfsLookupList;
- const USHORT nCntLookupTable = GetUShort( pLookupHeader );
+ const sal_uInt16 nCntLookupTable = GetUShort( pLookupHeader );
pLookupHeader += 2;
- for( USHORT nLookupIdx = 0; nLookupIdx < nCntLookupTable; ++nLookupIdx )
+ for( sal_uInt16 nLookupIdx = 0; nLookupIdx < nCntLookupTable; ++nLookupIdx )
{
- const USHORT nOffset = GetUShort( pLookupHeader );
+ const sal_uInt16 nOffset = GetUShort( pLookupHeader );
pLookupHeader += 2;
if( std::count( aLookupIndexList.begin(), aLookupIndexList.end(), nLookupIdx ) )
aLookupOffsetList.push_back( nOffset );
@@ -2456,43 +2456,43 @@ bool FreetypeServerFont::ApplyGSUB( const ImplFontSelectData& rFSD )
UshortList::const_iterator lookup_it = aLookupOffsetList.begin();
for(; lookup_it != aLookupOffsetList.end(); ++lookup_it )
{
- const USHORT nOfsLookupTable = *lookup_it;
+ const sal_uInt16 nOfsLookupTable = *lookup_it;
const FT_Byte* pLookupTable = pGsubBase + nOfsLookupList + nOfsLookupTable;
- const USHORT eLookupType = GetUShort( pLookupTable+0 );
- const USHORT nCntLookupSubtable = GetUShort( pLookupTable+4 );
+ const sal_uInt16 eLookupType = GetUShort( pLookupTable+0 );
+ const sal_uInt16 nCntLookupSubtable = GetUShort( pLookupTable+4 );
pLookupTable += 6;
// TODO: switch( eLookupType )
if( eLookupType != 1 ) // TODO: once we go beyond SingleSubst
continue;
- for( USHORT nSubTableIdx = 0; nSubTableIdx < nCntLookupSubtable; ++nSubTableIdx )
+ for( sal_uInt16 nSubTableIdx = 0; nSubTableIdx < nCntLookupSubtable; ++nSubTableIdx )
{
- const USHORT nOfsSubLookupTable = GetUShort( pLookupTable );
+ const sal_uInt16 nOfsSubLookupTable = GetUShort( pLookupTable );
pLookupTable += 2;
const FT_Byte* pSubLookup = pGsubBase + nOfsLookupList + nOfsLookupTable + nOfsSubLookupTable;
- const USHORT nFmtSubstitution = GetUShort( pSubLookup+0 );
- const USHORT nOfsCoverage = GetUShort( pSubLookup+2 );
+ const sal_uInt16 nFmtSubstitution = GetUShort( pSubLookup+0 );
+ const sal_uInt16 nOfsCoverage = GetUShort( pSubLookup+2 );
pSubLookup += 4;
- typedef std::pair<USHORT,USHORT> GlyphSubst;
+ typedef std::pair<sal_uInt16,sal_uInt16> GlyphSubst;
typedef std::vector<GlyphSubst> SubstVector;
SubstVector aSubstVector;
const FT_Byte* pCoverage = pGsubBase + nOfsLookupList + nOfsLookupTable + nOfsSubLookupTable + nOfsCoverage;
- const USHORT nFmtCoverage = GetUShort( pCoverage+0 );
+ const sal_uInt16 nFmtCoverage = GetUShort( pCoverage+0 );
pCoverage += 2;
switch( nFmtCoverage )
{
case 1: // Coverage Format 1
{
- const USHORT nCntGlyph = GetUShort( pCoverage );
+ const sal_uInt16 nCntGlyph = GetUShort( pCoverage );
pCoverage += 2;
aSubstVector.reserve( nCntGlyph );
- for( USHORT i = 0; i < nCntGlyph; ++i )
+ for( sal_uInt16 i = 0; i < nCntGlyph; ++i )
{
- const USHORT nGlyphId = GetUShort( pCoverage );
+ const sal_uInt16 nGlyphId = GetUShort( pCoverage );
pCoverage += 2;
aSubstVector.push_back( GlyphSubst( nGlyphId, 0 ) );
}
@@ -2501,16 +2501,16 @@ bool FreetypeServerFont::ApplyGSUB( const ImplFontSelectData& rFSD )
case 2: // Coverage Format 2
{
- const USHORT nCntRange = GetUShort( pCoverage );
+ const sal_uInt16 nCntRange = GetUShort( pCoverage );
pCoverage += 2;
for( int i = nCntRange; --i >= 0; )
{
- const UINT32 nGlyph0 = GetUShort( pCoverage+0 );
- const UINT32 nGlyph1 = GetUShort( pCoverage+2 );
- const USHORT nCovIdx = GetUShort( pCoverage+4 );
+ const sal_uInt32 nGlyph0 = GetUShort( pCoverage+0 );
+ const sal_uInt32 nGlyph1 = GetUShort( pCoverage+2 );
+ const sal_uInt16 nCovIdx = GetUShort( pCoverage+4 );
pCoverage += 6;
- for( UINT32 j = nGlyph0; j <= nGlyph1; ++j )
- aSubstVector.push_back( GlyphSubst( static_cast<USHORT>(j + nCovIdx), 0 ) );
+ for( sal_uInt32 j = nGlyph0; j <= nGlyph1; ++j )
+ aSubstVector.push_back( GlyphSubst( static_cast<sal_uInt16>(j + nCovIdx), 0 ) );
}
}
break;
@@ -2522,7 +2522,7 @@ bool FreetypeServerFont::ApplyGSUB( const ImplFontSelectData& rFSD )
{
case 1: // Single Substitution Format 1
{
- const USHORT nDeltaGlyphId = GetUShort( pSubLookup );
+ const sal_uInt16 nDeltaGlyphId = GetUShort( pSubLookup );
pSubLookup += 2;
for(; it != aSubstVector.end(); ++it )
(*it).second = (*it).first + nDeltaGlyphId;
@@ -2531,11 +2531,11 @@ bool FreetypeServerFont::ApplyGSUB( const ImplFontSelectData& rFSD )
case 2: // Single Substitution Format 2
{
- const USHORT nCntGlyph = GetUShort( pSubLookup );
+ const sal_uInt16 nCntGlyph = GetUShort( pSubLookup );
pSubLookup += 2;
for( int i = nCntGlyph; (it != aSubstVector.end()) && (--i>=0); ++it )
{
- const USHORT nGlyphId = GetUShort( pSubLookup );
+ const sal_uInt16 nGlyphId = GetUShort( pSubLookup );
pSubLookup += 2;
(*it).second = nGlyphId;
}
diff --git a/vcl/source/glyphs/gcach_ftyp.hxx b/vcl/source/glyphs/gcach_ftyp.hxx
index 5ebe70bcbdf9..1ab6539e2005 100644
--- a/vcl/source/glyphs/gcach_ftyp.hxx
+++ b/vcl/source/glyphs/gcach_ftyp.hxx
@@ -77,7 +77,7 @@ public:
const ExtraKernInfo* );
~FtFontInfo();
- const unsigned char* GetTable( const char*, ULONG* pLength=0 ) const;
+ const unsigned char* GetTable( const char*, sal_uIntPtr* pLength=0 ) const;
FT_FaceRec_* GetFaceFT();
void ReleaseFaceFT( FT_FaceRec_* );
@@ -191,9 +191,9 @@ public:
virtual bool GetGlyphBitmap8( int nGlyphIndex, RawBitmap& ) const;
virtual bool GetGlyphOutline( int nGlyphIndex, ::basegfx::B2DPolyPolygon& ) const;
virtual int GetGlyphKernValue( int nLeftGlyph, int nRightGlyph ) const;
- virtual ULONG GetKernPairs( ImplKernPairData** ) const;
+ virtual sal_uIntPtr GetKernPairs( ImplKernPairData** ) const;
- const unsigned char* GetTable( const char* pName, ULONG* pLength )
+ const unsigned char* GetTable( const char* pName, sal_uIntPtr* pLength )
{ return mpFontInfo->GetTable( pName, pLength ); }
int GetEmUnits() const;
const FT_Size_Metrics& GetMetricsFT() const { return maSizeFT->metrics; }
diff --git a/vcl/source/glyphs/gcach_layout.cxx b/vcl/source/glyphs/gcach_layout.cxx
index a9f9167062ba..7d61235e0bc7 100644..100755
--- a/vcl/source/glyphs/gcach_layout.cxx
+++ b/vcl/source/glyphs/gcach_layout.cxx
@@ -228,7 +228,7 @@ const void* IcuFontFromServerFont::getFontTable( LETag nICUTableTag ) const
pTagName[3] = (char)(nICUTableTag);
pTagName[4] = 0;
- ULONG nLength;
+ sal_uIntPtr nLength;
const unsigned char* pBuffer = mrServerFont.GetTable( pTagName, &nLength );
#ifdef VERBOSE_DEBUG
fprintf(stderr,"IcuGetTable(\"%s\") => %p\n", pTagName, pBuffer);
diff --git a/vcl/source/glyphs/gcach_rbmp.cxx b/vcl/source/glyphs/gcach_rbmp.cxx
index 5ea80da77794..c5ce53de4db6 100644..100755
--- a/vcl/source/glyphs/gcach_rbmp.cxx
+++ b/vcl/source/glyphs/gcach_rbmp.cxx
@@ -171,9 +171,9 @@ static void ImplRotate1_180( unsigned char* p1, const unsigned char* p2,
bool RawBitmap::Rotate( int nAngle )
{
- ULONG nNewScanlineSize = 0;
- ULONG nNewHeight = 0;
- ULONG nNewWidth = 0;
+ sal_uIntPtr nNewScanlineSize = 0;
+ sal_uIntPtr nNewHeight = 0;
+ sal_uIntPtr nNewWidth = 0;
// do inplace rotation or prepare double buffered rotation
switch( nAngle )
diff --git a/vcl/source/glyphs/gcach_vdev.cxx b/vcl/source/glyphs/gcach_vdev.cxx
index 8cd45cf58224..6d8172d014a2 100644
--- a/vcl/source/glyphs/gcach_vdev.cxx
+++ b/vcl/source/glyphs/gcach_vdev.cxx
@@ -137,7 +137,7 @@ void VirtDevServerFont::FetchFontMetric( ImplFontMetricData& rTo, long& rFactor
rTo.meWeight = aFSD.meWeight;
rTo.meItalic = aFSD.meItalic;
rTo.mePitch = aFSD.mePitch;
- rTo.mbDevice = FALSE;
+ rTo.mbDevice = sal_False;
}
// -----------------------------------------------------------------------
@@ -194,7 +194,7 @@ bool VirtDevServerFont::GetGlyphBitmap1( int nGlyphIndex, RawBitmap& ) const
String aGlyphStr( &aChar, 1 );
// draw bitmap
- vdev.SetOutputSizePixel( aSize, TRUE );
+ vdev.SetOutputSizePixel( aSize, sal_True );
vdev.DrawText( Point(0,0)-rGD.GetMetric().GetOffset(), aGlyphStr );
// create new glyph item
@@ -222,7 +222,7 @@ int VirtDevServerFont::GetGlyphKernValue( int, int ) const
// -----------------------------------------------------------------------
-ULONG VirtDevServerFont::GetKernPairs( ImplKernPairData** ppImplKernPairs ) const
+sal_uIntPtr VirtDevServerFont::GetKernPairs( ImplKernPairData** ppImplKernPairs ) const
{
Font aFont;
aFont.SetName ( GetFontSelData().maName );
@@ -235,7 +235,7 @@ ULONG VirtDevServerFont::GetKernPairs( ImplKernPairData** ppImplKernPairs ) cons
VirtualDevice vdev( 1 );
vdev.SetFont( aFont );
- ULONG nPairs = vdev.GetKerningPairCount();
+ sal_uIntPtr nPairs = vdev.GetKerningPairCount();
if( nPairs > 0 )
{
KerningPair* const pKernPairs = new KerningPair[ nPairs ];
@@ -244,7 +244,7 @@ ULONG VirtDevServerFont::GetKernPairs( ImplKernPairData** ppImplKernPairs ) cons
*ppImplKernPairs = new ImplKernPairData[ nPairs ];
ImplKernPairData* pTo = *ppImplKernPairs;
KerningPair* pFrom = pKernPairs;
- for ( ULONG n = 0; n < nPairs; n++ )
+ for ( sal_uIntPtr n = 0; n < nPairs; n++ )
{
pTo->mnChar1 = pFrom->nChar1;
pTo->mnChar2 = pFrom->nChar2;
diff --git a/vcl/source/glyphs/gcach_vdev.hxx b/vcl/source/glyphs/gcach_vdev.hxx
index e2349169ee13..dc03c0354047 100644
--- a/vcl/source/glyphs/gcach_vdev.hxx
+++ b/vcl/source/glyphs/gcach_vdev.hxx
@@ -44,7 +44,7 @@ protected:
static VirtDevServerFont* CreateFont( const ImplFontSelectData& );
virtual void FetchFontMetric( ImplFontMetricData&, long& rFactor ) const;
- virtual ULONG GetKernPairs( ImplKernPairData** ) const;
+ virtual sal_uIntPtr GetKernPairs( ImplKernPairData** ) const;
virtual int GetGlyphKernValue( int, int ) const;
virtual int GetGlyphIndex( sal_Unicode ) const;
diff --git a/vcl/source/glyphs/glyphcache.cxx b/vcl/source/glyphs/glyphcache.cxx
index 1953ecf553c4..e5670829b4d1 100644
--- a/vcl/source/glyphs/glyphcache.cxx
+++ b/vcl/source/glyphs/glyphcache.cxx
@@ -288,9 +288,9 @@ void GlyphCache::UncacheFont( ServerFont& rServerFont )
// -----------------------------------------------------------------------
-ULONG GlyphCache::CalcByteCount() const
+sal_uIntPtr GlyphCache::CalcByteCount() const
{
- ULONG nCacheSize = sizeof(*this);
+ sal_uIntPtr nCacheSize = sizeof(*this);
for( FontList::const_iterator it = maFontList.begin(); it != maFontList.end(); ++it )
{
const ServerFont* pSF = it->second;
diff --git a/vcl/source/glyphs/graphite_adaptors.cxx b/vcl/source/glyphs/graphite_adaptors.cxx
index f66f5b48e39e..b51c1f4724e0 100644
--- a/vcl/source/glyphs/graphite_adaptors.cxx
+++ b/vcl/source/glyphs/graphite_adaptors.cxx
@@ -246,7 +246,7 @@ void GraphiteFontAdaptor::getFontMetrics(float * ascent_out, float * descent_out
const void * GraphiteFontAdaptor::getTable(gr::fontTableId32 table_id, size_t * buffer_sz)
{
char tag_name[5] = {char(table_id >> 24), char(table_id >> 16), char(table_id >> 8), char(table_id), 0};
- ULONG temp = *buffer_sz;
+ sal_uIntPtr temp = *buffer_sz;
const void * const tbl_buf = static_cast<FreetypeServerFont &>(mrFont).GetTable(tag_name, &temp);
*buffer_sz = temp;
diff --git a/vcl/source/helper/canvasbitmap.cxx b/vcl/source/helper/canvasbitmap.cxx
index 2bc0ab94d272..29ef6c9a35c3 100644
--- a/vcl/source/helper/canvasbitmap.cxx
+++ b/vcl/source/helper/canvasbitmap.cxx
@@ -65,7 +65,7 @@ namespace
}
}
-void VclCanvasBitmap::setComponentInfo( ULONG redShift, ULONG greenShift, ULONG blueShift )
+void VclCanvasBitmap::setComponentInfo( sal_uIntPtr redShift, sal_uIntPtr greenShift, sal_uIntPtr blueShift )
{
// sort channels in increasing order of appearance in the pixel
// (starting with the least significant bits)
@@ -682,14 +682,14 @@ sal_Bool SAL_CALL VclCanvasBitmap::getIndex( uno::Sequence< double >& o_entry, s
{
vos::OGuard aGuard( Application::GetSolarMutex() );
- const USHORT nCount( m_pBmpAcc ?
+ const sal_uInt16 nCount( m_pBmpAcc ?
(m_pBmpAcc->HasPalette() ? m_pBmpAcc->GetPaletteEntryCount() : 0 ) : 0 );
OSL_ENSURE(nIndex >= 0 && nIndex < nCount,"Palette index out of range");
if( nIndex < 0 || nIndex >= nCount )
throw lang::IndexOutOfBoundsException(::rtl::OUString::createFromAscii("Palette index out of range"),
static_cast<rendering::XBitmapPalette*>(this));
- const BitmapColor aCol = m_pBmpAcc->GetPaletteColor(sal::static_int_cast<USHORT>(nIndex));
+ const BitmapColor aCol = m_pBmpAcc->GetPaletteColor(sal::static_int_cast<sal_uInt16>(nIndex));
o_entry.realloc(3);
double* pColor=o_entry.getArray();
pColor[0] = aCol.GetRed();
@@ -703,7 +703,7 @@ sal_Bool SAL_CALL VclCanvasBitmap::setIndex( const uno::Sequence< double >&, sal
{
vos::OGuard aGuard( Application::GetSolarMutex() );
- const USHORT nCount( m_pBmpAcc ?
+ const sal_uInt16 nCount( m_pBmpAcc ?
(m_pBmpAcc->HasPalette() ? m_pBmpAcc->GetPaletteEntryCount() : 0 ) : 0 );
OSL_ENSURE(nIndex >= 0 && nIndex < nCount,"Palette index out of range");
@@ -787,7 +787,7 @@ uno::Sequence<rendering::RGBColor> SAL_CALL VclCanvasBitmap::convertToRGB( const
for( sal_Size i=0; i<nLen; i+=nComponentsPerPixel )
{
const BitmapColor aCol = m_pBmpAcc->GetPaletteColor(
- sal::static_int_cast<USHORT>(deviceColor[i+m_nIndexIndex]));
+ sal::static_int_cast<sal_uInt16>(deviceColor[i+m_nIndexIndex]));
// TODO(F3): Convert result to sRGB color space
*pOut++ = rendering::RGBColor(toDoubleColor(aCol.GetRed()),
@@ -836,7 +836,7 @@ uno::Sequence<rendering::ARGBColor> SAL_CALL VclCanvasBitmap::convertToARGB( con
for( sal_Size i=0; i<nLen; i+=nComponentsPerPixel )
{
const BitmapColor aCol = m_pBmpAcc->GetPaletteColor(
- sal::static_int_cast<USHORT>(deviceColor[i+m_nIndexIndex]));
+ sal::static_int_cast<sal_uInt16>(deviceColor[i+m_nIndexIndex]));
// TODO(F3): Convert result to sRGB color space
const double nAlpha( m_nAlphaIndex != -1 ? 1.0 - deviceColor[i+m_nAlphaIndex] : 1.0 );
@@ -889,7 +889,7 @@ uno::Sequence<rendering::ARGBColor> SAL_CALL VclCanvasBitmap::convertToPARGB( co
for( sal_Size i=0; i<nLen; i+=nComponentsPerPixel )
{
const BitmapColor aCol = m_pBmpAcc->GetPaletteColor(
- sal::static_int_cast<USHORT>(deviceColor[i+m_nIndexIndex]));
+ sal::static_int_cast<sal_uInt16>(deviceColor[i+m_nIndexIndex]));
// TODO(F3): Convert result to sRGB color space
const double nAlpha( m_nAlphaIndex != -1 ? 1.0 - deviceColor[i+m_nAlphaIndex] : 1.0 );
@@ -1085,7 +1085,7 @@ uno::Sequence<double> SAL_CALL VclCanvasBitmap::convertFromIntegerColorSpace( co
for( sal_Size i=0; i<nLen; i+=nComponentsPerPixel )
{
const BitmapColor aCol = m_pBmpAcc->GetPaletteColor(
- sal::static_int_cast<USHORT>(deviceColor[i+m_nIndexIndex]));
+ sal::static_int_cast<sal_uInt16>(deviceColor[i+m_nIndexIndex]));
// TODO(F3): Convert result to sRGB color space
const double nAlpha( m_nAlphaIndex != -1 ? 1.0 - deviceColor[i+m_nAlphaIndex] : 1.0 );
@@ -1145,7 +1145,7 @@ uno::Sequence<rendering::RGBColor> SAL_CALL VclCanvasBitmap::convertIntegerToRGB
{
vos::OGuard aGuard( Application::GetSolarMutex() );
- const BYTE* pIn( reinterpret_cast<const BYTE*>(deviceColor.getConstArray()) );
+ const sal_uInt8* pIn( reinterpret_cast<const sal_uInt8*>(deviceColor.getConstArray()) );
const sal_Size nLen( deviceColor.getLength() );
const sal_Int32 nNumColors((nLen*8 + m_nBitsPerOutputPixel-1)/m_nBitsPerOutputPixel);
@@ -1181,7 +1181,7 @@ uno::Sequence<rendering::RGBColor> SAL_CALL VclCanvasBitmap::convertIntegerToRGB
const BitmapColor aCol =
m_bPalette ?
m_pBmpAcc->GetPaletteColor(
- sal::static_int_cast<USHORT>(
+ sal::static_int_cast<sal_uInt16>(
m_pBmpAcc->GetPixelFromData(
pIn, i ))) :
m_pBmpAcc->GetPixelFromData(pIn, i);
@@ -1200,7 +1200,7 @@ uno::Sequence<rendering::ARGBColor> SAL_CALL VclCanvasBitmap::convertIntegerToAR
{
vos::OGuard aGuard( Application::GetSolarMutex() );
- const BYTE* pIn( reinterpret_cast<const BYTE*>(deviceColor.getConstArray()) );
+ const sal_uInt8* pIn( reinterpret_cast<const sal_uInt8*>(deviceColor.getConstArray()) );
const sal_Size nLen( deviceColor.getLength() );
const sal_Int32 nNumColors((nLen*8 + m_nBitsPerOutputPixel-1)/m_nBitsPerOutputPixel);
@@ -1238,7 +1238,7 @@ uno::Sequence<rendering::ARGBColor> SAL_CALL VclCanvasBitmap::convertIntegerToAR
const BitmapColor aCol =
m_bPalette ?
m_pBmpAcc->GetPaletteColor(
- sal::static_int_cast<USHORT>(
+ sal::static_int_cast<sal_uInt16>(
m_pBmpAcc->GetPixelFromData(
pIn, i ))) :
m_pBmpAcc->GetPixelFromData(pIn, i);
@@ -1258,7 +1258,7 @@ uno::Sequence<rendering::ARGBColor> SAL_CALL VclCanvasBitmap::convertIntegerToPA
{
vos::OGuard aGuard( Application::GetSolarMutex() );
- const BYTE* pIn( reinterpret_cast<const BYTE*>(deviceColor.getConstArray()) );
+ const sal_uInt8* pIn( reinterpret_cast<const sal_uInt8*>(deviceColor.getConstArray()) );
const sal_Size nLen( deviceColor.getLength() );
const sal_Int32 nNumColors((nLen*8 + m_nBitsPerOutputPixel-1)/m_nBitsPerOutputPixel);
@@ -1297,7 +1297,7 @@ uno::Sequence<rendering::ARGBColor> SAL_CALL VclCanvasBitmap::convertIntegerToPA
const BitmapColor aCol =
m_bPalette ?
m_pBmpAcc->GetPaletteColor(
- sal::static_int_cast<USHORT>(
+ sal::static_int_cast<sal_uInt16>(
m_pBmpAcc->GetPixelFromData(
pIn, i ))) :
m_pBmpAcc->GetPixelFromData(pIn, i);
@@ -1321,7 +1321,7 @@ uno::Sequence< ::sal_Int8 > SAL_CALL VclCanvasBitmap::convertIntegerFromRGB( con
const sal_Int32 nNumBytes((nLen*m_nBitsPerOutputPixel+7)/8);
uno::Sequence< sal_Int8 > aRes(nNumBytes);
- BYTE* pColors=reinterpret_cast<BYTE*>(aRes.getArray());
+ sal_uInt8* pColors=reinterpret_cast<sal_uInt8*>(aRes.getArray());
if( m_aBmpEx.IsTransparent() )
{
@@ -1334,12 +1334,12 @@ uno::Sequence< ::sal_Int8 > SAL_CALL VclCanvasBitmap::convertIntegerFromRGB( con
const BitmapColor aCol2 =
m_bPalette ?
BitmapColor(
- sal::static_int_cast<BYTE>(m_pBmpAcc->GetBestPaletteIndex( aCol ))) :
+ sal::static_int_cast<sal_uInt8>(m_pBmpAcc->GetBestPaletteIndex( aCol ))) :
aCol;
m_pBmpAcc->SetPixelOnData(pColors,0,aCol2);
pColors += nNonAlphaBytes;
- *pColors++ = BYTE(255);
+ *pColors++ = sal_uInt8(255);
}
}
else
@@ -1352,7 +1352,7 @@ uno::Sequence< ::sal_Int8 > SAL_CALL VclCanvasBitmap::convertIntegerFromRGB( con
const BitmapColor aCol2 =
m_bPalette ?
BitmapColor(
- sal::static_int_cast<BYTE>(m_pBmpAcc->GetBestPaletteIndex( aCol ))) :
+ sal::static_int_cast<sal_uInt8>(m_pBmpAcc->GetBestPaletteIndex( aCol ))) :
aCol;
m_pBmpAcc->SetPixelOnData(pColors,i,aCol2);
@@ -1370,7 +1370,7 @@ uno::Sequence< ::sal_Int8 > SAL_CALL VclCanvasBitmap::convertIntegerFromARGB( co
const sal_Int32 nNumBytes((nLen*m_nBitsPerOutputPixel+7)/8);
uno::Sequence< sal_Int8 > aRes(nNumBytes);
- BYTE* pColors=reinterpret_cast<BYTE*>(aRes.getArray());
+ sal_uInt8* pColors=reinterpret_cast<sal_uInt8*>(aRes.getArray());
if( m_aBmpEx.IsTransparent() )
{
@@ -1383,7 +1383,7 @@ uno::Sequence< ::sal_Int8 > SAL_CALL VclCanvasBitmap::convertIntegerFromARGB( co
const BitmapColor aCol2 =
m_bPalette ?
BitmapColor(
- sal::static_int_cast<BYTE>(m_pBmpAcc->GetBestPaletteIndex( aCol ))) :
+ sal::static_int_cast<sal_uInt8>(m_pBmpAcc->GetBestPaletteIndex( aCol ))) :
aCol;
m_pBmpAcc->SetPixelOnData(pColors,0,aCol2);
@@ -1401,7 +1401,7 @@ uno::Sequence< ::sal_Int8 > SAL_CALL VclCanvasBitmap::convertIntegerFromARGB( co
const BitmapColor aCol2 =
m_bPalette ?
BitmapColor(
- sal::static_int_cast<BYTE>(m_pBmpAcc->GetBestPaletteIndex( aCol ))) :
+ sal::static_int_cast<sal_uInt8>(m_pBmpAcc->GetBestPaletteIndex( aCol ))) :
aCol;
m_pBmpAcc->SetPixelOnData(pColors,i,aCol2);
@@ -1419,7 +1419,7 @@ uno::Sequence< ::sal_Int8 > SAL_CALL VclCanvasBitmap::convertIntegerFromPARGB( c
const sal_Int32 nNumBytes((nLen*m_nBitsPerOutputPixel+7)/8);
uno::Sequence< sal_Int8 > aRes(nNumBytes);
- BYTE* pColors=reinterpret_cast<BYTE*>(aRes.getArray());
+ sal_uInt8* pColors=reinterpret_cast<sal_uInt8*>(aRes.getArray());
if( m_aBmpEx.IsTransparent() )
{
@@ -1433,7 +1433,7 @@ uno::Sequence< ::sal_Int8 > SAL_CALL VclCanvasBitmap::convertIntegerFromPARGB( c
const BitmapColor aCol2 =
m_bPalette ?
BitmapColor(
- sal::static_int_cast<BYTE>(m_pBmpAcc->GetBestPaletteIndex( aCol ))) :
+ sal::static_int_cast<sal_uInt8>(m_pBmpAcc->GetBestPaletteIndex( aCol ))) :
aCol;
m_pBmpAcc->SetPixelOnData(pColors,0,aCol2);
@@ -1451,7 +1451,7 @@ uno::Sequence< ::sal_Int8 > SAL_CALL VclCanvasBitmap::convertIntegerFromPARGB( c
const BitmapColor aCol2 =
m_bPalette ?
BitmapColor(
- sal::static_int_cast<BYTE>(m_pBmpAcc->GetBestPaletteIndex( aCol ))) :
+ sal::static_int_cast<sal_uInt8>(m_pBmpAcc->GetBestPaletteIndex( aCol ))) :
aCol;
m_pBmpAcc->SetPixelOnData(pColors,i,aCol2);
diff --git a/vcl/source/helper/canvastools.cxx b/vcl/source/helper/canvastools.cxx
index 71c306ff9bbb..36fdd514efe9 100644
--- a/vcl/source/helper/canvastools.cxx
+++ b/vcl/source/helper/canvastools.cxx
@@ -116,11 +116,11 @@ namespace vcl
{
RTL_LOGFILE_CONTEXT( aLog, "::vcl::unotools::polygonFromPoint2DSequence()" );
- const USHORT nCurrSize( sal::static_int_cast<USHORT>(points.getLength()) );
+ const sal_uInt16 nCurrSize( sal::static_int_cast<sal_uInt16>(points.getLength()) );
::Polygon aPoly( nCurrSize );
- USHORT nCurrPoint;
+ sal_uInt16 nCurrPoint;
for( nCurrPoint=0; nCurrPoint<nCurrSize; ++nCurrPoint )
aPoly[nCurrPoint] = pointFromRealPoint2D( points[nCurrPoint] );
@@ -254,7 +254,7 @@ namespace vcl
{
const rendering::ARGBColor& rColor=aARGBColors[x];
rWriteAcc->SetPixel( aRect.Y1, x,
- (BYTE)rWriteAcc->GetBestPaletteIndex(
+ (sal_uInt8)rWriteAcc->GetBestPaletteIndex(
BitmapColor( toByteColor(rColor.Red),
toByteColor(rColor.Green),
toByteColor(rColor.Blue))) );
@@ -286,7 +286,7 @@ namespace vcl
{
const rendering::RGBColor& rColor=aRGBColors[x];
rWriteAcc->SetPixel( aRect.Y1, x,
- (BYTE)rWriteAcc->GetBestPaletteIndex(
+ (sal_uInt8)rWriteAcc->GetBestPaletteIndex(
BitmapColor( toByteColor(rColor.Red),
toByteColor(rColor.Green),
toByteColor(rColor.Blue))) );
@@ -384,8 +384,8 @@ namespace vcl
else
nDepth = 8;
- const USHORT nPaletteEntries(
- sal::static_int_cast<USHORT>(
+ const sal_uInt16 nPaletteEntries(
+ sal::static_int_cast<sal_uInt16>(
std::min(sal_Int32(255), nEntryCount)));
// copy palette entries
@@ -394,7 +394,7 @@ namespace vcl
uno::Reference<rendering::XColorSpace> xPalColorSpace( xPalette->getColorSpace() );
uno::Sequence<double> aPaletteEntry;
- for( USHORT j=0; j<nPaletteEntries; ++j )
+ for( sal_uInt16 j=0; j<nPaletteEntries; ++j )
{
if( !xPalette->getIndex(aPaletteEntry,j) &&
nAlphaDepth == 0 )
@@ -422,14 +422,14 @@ namespace vcl
( nDepth <= 8 ) ? 8 : 24;
::Bitmap aBitmap( aPixelSize,
- sal::static_int_cast<USHORT>(nDepth),
+ sal::static_int_cast<sal_uInt16>(nDepth),
aLayout.Palette.is() ? &aPalette : NULL );
::Bitmap aAlpha;
if( nAlphaDepth )
aAlpha = ::Bitmap( aPixelSize,
- sal::static_int_cast<USHORT>(nAlphaDepth),
+ sal::static_int_cast<sal_uInt16>(nAlphaDepth),
&::Bitmap::GetGreyPalette(
- sal::static_int_cast<USHORT>(1L << nAlphaDepth)) );
+ sal::static_int_cast<sal_uInt16>(1L << nAlphaDepth)) );
{ // limit scoped access
ScopedBitmapWriteAccess pWriteAccess( aBitmap.AcquireWriteAccess(),
diff --git a/vcl/source/helper/lazydelete.cxx b/vcl/source/helper/lazydelete.cxx
index 7b244781c3c7..f5ecd02f39ae 100644
--- a/vcl/source/helper/lazydelete.cxx
+++ b/vcl/source/helper/lazydelete.cxx
@@ -68,7 +68,7 @@ void LazyDelete::flush()
// specialized is_less function for Window
template<> bool LazyDeletor<Window>::is_less( Window* left, Window* right )
{
- return (left != right && right->IsChild( left, TRUE )) ? true : false;
+ return (left != right && right->IsChild( left, sal_True )) ? true : false;
}
// specialized is_less function for Menu
diff --git a/vcl/source/helper/smartid.cxx b/vcl/source/helper/smartid.cxx
index c367aeb2bce5..15bbd3129908 100755
--- a/vcl/source/helper/smartid.cxx
+++ b/vcl/source/helper/smartid.cxx
@@ -32,9 +32,9 @@
struct ImplSmartIdData
{
String aUId;
- ULONG nUId;
- BOOL bHasStringId;
- BOOL bHasNumericId;
+ sal_uIntPtr nUId;
+ sal_Bool bHasStringId;
+ sal_Bool bHasNumericId;
};
@@ -45,8 +45,8 @@ ImplSmartIdData* SmartId::GetSmartIdData()
mpData = new ImplSmartIdData;
// mpData->aUId = "";
mpData->nUId = 0;
- mpData->bHasStringId = FALSE;
- mpData->bHasNumericId = FALSE;
+ mpData->bHasStringId = sal_False;
+ mpData->bHasNumericId = sal_False;
}
return mpData;
}
@@ -56,23 +56,23 @@ SmartId::SmartId( const String& rId )
: mpData( NULL )
{
GetSmartIdData()->aUId = rId;
- GetSmartIdData()->bHasStringId = TRUE;
+ GetSmartIdData()->bHasStringId = sal_True;
}
-SmartId::SmartId( ULONG nId )
+SmartId::SmartId( sal_uIntPtr nId )
: mpData( NULL )
{
GetSmartIdData()->nUId = nId;
- GetSmartIdData()->bHasNumericId = TRUE;
+ GetSmartIdData()->bHasNumericId = sal_True;
}
-SmartId::SmartId( const String& rId, ULONG nId )
+SmartId::SmartId( const String& rId, sal_uIntPtr nId )
: mpData( NULL )
{
GetSmartIdData()->aUId = rId;
- GetSmartIdData()->bHasStringId = TRUE;
+ GetSmartIdData()->bHasStringId = sal_True;
GetSmartIdData()->nUId = nId;
- GetSmartIdData()->bHasNumericId = TRUE;
+ GetSmartIdData()->bHasNumericId = sal_True;
}
SmartId::SmartId()
@@ -146,28 +146,28 @@ void SmartId::UpdateId( const SmartId& rId, SmartIdUpdateMode aMode )
}
}
-BOOL SmartId::HasNumeric() const
+sal_Bool SmartId::HasNumeric() const
{
if ( !mpData )
- return FALSE;
+ return sal_False;
else
return mpData->bHasNumericId;
}
-BOOL SmartId::HasString() const
+sal_Bool SmartId::HasString() const
{
if ( !mpData )
- return FALSE;
+ return sal_False;
else
return mpData->bHasStringId;
}
-BOOL SmartId::HasAny() const
+sal_Bool SmartId::HasAny() const
{
return mpData != NULL;
}
-ULONG SmartId::GetNum() const
+sal_uIntPtr SmartId::GetNum() const
{
if ( !mpData )
return 0;
@@ -198,20 +198,20 @@ String SmartId::GetText() const // return String for UI usage
return aRes;
}
-BOOL SmartId::Matches( const String &rId )const
+sal_Bool SmartId::Matches( const String &rId )const
{
if ( HasString() )
return GetStr().EqualsIgnoreCaseAscii( rId );
else
- return FALSE;
+ return sal_False;
}
-BOOL SmartId::Matches( const ULONG nId ) const
+sal_Bool SmartId::Matches( const sal_uIntPtr nId ) const
{
if ( HasNumeric() )
return GetNum() == nId;
else
- return FALSE;
+ return sal_False;
}
/******************************************************************************
@@ -220,17 +220,17 @@ If both Ids have Strings the result of Matching these is returned.
Numbers are then Ignored.
Else Matching Numbers is attempted.
******************************************************************************/
-BOOL SmartId::Matches( const SmartId &rId ) const
+sal_Bool SmartId::Matches( const SmartId &rId ) const
{
if ( !mpData || !rId.mpData )
- return FALSE;
+ return sal_False;
else if ( HasString() && rId.HasString() )
return Matches( rId.GetStr() );
else
return rId.HasNumeric() && Matches( rId.GetNum() );
}
-BOOL SmartId::Equals( const SmartId &rId ) const
+sal_Bool SmartId::Equals( const SmartId &rId ) const
{
if ( mpData && rId.mpData )
return mpData->aUId.EqualsIgnoreCaseAscii( rId.mpData->aUId )
@@ -238,17 +238,17 @@ BOOL SmartId::Equals( const SmartId &rId ) const
&& mpData->nUId == rId.mpData->nUId
&& mpData->bHasNumericId == rId.mpData->bHasNumericId;
else if ( !mpData && !rId.mpData )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
-BOOL SmartId::operator == ( const SmartId& rRight ) const
+sal_Bool SmartId::operator == ( const SmartId& rRight ) const
{
return Equals( rRight );
}
-BOOL SmartId::operator < ( const SmartId& rRight ) const
+sal_Bool SmartId::operator < ( const SmartId& rRight ) const
{
if ( HasString() && rRight.HasString() && GetStr() != rRight.GetStr() )
return GetStr() < rRight.GetStr();
diff --git a/vcl/source/helper/strhelper.cxx b/vcl/source/helper/strhelper.cxx
index db622073cea9..03f157d4b52b 100644
--- a/vcl/source/helper/strhelper.cxx
+++ b/vcl/source/helper/strhelper.cxx
@@ -325,7 +325,7 @@ int GetCommandLineTokenCount( const ByteString& rLine )
return nTokenCount;
}
-String WhitespaceToSpace( const String& rLine, BOOL bProtect )
+String WhitespaceToSpace( const String& rLine, sal_Bool bProtect )
{
int nLen = rLine.Len();
if( ! nLen )
@@ -357,11 +357,11 @@ String WhitespaceToSpace( const String& rLine, BOOL bProtect )
pRun++;
}
else if( bProtect && *pRun == '`' )
- CopyUntil( pLeap, pRun, '`', TRUE );
+ CopyUntil( pLeap, pRun, '`', sal_True );
else if( bProtect && *pRun == '\'' )
- CopyUntil( pLeap, pRun, '\'', TRUE );
+ CopyUntil( pLeap, pRun, '\'', sal_True );
else if( bProtect && *pRun == '"' )
- CopyUntil( pLeap, pRun, '"', TRUE );
+ CopyUntil( pLeap, pRun, '"', sal_True );
else
{
*pLeap = *pRun;
@@ -382,7 +382,7 @@ String WhitespaceToSpace( const String& rLine, BOOL bProtect )
return aRet;
}
-ByteString WhitespaceToSpace( const ByteString& rLine, BOOL bProtect )
+ByteString WhitespaceToSpace( const ByteString& rLine, sal_Bool bProtect )
{
int nLen = rLine.Len();
if( ! nLen )
@@ -414,11 +414,11 @@ ByteString WhitespaceToSpace( const ByteString& rLine, BOOL bProtect )
pRun++;
}
else if( bProtect && *pRun == '`' )
- CopyUntil( pLeap, pRun, '`', TRUE );
+ CopyUntil( pLeap, pRun, '`', sal_True );
else if( bProtect && *pRun == '\'' )
- CopyUntil( pLeap, pRun, '\'', TRUE );
+ CopyUntil( pLeap, pRun, '\'', sal_True );
else if( bProtect && *pRun == '"' )
- CopyUntil( pLeap, pRun, '"', TRUE );
+ CopyUntil( pLeap, pRun, '"', sal_True );
else
{
*pLeap = *pRun;
diff --git a/vcl/source/helper/threadex.cxx b/vcl/source/helper/threadex.cxx
index 133b19aa0538..f73dc9dd374d 100644
--- a/vcl/source/helper/threadex.cxx
+++ b/vcl/source/helper/threadex.cxx
@@ -111,8 +111,8 @@ long SolarThreadExecutor::impl_execute( const TimeValue* _pTimeout )
{
osl_resetCondition( m_aStart );
osl_resetCondition( m_aFinish );
- ULONG nSolarMutexCount = Application::ReleaseSolarMutex();
- ULONG nEvent = Application::PostUserEvent( LINK( this, SolarThreadExecutor, worker ) );
+ sal_uIntPtr nSolarMutexCount = Application::ReleaseSolarMutex();
+ sal_uIntPtr nEvent = Application::PostUserEvent( LINK( this, SolarThreadExecutor, worker ) );
if ( osl_cond_result_timeout == osl_waitCondition( m_aStart, _pTimeout ) )
{
m_bTimeout = true;
diff --git a/vcl/source/helper/xconnection.cxx b/vcl/source/helper/xconnection.cxx
index caf7ee237d67..b8c2aace4c1d 100644
--- a/vcl/source/helper/xconnection.cxx
+++ b/vcl/source/helper/xconnection.cxx
@@ -38,7 +38,7 @@ namespace vcl
{
class SolarMutexReleaser
{
- ULONG mnReleased;
+ sal_uIntPtr mnReleased;
public:
SolarMutexReleaser()
{
diff --git a/vcl/source/window/accel.cxx b/vcl/source/window/accel.cxx
index 3018236fff1a..31f2fe4dce67 100644
--- a/vcl/source/window/accel.cxx
+++ b/vcl/source/window/accel.cxx
@@ -46,7 +46,7 @@
DECLARE_TABLE( ImplAccelTable, ImplAccelEntry* )
DECLARE_LIST( ImplAccelList, ImplAccelEntry* )
-#define ACCELENTRY_NOTFOUND ((USHORT)0xFFFF)
+#define ACCELENTRY_NOTFOUND ((sal_uInt16)0xFFFF)
// =======================================================================
@@ -63,14 +63,14 @@ DBG_NAME( Accelerator )
// =======================================================================
-USHORT ImplAccelEntryGetIndex( ImplAccelList* pList, USHORT nId,
- USHORT* pIndex = NULL )
+sal_uInt16 ImplAccelEntryGetIndex( ImplAccelList* pList, sal_uInt16 nId,
+ sal_uInt16* pIndex = NULL )
{
- ULONG nLow;
- ULONG nHigh;
- ULONG nMid;
- ULONG nCount = pList->Count();
- USHORT nCompareId;
+ sal_uIntPtr nLow;
+ sal_uIntPtr nHigh;
+ sal_uIntPtr nMid;
+ sal_uIntPtr nCount = pList->Count();
+ sal_uInt16 nCompareId;
// Abpruefen, ob der erste Key groesser als der Vergleichskey ist
if ( !nCount || (nId < pList->GetObject( 0 )->mnId) )
@@ -94,7 +94,7 @@ USHORT ImplAccelEntryGetIndex( ImplAccelList* pList, USHORT nId,
if ( nId > nCompareId )
nLow = nMid + 1;
else
- return (USHORT)nMid;
+ return (sal_uInt16)nMid;
}
}
while ( nLow <= nHigh );
@@ -102,9 +102,9 @@ USHORT ImplAccelEntryGetIndex( ImplAccelList* pList, USHORT nId,
if ( pIndex )
{
if ( nId > nCompareId )
- *pIndex = (USHORT)(nMid+1);
+ *pIndex = (sal_uInt16)(nMid+1);
else
- *pIndex = (USHORT)nMid;
+ *pIndex = (sal_uInt16)nMid;
}
return ACCELENTRY_NOTFOUND;
@@ -114,8 +114,8 @@ USHORT ImplAccelEntryGetIndex( ImplAccelList* pList, USHORT nId,
static void ImplAccelEntryInsert( ImplAccelList* pList, ImplAccelEntry* pEntry )
{
- USHORT nInsIndex;
- USHORT nIndex = ImplAccelEntryGetIndex( pList, pEntry->mnId, &nInsIndex );
+ sal_uInt16 nInsIndex;
+ sal_uInt16 nIndex = ImplAccelEntryGetIndex( pList, pEntry->mnId, &nInsIndex );
if ( nIndex != ACCELENTRY_NOTFOUND )
{
@@ -128,17 +128,17 @@ static void ImplAccelEntryInsert( ImplAccelList* pList, ImplAccelEntry* pEntry )
}
while ( nIndex < pList->Count() );
- pList->Insert( pEntry, (ULONG)nIndex );
+ pList->Insert( pEntry, (sal_uIntPtr)nIndex );
}
else
- pList->Insert( pEntry, (ULONG)nInsIndex );
+ pList->Insert( pEntry, (sal_uIntPtr)nInsIndex );
}
// -----------------------------------------------------------------------
-static USHORT ImplAccelEntryGetFirstPos( ImplAccelList* pList, USHORT nId )
+static sal_uInt16 ImplAccelEntryGetFirstPos( ImplAccelList* pList, sal_uInt16 nId )
{
- USHORT nIndex = ImplAccelEntryGetIndex( pList, nId );
+ sal_uInt16 nIndex = ImplAccelEntryGetIndex( pList, nId );
if ( nIndex != ACCELENTRY_NOTFOUND )
{
while ( nIndex )
@@ -161,7 +161,7 @@ void Accelerator::ImplInit()
{
mnCurId = 0;
mnCurRepeat = 0;
- mbIsCancel = FALSE;
+ mbIsCancel = sal_False;
mpDel = NULL;
}
@@ -191,7 +191,7 @@ void Accelerator::ImplCopyData( ImplAccelData& rAccelData )
else
pEntry->mpAutoAccel = NULL;
- mpData->maKeyTable.Insert( (ULONG)pEntry->maKeyCode.GetFullKeyCode(), pEntry );
+ mpData->maKeyTable.Insert( (sal_uIntPtr)pEntry->maKeyCode.GetFullKeyCode(), pEntry );
mpData->maIdList.Insert( pEntry, LIST_APPEND );
pEntry = rAccelData.maIdList.Next();
@@ -217,18 +217,18 @@ void Accelerator::ImplDeleteData()
// -----------------------------------------------------------------------
-void Accelerator::ImplInsertAccel( USHORT nItemId, const KeyCode& rKeyCode,
- BOOL bEnable, Accelerator* pAutoAccel )
+void Accelerator::ImplInsertAccel( sal_uInt16 nItemId, const KeyCode& rKeyCode,
+ sal_Bool bEnable, Accelerator* pAutoAccel )
{
DBG_CHKTHIS( Accelerator, NULL );
DBG_ASSERT( nItemId, "Accelerator::InsertItem(): ItemId == 0" );
if ( rKeyCode.IsFunction() )
{
- USHORT nCode1;
- USHORT nCode2;
- USHORT nCode3;
- USHORT nCode4;
+ sal_uInt16 nCode1;
+ sal_uInt16 nCode2;
+ sal_uInt16 nCode3;
+ sal_uInt16 nCode4;
ImplGetKeyCode( rKeyCode.GetFunction(), nCode1, nCode2, nCode3, nCode4 );
if ( nCode1 )
ImplInsertAccel( nItemId, KeyCode( nCode1, nCode1 ), bEnable, pAutoAccel );
@@ -256,7 +256,7 @@ void Accelerator::ImplInsertAccel( USHORT nItemId, const KeyCode& rKeyCode,
pEntry->mbEnabled = bEnable;
// Ab in die Tabellen
- ULONG nCode = rKeyCode.GetFullKeyCode();
+ sal_uIntPtr nCode = rKeyCode.GetFullKeyCode();
if ( !nCode )
{
DBG_ERROR( "Accelerator::InsertItem(): KeyCode with KeyCode 0 not allowed" );
@@ -315,9 +315,9 @@ void Accelerator::ImplLoadRes( const ResId& rResId )
GetRes( rResId );
maHelpStr = ReadStringRes();
- ULONG nObjFollows = ReadLongRes();
+ sal_uIntPtr nObjFollows = ReadLongRes();
- for( ULONG i = 0; i < nObjFollows; i++ )
+ for( sal_uIntPtr i = 0; i < nObjFollows; i++ )
{
InsertItem( ResId( (RSHEADER_TYPE *)GetClassRes(), *rResId.GetResMgr() ) );
IncrementRes( GetObjSizeRes( (RSHEADER_TYPE *)GetClassRes() ) );
@@ -332,7 +332,7 @@ Accelerator::~Accelerator()
// AccelManager benachrichtigen, das Accelrator geloescht wurde
if ( mpDel )
- *mpDel = TRUE;
+ *mpDel = sal_True;
ImplDeleteData();
delete mpData;
@@ -361,9 +361,9 @@ void Accelerator::Select()
// -----------------------------------------------------------------------
-void Accelerator::InsertItem( USHORT nItemId, const KeyCode& rKeyCode )
+void Accelerator::InsertItem( sal_uInt16 nItemId, const KeyCode& rKeyCode )
{
- ImplInsertAccel( nItemId, rKeyCode, TRUE, NULL );
+ ImplInsertAccel( nItemId, rKeyCode, sal_True, NULL );
}
// -----------------------------------------------------------------------
@@ -372,15 +372,15 @@ void Accelerator::InsertItem( const ResId& rResId )
{
DBG_CHKTHIS( Accelerator, NULL );
- ULONG nObjMask;
- USHORT nAccelKeyId;
- USHORT bDisable;
+ sal_uIntPtr nObjMask;
+ sal_uInt16 nAccelKeyId;
+ sal_uInt16 bDisable;
KeyCode aKeyCode;
Accelerator* pAutoAccel = NULL;
GetRes( rResId.SetRT( RSC_ACCELITEM ) );
nObjMask = ReadLongRes();
- nAccelKeyId = sal::static_int_cast<USHORT>(ReadLongRes());
+ nAccelKeyId = sal::static_int_cast<sal_uInt16>(ReadLongRes());
bDisable = ReadShortRes();
if ( nObjMask & ACCELITEM_KEY )
@@ -403,22 +403,22 @@ void Accelerator::InsertItem( const ResId& rResId )
// -----------------------------------------------------------------------
-void Accelerator::RemoveItem( USHORT nItemId )
+void Accelerator::RemoveItem( sal_uInt16 nItemId )
{
DBG_CHKTHIS( Accelerator, NULL );
// Aus der Id-Liste entfernen
- USHORT nIndex = ImplAccelEntryGetFirstPos( &(mpData->maIdList), nItemId );
+ sal_uInt16 nIndex = ImplAccelEntryGetFirstPos( &(mpData->maIdList), nItemId );
if ( nIndex != ACCELENTRY_NOTFOUND )
{
- USHORT nItemCount = GetItemCount();
+ sal_uInt16 nItemCount = GetItemCount();
do
{
- ImplAccelEntry* pEntry = mpData->maIdList.GetObject( (ULONG)nIndex );
+ ImplAccelEntry* pEntry = mpData->maIdList.GetObject( (sal_uIntPtr)nIndex );
if ( pEntry && pEntry->mnId == nItemId )
{
mpData->maKeyTable.Remove( pEntry->maKeyCode.GetFullKeyCode() );
- mpData->maIdList.Remove( (ULONG)nIndex );
+ mpData->maIdList.Remove( (sal_uIntPtr)nIndex );
// AutoResAccel zerstoeren
if ( pEntry->mpAutoAccel )
@@ -443,18 +443,18 @@ void Accelerator::RemoveItem( const KeyCode rKeyCode )
if ( pEntry )
{
// Aus der Id-Liste entfernen
- USHORT nIndex = ImplAccelEntryGetFirstPos( &(mpData->maIdList), pEntry->mnId );
- USHORT nItemCount = GetItemCount();
+ sal_uInt16 nIndex = ImplAccelEntryGetFirstPos( &(mpData->maIdList), pEntry->mnId );
+ sal_uInt16 nItemCount = GetItemCount();
do
{
- if ( mpData->maIdList.GetObject( (ULONG)nIndex ) == pEntry )
+ if ( mpData->maIdList.GetObject( (sal_uIntPtr)nIndex ) == pEntry )
break;
nIndex++;
}
while ( nIndex < nItemCount );
mpData->maKeyTable.Remove( rKeyCode.GetFullKeyCode() );
- mpData->maIdList.Remove( (ULONG)nIndex );
+ mpData->maIdList.Remove( (sal_uIntPtr)nIndex );
// AutoResAccel zerstoeren
if ( pEntry->mpAutoAccel )
@@ -477,20 +477,20 @@ void Accelerator::Clear()
// -----------------------------------------------------------------------
-USHORT Accelerator::GetItemCount() const
+sal_uInt16 Accelerator::GetItemCount() const
{
DBG_CHKTHIS( Accelerator, NULL );
- return (USHORT)mpData->maIdList.Count();
+ return (sal_uInt16)mpData->maIdList.Count();
}
// -----------------------------------------------------------------------
-USHORT Accelerator::GetItemId( USHORT nPos ) const
+sal_uInt16 Accelerator::GetItemId( sal_uInt16 nPos ) const
{
DBG_CHKTHIS( Accelerator, NULL );
- ImplAccelEntry* pEntry = mpData->maIdList.GetObject( (ULONG)nPos );
+ ImplAccelEntry* pEntry = mpData->maIdList.GetObject( (sal_uIntPtr)nPos );
if ( pEntry )
return pEntry->mnId;
else
@@ -499,11 +499,11 @@ USHORT Accelerator::GetItemId( USHORT nPos ) const
// -----------------------------------------------------------------------
-KeyCode Accelerator::GetItemKeyCode( USHORT nPos ) const
+KeyCode Accelerator::GetItemKeyCode( sal_uInt16 nPos ) const
{
DBG_CHKTHIS( Accelerator, NULL );
- ImplAccelEntry* pEntry = mpData->maIdList.GetObject( (ULONG)nPos );
+ ImplAccelEntry* pEntry = mpData->maIdList.GetObject( (sal_uIntPtr)nPos );
if ( pEntry )
return pEntry->maKeyCode;
else
@@ -512,7 +512,7 @@ KeyCode Accelerator::GetItemKeyCode( USHORT nPos ) const
// -----------------------------------------------------------------------
-USHORT Accelerator::GetItemId( const KeyCode& rKeyCode ) const
+sal_uInt16 Accelerator::GetItemId( const KeyCode& rKeyCode ) const
{
DBG_CHKTHIS( Accelerator, NULL );
@@ -525,30 +525,30 @@ USHORT Accelerator::GetItemId( const KeyCode& rKeyCode ) const
// -----------------------------------------------------------------------
-KeyCode Accelerator::GetKeyCode( USHORT nItemId ) const
+KeyCode Accelerator::GetKeyCode( sal_uInt16 nItemId ) const
{
DBG_CHKTHIS( Accelerator, NULL );
- USHORT nIndex = ImplAccelEntryGetFirstPos( &(mpData->maIdList), nItemId );
+ sal_uInt16 nIndex = ImplAccelEntryGetFirstPos( &(mpData->maIdList), nItemId );
if ( nIndex != ACCELENTRY_NOTFOUND )
- return mpData->maIdList.GetObject( (ULONG)nIndex )->maKeyCode;
+ return mpData->maIdList.GetObject( (sal_uIntPtr)nIndex )->maKeyCode;
else
return KeyCode();
}
// -----------------------------------------------------------------------
-BOOL Accelerator::IsIdValid( USHORT nItemId ) const
+sal_Bool Accelerator::IsIdValid( sal_uInt16 nItemId ) const
{
DBG_CHKTHIS( Accelerator, NULL );
- USHORT nIndex = ImplAccelEntryGetIndex( &(mpData->maIdList), nItemId );
+ sal_uInt16 nIndex = ImplAccelEntryGetIndex( &(mpData->maIdList), nItemId );
return (nIndex != ACCELENTRY_NOTFOUND);
}
// -----------------------------------------------------------------------
-BOOL Accelerator::IsKeyCodeValid( const KeyCode rKeyCode ) const
+sal_Bool Accelerator::IsKeyCodeValid( const KeyCode rKeyCode ) const
{
DBG_CHKTHIS( Accelerator, NULL );
@@ -558,7 +558,7 @@ BOOL Accelerator::IsKeyCodeValid( const KeyCode rKeyCode ) const
// -----------------------------------------------------------------------
-BOOL Accelerator::Call( const KeyCode& rKeyCode, USHORT nRepeat )
+sal_Bool Accelerator::Call( const KeyCode& rKeyCode, sal_uInt16 nRepeat )
{
DBG_CHKTHIS( Accelerator, NULL );
@@ -567,7 +567,7 @@ BOOL Accelerator::Call( const KeyCode& rKeyCode, USHORT nRepeat )
{
if ( pEntry->mbEnabled )
{
- BOOL bDel = FALSE;
+ sal_Bool bDel = sal_False;
mnCurId = pEntry->mnId;
maCurKeyCode = rKeyCode;
mnCurRepeat = nRepeat;
@@ -580,26 +580,26 @@ BOOL Accelerator::Call( const KeyCode& rKeyCode, USHORT nRepeat )
mnCurRepeat = 0;
}
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-void Accelerator::SetAccel( USHORT nItemId, Accelerator* pAccel )
+void Accelerator::SetAccel( sal_uInt16 nItemId, Accelerator* pAccel )
{
DBG_CHKTHIS( Accelerator, NULL );
- USHORT nIndex = ImplAccelEntryGetFirstPos( &(mpData->maIdList), nItemId );
+ sal_uInt16 nIndex = ImplAccelEntryGetFirstPos( &(mpData->maIdList), nItemId );
if ( nIndex != ACCELENTRY_NOTFOUND )
{
- USHORT nItemCount = GetItemCount();
+ sal_uInt16 nItemCount = GetItemCount();
do
{
- ImplAccelEntry* pEntry = mpData->maIdList.GetObject( (ULONG)nIndex );
+ ImplAccelEntry* pEntry = mpData->maIdList.GetObject( (sal_uIntPtr)nIndex );
if ( pEntry->mnId != nItemId )
break;
@@ -612,13 +612,13 @@ void Accelerator::SetAccel( USHORT nItemId, Accelerator* pAccel )
// -----------------------------------------------------------------------
-Accelerator* Accelerator::GetAccel( USHORT nItemId ) const
+Accelerator* Accelerator::GetAccel( sal_uInt16 nItemId ) const
{
DBG_CHKTHIS( Accelerator, NULL );
- USHORT nIndex = ImplAccelEntryGetIndex( &(mpData->maIdList), nItemId );
+ sal_uInt16 nIndex = ImplAccelEntryGetIndex( &(mpData->maIdList), nItemId );
if ( nIndex != ACCELENTRY_NOTFOUND )
- return mpData->maIdList.GetObject( (ULONG)nIndex )->mpAccel;
+ return mpData->maIdList.GetObject( (sal_uIntPtr)nIndex )->mpAccel;
else
return NULL;
}
@@ -644,22 +644,22 @@ Accelerator* Accelerator::GetAccel( const KeyCode rKeyCode ) const
if ( pEntry )
return pEntry->mpAccel;
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-void Accelerator::EnableItem( USHORT nItemId, BOOL bEnable )
+void Accelerator::EnableItem( sal_uInt16 nItemId, sal_Bool bEnable )
{
DBG_CHKTHIS( Accelerator, NULL );
- USHORT nIndex = ImplAccelEntryGetFirstPos( &(mpData->maIdList), nItemId );
+ sal_uInt16 nIndex = ImplAccelEntryGetFirstPos( &(mpData->maIdList), nItemId );
if ( nIndex != ACCELENTRY_NOTFOUND )
{
- USHORT nItemCount = GetItemCount();
+ sal_uInt16 nItemCount = GetItemCount();
do
{
- ImplAccelEntry* pEntry = mpData->maIdList.GetObject( (ULONG)nIndex );
+ ImplAccelEntry* pEntry = mpData->maIdList.GetObject( (sal_uIntPtr)nIndex );
if ( pEntry->mnId != nItemId )
break;
@@ -672,20 +672,20 @@ void Accelerator::EnableItem( USHORT nItemId, BOOL bEnable )
// -----------------------------------------------------------------------
-BOOL Accelerator::IsItemEnabled( USHORT nItemId ) const
+sal_Bool Accelerator::IsItemEnabled( sal_uInt16 nItemId ) const
{
DBG_CHKTHIS( Accelerator, NULL );
- USHORT nIndex = ImplAccelEntryGetIndex( &(mpData->maIdList), nItemId );
+ sal_uInt16 nIndex = ImplAccelEntryGetIndex( &(mpData->maIdList), nItemId );
if ( nIndex != ACCELENTRY_NOTFOUND )
- return mpData->maIdList.GetObject( (ULONG)nIndex )->mbEnabled;
+ return mpData->maIdList.GetObject( (sal_uIntPtr)nIndex )->mbEnabled;
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-void Accelerator::EnableItem( const KeyCode rKeyCode, BOOL bEnable )
+void Accelerator::EnableItem( const KeyCode rKeyCode, sal_Bool bEnable )
{
DBG_CHKTHIS( Accelerator, NULL );
@@ -696,7 +696,7 @@ void Accelerator::EnableItem( const KeyCode rKeyCode, BOOL bEnable )
// -----------------------------------------------------------------------
-BOOL Accelerator::IsItemEnabled( const KeyCode rKeyCode ) const
+sal_Bool Accelerator::IsItemEnabled( const KeyCode rKeyCode ) const
{
DBG_CHKTHIS( Accelerator, NULL );
@@ -704,7 +704,7 @@ BOOL Accelerator::IsItemEnabled( const KeyCode rKeyCode ) const
if ( pEntry )
return pEntry->mbEnabled;
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -719,7 +719,7 @@ Accelerator& Accelerator::operator=( const Accelerator& rAccel )
maCurKeyCode = KeyCode();
mnCurId = 0;
mnCurRepeat = 0;
- mbIsCancel = FALSE;
+ mbIsCancel = sal_False;
// Tabellen loeschen und kopieren
ImplDeleteData();
diff --git a/vcl/source/window/accmgr.cxx b/vcl/source/window/accmgr.cxx
index 81699bcaabb0..ea9407eaa136 100644
--- a/vcl/source/window/accmgr.cxx
+++ b/vcl/source/window/accmgr.cxx
@@ -55,7 +55,7 @@ ImplAccelManager::~ImplAccelManager()
// -----------------------------------------------------------------------
-BOOL ImplAccelManager::InsertAccel( Accelerator* pAccel )
+sal_Bool ImplAccelManager::InsertAccel( Accelerator* pAccel )
{
if ( !mpAccelList )
mpAccelList = new ImplAccelList;
@@ -63,13 +63,13 @@ BOOL ImplAccelManager::InsertAccel( Accelerator* pAccel )
{
// Gibts den schon ?
if ( mpAccelList->GetPos( pAccel ) != LIST_ENTRY_NOTFOUND )
- return FALSE;
+ return sal_False;
}
// Am Anfang der Liste einfuegen
- mpAccelList->Insert( pAccel, (ULONG)0 );
+ mpAccelList->Insert( pAccel, (sal_uIntPtr)0 );
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -86,7 +86,7 @@ void ImplAccelManager::RemoveAccel( Accelerator* pAccel )
//sequence list, throw away the entire sequence
if ( mpSequenceList )
{
- for (USHORT i = 0; i < pAccel->GetItemCount(); ++i)
+ for (sal_uInt16 i = 0; i < pAccel->GetItemCount(); ++i)
{
Accelerator* pSubAccel = pAccel->GetAccel(pAccel->GetItemId(i));
if ( mpSequenceList->GetPos( pSubAccel ) != LIST_ENTRY_NOTFOUND )
@@ -103,7 +103,7 @@ void ImplAccelManager::RemoveAccel( Accelerator* pAccel )
// -----------------------------------------------------------------------
-void ImplAccelManager::EndSequence( BOOL bCancel )
+void ImplAccelManager::EndSequence( sal_Bool bCancel )
{
// Sind wir ueberhaupt in einer Sequenz ?
if ( !mpSequenceList )
@@ -113,13 +113,13 @@ void ImplAccelManager::EndSequence( BOOL bCancel )
Accelerator* pTempAccel = mpSequenceList->First();
while( pTempAccel )
{
- BOOL bDel = FALSE;
+ sal_Bool bDel = sal_False;
pTempAccel->mbIsCancel = bCancel;
pTempAccel->mpDel = &bDel;
pTempAccel->Deactivate();
if ( !bDel )
{
- pTempAccel->mbIsCancel = FALSE;
+ pTempAccel->mbIsCancel = sal_False;
pTempAccel->mpDel = NULL;
}
@@ -133,15 +133,15 @@ void ImplAccelManager::EndSequence( BOOL bCancel )
// -----------------------------------------------------------------------
-BOOL ImplAccelManager::IsAccelKey( const KeyCode& rKeyCode, USHORT nRepeat )
+sal_Bool ImplAccelManager::IsAccelKey( const KeyCode& rKeyCode, sal_uInt16 nRepeat )
{
Accelerator* pAccel;
// Haben wir ueberhaupt Acceleratoren ??
if ( !mpAccelList )
- return FALSE;
+ return sal_False;
if ( !mpAccelList->Count() )
- return FALSE;
+ return sal_False;
// Sind wir in einer Sequenz ?
if ( mpSequenceList )
@@ -154,7 +154,7 @@ BOOL ImplAccelManager::IsAccelKey( const KeyCode& rKeyCode, USHORT nRepeat )
{
// Sequenz abbrechen
FlushAccel();
- return FALSE;
+ return sal_False;
}
// Ist der Eintrag da drin ?
@@ -168,11 +168,11 @@ BOOL ImplAccelManager::IsAccelKey( const KeyCode& rKeyCode, USHORT nRepeat )
{
DBG_CHKOBJ( pNextAccel, Accelerator, NULL );
- mpSequenceList->Insert( pNextAccel, (ULONG)0 );
+ mpSequenceList->Insert( pNextAccel, (sal_uIntPtr)0 );
// Activate-Handler vom Neuen rufen
pNextAccel->Activate();
- return TRUE;
+ return sal_True;
}
else
{
@@ -184,7 +184,7 @@ BOOL ImplAccelManager::IsAccelKey( const KeyCode& rKeyCode, USHORT nRepeat )
// Dem Accelerator das aktuelle Item setzen
// und Handler rufen
- BOOL bDel = FALSE;
+ sal_Bool bDel = sal_False;
pAccel->maCurKeyCode = rKeyCode;
pAccel->mnCurId = pEntry->mnId;
pAccel->mnCurRepeat = nRepeat;
@@ -201,14 +201,14 @@ BOOL ImplAccelManager::IsAccelKey( const KeyCode& rKeyCode, USHORT nRepeat )
pAccel->mpDel = NULL;
}
- return TRUE;
+ return sal_True;
}
else
{
// Sequenz abbrechen, weil Acceleraor disabled
// Taste wird weitergeleitet (ans System)
FlushAccel();
- return FALSE;
+ return sal_False;
}
}
}
@@ -216,7 +216,7 @@ BOOL ImplAccelManager::IsAccelKey( const KeyCode& rKeyCode, USHORT nRepeat )
{
// Sequenz abbrechen wegen falscher Taste
FlushAccel();
- return FALSE;
+ return sal_False;
}
}
@@ -239,13 +239,13 @@ BOOL ImplAccelManager::IsAccelKey( const KeyCode& rKeyCode, USHORT nRepeat )
// Sequenz-Liste erzeugen
mpSequenceList = new ImplAccelList;
- mpSequenceList->Insert( pAccel, (ULONG)0 );
- mpSequenceList->Insert( pNextAccel, (ULONG)0 );
+ mpSequenceList->Insert( pAccel, (sal_uIntPtr)0 );
+ mpSequenceList->Insert( pNextAccel, (sal_uIntPtr)0 );
// Activate-Handler vom Neuen rufen
pNextAccel->Activate();
- return TRUE;
+ return sal_True;
}
else
{
@@ -258,7 +258,7 @@ BOOL ImplAccelManager::IsAccelKey( const KeyCode& rKeyCode, USHORT nRepeat )
// Dem Accelerator das aktuelle Item setzen
// und Handler rufen
- BOOL bDel = FALSE;
+ sal_Bool bDel = sal_False;
pAccel->maCurKeyCode = rKeyCode;
pAccel->mnCurId = pEntry->mnId;
pAccel->mnCurRepeat = nRepeat;
@@ -275,10 +275,10 @@ BOOL ImplAccelManager::IsAccelKey( const KeyCode& rKeyCode, USHORT nRepeat )
pAccel->mpDel = NULL;
}
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
}
@@ -286,5 +286,5 @@ BOOL ImplAccelManager::IsAccelKey( const KeyCode& rKeyCode, USHORT nRepeat )
pAccel = mpAccelList->Next();
}
- return FALSE;
+ return sal_False;
}
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index 8eedf76043da..2cd24857c156 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -54,7 +54,7 @@ using namespace ::com::sun::star::uno;
// =======================================================================
-static void ImplGetPinImage( USHORT nStyle, BOOL bPinIn, Image& rImage )
+static void ImplGetPinImage( sal_uInt16 nStyle, sal_Bool bPinIn, Image& rImage )
{
// ImageListe laden, wenn noch nicht vorhanden
ImplSVData* pSVData = ImplGetSVData();
@@ -72,7 +72,7 @@ static void ImplGetPinImage( USHORT nStyle, BOOL bPinIn, Image& rImage )
}
// Image ermitteln und zurueckgeben
- USHORT nId;
+ sal_uInt16 nId;
if ( nStyle & BUTTON_DRAW_PRESSED )
{
if ( bPinIn )
@@ -127,9 +127,9 @@ static void ImplDrawBrdWinSymbol( OutputDevice* pDev,
static void ImplDrawBrdWinSymbolButton( OutputDevice* pDev,
const Rectangle& rRect,
- SymbolType eSymbol, USHORT nState )
+ SymbolType eSymbol, sal_uInt16 nState )
{
- BOOL bMouseOver = (nState & BUTTON_DRAW_HIGHLIGHT) != 0;
+ sal_Bool bMouseOver = (nState & BUTTON_DRAW_HIGHLIGHT) != 0;
nState &= ~BUTTON_DRAW_HIGHLIGHT;
Rectangle aTempRect;
@@ -142,8 +142,8 @@ static void ImplDrawBrdWinSymbolButton( OutputDevice* pDev,
pWin->SetFillColor( pDev->GetSettings().GetStyleSettings().GetWindowColor() );
pWin->SetLineColor();
pWin->DrawRect( rRect );
- pWin->DrawSelectionBackground( rRect, 2, (nState & BUTTON_DRAW_PRESSED) ? TRUE : FALSE,
- TRUE, FALSE );
+ pWin->DrawSelectionBackground( rRect, 2, (nState & BUTTON_DRAW_PRESSED) ? sal_True : sal_False,
+ sal_True, sal_False );
}
aTempRect = rRect;
aTempRect.nLeft+=3;
@@ -172,23 +172,23 @@ ImplBorderWindowView::~ImplBorderWindowView()
// -----------------------------------------------------------------------
-BOOL ImplBorderWindowView::MouseMove( const MouseEvent& )
+sal_Bool ImplBorderWindowView::MouseMove( const MouseEvent& )
{
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL ImplBorderWindowView::MouseButtonDown( const MouseEvent& )
+sal_Bool ImplBorderWindowView::MouseButtonDown( const MouseEvent& )
{
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL ImplBorderWindowView::Tracking( const TrackingEvent& )
+sal_Bool ImplBorderWindowView::Tracking( const TrackingEvent& )
{
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -243,7 +243,7 @@ void ImplBorderWindowView::ImplInitTitle( ImplBorderFrameData* pData )
// -----------------------------------------------------------------------
-USHORT ImplBorderWindowView::ImplHitTest( ImplBorderFrameData* pData, const Point& rPos )
+sal_uInt16 ImplBorderWindowView::ImplHitTest( ImplBorderFrameData* pData, const Point& rPos )
{
ImplBorderWindow* pBorderWindow = pData->mpBorderWindow;
@@ -322,15 +322,15 @@ USHORT ImplBorderWindowView::ImplHitTest( ImplBorderFrameData* pData, const Poin
// -----------------------------------------------------------------------
-BOOL ImplBorderWindowView::ImplMouseMove( ImplBorderFrameData* pData, const MouseEvent& rMEvt )
+sal_Bool ImplBorderWindowView::ImplMouseMove( ImplBorderFrameData* pData, const MouseEvent& rMEvt )
{
- USHORT oldCloseState = pData->mnCloseState;
- USHORT oldMenuState = pData->mnMenuState;
+ sal_uInt16 oldCloseState = pData->mnCloseState;
+ sal_uInt16 oldMenuState = pData->mnMenuState;
pData->mnCloseState &= ~BUTTON_DRAW_HIGHLIGHT;
pData->mnMenuState &= ~BUTTON_DRAW_HIGHLIGHT;
Point aMousePos = rMEvt.GetPosPixel();
- USHORT nHitTest = ImplHitTest( pData, aMousePos );
+ sal_uInt16 nHitTest = ImplHitTest( pData, aMousePos );
PointerStyle ePtrStyle = POINTER_ARROW;
if ( nHitTest & BORDERWINDOW_HITTEST_LEFT )
ePtrStyle = POINTER_WINDOW_WSIZE;
@@ -359,12 +359,12 @@ BOOL ImplBorderWindowView::ImplMouseMove( ImplBorderFrameData* pData, const Mous
if( pData->mnMenuState != oldMenuState )
pData->mpBorderWindow->Invalidate( pData->maMenuRect );
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-BOOL ImplBorderWindowView::ImplMouseButtonDown( ImplBorderFrameData* pData, const MouseEvent& rMEvt )
+sal_Bool ImplBorderWindowView::ImplMouseButtonDown( ImplBorderFrameData* pData, const MouseEvent& rMEvt )
{
ImplBorderWindow* pBorderWindow = pData->mpBorderWindow;
@@ -372,11 +372,11 @@ BOOL ImplBorderWindowView::ImplMouseButtonDown( ImplBorderFrameData* pData, cons
{
pData->maMouseOff = rMEvt.GetPosPixel();
pData->mnHitTest = ImplHitTest( pData, pData->maMouseOff );
- USHORT nDragFullTest = 0;
+ sal_uInt16 nDragFullTest = 0;
if ( pData->mnHitTest )
{
- BOOL bTracking = TRUE;
- BOOL bHitTest = TRUE;
+ sal_Bool bTracking = sal_True;
+ sal_Bool bHitTest = sal_True;
if ( pData->mnHitTest & BORDERWINDOW_HITTEST_CLOSE )
{
@@ -441,18 +441,18 @@ BOOL ImplBorderWindowView::ImplMouseButtonDown( ImplBorderFrameData* pData, cons
}
else
{
- bTracking = FALSE;
+ bTracking = sal_False;
if ( (pData->mnHitTest & BORDERWINDOW_DRAW_TITLE) &&
((rMEvt.GetClicks() % 2) == 0) )
{
pData->mnHitTest = 0;
- bHitTest = FALSE;
+ bHitTest = sal_False;
if ( pBorderWindow->ImplGetClientWindow()->IsSystemWindow() )
{
SystemWindow* pClientWindow = (SystemWindow*)(pBorderWindow->ImplGetClientWindow());
- if ( TRUE /*pBorderWindow->mbDockBtn*/ ) // always perform docking on double click, no button required
+ if ( sal_True /*pBorderWindow->mbDockBtn*/ ) // always perform docking on double click, no button required
pClientWindow->TitleButtonClick( TITLE_BUTTON_DOCKING );
else if ( pBorderWindow->GetStyle() & WB_ROLLABLE )
{
@@ -469,9 +469,9 @@ BOOL ImplBorderWindowView::ImplMouseButtonDown( ImplBorderFrameData* pData, cons
if ( bTracking )
{
- pData->mbDragFull = FALSE;
+ pData->mbDragFull = sal_False;
if ( nDragFullTest )
- pData->mbDragFull = TRUE; // always fulldrag for proper docking, ignore system settings
+ pData->mbDragFull = sal_True; // always fulldrag for proper docking, ignore system settings
pBorderWindow->StartTracking();
}
else if ( bHitTest )
@@ -479,18 +479,18 @@ BOOL ImplBorderWindowView::ImplMouseButtonDown( ImplBorderFrameData* pData, cons
}
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-BOOL ImplBorderWindowView::ImplTracking( ImplBorderFrameData* pData, const TrackingEvent& rTEvt )
+sal_Bool ImplBorderWindowView::ImplTracking( ImplBorderFrameData* pData, const TrackingEvent& rTEvt )
{
ImplBorderWindow* pBorderWindow = pData->mpBorderWindow;
if ( rTEvt.IsTrackingEnded() )
{
- USHORT nHitTest = pData->mnHitTest;
+ sal_uInt16 nHitTest = pData->mnHitTest;
pData->mnHitTest = 0;
if ( nHitTest & BORDERWINDOW_HITTEST_CLOSE )
@@ -932,7 +932,7 @@ BOOL ImplBorderWindowView::ImplTracking( ImplBorderFrameData* pData, const Track
}
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -941,9 +941,9 @@ String ImplBorderWindowView::ImplRequestHelp( ImplBorderFrameData* pData,
const Point& rPos,
Rectangle& rHelpRect )
{
- USHORT nHelpId = 0;
+ sal_uInt16 nHelpId = 0;
String aHelpStr;
- USHORT nHitTest = ImplHitTest( pData, rPos );
+ sal_uInt16 nHitTest = ImplHitTest( pData, rPos );
if ( nHitTest )
{
if ( nHitTest & BORDERWINDOW_HITTEST_CLOSE )
@@ -1063,7 +1063,7 @@ long ImplNoBorderWindowView::CalcTitleWidth() const
// -----------------------------------------------------------------------
-void ImplNoBorderWindowView::DrawWindow( USHORT, OutputDevice*, const Point* )
+void ImplNoBorderWindowView::DrawWindow( sal_uInt16, OutputDevice*, const Point* )
{
}
@@ -1089,7 +1089,7 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei
mnHeight = nHeight;
mbNWFBorder = false;
- USHORT nBorderStyle = mpBorderWindow->GetBorderStyle();
+ sal_uInt16 nBorderStyle = mpBorderWindow->GetBorderStyle();
if ( nBorderStyle & WINDOW_BORDER_NOBORDER )
{
mnLeftBorder = 0;
@@ -1167,16 +1167,16 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei
if( mnWidth && mnHeight )
{
- mpBorderWindow->SetPaintTransparent( TRUE );
+ mpBorderWindow->SetPaintTransparent( sal_True );
mpBorderWindow->SetBackground();
- pCtrl->SetPaintTransparent( TRUE );
+ pCtrl->SetPaintTransparent( sal_True );
Window* pCompoundParent = NULL;
if( pWin->GetParent() && pWin->GetParent()->IsCompoundControl() )
pCompoundParent = pWin->GetParent();
if( pCompoundParent )
- pCompoundParent->SetPaintTransparent( TRUE );
+ pCompoundParent->SetPaintTransparent( sal_True );
if( mnWidth < aBounds.GetWidth() || mnHeight < aBounds.GetHeight() )
{
@@ -1199,7 +1199,7 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei
if( ! mbNWFBorder )
{
- USHORT nStyle = FRAME_DRAW_NODRAW;
+ sal_uInt16 nStyle = FRAME_DRAW_NODRAW;
// Wenn Border umgesetzt wurde oder BorderWindow ein Frame-Fenster
// ist, dann Border nach aussen
if ( (nBorderStyle & WINDOW_BORDER_DOUBLEOUT) || mpBorderWindow->mbSmallOutBorder )
@@ -1240,13 +1240,13 @@ long ImplSmallBorderWindowView::CalcTitleWidth() const
// -----------------------------------------------------------------------
-void ImplSmallBorderWindowView::DrawWindow( USHORT nDrawFlags, OutputDevice*, const Point* )
+void ImplSmallBorderWindowView::DrawWindow( sal_uInt16 nDrawFlags, OutputDevice*, const Point* )
{
- USHORT nBorderStyle = mpBorderWindow->GetBorderStyle();
+ sal_uInt16 nBorderStyle = mpBorderWindow->GetBorderStyle();
if ( nBorderStyle & WINDOW_BORDER_NOBORDER )
return;
- BOOL bNativeOK = FALSE;
+ sal_Bool bNativeOK = sal_False;
// for native widget drawing we must find out what
// control this border belongs to
Window *pWin = NULL, *pCtrl = NULL;
@@ -1337,9 +1337,9 @@ void ImplSmallBorderWindowView::DrawWindow( USHORT nDrawFlags, OutputDevice*, co
nState |= CTRL_STATE_FOCUSED;
}
- BOOL bMouseOver = FALSE;
+ sal_Bool bMouseOver = sal_False;
Window *pCtrlChild = pCtrl->GetWindow( WINDOW_FIRSTCHILD );
- while( pCtrlChild && (bMouseOver = pCtrlChild->IsMouseOver()) == FALSE )
+ while( pCtrlChild && (bMouseOver = pCtrlChild->IsMouseOver()) == sal_False )
pCtrlChild = pCtrlChild->GetWindow( WINDOW_NEXT );
if( bMouseOver )
@@ -1385,7 +1385,7 @@ void ImplSmallBorderWindowView::DrawWindow( USHORT nDrawFlags, OutputDevice*, co
}
else
{
- USHORT nStyle = 0;
+ sal_uInt16 nStyle = 0;
// Wenn Border umgesetzt wurde oder BorderWindow ein Frame-Fenster
// ist, dann Border nach aussen
if ( (nBorderStyle & WINDOW_BORDER_DOUBLEOUT) || mpBorderWindow->mbSmallOutBorder )
@@ -1417,7 +1417,7 @@ void ImplSmallBorderWindowView::DrawWindow( USHORT nDrawFlags, OutputDevice*, co
ImplStdBorderWindowView::ImplStdBorderWindowView( ImplBorderWindow* pBorderWindow )
{
maFrameData.mpBorderWindow = pBorderWindow;
- maFrameData.mbDragFull = FALSE;
+ maFrameData.mbDragFull = sal_False;
maFrameData.mnHitTest = 0;
maFrameData.mnPinState = 0;
maFrameData.mnCloseState = 0;
@@ -1444,21 +1444,21 @@ ImplStdBorderWindowView::~ImplStdBorderWindowView()
// -----------------------------------------------------------------------
-BOOL ImplStdBorderWindowView::MouseMove( const MouseEvent& rMEvt )
+sal_Bool ImplStdBorderWindowView::MouseMove( const MouseEvent& rMEvt )
{
return ImplMouseMove( &maFrameData, rMEvt );
}
// -----------------------------------------------------------------------
-BOOL ImplStdBorderWindowView::MouseButtonDown( const MouseEvent& rMEvt )
+sal_Bool ImplStdBorderWindowView::MouseButtonDown( const MouseEvent& rMEvt )
{
return ImplMouseButtonDown( &maFrameData, rMEvt );
}
// -----------------------------------------------------------------------
-BOOL ImplStdBorderWindowView::Tracking( const TrackingEvent& rTEvt )
+sal_Bool ImplStdBorderWindowView::Tracking( const TrackingEvent& rTEvt )
{
return ImplTracking( &maFrameData, rTEvt );
}
@@ -1654,7 +1654,7 @@ long ImplStdBorderWindowView::CalcTitleWidth() const
// -----------------------------------------------------------------------
-void ImplStdBorderWindowView::DrawWindow( USHORT nDrawFlags, OutputDevice* pOutDev, const Point* pOffset )
+void ImplStdBorderWindowView::DrawWindow( sal_uInt16 nDrawFlags, OutputDevice* pOutDev, const Point* pOffset )
{
ImplBorderFrameData* pData = &maFrameData;
OutputDevice* pDev = pOutDev ? pOutDev : pData->mpOutDev;
@@ -1665,7 +1665,7 @@ void ImplStdBorderWindowView::DrawWindow( USHORT nDrawFlags, OutputDevice* pOutD
DecorationView aDecoView( pDev );
Color aFrameColor( rStyleSettings.GetFaceColor() );
- aFrameColor.DecreaseContrast( (UINT8) (0.50 * 255));
+ aFrameColor.DecreaseContrast( (sal_uInt8) (0.50 * 255));
// Draw Frame
if ( nDrawFlags & BORDERWINDOW_DRAW_FRAME )
@@ -1734,7 +1734,7 @@ void ImplStdBorderWindowView::DrawWindow( USHORT nDrawFlags, OutputDevice* pOutD
if ( pOffset )
aInRect.Move( pOffset->X(), pOffset->Y() );
- USHORT nTextStyle = TEXT_DRAW_LEFT | TEXT_DRAW_VCENTER | TEXT_DRAW_ENDELLIPSIS | TEXT_DRAW_CLIP;
+ sal_uInt16 nTextStyle = TEXT_DRAW_LEFT | TEXT_DRAW_VCENTER | TEXT_DRAW_ENDELLIPSIS | TEXT_DRAW_CLIP;
// must show tooltip ?
TextRectInfo aInfo;
@@ -1824,14 +1824,14 @@ void ImplStdBorderWindowView::DrawWindow( USHORT nDrawFlags, OutputDevice* pOutD
// =======================================================================
void ImplBorderWindow::ImplInit( Window* pParent,
- WinBits nStyle, USHORT nTypeStyle,
+ WinBits nStyle, sal_uInt16 nTypeStyle,
const ::com::sun::star::uno::Any& )
{
ImplInit( pParent, nStyle, nTypeStyle, NULL );
}
void ImplBorderWindow::ImplInit( Window* pParent,
- WinBits nStyle, USHORT nTypeStyle,
+ WinBits nStyle, sal_uInt16 nTypeStyle,
SystemParentData* pSystemParentData
)
{
@@ -1842,44 +1842,44 @@ void ImplBorderWindow::ImplInit( Window* pParent,
nTestStyle |= WB_APP;
nStyle &= nTestStyle;
- mpWindowImpl->mbBorderWin = TRUE;
- mbSmallOutBorder = FALSE;
+ mpWindowImpl->mbBorderWin = sal_True;
+ mbSmallOutBorder = sal_False;
if ( nTypeStyle & BORDERWINDOW_STYLE_FRAME )
{
if( (nStyle & WB_SYSTEMCHILDWINDOW) )
{
- mpWindowImpl->mbOverlapWin = TRUE;
- mpWindowImpl->mbFrame = TRUE;
- mbFrameBorder = FALSE;
+ mpWindowImpl->mbOverlapWin = sal_True;
+ mpWindowImpl->mbFrame = sal_True;
+ mbFrameBorder = sal_False;
}
else if( (nStyle & WB_OWNERDRAWDECORATION) )
{
- mpWindowImpl->mbOverlapWin = TRUE;
- mpWindowImpl->mbFrame = TRUE;
- mbFrameBorder = (nOrgStyle & WB_NOBORDER) ? FALSE : TRUE;
+ mpWindowImpl->mbOverlapWin = sal_True;
+ mpWindowImpl->mbFrame = sal_True;
+ mbFrameBorder = (nOrgStyle & WB_NOBORDER) ? sal_False : sal_True;
}
else
{
- mpWindowImpl->mbOverlapWin = TRUE;
- mpWindowImpl->mbFrame = TRUE;
- mbFrameBorder = FALSE;
+ mpWindowImpl->mbOverlapWin = sal_True;
+ mpWindowImpl->mbFrame = sal_True;
+ mbFrameBorder = sal_False;
// closeable windows may have a border as well, eg. system floating windows without caption
if ( (nOrgStyle & (WB_BORDER | WB_NOBORDER | WB_MOVEABLE | WB_SIZEABLE/* | WB_CLOSEABLE*/)) == WB_BORDER )
- mbSmallOutBorder = TRUE;
+ mbSmallOutBorder = sal_True;
}
}
else if ( nTypeStyle & BORDERWINDOW_STYLE_OVERLAP )
{
- mpWindowImpl->mbOverlapWin = TRUE;
- mbFrameBorder = TRUE;
+ mpWindowImpl->mbOverlapWin = sal_True;
+ mbFrameBorder = sal_True;
}
else
- mbFrameBorder = FALSE;
+ mbFrameBorder = sal_False;
if ( nTypeStyle & BORDERWINDOW_STYLE_FLOAT )
- mbFloatWindow = TRUE;
+ mbFloatWindow = sal_True;
else
- mbFloatWindow = FALSE;
+ mbFloatWindow = sal_False;
Window::ImplInit( pParent, nStyle, pSystemParentData );
SetBackground();
@@ -1892,13 +1892,13 @@ void ImplBorderWindow::ImplInit( Window* pParent,
mnMaxHeight = SHRT_MAX;
mnRollHeight = 0;
mnOrgMenuHeight = 0;
- mbPined = FALSE;
- mbRollUp = FALSE;
- mbMenuHide = FALSE;
- mbDockBtn = FALSE;
- mbMenuBtn = FALSE;
- mbHideBtn = FALSE;
- mbHelpBtn = FALSE;
+ mbPined = sal_False;
+ mbRollUp = sal_False;
+ mbMenuHide = sal_False;
+ mbDockBtn = sal_False;
+ mbMenuBtn = sal_False;
+ mbHideBtn = sal_False;
+ mbHelpBtn = sal_False;
mbDisplayActive = IsActive();
if ( nTypeStyle & BORDERWINDOW_STYLE_FLOAT )
@@ -1913,7 +1913,7 @@ void ImplBorderWindow::ImplInit( Window* pParent,
ImplBorderWindow::ImplBorderWindow( Window* pParent,
SystemParentData* pSystemParentData,
- WinBits nStyle, USHORT nTypeStyle
+ WinBits nStyle, sal_uInt16 nTypeStyle
) : Window( WINDOW_BORDERWINDOW )
{
ImplInit( pParent, nStyle, nTypeStyle, pSystemParentData );
@@ -1922,14 +1922,14 @@ ImplBorderWindow::ImplBorderWindow( Window* pParent,
// -----------------------------------------------------------------------
ImplBorderWindow::ImplBorderWindow( Window* pParent, WinBits nStyle ,
- USHORT nTypeStyle ) :
+ sal_uInt16 nTypeStyle ) :
Window( WINDOW_BORDERWINDOW )
{
ImplInit( pParent, nStyle, nTypeStyle, ::com::sun::star::uno::Any() );
}
ImplBorderWindow::ImplBorderWindow( Window* pParent,
- WinBits nStyle, USHORT nTypeStyle,
+ WinBits nStyle, sal_uInt16 nTypeStyle,
const ::com::sun::star::uno::Any& aSystemToken ) :
Window( WINDOW_BORDERWINDOW )
{
@@ -1980,7 +1980,7 @@ void ImplBorderWindow::Draw( const Rectangle&, OutputDevice* pOutDev, const Poin
void ImplBorderWindow::Activate()
{
- SetDisplayActive( TRUE );
+ SetDisplayActive( sal_True );
Window::Activate();
}
@@ -1991,7 +1991,7 @@ void ImplBorderWindow::Deactivate()
// Fenster die immer Active sind, nehmen wir von dieser Regel aus,
// genauso, wenn ein Menu aktiv wird, ignorieren wir das Deactivate
if ( GetActivateMode() && !ImplGetSVData()->maWinData.mbNoDeactivate )
- SetDisplayActive( FALSE );
+ SetDisplayActive( sal_False );
Window::Deactivate();
}
@@ -2105,7 +2105,7 @@ void ImplBorderWindow::DataChanged( const DataChangedEvent& rDCEvt )
(rDCEvt.GetFlags() & SETTINGS_STYLE)) )
{
if ( !mpWindowImpl->mbFrame || (GetStyle() & WB_OWNERDRAWDECORATION) )
- UpdateView( TRUE, ImplGetWindow()->GetOutputSizePixel() );
+ UpdateView( sal_True, ImplGetWindow()->GetOutputSizePixel() );
}
Window::DataChanged( rDCEvt );
@@ -2134,7 +2134,7 @@ void ImplBorderWindow::InitView()
// -----------------------------------------------------------------------
-void ImplBorderWindow::UpdateView( BOOL bNewView, const Size& rNewOutSize )
+void ImplBorderWindow::UpdateView( sal_Bool bNewView, const Size& rNewOutSize )
{
sal_Int32 nLeftBorder;
sal_Int32 nTopBorder;
@@ -2210,7 +2210,7 @@ void ImplBorderWindow::InvalidateBorder()
// -----------------------------------------------------------------------
-void ImplBorderWindow::SetDisplayActive( BOOL bActive )
+void ImplBorderWindow::SetDisplayActive( sal_Bool bActive )
{
if ( mbDisplayActive != bActive )
{
@@ -2222,26 +2222,26 @@ void ImplBorderWindow::SetDisplayActive( BOOL bActive )
// -----------------------------------------------------------------------
-void ImplBorderWindow::SetTitleType( USHORT nTitleType, const Size& rSize )
+void ImplBorderWindow::SetTitleType( sal_uInt16 nTitleType, const Size& rSize )
{
mnTitleType = nTitleType;
- UpdateView( FALSE, rSize );
+ UpdateView( sal_False, rSize );
}
// -----------------------------------------------------------------------
-void ImplBorderWindow::SetBorderStyle( USHORT nStyle )
+void ImplBorderWindow::SetBorderStyle( sal_uInt16 nStyle )
{
if ( !mbFrameBorder && (mnBorderStyle != nStyle) )
{
mnBorderStyle = nStyle;
- UpdateView( FALSE, ImplGetWindow()->GetOutputSizePixel() );
+ UpdateView( sal_False, ImplGetWindow()->GetOutputSizePixel() );
}
}
// -----------------------------------------------------------------------
-void ImplBorderWindow::SetPin( BOOL bPin )
+void ImplBorderWindow::SetPin( sal_Bool bPin )
{
mbPined = bPin;
InvalidateBorder();
@@ -2249,11 +2249,11 @@ void ImplBorderWindow::SetPin( BOOL bPin )
// -----------------------------------------------------------------------
-void ImplBorderWindow::SetRollUp( BOOL bRollUp, const Size& rSize )
+void ImplBorderWindow::SetRollUp( sal_Bool bRollUp, const Size& rSize )
{
mbRollUp = bRollUp;
mnRollHeight = rSize.Height();
- UpdateView( FALSE, rSize );
+ UpdateView( sal_False, rSize );
}
// -----------------------------------------------------------------------
@@ -2268,7 +2268,7 @@ void ImplBorderWindow::SetCloser()
// -----------------------------------------------------------------------
-void ImplBorderWindow::SetDockButton( BOOL bDockButton )
+void ImplBorderWindow::SetDockButton( sal_Bool bDockButton )
{
mbDockBtn = bDockButton;
Size aSize = GetOutputSizePixel();
@@ -2278,7 +2278,7 @@ void ImplBorderWindow::SetDockButton( BOOL bDockButton )
// -----------------------------------------------------------------------
-void ImplBorderWindow::SetHideButton( BOOL bHideButton )
+void ImplBorderWindow::SetHideButton( sal_Bool bHideButton )
{
mbHideBtn = bHideButton;
Size aSize = GetOutputSizePixel();
@@ -2288,7 +2288,7 @@ void ImplBorderWindow::SetHideButton( BOOL bHideButton )
// -----------------------------------------------------------------------
-void ImplBorderWindow::SetHelpButton( BOOL bHelpButton )
+void ImplBorderWindow::SetHelpButton( sal_Bool bHelpButton )
{
mbHelpBtn = bHelpButton;
Size aSize = GetOutputSizePixel();
@@ -2298,7 +2298,7 @@ void ImplBorderWindow::SetHelpButton( BOOL bHelpButton )
// -----------------------------------------------------------------------
-void ImplBorderWindow::SetMenuButton( BOOL bMenuButton )
+void ImplBorderWindow::SetMenuButton( sal_Bool bMenuButton )
{
mbMenuBtn = bMenuButton;
Size aSize = GetOutputSizePixel();
@@ -2325,7 +2325,7 @@ void ImplBorderWindow::SetMenuBarWindow( Window* pWindow )
// -----------------------------------------------------------------------
-void ImplBorderWindow::SetMenuBarMode( BOOL bHide )
+void ImplBorderWindow::SetMenuBarMode( sal_Bool bHide )
{
mbMenuHide = bHide;
UpdateMenuHeight();
diff --git a/vcl/source/window/btndlg.cxx b/vcl/source/window/btndlg.cxx
index e835fe749ed1..4927505d7e4b 100644
--- a/vcl/source/window/btndlg.cxx
+++ b/vcl/source/window/btndlg.cxx
@@ -44,9 +44,9 @@
struct ImplBtnDlgItem
{
- USHORT mnId;
- BOOL mbOwnButton;
- BOOL mbDummyAlign;
+ sal_uInt16 mnId;
+ sal_Bool mbOwnButton;
+ sal_Bool mbDummyAlign;
long mnSepSize;
PushButton* mpPushButton;
};
@@ -61,7 +61,7 @@ void ButtonDialog::ImplInitButtonDialogData()
mnButtonSize = 0;
mnCurButtonId = 0;
mnFocusButtonId = BUTTONDIALOG_BUTTON_NOTFOUND;
- mbFormat = TRUE;
+ mbFormat = sal_True;
}
// -----------------------------------------------------------------------
@@ -110,7 +110,7 @@ ButtonDialog::~ButtonDialog()
// -----------------------------------------------------------------------
-PushButton* ButtonDialog::ImplCreatePushButton( USHORT nBtnFlags )
+PushButton* ButtonDialog::ImplCreatePushButton( sal_uInt16 nBtnFlags )
{
PushButton* pBtn;
WinBits nStyle = 0;
@@ -134,7 +134,7 @@ PushButton* ButtonDialog::ImplCreatePushButton( USHORT nBtnFlags )
// -----------------------------------------------------------------------
-ImplBtnDlgItem* ButtonDialog::ImplGetItem( USHORT nId ) const
+ImplBtnDlgItem* ButtonDialog::ImplGetItem( sal_uInt16 nId ) const
{
ImplBtnDlgItem* pItem = mpItemList->First();
while ( pItem )
@@ -258,7 +258,7 @@ void ButtonDialog::ImplPosControls()
SetOutputSizePixel( aDlgSize );
- mbFormat = FALSE;
+ mbFormat = sal_False;
}
// -----------------------------------------------------------------------
@@ -331,13 +331,13 @@ void ButtonDialog::Click()
// -----------------------------------------------------------------------
-void ButtonDialog::AddButton( const XubString& rText, USHORT nId,
- USHORT nBtnFlags, long nSepPixel )
+void ButtonDialog::AddButton( const XubString& rText, sal_uInt16 nId,
+ sal_uInt16 nBtnFlags, long nSepPixel )
{
// PageItem anlegen
ImplBtnDlgItem* pItem = new ImplBtnDlgItem;
pItem->mnId = nId;
- pItem->mbOwnButton = TRUE;
+ pItem->mbOwnButton = sal_True;
pItem->mnSepSize = nSepPixel;
pItem->mpPushButton = ImplCreatePushButton( nBtnFlags );
if ( rText.Len() )
@@ -349,18 +349,18 @@ void ButtonDialog::AddButton( const XubString& rText, USHORT nId,
if ( nBtnFlags & BUTTONDIALOG_FOCUSBUTTON )
mnFocusButtonId = nId;
- mbFormat = TRUE;
+ mbFormat = sal_True;
}
// -----------------------------------------------------------------------
-void ButtonDialog::AddButton( StandardButtonType eType, USHORT nId,
- USHORT nBtnFlags, long nSepPixel )
+void ButtonDialog::AddButton( StandardButtonType eType, sal_uInt16 nId,
+ sal_uInt16 nBtnFlags, long nSepPixel )
{
// PageItem anlegen
ImplBtnDlgItem* pItem = new ImplBtnDlgItem;
pItem->mnId = nId;
- pItem->mbOwnButton = TRUE;
+ pItem->mbOwnButton = sal_True;
pItem->mnSepSize = nSepPixel;
if ( eType == BUTTON_OK )
@@ -386,18 +386,18 @@ void ButtonDialog::AddButton( StandardButtonType eType, USHORT nId,
// In die Liste eintragen
mpItemList->Insert( pItem, LIST_APPEND );
- mbFormat = TRUE;
+ mbFormat = sal_True;
}
// -----------------------------------------------------------------------
-void ButtonDialog::AddButton( PushButton* pBtn, USHORT nId,
- USHORT nBtnFlags, long nSepPixel )
+void ButtonDialog::AddButton( PushButton* pBtn, sal_uInt16 nId,
+ sal_uInt16 nBtnFlags, long nSepPixel )
{
// PageItem anlegen
ImplBtnDlgItem* pItem = new ImplBtnDlgItem;
pItem->mnId = nId;
- pItem->mbOwnButton = FALSE;
+ pItem->mbOwnButton = sal_False;
pItem->mnSepSize = nSepPixel;
pItem->mpPushButton = pBtn;
@@ -407,12 +407,12 @@ void ButtonDialog::AddButton( PushButton* pBtn, USHORT nId,
// In die View-Liste eintragen
mpItemList->Insert( pItem, LIST_APPEND );
- mbFormat = TRUE;
+ mbFormat = sal_True;
}
// -----------------------------------------------------------------------
-void ButtonDialog::RemoveButton( USHORT nId )
+void ButtonDialog::RemoveButton( sal_uInt16 nId )
{
ImplBtnDlgItem* pItem = mpItemList->First();
while ( pItem )
@@ -424,7 +424,7 @@ void ButtonDialog::RemoveButton( USHORT nId )
delete pItem->mpPushButton;
delete pItem;
mpItemList->Remove();
- mbFormat = TRUE;
+ mbFormat = sal_True;
break;
}
@@ -449,29 +449,29 @@ void ButtonDialog::Clear()
}
mpItemList->Clear();
- mbFormat = TRUE;
+ mbFormat = sal_True;
}
// -----------------------------------------------------------------------
-USHORT ButtonDialog::GetButtonCount() const
+sal_uInt16 ButtonDialog::GetButtonCount() const
{
- return (USHORT)mpItemList->Count();
+ return (sal_uInt16)mpItemList->Count();
}
// -----------------------------------------------------------------------
-USHORT ButtonDialog::GetButtonId( USHORT nButton ) const
+sal_uInt16 ButtonDialog::GetButtonId( sal_uInt16 nButton ) const
{
if ( nButton < mpItemList->Count() )
- return (USHORT)mpItemList->GetObject( nButton )->mnId;
+ return (sal_uInt16)mpItemList->GetObject( nButton )->mnId;
else
return BUTTONDIALOG_BUTTON_NOTFOUND;
}
// -----------------------------------------------------------------------
-PushButton* ButtonDialog::GetPushButton( USHORT nId ) const
+PushButton* ButtonDialog::GetPushButton( sal_uInt16 nId ) const
{
ImplBtnDlgItem* pItem = ImplGetItem( nId );
@@ -483,20 +483,20 @@ PushButton* ButtonDialog::GetPushButton( USHORT nId ) const
// -----------------------------------------------------------------------
-void ButtonDialog::SetButtonText( USHORT nId, const XubString& rText )
+void ButtonDialog::SetButtonText( sal_uInt16 nId, const XubString& rText )
{
ImplBtnDlgItem* pItem = ImplGetItem( nId );
if ( pItem )
{
pItem->mpPushButton->SetText( rText );
- mbFormat = TRUE;
+ mbFormat = sal_True;
}
}
// -----------------------------------------------------------------------
-XubString ButtonDialog::GetButtonText( USHORT nId ) const
+XubString ButtonDialog::GetButtonText( sal_uInt16 nId ) const
{
ImplBtnDlgItem* pItem = ImplGetItem( nId );
@@ -508,7 +508,7 @@ XubString ButtonDialog::GetButtonText( USHORT nId ) const
// -----------------------------------------------------------------------
-void ButtonDialog::SetButtonHelpText( USHORT nId, const XubString& rText )
+void ButtonDialog::SetButtonHelpText( sal_uInt16 nId, const XubString& rText )
{
ImplBtnDlgItem* pItem = ImplGetItem( nId );
@@ -518,7 +518,7 @@ void ButtonDialog::SetButtonHelpText( USHORT nId, const XubString& rText )
// -----------------------------------------------------------------------
-XubString ButtonDialog::GetButtonHelpText( USHORT nId ) const
+XubString ButtonDialog::GetButtonHelpText( sal_uInt16 nId ) const
{
ImplBtnDlgItem* pItem = ImplGetItem( nId );
@@ -530,7 +530,7 @@ XubString ButtonDialog::GetButtonHelpText( USHORT nId ) const
// -----------------------------------------------------------------------
-void ButtonDialog::SetButtonHelpId( USHORT nId, ULONG nHelpId )
+void ButtonDialog::SetButtonHelpId( sal_uInt16 nId, sal_uIntPtr nHelpId )
{
ImplBtnDlgItem* pItem = ImplGetItem( nId );
@@ -540,7 +540,7 @@ void ButtonDialog::SetButtonHelpId( USHORT nId, ULONG nHelpId )
// -----------------------------------------------------------------------
-ULONG ButtonDialog::GetButtonHelpId( USHORT nId ) const
+sal_uIntPtr ButtonDialog::GetButtonHelpId( sal_uInt16 nId ) const
{
ImplBtnDlgItem* pItem = ImplGetItem( nId );
diff --git a/vcl/source/window/cmdevt.cxx b/vcl/source/window/cmdevt.cxx
index 03e01c96742b..e10d33028fbc 100644
--- a/vcl/source/window/cmdevt.cxx
+++ b/vcl/source/window/cmdevt.cxx
@@ -45,24 +45,24 @@ CommandExtTextInputData::CommandExtTextInputData()
mnDeltaStart = 0;
mnOldTextLen = 0;
mnCursorFlags = 0;
- mbOnlyCursor = FALSE;
+ mbOnlyCursor = sal_False;
}
// -----------------------------------------------------------------------
CommandExtTextInputData::CommandExtTextInputData( const XubString& rText,
- const USHORT* pTextAttr,
+ const sal_uInt16* pTextAttr,
xub_StrLen nCursorPos,
- USHORT nCursorFlags,
+ sal_uInt16 nCursorFlags,
xub_StrLen nDeltaStart,
xub_StrLen nOldTextLen,
- BOOL bOnlyCursor ) :
+ sal_Bool bOnlyCursor ) :
maText( rText )
{
if ( pTextAttr && maText.Len() )
{
- mpTextAttr = new USHORT[maText.Len()];
- memcpy( mpTextAttr, pTextAttr, maText.Len()*sizeof(USHORT) );
+ mpTextAttr = new sal_uInt16[maText.Len()];
+ memcpy( mpTextAttr, pTextAttr, maText.Len()*sizeof(sal_uInt16) );
}
else
mpTextAttr = NULL;
@@ -80,8 +80,8 @@ CommandExtTextInputData::CommandExtTextInputData( const CommandExtTextInputData&
{
if ( rData.mpTextAttr && maText.Len() )
{
- mpTextAttr = new USHORT[maText.Len()];
- memcpy( mpTextAttr, rData.mpTextAttr, maText.Len()*sizeof(USHORT) );
+ mpTextAttr = new sal_uInt16[maText.Len()];
+ memcpy( mpTextAttr, rData.mpTextAttr, maText.Len()*sizeof(sal_uInt16) );
}
else
mpTextAttr = NULL;
diff --git a/vcl/source/window/cursor.cxx b/vcl/source/window/cursor.cxx
index 5725189e10c3..3be6fad02366 100644
--- a/vcl/source/window/cursor.cxx
+++ b/vcl/source/window/cursor.cxx
@@ -47,8 +47,8 @@ struct ImplCursorData
long mnPixSlant; // Pixel-Slant
short mnOrientation; // Pixel-Orientation
unsigned char mnDirection; // indicates writing direction
- USHORT mnStyle; // Cursor-Style
- BOOL mbCurVisible; // Ist Cursor aktuell sichtbar
+ sal_uInt16 mnStyle; // Cursor-Style
+ sal_Bool mbCurVisible; // Ist Cursor aktuell sichtbar
Window* mpWindow; // Zugeordnetes Windows
};
@@ -57,9 +57,9 @@ struct ImplCursorData
static void ImplCursorInvert( ImplCursorData* pData )
{
Window* pWindow = pData->mpWindow;
- BOOL bMapMode = pWindow->IsMapModeEnabled();
- pWindow->EnableMapMode( FALSE );
- USHORT nInvertStyle;
+ sal_Bool bMapMode = pWindow->IsMapModeEnabled();
+ pWindow->EnableMapMode( sal_False );
+ sal_uInt16 nInvertStyle;
if ( pData->mnStyle & CURSOR_SHADOW )
nInvertStyle = INVERT_50;
else
@@ -154,7 +154,7 @@ void Cursor::ImplDraw()
// Ausgabeflaeche berechnen und ausgeben
ImplCursorInvert( mpData );
- mpData->mbCurVisible = TRUE;
+ mpData->mbCurVisible = sal_True;
}
}
@@ -165,13 +165,13 @@ void Cursor::ImplRestore()
if ( mpData && mpData->mbCurVisible )
{
ImplCursorInvert( mpData );
- mpData->mbCurVisible = FALSE;
+ mpData->mbCurVisible = sal_False;
}
}
// -----------------------------------------------------------------------
-void Cursor::ImplShow( BOOL bDrawDirect )
+void Cursor::ImplShow( sal_Bool bDrawDirect )
{
if ( mbVisible )
{
@@ -193,7 +193,7 @@ void Cursor::ImplShow( BOOL bDrawDirect )
if ( !mpData )
{
mpData = new ImplCursorData;
- mpData->mbCurVisible = FALSE;
+ mpData->mbCurVisible = sal_False;
mpData->maTimer.SetTimeoutHdl( LINK( this, Cursor, ImplTimerHdl ) );
}
@@ -268,7 +268,7 @@ Cursor::Cursor()
mnOrientation = 0;
mnDirection = 0;
mnStyle = 0;
- mbVisible = FALSE;
+ mbVisible = sal_False;
}
// -----------------------------------------------------------------------
@@ -301,7 +301,7 @@ Cursor::~Cursor()
// -----------------------------------------------------------------------
-void Cursor::SetStyle( USHORT nStyle )
+void Cursor::SetStyle( sal_uInt16 nStyle )
{
if ( mnStyle != nStyle )
{
@@ -316,7 +316,7 @@ void Cursor::Show()
{
if ( !mbVisible )
{
- mbVisible = TRUE;
+ mbVisible = sal_True;
ImplShow();
}
}
@@ -327,7 +327,7 @@ void Cursor::Hide()
{
if ( mbVisible )
{
- mbVisible = FALSE;
+ mbVisible = sal_False;
ImplHide();
}
}
@@ -448,7 +448,7 @@ Cursor& Cursor::operator=( const Cursor& rCursor )
// -----------------------------------------------------------------------
-BOOL Cursor::operator==( const Cursor& rCursor ) const
+sal_Bool Cursor::operator==( const Cursor& rCursor ) const
{
if ( (maPos == rCursor.maPos) &&
(maSize == rCursor.maSize) &&
@@ -456,7 +456,7 @@ BOOL Cursor::operator==( const Cursor& rCursor ) const
(mnOrientation == rCursor.mnOrientation) &&
(mnDirection == rCursor.mnDirection) &&
(mbVisible == rCursor.mbVisible) )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx
index a32790cfb0d4..31ecb4763e4b 100644
--- a/vcl/source/window/decoview.cxx
+++ b/vcl/source/window/decoview.cxx
@@ -45,7 +45,7 @@
// =======================================================================
void ImplDrawOS2Symbol( OutputDevice* pDev, const Rectangle& rRect,
- USHORT nStyle, BOOL bClose )
+ sal_uInt16 nStyle, sal_Bool bClose )
{
DecorationView aView( pDev );
const StyleSettings& rStyleSettings = pDev->GetSettings().GetStyleSettings();
@@ -508,7 +508,7 @@ static void ImplDrawSymbol( OutputDevice* pDev, const Rectangle& rRect,
case SYMBOL_CHECKMARK:
{
// #106953# never mirror checkmarks
- BOOL bRTL = pDev->ImplHasMirroredGraphics() && pDev->IsRTLEnabled();
+ sal_Bool bRTL = pDev->ImplHasMirroredGraphics() && pDev->IsRTLEnabled();
Point aPos1( bRTL ? rRect.Right() : rRect.Left(),
rRect.Bottom() - rRect.GetHeight() / 3 );
Point aPos2( bRTL ? rRect.Right() - rRect.GetWidth()/3 : rRect.Left() + rRect.GetWidth()/3,
@@ -635,7 +635,7 @@ static void ImplDrawSymbol( OutputDevice* pDev, const Rectangle& rRect,
{
Rectangle aRect( nCenterX-n2, nCenterY-n2,
nCenterX+n2, nCenterY+n2 );
- ImplDrawOS2Symbol( pDev, aRect, 0, TRUE );
+ ImplDrawOS2Symbol( pDev, aRect, 0, sal_True );
}
break;
@@ -643,7 +643,7 @@ static void ImplDrawSymbol( OutputDevice* pDev, const Rectangle& rRect,
{
Rectangle aRect( nCenterX-n2+4, nCenterY-n2+4,
nCenterX+n2-4, nCenterY+n2-3 );
- ImplDrawOS2Symbol( pDev, aRect, 0, FALSE );
+ ImplDrawOS2Symbol( pDev, aRect, 0, sal_False );
DecorationView aDecoView( pDev );
Rectangle aRect2( nCenterX-n2, nCenterY-n2,
nCenterX-n2+2, nCenterY+n2 );
@@ -662,7 +662,7 @@ static void ImplDrawSymbol( OutputDevice* pDev, const Rectangle& rRect,
{
Rectangle aRect( nCenterX-n2+3, nCenterY-n2+3,
nCenterX+n2-3, nCenterY+n2-3 );
- ImplDrawOS2Symbol( pDev, aRect, 0, FALSE );
+ ImplDrawOS2Symbol( pDev, aRect, 0, sal_False );
}
break;
}
@@ -671,16 +671,16 @@ static void ImplDrawSymbol( OutputDevice* pDev, const Rectangle& rRect,
// -----------------------------------------------------------------------
void DecorationView::DrawSymbol( const Rectangle& rRect, SymbolType eType,
- const Color& rColor, USHORT nStyle )
+ const Color& rColor, sal_uInt16 nStyle )
{
const StyleSettings& rStyleSettings = mpOutDev->GetSettings().GetStyleSettings();
Rectangle aRect = mpOutDev->LogicToPixel( rRect );
Color aOldLineColor = mpOutDev->GetLineColor();
Color aOldFillColor = mpOutDev->GetFillColor();
- BOOL bOldMapMode = mpOutDev->IsMapModeEnabled();
+ sal_Bool bOldMapMode = mpOutDev->IsMapModeEnabled();
mpOutDev->SetLineColor();
mpOutDev->SetFillColor( rColor );
- mpOutDev->EnableMapMode( FALSE );
+ mpOutDev->EnableMapMode( sal_False );
if ( (rStyleSettings.GetOptions() & STYLE_OPTION_MONO) ||
(mpOutDev->GetOutDevType() == OUTDEV_PRINTER) )
@@ -724,8 +724,8 @@ void DecorationView::DrawFrame( const Rectangle& rRect,
Rectangle aRect = mpOutDev->LogicToPixel( rRect );
Color aOldLineColor = mpOutDev->GetLineColor();
Color aOldFillColor = mpOutDev->GetFillColor();
- BOOL bOldMapMode = mpOutDev->IsMapModeEnabled();
- mpOutDev->EnableMapMode( FALSE );
+ sal_Bool bOldMapMode = mpOutDev->IsMapModeEnabled();
+ mpOutDev->EnableMapMode( sal_False );
mpOutDev->SetLineColor();
mpOutDev->ImplDraw2ColorFrame( aRect, rLeftTopColor, rRightBottomColor );
mpOutDev->SetLineColor( aOldLineColor );
@@ -736,7 +736,7 @@ void DecorationView::DrawFrame( const Rectangle& rRect,
// =======================================================================
void DecorationView::DrawHighlightFrame( const Rectangle& rRect,
- USHORT nStyle )
+ sal_uInt16 nStyle )
{
const StyleSettings& rStyleSettings = mpOutDev->GetSettings().GetStyleSettings();
Color aLightColor = rStyleSettings.GetLightColor();
@@ -786,7 +786,7 @@ void DecorationView::DrawHighlightFrame( const Rectangle& rRect,
// =======================================================================
static void ImplDrawDPILineRect( OutputDevice* pDev, Rectangle& rRect,
- const Color* pColor, BOOL bRound = FALSE )
+ const Color* pColor, sal_Bool bRound = sal_False )
{
long nLineWidth = pDev->ImplGetDPIX()/300;
long nLineHeight = pDev->ImplGetDPIY()/300;
@@ -835,10 +835,10 @@ static void ImplDrawDPILineRect( OutputDevice* pDev, Rectangle& rRect,
// =======================================================================
static void ImplDrawFrame( OutputDevice* pDev, Rectangle& rRect,
- const StyleSettings& rStyleSettings, USHORT nStyle )
+ const StyleSettings& rStyleSettings, sal_uInt16 nStyle )
{
// mask menu style
- BOOL bMenuStyle = (nStyle & FRAME_DRAW_MENU) ? TRUE : FALSE;
+ sal_Bool bMenuStyle = (nStyle & FRAME_DRAW_MENU) ? sal_True : sal_False;
nStyle &= ~FRAME_DRAW_MENU;
Window *pWin = NULL;
@@ -849,7 +849,7 @@ static void ImplDrawFrame( OutputDevice* pDev, Rectangle& rRect,
// menus may use different border colors (eg on XP)
// normal frames will be drawn using the shadow color
// whereas window frame borders will use black
- BOOL bFlatBorders = ( !bMenuStyle && rStyleSettings.GetUseFlatBorders() );
+ sal_Bool bFlatBorders = ( !bMenuStyle && rStyleSettings.GetUseFlatBorders() );
// no flat borders for standard VCL controls (ie formcontrols that keep their classic look)
// will not affect frame windows (like dropdowns)
@@ -858,13 +858,13 @@ static void ImplDrawFrame( OutputDevice* pDev, Rectangle& rRect,
// check for formcontrol, i.e., a control without NWF enabled
Control *pControl = dynamic_cast< Control* >( pWin->GetWindow( WINDOW_CLIENT ) );
if( pControl && pControl->IsNativeWidgetEnabled() )
- bFlatBorders = TRUE;
+ bFlatBorders = sal_True;
else
- bFlatBorders = FALSE;
+ bFlatBorders = sal_False;
}
// no round corners for window frame borders
- BOOL bRound = (bFlatBorders && !(nStyle & FRAME_DRAW_WINDOWBORDER));
+ sal_Bool bRound = (bFlatBorders && !(nStyle & FRAME_DRAW_WINDOWBORDER));
if ( (rStyleSettings.GetOptions() & STYLE_OPTION_MONO) ||
(pDev->GetOutDevType() == OUTDEV_PRINTER) ||
@@ -873,7 +873,7 @@ static void ImplDrawFrame( OutputDevice* pDev, Rectangle& rRect,
if ( nStyle & FRAME_DRAW_NODRAW )
{
- USHORT nValueStyle = bMenuStyle ? nStyle | FRAME_DRAW_MENU : nStyle;
+ sal_uInt16 nValueStyle = bMenuStyle ? nStyle | FRAME_DRAW_MENU : nStyle;
if( pWin->GetType() == WINDOW_BORDERWINDOW )
nValueStyle |= FRAME_DRAW_BORDERWINDOWBORDER;
ImplControlValue aControlValue( nValueStyle );
@@ -888,7 +888,7 @@ static void ImplDrawFrame( OutputDevice* pDev, Rectangle& rRect,
ImplDrawDPILineRect( pDev, rRect, NULL, bRound );
else
{
- USHORT nFrameStyle = nStyle & FRAME_DRAW_STYLE;
+ sal_uInt16 nFrameStyle = nStyle & FRAME_DRAW_STYLE;
if ( nFrameStyle == FRAME_DRAW_GROUP )
{
@@ -918,7 +918,7 @@ static void ImplDrawFrame( OutputDevice* pDev, Rectangle& rRect,
{
if( pWin && pWin->IsNativeControlSupported(CTRL_FRAME, PART_BORDER) )
{
- USHORT nValueStyle = bMenuStyle ? nStyle | FRAME_DRAW_MENU : nStyle;
+ sal_uInt16 nValueStyle = bMenuStyle ? nStyle | FRAME_DRAW_MENU : nStyle;
if( pWin->GetType() == WINDOW_BORDERWINDOW )
nValueStyle |= FRAME_DRAW_BORDERWINDOWBORDER;
ImplControlValue aControlValue( nValueStyle );
@@ -955,7 +955,7 @@ static void ImplDrawFrame( OutputDevice* pDev, Rectangle& rRect,
}
else
{
- USHORT nFrameStyle = nStyle & FRAME_DRAW_STYLE;
+ sal_uInt16 nFrameStyle = nStyle & FRAME_DRAW_STYLE;
if ( nFrameStyle == FRAME_DRAW_GROUP )
{
pDev->SetFillColor();
@@ -1030,7 +1030,7 @@ static void ImplDrawFrame( OutputDevice* pDev, Rectangle& rRect,
rRect.Right()--;
rRect.Bottom()--;
- BOOL bDrawn = TRUE;
+ sal_Bool bDrawn = sal_True;
if ( nFrameStyle == FRAME_DRAW_DOUBLEIN )
{
if( bFlatBorders ) // no 3d effect
@@ -1050,7 +1050,7 @@ static void ImplDrawFrame( OutputDevice* pDev, Rectangle& rRect,
rStyleSettings.GetLightColor(),
rStyleSettings.GetShadowColor() );
else
- bDrawn = FALSE;
+ bDrawn = sal_False;
}
if( bDrawn )
{
@@ -1067,14 +1067,14 @@ static void ImplDrawFrame( OutputDevice* pDev, Rectangle& rRect,
// -----------------------------------------------------------------------
-Rectangle DecorationView::DrawFrame( const Rectangle& rRect, USHORT nStyle )
+Rectangle DecorationView::DrawFrame( const Rectangle& rRect, sal_uInt16 nStyle )
{
Rectangle aRect = rRect;
- BOOL bOldMap = mpOutDev->IsMapModeEnabled();
+ sal_Bool bOldMap = mpOutDev->IsMapModeEnabled();
if ( bOldMap )
{
aRect = mpOutDev->LogicToPixel( aRect );
- mpOutDev->EnableMapMode( FALSE );
+ mpOutDev->EnableMapMode( sal_False );
}
if ( !rRect.IsEmpty() )
@@ -1103,7 +1103,7 @@ Rectangle DecorationView::DrawFrame( const Rectangle& rRect, USHORT nStyle )
// =======================================================================
static void ImplDrawButton( OutputDevice* pDev, Rectangle& rRect,
- const StyleSettings& rStyleSettings, USHORT nStyle )
+ const StyleSettings& rStyleSettings, sal_uInt16 nStyle )
{
Rectangle aFillRect = rRect;
@@ -1316,14 +1316,14 @@ static void ImplDrawButton( OutputDevice* pDev, Rectangle& rRect,
// -----------------------------------------------------------------------
-Rectangle DecorationView::DrawButton( const Rectangle& rRect, USHORT nStyle )
+Rectangle DecorationView::DrawButton( const Rectangle& rRect, sal_uInt16 nStyle )
{
Rectangle aRect = rRect;
- BOOL bOldMap = mpOutDev->IsMapModeEnabled();
+ sal_Bool bOldMap = mpOutDev->IsMapModeEnabled();
if ( bOldMap )
{
aRect = mpOutDev->LogicToPixel( aRect );
- mpOutDev->EnableMapMode( FALSE );
+ mpOutDev->EnableMapMode( sal_False );
}
if ( !rRect.IsEmpty() )
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 3b5585d3bc63..5ce32a14d725 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -74,24 +74,24 @@ static ByteString ImplGetDialogText( Dialog* pDialog )
// =======================================================================
-static BOOL ImplIsMnemonicCtrl( Window* pWindow )
+static sal_Bool ImplIsMnemonicCtrl( Window* pWindow )
{
if( ! pWindow->GetSettings().GetStyleSettings().GetAutoMnemonic() )
- return FALSE;
+ return sal_False;
if ( (pWindow->GetType() == WINDOW_RADIOBUTTON) ||
(pWindow->GetType() == WINDOW_CHECKBOX) ||
(pWindow->GetType() == WINDOW_TRISTATEBOX) ||
(pWindow->GetType() == WINDOW_PUSHBUTTON) )
- return TRUE;
+ return sal_True;
if ( pWindow->GetType() == WINDOW_FIXEDTEXT )
{
if ( pWindow->GetStyle() & (WB_INFO | WB_NOLABEL) )
- return FALSE;
+ return sal_False;
Window* pNextWindow = pWindow->GetWindow( WINDOW_NEXT );
if ( !pNextWindow )
- return FALSE;
+ return sal_False;
pNextWindow = pNextWindow->GetWindow( WINDOW_CLIENT );
if ( !(pNextWindow->GetStyle() & WB_TABSTOP) ||
(pNextWindow->GetType() == WINDOW_FIXEDTEXT) ||
@@ -100,12 +100,12 @@ static BOOL ImplIsMnemonicCtrl( Window* pWindow )
(pNextWindow->GetType() == WINDOW_CHECKBOX) ||
(pNextWindow->GetType() == WINDOW_TRISTATEBOX) ||
(pNextWindow->GetType() == WINDOW_PUSHBUTTON) )
- return FALSE;
+ return sal_False;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -216,7 +216,7 @@ static PushButton* ImplGetCancelButton( Dialog* pDialog )
static void ImplMouseAutoPos( Dialog* pDialog )
{
- ULONG nMouseOptions = pDialog->GetSettings().GetMouseSettings().GetOptions();
+ sal_uIntPtr nMouseOptions = pDialog->GetSettings().GetMouseSettings().GetOptions();
if ( nMouseOptions & MOUSE_OPTION_AUTOCENTERPOS )
{
Size aSize = pDialog->GetOutputSizePixel();
@@ -251,13 +251,13 @@ struct DialogImpl
void Dialog::ImplInitDialogData()
{
- mpWindowImpl->mbDialog = TRUE;
+ mpWindowImpl->mbDialog = sal_True;
mpDialogParent = NULL;
mpPrevExecuteDlg = NULL;
- mbInExecute = FALSE;
- mbOldSaveBack = FALSE;
- mbInClose = FALSE;
- mbModalMode = FALSE;
+ mbInExecute = sal_False;
+ mbOldSaveBack = sal_False;
+ mbInClose = sal_False;
+ mbModalMode = sal_False;
mnMousePositioned = 0;
mpDialogImpl = new DialogImpl;
}
@@ -266,7 +266,7 @@ void Dialog::ImplInitDialogData()
void Dialog::ImplInit( Window* pParent, WinBits nStyle )
{
- USHORT nSysWinMode = Application::GetSystemWindowMode();
+ sal_uInt16 nSysWinMode = Application::GetSystemWindowMode();
if ( !(nStyle & WB_NODIALOGCONTROL) )
nStyle |= WB_DIALOGCONTROL;
@@ -292,7 +292,7 @@ void Dialog::ImplInit( Window* pParent, WinBits nStyle )
while ( pExeDlg )
{
// Nur wenn er sichtbar und enabled ist
- if ( pParent->ImplGetFirstOverlapWindow()->IsWindowOrChild( pExeDlg, TRUE ) &&
+ if ( pParent->ImplGetFirstOverlapWindow()->IsWindowOrChild( pExeDlg, sal_True ) &&
pExeDlg->IsReallyVisible() &&
pExeDlg->IsEnabled() && pExeDlg->IsInputEnabled() && !pExeDlg->IsInModalMode() )
{
@@ -342,8 +342,8 @@ void Dialog::ImplInit( Window* pParent, WinBits nStyle )
}
else
{
- mpWindowImpl->mbFrame = TRUE;
- mpWindowImpl->mbOverlapWin = TRUE;
+ mpWindowImpl->mbFrame = sal_True;
+ mpWindowImpl->mbOverlapWin = sal_True;
SystemWindow::ImplInit( pParent, (nStyle & (WB_MOVEABLE | WB_SIZEABLE | WB_ROLLABLE | WB_CLOSEABLE | WB_STANDALONE)) | WB_CLOSEABLE, NULL );
// Now set all style bits
mpWindowImpl->mnStyle = nStyle;
@@ -375,7 +375,7 @@ void Dialog::ImplInitSettings()
else if( IsNativeControlSupported( CTRL_WINDOW_BACKGROUND, PART_BACKGROUND_DIALOG ) )
{
mpWindowImpl->mnNativeBackground = PART_BACKGROUND_DIALOG;
- EnableChildTransparentMode( TRUE );
+ EnableChildTransparentMode( sal_True );
}
// fallback to settings color
else
@@ -468,7 +468,7 @@ long Dialog::Notify( NotifyEvent& rNEvt )
{
const KeyEvent* pKEvt = rNEvt.GetKeyEvent();
KeyCode aKeyCode = pKEvt->GetKeyCode();
- USHORT nKeyCode = aKeyCode.GetCode();
+ sal_uInt16 nKeyCode = aKeyCode.GetCode();
if ( (nKeyCode == KEY_ESCAPE) &&
((GetStyle() & WB_CLOSEABLE) || ImplGetCancelButton( this ) || ImplGetOKButton( this )) )
@@ -478,7 +478,7 @@ long Dialog::Notify( NotifyEvent& rNEvt )
// post this Close asynchronous so we can leave our key handler before
// we get destroyed
PostUserEvent( LINK( this, Dialog, ImplAsyncCloseHdl ), this );
- return TRUE;
+ return sal_True;
}
}
else if ( rNEvt.GetType() == EVENT_GETFOCUS )
@@ -489,8 +489,8 @@ long Dialog::Notify( NotifyEvent& rNEvt )
if( mbInExecute && mbModalMode )
{
// do not change modal counter (pSVData->maAppData.mnModalDialog)
- SetModalInputMode( FALSE );
- SetModalInputMode( TRUE );
+ SetModalInputMode( sal_False );
+ SetModalInputMode( sal_True );
// #93022# def-button might have changed after show
if( !mnMousePositioned )
@@ -555,23 +555,23 @@ void Dialog::DataChanged( const DataChangedEvent& rDCEvt )
// -----------------------------------------------------------------------
-BOOL Dialog::Close()
+sal_Bool Dialog::Close()
{
ImplDelData aDelData;
ImplAddDel( &aDelData );
ImplCallEventListeners( VCLEVENT_WINDOW_CLOSE );
if ( aDelData.IsDelete() )
- return FALSE;
+ return sal_False;
ImplRemoveDel( &aDelData );
if ( mpWindowImpl->mxWindowPeer.is() && IsCreatedWithToolkit() && !IsInExecute() )
- return FALSE;
+ return sal_False;
- mbInClose = TRUE;
+ mbInClose = sal_True;
if ( !(GetStyle() & WB_CLOSEABLE) )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
ImplAddDel( &aDelData );
PushButton* pButton = ImplGetCancelButton( this );
if ( pButton )
@@ -582,30 +582,30 @@ BOOL Dialog::Close()
if ( pButton )
pButton->Click();
else
- bRet = FALSE;
+ bRet = sal_False;
}
if ( aDelData.IsDelete() )
- return TRUE;
+ return sal_True;
ImplRemoveDel( &aDelData );
return bRet;
}
if ( IsInExecute() )
{
- EndDialog( FALSE );
- mbInClose = FALSE;
- return TRUE;
+ EndDialog( sal_False );
+ mbInClose = sal_False;
+ return sal_True;
}
else
{
- mbInClose = FALSE;
+ mbInClose = sal_False;
return SystemWindow::Close();
}
}
// -----------------------------------------------------------------------
-BOOL Dialog::ImplStartExecuteModal()
+sal_Bool Dialog::ImplStartExecuteModal()
{
if ( mbInExecute )
{
@@ -614,7 +614,7 @@ BOOL Dialog::ImplStartExecuteModal()
aErrorStr += ImplGetDialogText( this );
DBG_ERROR( aErrorStr.GetBuffer() );
#endif
- return FALSE;
+ return sal_False;
}
if ( Application::IsDialogCancelEnabled() )
@@ -624,7 +624,7 @@ BOOL Dialog::ImplStartExecuteModal()
aErrorStr += ImplGetDialogText( this );
DBG_ERROR( aErrorStr.GetBuffer() );
#endif
- return FALSE;
+ return sal_False;
}
#ifdef DBG_UTIL
@@ -653,15 +653,15 @@ BOOL Dialog::ImplStartExecuteModal()
pSVData->maWinData.mpTrackWin->EndTracking( ENDTRACK_CANCEL );
if ( pSVData->maWinData.mpCaptureWin )
pSVData->maWinData.mpCaptureWin->ReleaseMouse();
- EnableInput( TRUE, TRUE );
+ EnableInput( sal_True, sal_True );
if ( GetParent() )
{
NotifyEvent aNEvt( EVENT_EXECUTEDIALOG, this );
GetParent()->Notify( aNEvt );
}
- mbInExecute = TRUE;
- SetModalInputMode( TRUE );
+ mbInExecute = sal_True;
+ SetModalInputMode( sal_True );
mbOldSaveBack = IsSaveBackgroundEnabled();
EnableSaveBackground();
@@ -671,7 +671,7 @@ BOOL Dialog::ImplStartExecuteModal()
Show();
pSVData->maAppData.mnModalMode++;
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -743,7 +743,7 @@ void Dialog::StartExecuteModal( const Link& rEndDialogHdl )
// -----------------------------------------------------------------------
-BOOL Dialog::IsStartedModal() const
+sal_Bool Dialog::IsStartedModal() const
{
return mpDialogImpl->mbStartedModal;
}
@@ -754,7 +754,7 @@ void Dialog::EndDialog( long nResult )
{
if ( mbInExecute )
{
- SetModalInputMode( FALSE );
+ SetModalInputMode( sal_False );
// Dialog aus der Kette der Dialoge die in Execute stehen entfernen
ImplSVData* pSVData = ImplGetSVData();
@@ -802,7 +802,7 @@ void Dialog::EndDialog( long nResult )
mpDialogImpl->mbStartedModal = false;
mpDialogImpl->mnResult = -1;
}
- mbInExecute = FALSE;
+ mbInExecute = sal_False;
}
}
@@ -823,9 +823,9 @@ void Dialog::EndAllDialogs( Window* pParent )
while ( pModDialog )
{
pTempModDialog = pModDialog->mpPrevExecuteDlg;
- if( !pParent || ( pParent && pParent->IsWindowOrChild( pModDialog, TRUE ) ) )
+ if( !pParent || ( pParent && pParent->IsWindowOrChild( pModDialog, sal_True ) ) )
{
- pModDialog->EndDialog( FALSE );
+ pModDialog->EndDialog( sal_False );
pModDialog->PostUserEvent( Link() );
}
pModDialog = pTempModDialog;
@@ -834,7 +834,7 @@ void Dialog::EndAllDialogs( Window* pParent )
// -----------------------------------------------------------------------
-void Dialog::SetModalInputMode( BOOL bModal )
+void Dialog::SetModalInputMode( sal_Bool bModal )
{
if ( bModal == mbModalMode )
return;
@@ -848,8 +848,8 @@ void Dialog::SetModalInputMode( BOOL bModal )
// Diable the prev Modal Dialog, because our dialog must close at first,
// before the other dialog can be closed (because the other dialog
// is on stack since our dialog returns)
- if ( mpPrevExecuteDlg && !mpPrevExecuteDlg->IsWindowOrChild( this, TRUE ) )
- mpPrevExecuteDlg->EnableInput( FALSE, TRUE, TRUE, this );
+ if ( mpPrevExecuteDlg && !mpPrevExecuteDlg->IsWindowOrChild( this, sal_True ) )
+ mpPrevExecuteDlg->EnableInput( sal_False, sal_True, sal_True, this );
// determine next overlap dialog parent
Window* pParent = GetParent();
@@ -876,20 +876,20 @@ void Dialog::SetModalInputMode( BOOL bModal )
}
// Enable the prev Modal Dialog
- if ( mpPrevExecuteDlg && !mpPrevExecuteDlg->IsWindowOrChild( this, TRUE ) )
+ if ( mpPrevExecuteDlg && !mpPrevExecuteDlg->IsWindowOrChild( this, sal_True ) )
{
- mpPrevExecuteDlg->EnableInput( TRUE, TRUE, TRUE, this );
+ mpPrevExecuteDlg->EnableInput( sal_True, sal_True, sal_True, this );
// ensure continued modality of prev dialog
// do not change modality counter
- mpPrevExecuteDlg->SetModalInputMode( FALSE );
- mpPrevExecuteDlg->SetModalInputMode( TRUE );
+ mpPrevExecuteDlg->SetModalInputMode( sal_False );
+ mpPrevExecuteDlg->SetModalInputMode( sal_True );
}
}
}
// -----------------------------------------------------------------------
-void Dialog::SetModalInputMode( BOOL bModal, BOOL bSubModalDialogs )
+void Dialog::SetModalInputMode( sal_Bool bModal, sal_Bool bSubModalDialogs )
{
if ( bSubModalDialogs )
{
@@ -898,7 +898,7 @@ void Dialog::SetModalInputMode( BOOL bModal, BOOL bSubModalDialogs )
while ( pOverlap )
{
if ( pOverlap->IsDialog() )
- ((Dialog*)pOverlap)->SetModalInputMode( bModal, TRUE );
+ ((Dialog*)pOverlap)->SetModalInputMode( bModal, sal_True );
pOverlap = pOverlap->mpWindowImpl->mpNext;
}
}
@@ -933,7 +933,7 @@ void Dialog::GrabFocusToFirstControl()
!pFocusControl->IsVisible() ||
!pFocusControl->IsEnabled() || !pFocusControl->IsInputEnabled() )
{
- USHORT n = 0;
+ sal_uInt16 n = 0;
pFocusControl = ImplGetDlgWindow( n, DLGWINDOW_FIRST );
}
if ( pFocusControl )
@@ -945,13 +945,13 @@ void Dialog::GetDrawWindowBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder,
ImplBorderWindow aImplWin( (Window*)this, WB_BORDER|WB_STDWORK, BORDERWINDOW_STYLE_OVERLAP );
// aImplWin.SetText( GetText() );
// aImplWin.SetPosSizePixel( aPos.X(), aPos.Y(), aSize.Width(), aSize.Height() );
-// aImplWin.SetDisplayActive( TRUE );
+// aImplWin.SetDisplayActive( sal_True );
// aImplWin.InitView();
aImplWin.GetBorder( rLeftBorder, rTopBorder, rRightBorder, rBottomBorder );
}
-void Dialog::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG )
+void Dialog::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uIntPtr )
{
Point aPos = pDev->LogicToPixel( rPos );
Size aSize = pDev->LogicToPixel( rSize );
@@ -977,7 +977,7 @@ void Dialog::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULO
ImplBorderWindow aImplWin( this, WB_BORDER|WB_STDWORK, BORDERWINDOW_STYLE_OVERLAP );
aImplWin.SetText( GetText() );
aImplWin.SetPosSizePixel( aPos.X(), aPos.Y(), aSize.Width(), aSize.Height() );
- aImplWin.SetDisplayActive( TRUE );
+ aImplWin.SetDisplayActive( sal_True );
aImplWin.InitView();
aImplWin.Draw( Rectangle( aPos, aSize ), pDev, aPos );
diff --git a/vcl/source/window/dlgctrl.cxx b/vcl/source/window/dlgctrl.cxx
index 64f2b7e0d2a1..5681d6c2b724 100644
--- a/vcl/source/window/dlgctrl.cxx
+++ b/vcl/source/window/dlgctrl.cxx
@@ -44,7 +44,7 @@ using namespace ::com::sun::star;
// =======================================================================
-static BOOL ImplHasIndirectTabParent( Window* pWindow )
+static sal_Bool ImplHasIndirectTabParent( Window* pWindow )
{
// The window has inderect tab parent if it is included in tab hierarchy
// of the indirect parent window
@@ -74,7 +74,7 @@ static Window* ImplGetTopParentOfTabHierarchy( Window* pParent )
// -----------------------------------------------------------------------
-static Window* ImplGetSubChildWindow( Window* pParent, USHORT n, USHORT& nIndex )
+static Window* ImplGetSubChildWindow( Window* pParent, sal_uInt16 n, sal_uInt16& nIndex )
{
Window* pTabPage = NULL;
Window* pFoundWindow = NULL;
@@ -150,7 +150,7 @@ static Window* ImplGetSubChildWindow( Window* pParent, USHORT n, USHORT& nIndex
// -----------------------------------------------------------------------
-static Window* ImplGetChildWindow( Window* pParent, USHORT n, USHORT& nIndex, BOOL bTestEnable )
+static Window* ImplGetChildWindow( Window* pParent, sal_uInt16 n, sal_uInt16& nIndex, sal_Bool bTestEnable )
{
pParent = ImplGetTopParentOfTabHierarchy( pParent );
@@ -158,7 +158,7 @@ static Window* ImplGetChildWindow( Window* pParent, USHORT n, USHORT& nIndex, BO
Window* pWindow = ImplGetSubChildWindow( pParent, n, nIndex );
if ( bTestEnable )
{
- USHORT n2 = nIndex;
+ sal_uInt16 n2 = nIndex;
while ( pWindow && (!pWindow->IsEnabled() || !pWindow->IsInputEnabled()) )
{
n2 = nIndex+1;
@@ -184,7 +184,7 @@ static Window* ImplGetChildWindow( Window* pParent, USHORT n, USHORT& nIndex, BO
// -----------------------------------------------------------------------
-static Window* ImplGetNextWindow( Window* pParent, USHORT n, USHORT& nIndex, BOOL bTestEnable )
+static Window* ImplGetNextWindow( Window* pParent, sal_uInt16 n, sal_uInt16& nIndex, sal_Bool bTestEnable )
{
Window* pWindow = ImplGetChildWindow( pParent, n+1, nIndex, bTestEnable );
if ( n == nIndex )
@@ -197,17 +197,17 @@ static Window* ImplGetNextWindow( Window* pParent, USHORT n, USHORT& nIndex, BOO
// -----------------------------------------------------------------------
-Window* Window::ImplGetDlgWindow( USHORT nIndex, USHORT nType,
- USHORT nFormStart, USHORT nFormEnd,
- USHORT* pIndex )
+Window* Window::ImplGetDlgWindow( sal_uInt16 nIndex, sal_uInt16 nType,
+ sal_uInt16 nFormStart, sal_uInt16 nFormEnd,
+ sal_uInt16* pIndex )
{
DBG_ASSERT( (nIndex >= nFormStart) && (nIndex <= nFormEnd),
"Window::ImplGetDlgWindow() - nIndex not in Form" );
Window* pWindow = NULL;
- USHORT i;
- USHORT nTemp;
- USHORT nStartIndex;
+ sal_uInt16 i;
+ sal_uInt16 nTemp;
+ sal_uInt16 nStartIndex;
if ( nType == DLGWINDOW_PREV )
{
@@ -218,7 +218,7 @@ Window* Window::ImplGetDlgWindow( USHORT nIndex, USHORT nType,
i--;
else
i = nFormEnd;
- pWindow = ImplGetChildWindow( this, i, nTemp, TRUE );
+ pWindow = ImplGetChildWindow( this, i, nTemp, sal_True );
if ( !pWindow )
break;
if ( (i == nTemp) && (pWindow->GetStyle() & WB_TABSTOP) )
@@ -238,19 +238,19 @@ Window* Window::ImplGetDlgWindow( USHORT nIndex, USHORT nType,
{
if ( i < nFormEnd )
{
- pWindow = ImplGetNextWindow( this, i, i, TRUE );
+ pWindow = ImplGetNextWindow( this, i, i, sal_True );
if ( (i > nFormEnd) || (i < nFormStart) )
- pWindow = ImplGetChildWindow( this, nFormStart, i, TRUE );
+ pWindow = ImplGetChildWindow( this, nFormStart, i, sal_True );
}
else
- pWindow = ImplGetChildWindow( this, nFormStart, i, TRUE );
+ pWindow = ImplGetChildWindow( this, nFormStart, i, sal_True );
}
if ( i <= nFormEnd )
{
// 2ten Index mitfuehren, falls alle Controls disablte
- USHORT nStartIndex2 = i;
- USHORT nOldIndex = i+1;
+ sal_uInt16 nStartIndex2 = i;
+ sal_uInt16 nOldIndex = i+1;
do
{
@@ -263,9 +263,9 @@ Window* Window::ImplGetDlgWindow( USHORT nIndex, USHORT nType,
}
nOldIndex = i;
if ( (i > nFormEnd) || (i < nFormStart) )
- pWindow = ImplGetChildWindow( this, nFormStart, i, TRUE );
+ pWindow = ImplGetChildWindow( this, nFormStart, i, sal_True );
else
- pWindow = ImplGetNextWindow( this, i, i, TRUE );
+ pWindow = ImplGetNextWindow( this, i, i, sal_True );
}
while ( (i != nStartIndex) && (i != nStartIndex2) );
@@ -303,20 +303,20 @@ Window* Window::ImplGetDlgWindow( USHORT nIndex, USHORT nType,
// -----------------------------------------------------------------------
-static Window* ImplFindDlgCtrlWindow( Window* pParent, Window* pWindow, USHORT& rIndex,
- USHORT& rFormStart, USHORT& rFormEnd )
+static Window* ImplFindDlgCtrlWindow( Window* pParent, Window* pWindow, sal_uInt16& rIndex,
+ sal_uInt16& rFormStart, sal_uInt16& rFormEnd )
{
Window* pSWindow;
Window* pSecondWindow = NULL;
Window* pTempWindow = NULL;
- USHORT i;
- USHORT nSecond_i = 0;
- USHORT nFormStart = 0;
- USHORT nSecondFormStart = 0;
- USHORT nFormEnd;
+ sal_uInt16 i;
+ sal_uInt16 nSecond_i = 0;
+ sal_uInt16 nFormStart = 0;
+ sal_uInt16 nSecondFormStart = 0;
+ sal_uInt16 nFormEnd;
// Focus-Fenster in der Child-Liste suchen
- Window* pFirstChildWindow = pSWindow = ImplGetChildWindow( pParent, 0, i, FALSE );
+ Window* pFirstChildWindow = pSWindow = ImplGetChildWindow( pParent, 0, i, sal_False );
if( pWindow == NULL )
pWindow = pSWindow;
@@ -339,7 +339,7 @@ static Window* ImplFindDlgCtrlWindow( Window* pParent, Window* pWindow, USHORT&
break;
}
- pSWindow = ImplGetNextWindow( pParent, i, i, FALSE );
+ pSWindow = ImplGetNextWindow( pParent, i, i, sal_False );
if ( !i )
pSWindow = NULL;
}
@@ -369,7 +369,7 @@ static Window* ImplFindDlgCtrlWindow( Window* pParent, Window* pWindow, USHORT&
do
{
nFormEnd = i;
- pTempWindow = ImplGetNextWindow( pParent, i, i, FALSE );
+ pTempWindow = ImplGetNextWindow( pParent, i, i, sal_False );
// the DialogControlStart mark is only accepted for the direct children
if ( !i
@@ -387,7 +387,7 @@ static Window* ImplFindDlgCtrlWindow( Window* pParent, Window* pWindow, USHORT&
if ( nIteration >= 2 )
{
// this is an unexpected scenario
- DBG_ASSERT( FALSE, "It seems to be an endless loop!" );
+ DBG_ASSERT( sal_False, "It seems to be an endless loop!" );
rFormStart = 0;
break;
}
@@ -401,16 +401,16 @@ static Window* ImplFindDlgCtrlWindow( Window* pParent, Window* pWindow, USHORT&
// -----------------------------------------------------------------------
-static Window* ImplFindAccelWindow( Window* pParent, USHORT& rIndex, xub_Unicode cCharCode,
- USHORT nFormStart, USHORT nFormEnd, BOOL bCheckEnable = TRUE )
+static Window* ImplFindAccelWindow( Window* pParent, sal_uInt16& rIndex, xub_Unicode cCharCode,
+ sal_uInt16 nFormStart, sal_uInt16 nFormEnd, sal_Bool bCheckEnable = sal_True )
{
DBG_ASSERT( (rIndex >= nFormStart) && (rIndex <= nFormEnd),
"Window::ImplFindAccelWindow() - rIndex not in Form" );
xub_Unicode cCompareChar;
- USHORT nStart = rIndex;
- USHORT i = rIndex;
- int bSearch = TRUE;
+ sal_uInt16 nStart = rIndex;
+ sal_uInt16 i = rIndex;
+ int bSearch = sal_True;
Window* pWindow;
// MT: Where can we keep the CharClass?!
@@ -422,13 +422,13 @@ static Window* ImplFindAccelWindow( Window* pParent, USHORT& rIndex, xub_Unicode
cCharCode = xCharClass->toUpper( String(cCharCode), 0, 1, rLocale )[0];
if ( i < nFormEnd )
- pWindow = ImplGetNextWindow( pParent, i, i, TRUE );
+ pWindow = ImplGetNextWindow( pParent, i, i, sal_True );
else
- pWindow = ImplGetChildWindow( pParent, nFormStart, i, TRUE );
+ pWindow = ImplGetChildWindow( pParent, nFormStart, i, sal_True );
while( bSearch && pWindow )
{
const XubString aStr = pWindow->GetText();
- USHORT nPos = aStr.Search( '~' );
+ sal_uInt16 nPos = aStr.Search( '~' );
while ( nPos != STRING_NOTFOUND )
{
cCompareChar = aStr.GetChar( nPos+1 );
@@ -452,9 +452,9 @@ static Window* ImplFindAccelWindow( Window* pParent, USHORT& rIndex, xub_Unicode
// children checked for accelerators
if( (pWindow->GetStyle() & WB_CHILDDLGCTRL) != 0 )
{
- USHORT nChildIndex;
- USHORT nChildFormStart;
- USHORT nChildFormEnd;
+ sal_uInt16 nChildIndex;
+ sal_uInt16 nChildFormStart;
+ sal_uInt16 nChildFormEnd;
// get form start and end
::ImplFindDlgCtrlWindow( pWindow, NULL,
@@ -484,14 +484,14 @@ static Window* ImplFindAccelWindow( Window* pParent, USHORT& rIndex, xub_Unicode
// -----------------------------------------------------------------------
-void Window::ImplControlFocus( USHORT nFlags )
+void Window::ImplControlFocus( sal_uInt16 nFlags )
{
if ( nFlags & GETFOCUS_MNEMONIC )
{
if ( GetType() == WINDOW_RADIOBUTTON )
{
if ( !((RadioButton*)this)->IsChecked() )
- ((RadioButton*)this)->ImplCallClick( TRUE, nFlags );
+ ((RadioButton*)this)->ImplCallClick( sal_True, nFlags );
else
ImplGrabFocus( nFlags );
}
@@ -504,8 +504,8 @@ void Window::ImplControlFocus( USHORT nFlags )
((CheckBox*)this)->ImplCheck();
else if ( mpWindowImpl->mbPushButton )
{
- ((PushButton*)this)->SetPressed( TRUE );
- ((PushButton*)this)->SetPressed( FALSE );
+ ((PushButton*)this)->SetPressed( sal_True );
+ ((PushButton*)this)->SetPressed( sal_False );
((PushButton*)this)->Click();
}
}
@@ -516,7 +516,7 @@ void Window::ImplControlFocus( USHORT nFlags )
if ( GetType() == WINDOW_RADIOBUTTON )
{
if ( !((RadioButton*)this)->IsChecked() )
- ((RadioButton*)this)->ImplCallClick( TRUE, nFlags );
+ ((RadioButton*)this)->ImplCallClick( sal_True, nFlags );
else
ImplGrabFocus( nFlags );
}
@@ -527,32 +527,32 @@ void Window::ImplControlFocus( USHORT nFlags )
// -----------------------------------------------------------------------
-BOOL Window::ImplDlgCtrl( const KeyEvent& rKEvt, BOOL bKeyInput )
+sal_Bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, sal_Bool bKeyInput )
{
KeyCode aKeyCode = rKEvt.GetKeyCode();
- USHORT nKeyCode = aKeyCode.GetCode();
+ sal_uInt16 nKeyCode = aKeyCode.GetCode();
Window* pSWindow;
Window* pTempWindow;
Window* pButtonWindow;
- USHORT i;
- USHORT iButton;
- USHORT iButtonStart;
- USHORT iTemp;
- USHORT nIndex;
- USHORT nFormStart;
- USHORT nFormEnd;
- USHORT nDlgCtrlFlags;
+ sal_uInt16 i;
+ sal_uInt16 iButton;
+ sal_uInt16 iButtonStart;
+ sal_uInt16 iTemp;
+ sal_uInt16 nIndex;
+ sal_uInt16 nFormStart;
+ sal_uInt16 nFormEnd;
+ sal_uInt16 nDlgCtrlFlags;
// Ohne Focus-Window koennen wir auch keine Steuerung uebernehmen
Window* pFocusWindow = Application::GetFocusWindow();
if ( !pFocusWindow || !ImplIsWindowOrChild( pFocusWindow ) )
- return FALSE;
+ return sal_False;
// Focus-Fenster in der Child-Liste suchen
pSWindow = ::ImplFindDlgCtrlWindow( this, pFocusWindow,
nIndex, nFormStart, nFormEnd );
if ( !pSWindow )
- return FALSE;
+ return sal_False;
i = nIndex;
nDlgCtrlFlags = 0;
@@ -571,7 +571,7 @@ BOOL Window::ImplDlgCtrl( const KeyEvent& rKEvt, BOOL bKeyInput )
if ( nKeyCode == KEY_RETURN )
{
// Wir suchen zuerst nach einem DefPushButton/CancelButton
- pButtonWindow = ImplGetChildWindow( this, nFormStart, iButton, TRUE );
+ pButtonWindow = ImplGetChildWindow( this, nFormStart, iButton, sal_True );
iButtonStart = iButton;
while ( pButtonWindow )
{
@@ -579,17 +579,17 @@ BOOL Window::ImplDlgCtrl( const KeyEvent& rKEvt, BOOL bKeyInput )
pButtonWindow->mpWindowImpl->mbPushButton )
break;
- pButtonWindow = ImplGetNextWindow( this, iButton, iButton, TRUE );
+ pButtonWindow = ImplGetNextWindow( this, iButton, iButton, sal_True );
if ( (iButton <= iButtonStart) || (iButton > nFormEnd) )
pButtonWindow = NULL;
}
if ( bKeyInput && !pButtonWindow && (nDlgCtrlFlags & WINDOW_DLGCTRL_RETURN) )
{
- USHORT nType;
- USHORT nGetFocusFlags = GETFOCUS_TAB;
- USHORT nNewIndex;
- USHORT iStart;
+ sal_uInt16 nType;
+ sal_uInt16 nGetFocusFlags = GETFOCUS_TAB;
+ sal_uInt16 nNewIndex;
+ sal_uInt16 iStart;
if ( aKeyCode.IsShift() )
{
nType = DLGWINDOW_PREV;
@@ -618,7 +618,7 @@ BOOL Window::ImplDlgCtrl( const KeyEvent& rKEvt, BOOL bKeyInput )
nGetFocusFlags |= GETFOCUS_AROUND;
}
pTempWindow->ImplControlFocus( nGetFocusFlags );
- return TRUE;
+ return sal_True;
}
else
{
@@ -640,21 +640,21 @@ BOOL Window::ImplDlgCtrl( const KeyEvent& rKEvt, BOOL bKeyInput )
if ( !ImplCallPreNotify( aNEvt2 ) )
pSWindow->GetFocus();
pSWindow->mpWindowImpl->mnGetFocusFlags = 0;
- return TRUE;
+ return sal_True;
}
}
}
else if ( nKeyCode == KEY_ESCAPE )
{
// Wir suchen zuerst nach einem DefPushButton/CancelButton
- pButtonWindow = ImplGetChildWindow( this, nFormStart, iButton, TRUE );
+ pButtonWindow = ImplGetChildWindow( this, nFormStart, iButton, sal_True );
iButtonStart = iButton;
while ( pButtonWindow )
{
if ( pButtonWindow->GetType() == WINDOW_CANCELBUTTON )
break;
- pButtonWindow = ImplGetNextWindow( this, iButton, iButton, TRUE );
+ pButtonWindow = ImplGetNextWindow( this, iButton, iButton, sal_True );
if ( (iButton <= iButtonStart) || (iButton > nFormEnd) )
pButtonWindow = NULL;
}
@@ -663,9 +663,9 @@ BOOL Window::ImplDlgCtrl( const KeyEvent& rKEvt, BOOL bKeyInput )
{
if ( mpWindowImpl->mpDlgCtrlDownWindow != pButtonWindow )
{
- ((PushButton*)mpWindowImpl->mpDlgCtrlDownWindow)->SetPressed( FALSE );
+ ((PushButton*)mpWindowImpl->mpDlgCtrlDownWindow)->SetPressed( sal_False );
mpWindowImpl->mpDlgCtrlDownWindow = NULL;
- return TRUE;
+ return sal_True;
}
}
}
@@ -676,10 +676,10 @@ BOOL Window::ImplDlgCtrl( const KeyEvent& rKEvt, BOOL bKeyInput )
// keine Alt-Taste abfangen, wegen Windows
if ( !aKeyCode.IsMod2() )
{
- USHORT nType;
- USHORT nGetFocusFlags = GETFOCUS_TAB;
- USHORT nNewIndex;
- BOOL bFormular = FALSE;
+ sal_uInt16 nType;
+ sal_uInt16 nGetFocusFlags = GETFOCUS_TAB;
+ sal_uInt16 nNewIndex;
+ sal_Bool bFormular = sal_False;
// Bei Ctrl-Tab erstmal testen, ob zwischen Formularen
// gesprungen werden soll
@@ -688,7 +688,7 @@ BOOL Window::ImplDlgCtrl( const KeyEvent& rKEvt, BOOL bKeyInput )
// Gruppe suchen
Window* pFormularFirstWindow = NULL;
Window* pLastFormularFirstWindow = NULL;
- pTempWindow = ImplGetChildWindow( this, 0, iTemp, FALSE );
+ pTempWindow = ImplGetChildWindow( this, 0, iTemp, sal_False );
Window* pPrevFirstFormularFirstWindow = NULL;
Window* pFirstFormularFirstWindow = pTempWindow;
while ( pTempWindow )
@@ -696,7 +696,7 @@ BOOL Window::ImplDlgCtrl( const KeyEvent& rKEvt, BOOL bKeyInput )
if ( pTempWindow->ImplGetWindow()->IsDialogControlStart() )
{
if ( iTemp != 0 )
- bFormular = TRUE;
+ bFormular = sal_True;
if ( aKeyCode.IsShift() )
{
if ( iTemp <= nIndex )
@@ -711,7 +711,7 @@ BOOL Window::ImplDlgCtrl( const KeyEvent& rKEvt, BOOL bKeyInput )
pLastFormularFirstWindow = pTempWindow;
}
- pTempWindow = ImplGetNextWindow( this, iTemp, iTemp, FALSE );
+ pTempWindow = ImplGetNextWindow( this, iTemp, iTemp, sal_False );
if ( !iTemp )
pTempWindow = NULL;
}
@@ -726,9 +726,9 @@ BOOL Window::ImplDlgCtrl( const KeyEvent& rKEvt, BOOL bKeyInput )
pFormularFirstWindow = pFirstFormularFirstWindow;
}
- USHORT nFoundFormStart = 0;
- USHORT nFoundFormEnd = 0;
- USHORT nTempIndex = 0;
+ sal_uInt16 nFoundFormStart = 0;
+ sal_uInt16 nFoundFormEnd = 0;
+ sal_uInt16 nTempIndex = 0;
if ( ::ImplFindDlgCtrlWindow( this, pFormularFirstWindow, nTempIndex,
nFoundFormStart, nFoundFormEnd ) )
{
@@ -737,7 +737,7 @@ BOOL Window::ImplDlgCtrl( const KeyEvent& rKEvt, BOOL bKeyInput )
if ( pFormularFirstWindow )
{
pFormularFirstWindow->ImplControlFocus();
- return TRUE;
+ return sal_True;
}
}
}
@@ -773,7 +773,7 @@ BOOL Window::ImplDlgCtrl( const KeyEvent& rKEvt, BOOL bKeyInput )
if ( !ImplCallPreNotify( aNEvt2 ) )
pSWindow->GetFocus();
pSWindow->mpWindowImpl->mnGetFocusFlags = 0;
- return TRUE;
+ return sal_True;
}
else if ( pWindow )
{
@@ -789,7 +789,7 @@ BOOL Window::ImplDlgCtrl( const KeyEvent& rKEvt, BOOL bKeyInput )
nGetFocusFlags |= GETFOCUS_AROUND;
}
pWindow->ImplControlFocus( nGetFocusFlags );
- return TRUE;
+ return sal_True;
}
}
}
@@ -812,7 +812,7 @@ BOOL Window::ImplDlgCtrl( const KeyEvent& rKEvt, BOOL bKeyInput )
{
if ( pWindow != pSWindow )
pWindow->ImplControlFocus( GETFOCUS_CURSOR | GETFOCUS_BACKWARD );
- return TRUE;
+ return sal_True;
}
if ( nStyle & WB_GROUP )
@@ -839,7 +839,7 @@ BOOL Window::ImplDlgCtrl( const KeyEvent& rKEvt, BOOL bKeyInput )
if ( pWindow->IsVisible() && pWindow->IsEnabled() && pWindow->IsInputEnabled() )
{
pWindow->ImplControlFocus( GETFOCUS_CURSOR | GETFOCUS_BACKWARD );
- return TRUE;
+ return sal_True;
}
pWindow = pWindow->GetWindow( WINDOW_NEXT );
@@ -853,11 +853,11 @@ BOOL Window::ImplDlgCtrl( const KeyEvent& rKEvt, BOOL bKeyInput )
pSWindow = ::ImplFindAccelWindow( this, i, c, nFormStart, nFormEnd );
if ( pSWindow )
{
- USHORT nGetFocusFlags = GETFOCUS_MNEMONIC;
+ sal_uInt16 nGetFocusFlags = GETFOCUS_MNEMONIC;
if ( pSWindow == ::ImplFindAccelWindow( this, i, c, nFormStart, nFormEnd ) )
nGetFocusFlags |= GETFOCUS_UNIQUEMNEMONIC;
pSWindow->ImplControlFocus( nGetFocusFlags );
- return TRUE;
+ return sal_True;
}
}
}
@@ -869,30 +869,30 @@ BOOL Window::ImplDlgCtrl( const KeyEvent& rKEvt, BOOL bKeyInput )
{
if ( mpWindowImpl->mpDlgCtrlDownWindow && (mpWindowImpl->mpDlgCtrlDownWindow != pButtonWindow) )
{
- ((PushButton*)mpWindowImpl->mpDlgCtrlDownWindow)->SetPressed( FALSE );
+ ((PushButton*)mpWindowImpl->mpDlgCtrlDownWindow)->SetPressed( sal_False );
mpWindowImpl->mpDlgCtrlDownWindow = NULL;
}
- ((PushButton*)pButtonWindow)->SetPressed( TRUE );
+ ((PushButton*)pButtonWindow)->SetPressed( sal_True );
mpWindowImpl->mpDlgCtrlDownWindow = pButtonWindow;
}
else if ( mpWindowImpl->mpDlgCtrlDownWindow == pButtonWindow )
{
mpWindowImpl->mpDlgCtrlDownWindow = NULL;
- ((PushButton*)pButtonWindow)->SetPressed( FALSE );
+ ((PushButton*)pButtonWindow)->SetPressed( sal_False );
((PushButton*)pButtonWindow)->Click();
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
// checks if this window has dialog control
-BOOL Window::ImplHasDlgCtrl()
+sal_Bool Window::ImplHasDlgCtrl()
{
Window* pDlgCtrlParent;
Window* pDlgCtrl;
@@ -906,9 +906,9 @@ BOOL Window::ImplHasDlgCtrl()
pDlgCtrlParent = pDlgCtrlParent->ImplGetParent();
if ( !pDlgCtrlParent || ((pDlgCtrlParent->GetStyle() & (WB_DIALOGCONTROL | WB_NODIALOGCONTROL)) != WB_DIALOGCONTROL) )
- return FALSE;
+ return sal_False;
else
- return TRUE;
+ return sal_True;
}
void Window::ImplDlgCtrlNextWindow()
@@ -916,9 +916,9 @@ void Window::ImplDlgCtrlNextWindow()
Window* pDlgCtrlParent;
Window* pDlgCtrl;
Window* pSWindow;
- USHORT nIndex;
- USHORT nFormStart;
- USHORT nFormEnd;
+ sal_uInt16 nIndex;
+ sal_uInt16 nFormStart;
+ sal_uInt16 nFormEnd;
// lookup window for dialog control
pDlgCtrl = this;
@@ -945,14 +945,14 @@ if ( !pDlgCtrlParent || (GetStyle() & WB_NODIALOGCONTROL) || ((pDlgCtrlParent->G
// -----------------------------------------------------------------------
static void ImplDlgCtrlUpdateDefButton( Window* pParent, Window* pFocusWindow,
- BOOL bGetFocus )
+ sal_Bool bGetFocus )
{
PushButton* pOldDefButton = NULL;
PushButton* pNewDefButton = NULL;
Window* pSWindow;
- USHORT i;
- USHORT nFormStart;
- USHORT nFormEnd;
+ sal_uInt16 i;
+ sal_uInt16 nFormStart;
+ sal_uInt16 nFormEnd;
// Formular suchen
pSWindow = ::ImplFindDlgCtrlWindow( pParent, pFocusWindow, i, nFormStart, nFormEnd );
@@ -962,7 +962,7 @@ static void ImplDlgCtrlUpdateDefButton( Window* pParent, Window* pFocusWindow,
nFormEnd = 0xFFFF;
}
- pSWindow = ImplGetChildWindow( pParent, nFormStart, i, FALSE );
+ pSWindow = ImplGetChildWindow( pParent, nFormStart, i, sal_False );
while ( pSWindow )
{
if ( pSWindow->ImplIsPushButton() )
@@ -976,14 +976,14 @@ static void ImplDlgCtrlUpdateDefButton( Window* pParent, Window* pFocusWindow,
pNewDefButton = pPushButton;
}
- pSWindow = ImplGetNextWindow( pParent, i, i, FALSE );
+ pSWindow = ImplGetNextWindow( pParent, i, i, sal_False );
if ( !i || (i > nFormEnd) )
pSWindow = NULL;
}
if ( !bGetFocus )
{
- USHORT nDummy;
+ sal_uInt16 nDummy;
Window* pNewFocusWindow = Application::GetFocusWindow();
if ( !pNewFocusWindow || !pParent->ImplIsWindowOrChild( pNewFocusWindow ) )
pNewDefButton = NULL;
@@ -995,19 +995,19 @@ static void ImplDlgCtrlUpdateDefButton( Window* pParent, Window* pFocusWindow,
if ( pOldDefButton != pNewDefButton )
{
if ( pOldDefButton )
- pOldDefButton->ImplSetDefButton( FALSE );
+ pOldDefButton->ImplSetDefButton( sal_False );
if ( pNewDefButton )
- pNewDefButton->ImplSetDefButton( TRUE );
+ pNewDefButton->ImplSetDefButton( sal_True );
}
}
// -----------------------------------------------------------------------
-void Window::ImplDlgCtrlFocusChanged( Window* pWindow, BOOL bGetFocus )
+void Window::ImplDlgCtrlFocusChanged( Window* pWindow, sal_Bool bGetFocus )
{
if ( mpWindowImpl->mpDlgCtrlDownWindow && !bGetFocus )
{
- ((PushButton*)mpWindowImpl->mpDlgCtrlDownWindow)->SetPressed( FALSE );
+ ((PushButton*)mpWindowImpl->mpDlgCtrlDownWindow)->SetPressed( sal_False );
mpWindowImpl->mpDlgCtrlDownWindow = NULL;
}
@@ -1018,9 +1018,9 @@ void Window::ImplDlgCtrlFocusChanged( Window* pWindow, BOOL bGetFocus )
Window* Window::ImplFindDlgCtrlWindow( Window* pWindow )
{
- USHORT nIndex;
- USHORT nFormStart;
- USHORT nFormEnd;
+ sal_uInt16 nIndex;
+ sal_uInt16 nFormStart;
+ sal_uInt16 nFormEnd;
// Focus-Fenster in der Child-Liste suchen und zurueckgeben
return ::ImplFindDlgCtrlWindow( this, pWindow, nIndex, nFormStart, nFormEnd );
@@ -1046,7 +1046,7 @@ Window* Window::GetParentLabeledBy( const Window* ) const
static sal_Unicode getAccel( const String& rStr )
{
sal_Unicode nChar = 0;
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
do
{
nPos = rStr.Search( '~', nPos );
@@ -1087,10 +1087,10 @@ Window* Window::GetLabelFor() const
{
// #i100833# MT 2010/02: Group box and fixed lines can also lable a fixed text.
// See tools/options/print for example.
- BOOL bThisIsAGroupControl = (nMyType == WINDOW_GROUPBOX) || (nMyType == WINDOW_FIXEDLINE);
+ sal_Bool bThisIsAGroupControl = (nMyType == WINDOW_GROUPBOX) || (nMyType == WINDOW_FIXEDLINE);
Window* pSWindow = NULL;
// get index, form start and form end
- USHORT nIndex=0, nFormStart=0, nFormEnd=0;
+ sal_uInt16 nIndex=0, nFormStart=0, nFormEnd=0;
pSWindow = ::ImplFindDlgCtrlWindow( pFrameWindow,
const_cast<Window*>(this),
nIndex,
@@ -1104,7 +1104,7 @@ Window* Window::GetLabelFor() const
nAccel,
nFormStart,
nFormEnd,
- FALSE );
+ sal_False );
}
else
{
@@ -1116,7 +1116,7 @@ Window* Window::GetLabelFor() const
pSWindow = ::ImplGetChildWindow( pFrameWindow,
nIndex,
nIndex,
- FALSE );
+ sal_False );
if( pSWindow && pSWindow->IsVisible() && ! (pSWindow->GetStyle() & WB_NOLABEL) )
{
WindowType nType = pSWindow->GetType();
@@ -1174,7 +1174,7 @@ Window* Window::GetLabeledBy() const
// is directly before the control
// get form start and form end and index of this control
- USHORT nIndex, nFormStart, nFormEnd;
+ sal_uInt16 nIndex, nFormStart, nFormEnd;
Window* pSWindow = ::ImplFindDlgCtrlWindow( pFrameWindow,
const_cast<Window*>(this),
nIndex,
@@ -1189,13 +1189,13 @@ Window* Window::GetLabeledBy() const
{
nFormStart = nIndex-1;
}
- for( USHORT nSearchIndex = nIndex-1; nSearchIndex >= nFormStart; nSearchIndex-- )
+ for( sal_uInt16 nSearchIndex = nIndex-1; nSearchIndex >= nFormStart; nSearchIndex-- )
{
- USHORT nFoundIndex = 0;
+ sal_uInt16 nFoundIndex = 0;
pSWindow = ::ImplGetChildWindow( pFrameWindow,
nSearchIndex,
nFoundIndex,
- FALSE );
+ sal_False );
if( pSWindow && pSWindow->IsVisible() && !(pSWindow->GetStyle() & WB_NOLABEL) )
{
WindowType nType = pSWindow->GetType();
@@ -1232,14 +1232,14 @@ KeyEvent Window::GetActivationKey() const
}
if( nAccel )
{
- USHORT nCode = 0;
+ sal_uInt16 nCode = 0;
if( nAccel >= 'a' && nAccel <= 'z' )
nCode = KEY_A + (nAccel-'a');
else if( nAccel >= 'A' && nAccel <= 'Z' )
nCode = KEY_A + (nAccel-'A');
else if( nAccel >= '0' && nAccel <= '9' )
nCode = KEY_0 + (nAccel-'0');
- KeyCode aKeyCode( nCode, FALSE, FALSE, TRUE, FALSE );
+ KeyCode aKeyCode( nCode, sal_False, sal_False, sal_True, sal_False );
aKeyEvent = KeyEvent( nAccel, aKeyCode );
}
return aKeyEvent;
diff --git a/vcl/source/window/dockingarea.cxx b/vcl/source/window/dockingarea.cxx
index 95e6c6113c45..afdf5ca99035 100644
--- a/vcl/source/window/dockingarea.cxx
+++ b/vcl/source/window/dockingarea.cxx
@@ -126,7 +126,7 @@ void DockingAreaWindow::StateChanged( StateChangedType nType )
// -----------------------------------------------------------------------
-BOOL DockingAreaWindow::IsHorizontal() const
+sal_Bool DockingAreaWindow::IsHorizontal() const
{
return ( mpImplData->meAlign == WINDOWALIGN_TOP || mpImplData->meAlign == WINDOWALIGN_BOTTOM );
}
@@ -149,7 +149,7 @@ WindowAlign DockingAreaWindow::GetAlign() const
void DockingAreaWindow::Paint( const Rectangle& )
{
- EnableNativeWidget( TRUE ); // only required because the toolkit curently switches this flag off
+ EnableNativeWidget( sal_True ); // only required because the toolkit curently switches this flag off
if( IsNativeControlSupported( CTRL_TOOLBAR, PART_ENTIRE_CONTROL ) )
{
ImplControlValue aControlValue;
@@ -159,7 +159,7 @@ void DockingAreaWindow::Paint( const Rectangle& )
{
// give NWF a hint that this dockingarea is adjacent to the menubar
// useful for special gradient effects that should cover both windows
- aToolbarValue.mbIsTopDockingArea = TRUE;
+ aToolbarValue.mbIsTopDockingArea = sal_True;
}
aControlValue.setOptionalVal( (void *)(&aToolbarValue) );
ControlState nState = CTRL_STATE_ENABLED;
@@ -174,8 +174,8 @@ void DockingAreaWindow::Paint( const Rectangle& )
aCtrlRegion, nState, aControlValue, rtl::OUString() );
// each toolbar gets a thin border to better recognize its borders on the homogeneous docking area
- USHORT nChildren = GetChildCount();
- for( USHORT n = 0; n < nChildren; n++ )
+ sal_uInt16 nChildren = GetChildCount();
+ for( sal_uInt16 n = 0; n < nChildren; n++ )
{
Window* pChild = GetChild( n );
if ( pChild->IsVisible() )
@@ -199,8 +199,8 @@ void DockingAreaWindow::Paint( const Rectangle& )
// create map to find toolbar lines
Size aOutSz = GetOutputSizePixel();
std::map< int, int > ranges;
- USHORT nChildren = GetChildCount();
- for( USHORT n = 0; n < nChildren; n++ )
+ sal_uInt16 nChildren = GetChildCount();
+ for( sal_uInt16 n = 0; n < nChildren; n++ )
{
Window* pChild = GetChild( n );
Point aPos = pChild->GetPosPixel();
diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx
index e67c2d9ecfd5..ec208cc0c4a0 100644
--- a/vcl/source/window/dockmgr.cxx
+++ b/vcl/source/window/dockmgr.cxx
@@ -62,13 +62,13 @@ class ImplDockFloatWin2 : public FloatingWindow
{
private:
ImplDockingWindowWrapper* mpDockWin;
- ULONG mnLastTicks;
+ sal_uIntPtr mnLastTicks;
Timer maDockTimer;
Timer maEndDockTimer;
Point maDockPos;
Rectangle maDockRect;
- BOOL mbInMove;
- ULONG mnLastUserEvent;
+ sal_Bool mbInMove;
+ sal_uIntPtr mnLastUserEvent;
DECL_LINK( DockingHdl, ImplDockFloatWin2* );
DECL_LINK( DockTimerHdl, ImplDockFloatWin2* );
@@ -80,18 +80,18 @@ public:
virtual void Move();
virtual void Resize();
- virtual void TitleButtonClick( USHORT nButton );
+ virtual void TitleButtonClick( sal_uInt16 nButton );
virtual void Pin();
virtual void Roll();
virtual void PopupModeEnd();
virtual void Resizing( Size& rSize );
- virtual BOOL Close();
+ virtual sal_Bool Close();
using Window::SetPosSizePixel;
virtual void SetPosSizePixel( long nX, long nY,
long nWidth, long nHeight,
- USHORT nFlags = WINDOW_POSSIZE_ALL );
+ sal_uInt16 nFlags = WINDOW_POSSIZE_ALL );
- ULONG GetLastTicks() const { return mnLastTicks; }
+ sal_uIntPtr GetLastTicks() const { return mnLastTicks; }
};
// =======================================================================
@@ -101,16 +101,16 @@ ImplDockFloatWin2::ImplDockFloatWin2( Window* pParent, WinBits nWinBits,
FloatingWindow( pParent, nWinBits ),
mpDockWin( pDockingWin ),
mnLastTicks( Time::GetSystemTicks() ),
- mbInMove( FALSE ),
+ mbInMove( sal_False ),
mnLastUserEvent( 0 )
{
// Daten vom DockingWindow uebernehmen
if ( pDockingWin )
{
SetSettings( pDockingWin->GetWindow()->GetSettings() );
- Enable( pDockingWin->GetWindow()->IsEnabled(), FALSE );
- EnableInput( pDockingWin->GetWindow()->IsInputEnabled(), FALSE );
- AlwaysEnableInput( pDockingWin->GetWindow()->IsAlwaysEnableInput(), FALSE );
+ Enable( pDockingWin->GetWindow()->IsEnabled(), sal_False );
+ EnableInput( pDockingWin->GetWindow()->IsInputEnabled(), sal_False );
+ AlwaysEnableInput( pDockingWin->GetWindow()->IsAlwaysEnableInput(), sal_False );
EnableAlwaysOnTop( pDockingWin->GetWindow()->IsAlwaysOnTopEnabled() );
SetActivateMode( pDockingWin->GetWindow()->GetActivateMode() );
}
@@ -150,7 +150,7 @@ IMPL_LINK( ImplDockFloatWin2, DockTimerHdl, ImplDockFloatWin2*, EMPTYARG )
else if( ! ( aState.mnState & ( MOUSE_LEFT | MOUSE_MIDDLE | MOUSE_RIGHT ) ) )
{
mpDockWin->GetWindow()->GetParent()->ImplGetFrameWindow()->HideTracking();
- mpDockWin->EndDocking( maDockRect, FALSE );
+ mpDockWin->EndDocking( maDockRect, sal_False );
}
else
{
@@ -170,7 +170,7 @@ IMPL_LINK( ImplDockFloatWin2, EndDockTimerHdl, ImplDockFloatWin2*, EMPTYARG )
if( ! ( aState.mnState & ( MOUSE_LEFT | MOUSE_MIDDLE | MOUSE_RIGHT ) ) )
{
mpDockWin->GetWindow()->GetParent()->ImplGetFrameWindow()->HideTracking();
- mpDockWin->EndDocking( maDockRect, TRUE );
+ mpDockWin->EndDocking( maDockRect, sal_True );
}
else
{
@@ -189,7 +189,7 @@ IMPL_LINK( ImplDockFloatWin2, DockingHdl, ImplDockFloatWin2*, EMPTYARG )
Window *pDockingArea = mpDockWin->GetWindow()->GetParent();
PointerState aState = pDockingArea->GetPointerState();
- BOOL bRealMove = TRUE;
+ sal_Bool bRealMove = sal_True;
if( GetStyle() & WB_OWNERDRAWDECORATION )
{
// for windows with ownerdraw decoration
@@ -210,9 +210,9 @@ IMPL_LINK( ImplDockFloatWin2, DockingHdl, ImplDockFloatWin2*, EMPTYARG )
PointerState aBorderState = pBorder->GetPointerState();
if( aBorderRect.IsInside( aBorderState.maPos ) )
- bRealMove = TRUE;
+ bRealMove = sal_True;
else
- bRealMove = FALSE;
+ bRealMove = sal_False;
}
}
@@ -232,7 +232,7 @@ IMPL_LINK( ImplDockFloatWin2, DockingHdl, ImplDockFloatWin2*, EMPTYARG )
if( ! mpDockWin->IsDocking() )
mpDockWin->StartDocking( aMousePos, maDockRect );
- BOOL bFloatMode = mpDockWin->Docking( aMousePos, maDockRect );
+ sal_Bool bFloatMode = mpDockWin->Docking( aMousePos, maDockRect );
if( ! bFloatMode )
{
@@ -250,7 +250,7 @@ IMPL_LINK( ImplDockFloatWin2, DockingHdl, ImplDockFloatWin2*, EMPTYARG )
EndDockTimerHdl( this );
}
}
- mbInMove = FALSE;
+ mbInMove = sal_False;
return 0;
}
// -----------------------------------------------------------------------
@@ -260,7 +260,7 @@ void ImplDockFloatWin2::Move()
if( mbInMove )
return;
- mbInMove = TRUE;
+ mbInMove = sal_True;
FloatingWindow::Move();
mpDockWin->GetWindow()->Move();
@@ -292,7 +292,7 @@ void ImplDockFloatWin2::Resize()
void ImplDockFloatWin2::SetPosSizePixel( long nX, long nY,
long nWidth, long nHeight,
- USHORT nFlags )
+ sal_uInt16 nFlags )
{
FloatingWindow::SetPosSizePixel( nX, nY, nWidth, nHeight, nFlags );
}
@@ -300,7 +300,7 @@ void ImplDockFloatWin2::SetPosSizePixel( long nX, long nY,
// -----------------------------------------------------------------------
-void ImplDockFloatWin2::TitleButtonClick( USHORT nButton )
+void ImplDockFloatWin2::TitleButtonClick( sal_uInt16 nButton )
{
FloatingWindow::TitleButtonClick( nButton );
mpDockWin->TitleButtonClick( nButton );
@@ -340,7 +340,7 @@ void ImplDockFloatWin2::Resizing( Size& rSize )
// -----------------------------------------------------------------------
-BOOL ImplDockFloatWin2::Close()
+sal_Bool ImplDockFloatWin2::Close()
{
return mpDockWin->Close();
}
@@ -376,33 +376,33 @@ ImplDockingWindowWrapper* DockingManager::GetDockingWindowWrapper( const Window
return NULL;
}
-BOOL DockingManager::IsDockable( const Window *pWindow )
+sal_Bool DockingManager::IsDockable( const Window *pWindow )
{
ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow );
/*
if( pWindow->HasDockingHandler() )
- return TRUE;
+ return sal_True;
*/
return (pWrapper != NULL);
}
-BOOL DockingManager::IsFloating( const Window *pWindow )
+sal_Bool DockingManager::IsFloating( const Window *pWindow )
{
ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow );
if( pWrapper )
return pWrapper->IsFloatingMode();
else
- return FALSE;
+ return sal_False;
}
-BOOL DockingManager::IsLocked( const Window *pWindow )
+sal_Bool DockingManager::IsLocked( const Window *pWindow )
{
ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow );
if( pWrapper && pWrapper->IsLocked() )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
void DockingManager::Lock( const Window *pWindow )
@@ -419,14 +419,14 @@ void DockingManager::Unlock( const Window *pWindow )
pWrapper->Unlock();
}
-void DockingManager::SetFloatingMode( const Window *pWindow, BOOL bFloating )
+void DockingManager::SetFloatingMode( const Window *pWindow, sal_Bool bFloating )
{
ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow );
if( pWrapper )
pWrapper->SetFloatingMode( bFloating );
}
-void DockingManager::StartPopupMode( ToolBox *pParentToolBox, const Window *pWindow, ULONG nFlags )
+void DockingManager::StartPopupMode( ToolBox *pParentToolBox, const Window *pWindow, sal_uIntPtr nFlags )
{
ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow );
if( pWrapper )
@@ -441,13 +441,13 @@ void DockingManager::StartPopupMode( ToolBox *pParentToolBox, const Window *pWin
FLOATWIN_POPUPMODE_NOMOUSEUPCLOSE );
}
-BOOL DockingManager::IsInPopupMode( const Window *pWindow )
+sal_Bool DockingManager::IsInPopupMode( const Window *pWindow )
{
ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow );
if( pWrapper && pWrapper->IsInPopupMode() )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -491,7 +491,7 @@ void DockingManager::RemoveWindow( const Window *pWindow )
void DockingManager::SetPosSizePixel( Window *pWindow, long nX, long nY,
long nWidth, long nHeight,
- USHORT nFlags )
+ sal_uInt16 nFlags )
{
ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow );
if( pWrapper )
@@ -532,8 +532,8 @@ class ImplPopupFloatWin : public FloatingWindow
{
private:
ImplDockingWindowWrapper* mpDockingWin;
- BOOL mbHighlight;
- BOOL mbMoving;
+ sal_Bool mbHighlight;
+ sal_Bool mbMoving;
bool mbTrackingEnabled;
Point maDelta;
Point maTearOffPosition;
@@ -566,13 +566,13 @@ public:
ImplPopupFloatWin::ImplPopupFloatWin( Window* pParent, ImplDockingWindowWrapper* pDockingWin, bool bHasGrip ) :
FloatingWindow( pParent, WB_NOBORDER | WB_SYSTEMWINDOW | WB_NOSHADOW)
{
- mpWindowImpl->mbToolbarFloatingWindow = TRUE; // indicate window type, required for accessibility
+ mpWindowImpl->mbToolbarFloatingWindow = sal_True; // indicate window type, required for accessibility
// which should not see this window as a toplevel window
mpDockingWin = pDockingWin;
- mbHighlight = FALSE;
- mbMoving = FALSE;
- mbTrackingEnabled = FALSE;
- mbGripAtBottom = TRUE;
+ mbHighlight = sal_False;
+ mbMoving = sal_False;
+ mbTrackingEnabled = sal_False;
+ mbGripAtBottom = sal_True;
mbHasGrip = bHasGrip;
ImplSetBorder();
@@ -682,9 +682,9 @@ void ImplPopupFloatWin::DrawBorder()
void ImplPopupFloatWin::DrawGrip()
{
- BOOL bLinecolor = IsLineColor();
+ sal_Bool bLinecolor = IsLineColor();
Color aLinecolor = GetLineColor();
- BOOL bFillcolor = IsFillColor();
+ sal_Bool bFillcolor = IsFillColor();
Color aFillcolor = GetFillColor();
// draw background
@@ -697,7 +697,7 @@ void ImplPopupFloatWin::DrawGrip()
if( mbHighlight )
{
Erase( aRect );
- DrawSelectionBackground( aRect, 2, FALSE, TRUE, FALSE );
+ DrawSelectionBackground( aRect, 2, sal_False, sal_True, sal_False );
}
else
{
@@ -784,18 +784,18 @@ void ImplPopupFloatWin::MouseMove( const MouseEvent& rMEvt )
if( mbTrackingEnabled && rMEvt.IsLeft() && GetDragRect().IsInside( aMousePos ) )
{
// start window move
- mbMoving = TRUE;
+ mbMoving = sal_True;
StartTracking( STARTTRACK_NOKEYCANCEL );
return;
}
if( !mbHighlight && GetDragRect().IsInside( aMousePos ) )
{
- mbHighlight = TRUE;
+ mbHighlight = sal_True;
DrawGrip();
}
if( mbHighlight && ( rMEvt.IsLeaveWindow() || !GetDragRect().IsInside( aMousePos ) ) )
{
- mbHighlight = FALSE;
+ mbHighlight = sal_False;
DrawGrip();
}
}
@@ -832,7 +832,7 @@ void ImplPopupFloatWin::Tracking( const TrackingEvent& rTEvt )
{
if ( rTEvt.IsTrackingEnded() )
{
- mbMoving = FALSE;
+ mbMoving = sal_False;
EndPopupMode( FLOATWIN_POPUPMODEEND_TEAROFF );
}
else if ( !rTEvt.GetMouseEvent().IsSynthetic() )
@@ -856,39 +856,39 @@ ImplDockingWindowWrapper::ImplDockingWindowWrapper( const Window *pWindow )
mpDockingWindow = (Window*) pWindow;
mpParent = pWindow->GetParent();
- mbDockable = TRUE;
- mbLocked = FALSE;
+ mbDockable = sal_True;
+ mbLocked = sal_False;
mnFloatBits = WB_BORDER | WB_CLOSEABLE | WB_SIZEABLE | (pWindow->GetStyle() & DOCKWIN_FLOATSTYLES);
DockingWindow *pDockWin = dynamic_cast< DockingWindow* > ( mpDockingWindow );
if( pDockWin )
mnFloatBits = pDockWin->GetFloatStyle();
// must be enabled in Window::Notify to prevent permanent docking during mouse move
- mbStartDockingEnabled = FALSE;
+ mbStartDockingEnabled = sal_False;
}
ImplDockingWindowWrapper::~ImplDockingWindowWrapper()
{
if ( IsFloatingMode() )
{
- GetWindow()->Show( FALSE, SHOW_NOFOCUSCHANGE );
- SetFloatingMode( FALSE );
+ GetWindow()->Show( sal_False, SHOW_NOFOCUSCHANGE );
+ SetFloatingMode( sal_False );
}
}
// -----------------------------------------------------------------------
-BOOL ImplDockingWindowWrapper::ImplStartDocking( const Point& rPos )
+sal_Bool ImplDockingWindowWrapper::ImplStartDocking( const Point& rPos )
{
if ( !mbDockable )
- return FALSE;
+ return sal_False;
if( !mbStartDockingEnabled )
- return FALSE;
+ return sal_False;
maMouseOff = rPos;
maMouseStart = maMouseOff;
- mbDocking = TRUE;
+ mbDocking = sal_True;
mbLastFloatMode = IsFloatingMode();
mbStartFloat = mbLastFloatMode;
@@ -932,7 +932,7 @@ BOOL ImplDockingWindowWrapper::ImplStartDocking( const Point& rPos )
GetWindow()->ImplGetFrameWindow()->ImplUpdateAll();
GetWindow()->StartTracking( STARTTRACK_KEYMOD );
- return TRUE;
+ return sal_True;
}
// =======================================================================
@@ -941,15 +941,15 @@ void ImplDockingWindowWrapper::ImplInitData()
{
mpDockingWindow = NULL;
- //GetWindow()->mpWindowImpl->mbDockWin = TRUE; // TODO: must be eliminated
+ //GetWindow()->mpWindowImpl->mbDockWin = sal_True; // TODO: must be eliminated
mpFloatWin = NULL;
- mbDockCanceled = FALSE;
- mbFloatPrevented = FALSE;
- mbDocking = FALSE;
- mbPined = FALSE;
- mbRollUp = FALSE;
- mbDockBtn = FALSE;
- mbHideBtn = FALSE;
+ mbDockCanceled = sal_False;
+ mbFloatPrevented = sal_False;
+ mbDocking = sal_False;
+ mbPined = sal_False;
+ mbRollUp = sal_False;
+ mbDockBtn = sal_False;
+ mbHideBtn = sal_False;
maMaxOutSize = Size( SHRT_MAX, SHRT_MAX );
}
@@ -962,13 +962,13 @@ void ImplDockingWindowWrapper::Tracking( const TrackingEvent& rTEvt )
{
if ( rTEvt.IsTrackingEnded() )
{
- mbDocking = FALSE;
+ mbDocking = sal_False;
GetWindow()->HideTracking();
if ( rTEvt.IsTrackingCanceled() )
{
- mbDockCanceled = TRUE;
+ mbDockCanceled = sal_True;
EndDocking( Rectangle( Point( mnTrackX, mnTrackY ), Size( mnTrackWidth, mnTrackHeight ) ), mbLastFloatMode );
- mbDockCanceled = FALSE;
+ mbDockCanceled = sal_False;
}
else
EndDocking( Rectangle( Point( mnTrackX, mnTrackY ), Size( mnTrackWidth, mnTrackHeight ) ), mbLastFloatMode );
@@ -996,9 +996,9 @@ void ImplDockingWindowWrapper::Tracking( const TrackingEvent& rTEvt )
aPos.X() += maMouseOff.X();
aPos.Y() += maMouseOff.Y();
- BOOL bFloatMode = Docking( aPos, aTrackRect );
+ sal_Bool bFloatMode = Docking( aPos, aTrackRect );
- mbFloatPrevented = FALSE;
+ mbFloatPrevented = sal_False;
if ( mbLastFloatMode != bFloatMode )
{
if ( bFloatMode )
@@ -1021,7 +1021,7 @@ void ImplDockingWindowWrapper::Tracking( const TrackingEvent& rTEvt )
mbLastFloatMode = bFloatMode;
}
- USHORT nTrackStyle;
+ sal_uInt16 nTrackStyle;
if ( bFloatMode )
nTrackStyle = SHOWTRACK_OBJECT;
else
@@ -1058,12 +1058,12 @@ void ImplDockingWindowWrapper::StartDocking( const Point& rPoint, Rectangle& rRe
DockingData data( rPoint, rRect, IsFloatingMode() );
GetWindow()->ImplCallEventListeners( VCLEVENT_WINDOW_STARTDOCKING, &data );
- mbDocking = TRUE;
+ mbDocking = sal_True;
}
// -----------------------------------------------------------------------
-BOOL ImplDockingWindowWrapper::Docking( const Point& rPoint, Rectangle& rRect )
+sal_Bool ImplDockingWindowWrapper::Docking( const Point& rPoint, Rectangle& rRect )
{
DockingData data( rPoint, rRect, IsFloatingMode() );
@@ -1074,18 +1074,18 @@ BOOL ImplDockingWindowWrapper::Docking( const Point& rPoint, Rectangle& rRect )
// -----------------------------------------------------------------------
-void ImplDockingWindowWrapper::EndDocking( const Rectangle& rRect, BOOL bFloatMode )
+void ImplDockingWindowWrapper::EndDocking( const Rectangle& rRect, sal_Bool bFloatMode )
{
Rectangle aRect( rRect );
if ( !IsDockingCanceled() )
{
- BOOL bShow = FALSE;
+ sal_Bool bShow = sal_False;
if ( bFloatMode != IsFloatingMode() )
{
- GetWindow()->Show( FALSE, SHOW_NOFOCUSCHANGE );
+ GetWindow()->Show( sal_False, SHOW_NOFOCUSCHANGE );
SetFloatingMode( bFloatMode );
- bShow = TRUE;
+ bShow = sal_True;
if ( bFloatMode )
{
// #i44800# always use outputsize - as in all other places
@@ -1101,30 +1101,30 @@ void ImplDockingWindowWrapper::EndDocking( const Rectangle& rRect, BOOL bFloatMo
}
if ( bShow )
- GetWindow()->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE );
+ GetWindow()->Show( sal_True, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE );
}
EndDockingData data( aRect, IsFloatingMode(), IsDockingCanceled() );
GetWindow()->ImplCallEventListeners( VCLEVENT_WINDOW_ENDDOCKING, &data );
- mbDocking = FALSE;
+ mbDocking = sal_False;
// must be enabled in Window::Notify to prevent permanent docking during mouse move
- mbStartDockingEnabled = FALSE;
+ mbStartDockingEnabled = sal_False;
}
// -----------------------------------------------------------------------
-BOOL ImplDockingWindowWrapper::PrepareToggleFloatingMode()
+sal_Bool ImplDockingWindowWrapper::PrepareToggleFloatingMode()
{
- BOOL bFloating = TRUE;
+ sal_Bool bFloating = sal_True;
GetWindow()->ImplCallEventListeners( VCLEVENT_WINDOW_PREPARETOGGLEFLOATING, &bFloating );
return bFloating;
}
// -----------------------------------------------------------------------
-BOOL ImplDockingWindowWrapper::Close()
+sal_Bool ImplDockingWindowWrapper::Close()
{
// TODO: send event
/*
@@ -1132,15 +1132,15 @@ BOOL ImplDockingWindowWrapper::Close()
ImplAddDel( &aDelData );
GetWindow()->ImplCallEventListeners( VCLEVENT_WINDOW_CLOSE );
if ( aDelData.IsDelete() )
- return FALSE;
+ return sal_False;
ImplRemoveDel( &aDelData );
if ( mpWindowImpl->mxWindowPeer.is() && IsCreatedWithToolkit() )
- return FALSE;
+ return sal_False;
- GetWindow()->Show( FALSE, SHOW_NOFOCUSCHANGE );
+ GetWindow()->Show( sal_False, SHOW_NOFOCUSCHANGE );
*/
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -1157,12 +1157,12 @@ void ImplDockingWindowWrapper::ToggleFloatingMode()
GetWindow()->ImplCallEventListeners( VCLEVENT_WINDOW_TOGGLEFLOATING );
// must be enabled in Window::Notify to prevent permanent docking during mouse move
- mbStartDockingEnabled = FALSE;
+ mbStartDockingEnabled = sal_False;
}
// -----------------------------------------------------------------------
-void ImplDockingWindowWrapper::TitleButtonClick( USHORT nType )
+void ImplDockingWindowWrapper::TitleButtonClick( sal_uInt16 nType )
{
if( nType == TITLE_BUTTON_MENU )
{
@@ -1211,7 +1211,7 @@ void ImplDockingWindowWrapper::Resizing( Size& rSize )
// -----------------------------------------------------------------------
-void ImplDockingWindowWrapper::ShowTitleButton( USHORT nButton, BOOL bVisible )
+void ImplDockingWindowWrapper::ShowTitleButton( sal_uInt16 nButton, sal_Bool bVisible )
{
if ( mpFloatWin )
mpFloatWin->ShowTitleButton( nButton, bVisible );
@@ -1226,7 +1226,7 @@ void ImplDockingWindowWrapper::ShowTitleButton( USHORT nButton, BOOL bVisible )
// -----------------------------------------------------------------------
-BOOL ImplDockingWindowWrapper::IsTitleButtonVisible( USHORT nButton ) const
+sal_Bool ImplDockingWindowWrapper::IsTitleButtonVisible( sal_uInt16 nButton ) const
{
if ( mpFloatWin )
return mpFloatWin->IsTitleButtonVisible( nButton );
@@ -1241,13 +1241,13 @@ BOOL ImplDockingWindowWrapper::IsTitleButtonVisible( USHORT nButton ) const
// -----------------------------------------------------------------------
-void ImplDockingWindowWrapper::StartPopupMode( ToolBox *pParentToolBox, ULONG nFlags )
+void ImplDockingWindowWrapper::StartPopupMode( ToolBox *pParentToolBox, sal_uIntPtr nFlags )
{
// do nothing if window is floating
if( IsFloatingMode() )
return;
- GetWindow()->Show( FALSE, SHOW_NOFOCUSCHANGE );
+ GetWindow()->Show( sal_False, SHOW_NOFOCUSCHANGE );
// prepare reparenting
Window* pRealParent = GetWindow()->GetWindow( WINDOW_PARENT );
@@ -1304,7 +1304,7 @@ void ImplDockingWindowWrapper::StartPopupMode( ToolBox *pParentToolBox, ULONG nF
IMPL_LINK( ImplDockingWindowWrapper, PopupModeEnd, void*, EMPTYARG )
{
- GetWindow()->Show( FALSE, SHOW_NOFOCUSCHANGE );
+ GetWindow()->Show( sal_False, SHOW_NOFOCUSCHANGE );
// set parameter for handler before destroying floating window
ImplPopupFloatWin *pPopupFloatWin = (ImplPopupFloatWin*) mpFloatWin;
@@ -1335,17 +1335,17 @@ IMPL_LINK( ImplDockingWindowWrapper, PopupModeEnd, void*, EMPTYARG )
}
-BOOL ImplDockingWindowWrapper::IsInPopupMode() const
+sal_Bool ImplDockingWindowWrapper::IsInPopupMode() const
{
if( GetFloatingWindow() )
return GetFloatingWindow()->IsInPopupMode();
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-void ImplDockingWindowWrapper::SetFloatingMode( BOOL bFloatMode )
+void ImplDockingWindowWrapper::SetFloatingMode( sal_Bool bFloatMode )
{
// do nothing if window is docked and locked
if( !IsFloatingMode() && IsLocked() )
@@ -1355,11 +1355,11 @@ void ImplDockingWindowWrapper::SetFloatingMode( BOOL bFloatMode )
{
if ( PrepareToggleFloatingMode() )
{
- BOOL bVisible = GetWindow()->IsVisible();
+ sal_Bool bVisible = GetWindow()->IsVisible();
if ( bFloatMode )
{
- GetWindow()->Show( FALSE, SHOW_NOFOCUSCHANGE );
+ GetWindow()->Show( sal_False, SHOW_NOFOCUSCHANGE );
maDockPos = GetWindow()->GetPosPixel();
@@ -1425,13 +1425,13 @@ void ImplDockingWindowWrapper::SetFloatingMode( BOOL bFloatMode )
mpFloatWin = pWin;
if ( bVisible )
- GetWindow()->Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE );
+ GetWindow()->Show( sal_True, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE );
ToggleFloatingMode();
}
else
{
- GetWindow()->Show( FALSE, SHOW_NOFOCUSCHANGE );
+ GetWindow()->Show( sal_False, SHOW_NOFOCUSCHANGE );
// FloatingDaten wird im FloatingWindow speichern
maFloatPos = mpFloatWin->GetPosPixel();
@@ -1496,7 +1496,7 @@ void ImplDockingWindowWrapper::SetTabStop()
void ImplDockingWindowWrapper::SetPosSizePixel( long nX, long nY,
long nWidth, long nHeight,
- USHORT nFlags )
+ sal_uInt16 nFlags )
{
if ( mpFloatWin )
mpFloatWin->SetPosSizePixel( nX, nY, nWidth, nHeight, nFlags );
@@ -1564,14 +1564,14 @@ Point ImplDockingWindowWrapper::GetFloatingPos() const
// old inlines from DockingWindow
// -----------------------------------------------------------------------
-void ImplDockingWindowWrapper::SetPin( BOOL bPin )
+void ImplDockingWindowWrapper::SetPin( sal_Bool bPin )
{
if ( mpFloatWin )
mpFloatWin->SetPin( bPin );
mbPined = bPin;
}
-BOOL ImplDockingWindowWrapper::IsPined() const
+sal_Bool ImplDockingWindowWrapper::IsPined() const
{
if ( mpFloatWin )
return mpFloatWin->IsPined();
@@ -1582,17 +1582,17 @@ void ImplDockingWindowWrapper::RollUp()
{
if ( mpFloatWin )
mpFloatWin->RollUp();
- mbRollUp = TRUE;
+ mbRollUp = sal_True;
}
void ImplDockingWindowWrapper::RollDown()
{
if ( mpFloatWin )
mpFloatWin->RollDown();
- mbRollUp = FALSE;
+ mbRollUp = sal_False;
}
-BOOL ImplDockingWindowWrapper::IsRollUp() const
+sal_Bool ImplDockingWindowWrapper::IsRollUp() const
{
if ( mpFloatWin )
return mpFloatWin->IsRollUp();
@@ -1649,7 +1649,7 @@ void ImplDockingWindowWrapper::SetFloatingPos( const Point& rNewPos )
maFloatPos = rNewPos;
}
-BOOL ImplDockingWindowWrapper::IsFloatingMode() const
+sal_Bool ImplDockingWindowWrapper::IsFloatingMode() const
{
return (mpFloatWin != NULL);
}
@@ -1667,7 +1667,7 @@ Rectangle ImplDockingWindowWrapper::GetDragArea() const
void ImplDockingWindowWrapper::Lock()
{
- mbLocked = TRUE;
+ mbLocked = sal_True;
// only toolbars support locking
ToolBox *pToolBox = dynamic_cast< ToolBox * >( GetWindow() );
if( pToolBox )
@@ -1676,14 +1676,14 @@ void ImplDockingWindowWrapper::Lock()
void ImplDockingWindowWrapper::Unlock()
{
- mbLocked = FALSE;
+ mbLocked = sal_False;
// only toolbars support locking
ToolBox *pToolBox = dynamic_cast< ToolBox * >( GetWindow() );
if( pToolBox )
pToolBox->Lock( mbLocked );
}
-BOOL ImplDockingWindowWrapper::IsLocked() const
+sal_Bool ImplDockingWindowWrapper::IsLocked() const
{
return mbLocked;
}
diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx
index c8e382bad982..8b0f1030285f 100644
--- a/vcl/source/window/dockwin.cxx
+++ b/vcl/source/window/dockwin.cxx
@@ -82,12 +82,12 @@ class ImplDockFloatWin : public FloatingWindow
{
private:
DockingWindow* mpDockWin;
- ULONG mnLastTicks;
+ sal_uIntPtr mnLastTicks;
Timer maDockTimer;
Point maDockPos;
Rectangle maDockRect;
- BOOL mbInMove;
- ULONG mnLastUserEvent;
+ sal_Bool mbInMove;
+ sal_uIntPtr mnLastUserEvent;
DECL_LINK( DockingHdl, ImplDockFloatWin* );
DECL_LINK( DockTimerHdl, ImplDockFloatWin* );
@@ -98,14 +98,14 @@ public:
virtual void Move();
virtual void Resize();
- virtual void TitleButtonClick( USHORT nButton );
+ virtual void TitleButtonClick( sal_uInt16 nButton );
virtual void Pin();
virtual void Roll();
virtual void PopupModeEnd();
virtual void Resizing( Size& rSize );
- virtual BOOL Close();
+ virtual sal_Bool Close();
- ULONG GetLastTicks() const { return mnLastTicks; }
+ sal_uIntPtr GetLastTicks() const { return mnLastTicks; }
};
@@ -114,16 +114,16 @@ ImplDockFloatWin::ImplDockFloatWin( Window* pParent, WinBits nWinBits,
FloatingWindow( pParent, nWinBits ),
mpDockWin( pDockingWin ),
mnLastTicks( Time::GetSystemTicks() ),
- mbInMove( FALSE ),
+ mbInMove( sal_False ),
mnLastUserEvent( 0 )
{
// Daten vom DockingWindow uebernehmen
if ( pDockingWin )
{
SetSettings( pDockingWin->GetSettings() );
- Enable( pDockingWin->IsEnabled(), FALSE );
- EnableInput( pDockingWin->IsInputEnabled(), FALSE );
- AlwaysEnableInput( pDockingWin->IsAlwaysEnableInput(), FALSE );
+ Enable( pDockingWin->IsEnabled(), sal_False );
+ EnableInput( pDockingWin->IsInputEnabled(), sal_False );
+ AlwaysEnableInput( pDockingWin->IsAlwaysEnableInput(), sal_False );
EnableAlwaysOnTop( pDockingWin->IsAlwaysOnTopEnabled() );
SetActivateMode( pDockingWin->GetActivateMode() );
}
@@ -155,14 +155,14 @@ IMPL_LINK( ImplDockFloatWin, DockTimerHdl, ImplDockFloatWin*, EMPTYARG )
{
// i43499 CTRL disables docking now
mpDockWin->GetParent()->ImplGetFrameWindow()->HideTracking();
- mpDockWin->EndDocking( maDockRect, TRUE );
+ mpDockWin->EndDocking( maDockRect, sal_True );
if( aState.mnState & ( MOUSE_LEFT | MOUSE_MIDDLE | MOUSE_RIGHT ) )
maDockTimer.Start();
}
else if( ! ( aState.mnState & ( MOUSE_LEFT | MOUSE_MIDDLE | MOUSE_RIGHT ) ) )
{
mpDockWin->GetParent()->ImplGetFrameWindow()->HideTracking();
- mpDockWin->EndDocking( maDockRect, FALSE );
+ mpDockWin->EndDocking( maDockRect, sal_False );
}
else
{
@@ -193,7 +193,7 @@ IMPL_LINK( ImplDockFloatWin, DockingHdl, ImplDockFloatWin*, EMPTYARG )
// mouse pos also in screen pixels
Point aMousePos = mpDockWin->GetParent()->OutputToScreenPixel( aState.maPos );
- BOOL bFloatMode = mpDockWin->Docking( aMousePos, maDockRect );
+ sal_Bool bFloatMode = mpDockWin->Docking( aMousePos, maDockRect );
if( ! bFloatMode )
{
mpDockWin->GetParent()->ImplGetFrameWindow()->ShowTracking( maDockRect, SHOWTRACK_OBJECT | SHOWTRACK_WINDOW );
@@ -203,10 +203,10 @@ IMPL_LINK( ImplDockFloatWin, DockingHdl, ImplDockFloatWin*, EMPTYARG )
{
mpDockWin->GetParent()->ImplGetFrameWindow()->HideTracking();
maDockTimer.Stop();
- mpDockWin->EndDocking( maDockRect, TRUE );
+ mpDockWin->EndDocking( maDockRect, sal_True );
}
}
- mbInMove = FALSE;
+ mbInMove = sal_False;
return 0;
}
// -----------------------------------------------------------------------
@@ -216,7 +216,7 @@ void ImplDockFloatWin::Move()
if( mbInMove )
return;
- mbInMove = TRUE;
+ mbInMove = sal_True;
FloatingWindow::Move();
mpDockWin->Move();
@@ -244,7 +244,7 @@ void ImplDockFloatWin::Resize()
// -----------------------------------------------------------------------
-void ImplDockFloatWin::TitleButtonClick( USHORT nButton )
+void ImplDockFloatWin::TitleButtonClick( sal_uInt16 nButton )
{
FloatingWindow::TitleButtonClick( nButton );
mpDockWin->TitleButtonClick( nButton );
@@ -284,21 +284,21 @@ void ImplDockFloatWin::Resizing( Size& rSize )
// -----------------------------------------------------------------------
-BOOL ImplDockFloatWin::Close()
+sal_Bool ImplDockFloatWin::Close()
{
return mpDockWin->Close();
}
// =======================================================================
-BOOL DockingWindow::ImplStartDocking( const Point& rPos )
+sal_Bool DockingWindow::ImplStartDocking( const Point& rPos )
{
if ( !mbDockable )
- return FALSE;
+ return sal_False;
maMouseOff = rPos;
maMouseStart = maMouseOff;
- mbDocking = TRUE;
+ mbDocking = sal_True;
mbLastFloatMode = IsFloatingMode();
mbStartFloat = mbLastFloatMode;
@@ -331,17 +331,17 @@ BOOL DockingWindow::ImplStartDocking( const Point& rPos )
if ( GetSettings().GetStyleSettings().GetDragFullOptions() & DRAGFULL_OPTION_DOCKING &&
!( mnFloatBits & ( WB_MOVEABLE | WB_SIZEABLE | WB_CLOSEABLE ) ) ) // no full drag when migrating to system window
- mbDragFull = TRUE;
+ mbDragFull = sal_True;
else
{
StartDocking();
- mbDragFull = FALSE;
+ mbDragFull = sal_False;
ImplUpdateAll();
ImplGetFrameWindow()->ImplUpdateAll();
}
StartTracking( STARTTRACK_KEYMOD );
- return TRUE;
+ return sal_True;
}
// =======================================================================
@@ -349,17 +349,17 @@ BOOL DockingWindow::ImplStartDocking( const Point& rPos )
void DockingWindow::ImplInitDockingWindowData()
{
mpImplData = new ImplData;
- mpWindowImpl->mbDockWin = TRUE;
+ mpWindowImpl->mbDockWin = sal_True;
mpFloatWin = NULL;
- mbDockCanceled = FALSE;
- mbDockPrevented = FALSE;
- mbFloatPrevented = FALSE;
- mbDocking = FALSE;
- mbPined = FALSE;
- mbRollUp = FALSE;
- mbDockBtn = FALSE;
- mbHideBtn = FALSE;
+ mbDockCanceled = sal_False;
+ mbDockPrevented = sal_False;
+ mbFloatPrevented = sal_False;
+ mbDocking = sal_False;
+ mbPined = sal_False;
+ mbRollUp = sal_False;
+ mbDockBtn = sal_False;
+ mbHideBtn = sal_False;
}
// -----------------------------------------------------------------------
@@ -408,7 +408,7 @@ void DockingWindow::ImplLoadRes( const ResId& rResId )
{
Window::ImplLoadRes( rResId );
- ULONG nMask = ReadLongRes();
+ sal_uIntPtr nMask = ReadLongRes();
if ( (RSC_DOCKINGWINDOW_XYMAPMODE | RSC_DOCKINGWINDOW_X |
RSC_DOCKINGWINDOW_Y) & nMask )
@@ -437,8 +437,8 @@ void DockingWindow::ImplLoadRes( const ResId& rResId )
if ( nMask & RSC_DOCKINGWINDOW_FLOATING )
{
- if ( (BOOL)ReadShortRes() )
- SetFloatingMode( TRUE );
+ if ( (sal_Bool)ReadShortRes() )
+ SetFloatingMode( sal_True );
}
}
@@ -480,8 +480,8 @@ DockingWindow::~DockingWindow()
{
if ( IsFloatingMode() )
{
- Show( FALSE, SHOW_NOFOCUSCHANGE );
- SetFloatingMode( FALSE );
+ Show( sal_False, SHOW_NOFOCUSCHANGE );
+ SetFloatingMode( sal_False );
}
delete mpImplData;
}
@@ -497,7 +497,7 @@ void DockingWindow::Tracking( const TrackingEvent& rTEvt )
{
if ( rTEvt.IsTrackingEnded() )
{
- mbDocking = FALSE;
+ mbDocking = sal_False;
if ( mbDragFull )
{
// Bei Abbruch alten Zustand wieder herstellen
@@ -513,9 +513,9 @@ void DockingWindow::Tracking( const TrackingEvent& rTEvt )
HideTracking();
if ( rTEvt.IsTrackingCanceled() )
{
- mbDockCanceled = TRUE;
+ mbDockCanceled = sal_True;
EndDocking( Rectangle( Point( mnTrackX, mnTrackY ), Size( mnTrackWidth, mnTrackHeight ) ), mbLastFloatMode );
- mbDockCanceled = FALSE;
+ mbDockCanceled = sal_False;
}
else
EndDocking( Rectangle( Point( mnTrackX, mnTrackY ), Size( mnTrackWidth, mnTrackHeight ) ), mbLastFloatMode );
@@ -545,9 +545,9 @@ void DockingWindow::Tracking( const TrackingEvent& rTEvt )
aFramePos.Y() += maMouseOff.Y();
if ( mbDragFull )
StartDocking();
- BOOL bFloatMode = Docking( aFramePos, aTrackRect );
- mbDockPrevented = FALSE;
- mbFloatPrevented = FALSE;
+ sal_Bool bFloatMode = Docking( aFramePos, aTrackRect );
+ mbDockPrevented = sal_False;
+ mbFloatPrevented = sal_False;
if ( mbLastFloatMode != bFloatMode )
{
if ( bFloatMode )
@@ -585,7 +585,7 @@ void DockingWindow::Tracking( const TrackingEvent& rTEvt )
}
else
{
- USHORT nTrackStyle;
+ sal_uInt16 nTrackStyle;
if ( bFloatMode )
nTrackStyle = SHOWTRACK_BIG;
else
@@ -625,7 +625,7 @@ long DockingWindow::Notify( NotifyEvent& rNEvt )
if ( pMEvt->IsMod1() && (pMEvt->GetClicks() == 2) )
{
SetFloatingMode( !IsFloatingMode() );
- return TRUE;
+ return sal_True;
}
else if ( pMEvt->GetClicks() == 1 )
{
@@ -643,7 +643,7 @@ long DockingWindow::Notify( NotifyEvent& rNEvt )
}
ImplStartDocking( aPos );
}
- return TRUE;
+ return sal_True;
}
}
}
@@ -654,7 +654,7 @@ long DockingWindow::Notify( NotifyEvent& rNEvt )
rKey.IsShift() && rKey.IsMod1() )
{
SetFloatingMode( !IsFloatingMode() );
- return TRUE;
+ return sal_True;
}
}
}
@@ -666,28 +666,28 @@ long DockingWindow::Notify( NotifyEvent& rNEvt )
void DockingWindow::StartDocking()
{
- mbDocking = TRUE;
+ mbDocking = sal_True;
}
// -----------------------------------------------------------------------
-BOOL DockingWindow::Docking( const Point&, Rectangle& )
+sal_Bool DockingWindow::Docking( const Point&, Rectangle& )
{
return IsFloatingMode();
}
// -----------------------------------------------------------------------
-void DockingWindow::EndDocking( const Rectangle& rRect, BOOL bFloatMode )
+void DockingWindow::EndDocking( const Rectangle& rRect, sal_Bool bFloatMode )
{
if ( !IsDockingCanceled() )
{
- BOOL bShow = FALSE;
+ sal_Bool bShow = sal_False;
if ( bFloatMode != IsFloatingMode() )
{
- Show( FALSE, SHOW_NOFOCUSCHANGE );
+ Show( sal_False, SHOW_NOFOCUSCHANGE );
SetFloatingMode( bFloatMode );
- bShow = TRUE;
+ bShow = sal_True;
if ( bFloatMode && mpFloatWin )
mpFloatWin->SetPosSizePixel( rRect.TopLeft(), rRect.GetSize() );
}
@@ -701,32 +701,32 @@ void DockingWindow::EndDocking( const Rectangle& rRect, BOOL bFloatMode )
if ( bShow )
Show();
}
- mbDocking = FALSE;
+ mbDocking = sal_False;
}
// -----------------------------------------------------------------------
-BOOL DockingWindow::PrepareToggleFloatingMode()
+sal_Bool DockingWindow::PrepareToggleFloatingMode()
{
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-BOOL DockingWindow::Close()
+sal_Bool DockingWindow::Close()
{
ImplDelData aDelData;
ImplAddDel( &aDelData );
ImplCallEventListeners( VCLEVENT_WINDOW_CLOSE );
if ( aDelData.IsDelete() )
- return FALSE;
+ return sal_False;
ImplRemoveDel( &aDelData );
if ( mpWindowImpl->mxWindowPeer.is() && IsCreatedWithToolkit() )
- return FALSE;
+ return sal_False;
- Show( FALSE, SHOW_NOFOCUSCHANGE );
- return TRUE;
+ Show( sal_False, SHOW_NOFOCUSCHANGE );
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -737,7 +737,7 @@ void DockingWindow::ToggleFloatingMode()
// -----------------------------------------------------------------------
-void DockingWindow::TitleButtonClick( USHORT )
+void DockingWindow::TitleButtonClick( sal_uInt16 )
{
}
@@ -794,7 +794,7 @@ void DockingWindow::DataChanged( const DataChangedEvent& rDCEvt )
// -----------------------------------------------------------------------
-void DockingWindow::ShowTitleButton( USHORT nButton, BOOL bVisible )
+void DockingWindow::ShowTitleButton( sal_uInt16 nButton, sal_Bool bVisible )
{
if ( mpFloatWin )
mpFloatWin->ShowTitleButton( nButton, bVisible );
@@ -809,7 +809,7 @@ void DockingWindow::ShowTitleButton( USHORT nButton, BOOL bVisible )
// -----------------------------------------------------------------------
-BOOL DockingWindow::IsTitleButtonVisible( USHORT nButton ) const
+sal_Bool DockingWindow::IsTitleButtonVisible( sal_uInt16 nButton ) const
{
if ( mpFloatWin )
return mpFloatWin->IsTitleButtonVisible( nButton );
@@ -824,7 +824,7 @@ BOOL DockingWindow::IsTitleButtonVisible( USHORT nButton ) const
// -----------------------------------------------------------------------
-void DockingWindow::SetFloatingMode( BOOL bFloatMode )
+void DockingWindow::SetFloatingMode( sal_Bool bFloatMode )
{
ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this );
if( pWrapper )
@@ -836,11 +836,11 @@ void DockingWindow::SetFloatingMode( BOOL bFloatMode )
{
if ( PrepareToggleFloatingMode() ) // changes to floating mode can be vetoed
{
- BOOL bVisible = IsVisible();
+ sal_Bool bVisible = IsVisible();
if ( bFloatMode )
{
- Show( FALSE, SHOW_NOFOCUSCHANGE );
+ Show( sal_False, SHOW_NOFOCUSCHANGE );
maDockPos = Window::GetPosPixel();
@@ -889,7 +889,7 @@ void DockingWindow::SetFloatingMode( BOOL bFloatMode )
}
else
{
- Show( FALSE, SHOW_NOFOCUSCHANGE );
+ Show( sal_False, SHOW_NOFOCUSCHANGE );
// FloatingDaten wird im FloatingWindow speichern
maFloatPos = mpFloatWin->GetPosPixel();
@@ -970,7 +970,7 @@ void DockingWindow::SetTabStop()
void DockingWindow::SetPosSizePixel( long nX, long nY,
long nWidth, long nHeight,
- USHORT nFlags )
+ sal_uInt16 nFlags )
{
ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this );
if( pWrapper )
@@ -1096,7 +1096,7 @@ Point DockingWindow::GetFloatingPos() const
return maFloatPos;
}
-BOOL DockingWindow::IsFloatingMode() const
+sal_Bool DockingWindow::IsFloatingMode() const
{
ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this );
if( pWrapper )
diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx
index 323bbe3b0d74..cb441bf23945 100644
--- a/vcl/source/window/floatwin.cxx
+++ b/vcl/source/window/floatwin.cxx
@@ -78,9 +78,9 @@ void FloatingWindow::ImplInit( Window* pParent, WinBits nStyle )
{
mpImplData = new ImplData;
- mpWindowImpl->mbFloatWin = TRUE;
- mbInCleanUp = FALSE;
- mbGrabFocus = FALSE;
+ mpWindowImpl->mbFloatWin = sal_True;
+ mbInCleanUp = sal_False;
+ mbGrabFocus = sal_False;
DBG_ASSERT( pParent, "FloatWindow::FloatingWindow(): - pParent == NULL!" );
@@ -92,7 +92,7 @@ void FloatingWindow::ImplInit( Window* pParent, WinBits nStyle )
// no Border, then we dont need a border window
if ( !nStyle )
{
- mpWindowImpl->mbOverlapWin = TRUE;
+ mpWindowImpl->mbOverlapWin = sal_True;
nStyle |= WB_DIALOGCONTROL;
SystemWindow::ImplInit( pParent, nStyle, NULL );
}
@@ -107,14 +107,14 @@ void FloatingWindow::ImplInit( Window* pParent, WinBits nStyle )
WinBits nFloatWinStyle = nStyle;
// #99154# floaters are not closeable by default anymore, eg fullscreen floater
// nFloatWinStyle |= WB_CLOSEABLE;
- mpWindowImpl->mbFrame = TRUE;
- mpWindowImpl->mbOverlapWin = TRUE;
+ mpWindowImpl->mbFrame = sal_True;
+ mpWindowImpl->mbOverlapWin = sal_True;
SystemWindow::ImplInit( pParent, nFloatWinStyle & ~WB_BORDER, NULL );
}
else
{
ImplBorderWindow* pBorderWin;
- USHORT nBorderStyle = BORDERWINDOW_STYLE_BORDER | BORDERWINDOW_STYLE_FLOAT;
+ sal_uInt16 nBorderStyle = BORDERWINDOW_STYLE_BORDER | BORDERWINDOW_STYLE_FLOAT;
if( nStyle & WB_OWNERDRAWDECORATION ) nBorderStyle |= BORDERWINDOW_STYLE_FRAME;
else nBorderStyle |= BORDERWINDOW_STYLE_OVERLAP;
@@ -128,7 +128,7 @@ void FloatingWindow::ImplInit( Window* pParent, WinBits nStyle )
SystemWindow::ImplInit( pBorderWin, nStyle & ~WB_BORDER, NULL );
pBorderWin->mpWindowImpl->mpClientWindow = this;
pBorderWin->GetBorder( mpWindowImpl->mnLeftBorder, mpWindowImpl->mnTopBorder, mpWindowImpl->mnRightBorder, mpWindowImpl->mnBottomBorder );
- pBorderWin->SetDisplayActive( TRUE );
+ pBorderWin->SetDisplayActive( sal_True );
mpWindowImpl->mpBorderWindow = pBorderWin;
mpWindowImpl->mpRealParent = pParent;
}
@@ -141,11 +141,11 @@ void FloatingWindow::ImplInit( Window* pParent, WinBits nStyle )
mnTitle = (nStyle & WB_MOVEABLE) ? FLOATWIN_TITLE_NORMAL : FLOATWIN_TITLE_NONE;
mnOldTitle = mnTitle;
mnPopupModeFlags = 0;
- mbInPopupMode = FALSE;
- mbPopupMode = FALSE;
- mbPopupModeCanceled = FALSE;
- mbPopupModeTearOff = FALSE;
- mbMouseDown = FALSE;
+ mbInPopupMode = sal_False;
+ mbPopupMode = sal_False;
+ mbPopupModeCanceled = sal_False;
+ mbPopupModeTearOff = sal_False;
+ mbMouseDown = sal_False;
ImplInitSettings();
}
@@ -194,7 +194,7 @@ void FloatingWindow::ImplLoadRes( const ResId& rResId )
{
SystemWindow::ImplLoadRes( rResId );
- ULONG nObjMask = ReadLongRes();
+ sal_uIntPtr nObjMask = ReadLongRes();
if ( (RSC_FLOATINGWINDOW_WHMAPMODE | RSC_FLOATINGWINDOW_WIDTH |
RSC_FLOATINGWINDOW_HEIGHT) & nObjMask )
@@ -240,7 +240,7 @@ FloatingWindow::~FloatingWindow()
// -----------------------------------------------------------------------
-Point FloatingWindow::CalcFloatingPosition( Window* pWindow, const Rectangle& rRect, ULONG nFlags, USHORT& rArrangeIndex )
+Point FloatingWindow::CalcFloatingPosition( Window* pWindow, const Rectangle& rRect, sal_uIntPtr nFlags, sal_uInt16& rArrangeIndex )
{
return ImplCalcPos( pWindow, rRect, nFlags, rArrangeIndex );
}
@@ -248,8 +248,8 @@ Point FloatingWindow::CalcFloatingPosition( Window* pWindow, const Rectangle& rR
// -----------------------------------------------------------------------
Point FloatingWindow::ImplCalcPos( Window* pWindow,
- const Rectangle& rRect, ULONG nFlags,
- USHORT& rArrangeIndex )
+ const Rectangle& rRect, sal_uIntPtr nFlags,
+ sal_uInt16& rArrangeIndex )
{
// Fenster-Position ermitteln
Point aPos;
@@ -265,7 +265,7 @@ Point FloatingWindow::ImplCalcPos( Window* pWindow,
Rectangle normRect( rRect ); // rRect is already relative to top-level window
normRect.SetPos( pW->ScreenToOutputPixel( normRect.TopLeft() ) );
- BOOL bRTL = Application::GetSettings().GetLayoutRTL();
+ sal_Bool bRTL = Application::GetSettings().GetLayoutRTL();
Rectangle devRect( pW->OutputToAbsoluteScreenPixel( normRect.TopLeft() ),
pW->OutputToAbsoluteScreenPixel( normRect.BottomRight() ) );
@@ -279,9 +279,9 @@ Point FloatingWindow::ImplCalcPos( Window* pWindow,
Application::GetBestScreen( bRTL ? devRectRTL : devRect ) );
- USHORT nArrangeAry[5];
- USHORT nArrangeIndex;
- BOOL bBreak;
+ sal_uInt16 nArrangeAry[5];
+ sal_uInt16 nArrangeIndex;
+ sal_Bool bBreak;
Point e1,e2; // the common edge between the item rect and the floating window
if ( nFlags & FLOATWIN_POPUPMODE_LEFT )
@@ -323,7 +323,7 @@ Point FloatingWindow::ImplCalcPos( Window* pWindow,
for ( ; nArrangeIndex < 5; nArrangeIndex++ )
{
- bBreak = TRUE;
+ bBreak = sal_True;
switch ( nArrangeAry[nArrangeIndex] )
{
@@ -334,12 +334,12 @@ Point FloatingWindow::ImplCalcPos( Window* pWindow,
if( bRTL ) // --- RTL --- we're comparing screen coordinates here
{
if( (devRectRTL.Right()+aSize.Width()) > aScreenRect.Right() )
- bBreak = FALSE;
+ bBreak = sal_False;
}
else
{
if ( aPos.X() < aScreenRect.Left() )
- bBreak = FALSE;
+ bBreak = sal_False;
}
if( bBreak )
{
@@ -358,12 +358,12 @@ Point FloatingWindow::ImplCalcPos( Window* pWindow,
if( bRTL ) // --- RTL --- we're comparing screen coordinates here
{
if( (devRectRTL.Left() - aSize.Width()) < aScreenRect.Left() )
- bBreak = FALSE;
+ bBreak = sal_False;
}
else
{
if ( aPos.X()+aSize.Width() > aScreenRect.Right() )
- bBreak = FALSE;
+ bBreak = sal_False;
}
if( bBreak )
{
@@ -380,7 +380,7 @@ Point FloatingWindow::ImplCalcPos( Window* pWindow,
aPos.X() = devRect.Left();
aPos.Y() = devRect.Top()-aSize.Height()+1;
if ( aPos.Y() < aScreenRect.Top() )
- bBreak = FALSE;
+ bBreak = sal_False;
if( bBreak )
{
e1 = devRect.TopLeft();
@@ -395,7 +395,7 @@ Point FloatingWindow::ImplCalcPos( Window* pWindow,
case FLOATWIN_POPUPMODE_DOWN:
aPos = devRect.BottomLeft();
if ( aPos.Y()+aSize.Height() > aScreenRect.Bottom() )
- bBreak = FALSE;
+ bBreak = sal_False;
if( bBreak )
{
e1 = devRect.BottomLeft();
@@ -466,7 +466,7 @@ Point FloatingWindow::ImplCalcPos( Window* pWindow,
// -----------------------------------------------------------------------
-FloatingWindow* FloatingWindow::ImplFloatHitTest( Window* pReference, const Point& rPos, USHORT& rHitTest )
+FloatingWindow* FloatingWindow::ImplFloatHitTest( Window* pReference, const Point& rPos, sal_uInt16& rHitTest )
{
FloatingWindow* pWin = this;
@@ -541,20 +541,20 @@ FloatingWindow* FloatingWindow::ImplFindLastLevelFloat()
// -----------------------------------------------------------------------
-BOOL FloatingWindow::ImplIsFloatPopupModeWindow( const Window* pWindow )
+sal_Bool FloatingWindow::ImplIsFloatPopupModeWindow( const Window* pWindow )
{
FloatingWindow* pWin = this;
do
{
if ( pWin->mpFirstPopupModeWin == pWindow )
- return TRUE;
+ return sal_True;
pWin = pWin->mpNextFloat;
}
while ( pWin );
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -563,7 +563,7 @@ IMPL_LINK( FloatingWindow, ImplEndPopupModeHdl, void*, EMPTYARG )
{
mnPostId = 0;
mnPopupModeFlags = 0;
- mbPopupMode = FALSE;
+ mbPopupMode = sal_False;
PopupModeEnd();
return 0;
}
@@ -580,12 +580,12 @@ long FloatingWindow::Notify( NotifyEvent& rNEvt )
{
const KeyEvent* pKEvt = rNEvt.GetKeyEvent();
KeyCode aKeyCode = pKEvt->GetKeyCode();
- USHORT nKeyCode = aKeyCode.GetCode();
+ sal_uInt16 nKeyCode = aKeyCode.GetCode();
if ( (nKeyCode == KEY_ESCAPE) && (GetStyle() & WB_CLOSEABLE) )
{
Close();
- return TRUE;
+ return sal_True;
}
}
}
@@ -625,7 +625,7 @@ void FloatingWindow::DataChanged( const DataChangedEvent& rDCEvt )
void FloatingWindow::ImplCallPopupModeEnd()
{
// PopupMode wurde beendet
- mbInPopupMode = FALSE;
+ mbInPopupMode = sal_False;
// Handler asyncron rufen
if ( !mnPostId )
@@ -641,13 +641,13 @@ void FloatingWindow::PopupModeEnd()
// -----------------------------------------------------------------------
-void FloatingWindow::SetTitleType( USHORT nTitle )
+void FloatingWindow::SetTitleType( sal_uInt16 nTitle )
{
if ( (mnTitle != nTitle) && mpWindowImpl->mpBorderWindow )
{
mnTitle = nTitle;
Size aOutSize = GetOutputSizePixel();
- USHORT nTitleStyle;
+ sal_uInt16 nTitleStyle;
if ( nTitle == FLOATWIN_TITLE_NORMAL )
nTitleStyle = BORDERWINDOW_TITLE_SMALL;
else if ( nTitle == FLOATWIN_TITLE_TEAROFF )
@@ -661,11 +661,11 @@ void FloatingWindow::SetTitleType( USHORT nTitle )
// -----------------------------------------------------------------------
-void FloatingWindow::StartPopupMode( const Rectangle& rRect, ULONG nFlags )
+void FloatingWindow::StartPopupMode( const Rectangle& rRect, sal_uIntPtr nFlags )
{
// avoid flickering
if ( IsVisible() )
- Show( FALSE, SHOW_NOFOCUSCHANGE );
+ Show( sal_False, SHOW_NOFOCUSCHANGE );
if ( IsRollUp() )
RollDown();
@@ -687,7 +687,7 @@ void FloatingWindow::StartPopupMode( const Rectangle& rRect, ULONG nFlags )
nFlags |= FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE;
// compute window position according to flags and arrangement
- USHORT nArrangeIndex;
+ sal_uInt16 nArrangeIndex;
SetPosPixel( ImplCalcPos( this, rRect, nFlags, nArrangeIndex ) );
// set data and display window
@@ -708,11 +708,11 @@ void FloatingWindow::StartPopupMode( const Rectangle& rRect, ULONG nFlags )
maFloatRect.Right() += 2;
maFloatRect.Bottom() += 2;
mnPopupModeFlags = nFlags;
- mbInPopupMode = TRUE;
- mbPopupMode = TRUE;
- mbPopupModeCanceled = FALSE;
- mbPopupModeTearOff = FALSE;
- mbMouseDown = FALSE;
+ mbInPopupMode = sal_True;
+ mbPopupMode = sal_True;
+ mbPopupModeCanceled = sal_False;
+ mbPopupModeTearOff = sal_False;
+ mbMouseDown = sal_False;
mbOldSaveBackMode = IsSaveBackgroundEnabled();
EnableSaveBackground();
@@ -724,22 +724,22 @@ void FloatingWindow::StartPopupMode( const Rectangle& rRect, ULONG nFlags )
if( nFlags & FLOATWIN_POPUPMODE_GRABFOCUS )
{
// force key input even without focus (useful for menues)
- mbGrabFocus = TRUE;
+ mbGrabFocus = sal_True;
}
- Show( TRUE, SHOW_NOACTIVATE );
+ Show( sal_True, SHOW_NOACTIVATE );
}
// -----------------------------------------------------------------------
-void FloatingWindow::StartPopupMode( ToolBox* pBox, ULONG nFlags )
+void FloatingWindow::StartPopupMode( ToolBox* pBox, sal_uIntPtr nFlags )
{
// get selected button
- USHORT nItemId = pBox->GetDownItemId();
+ sal_uInt16 nItemId = pBox->GetDownItemId();
if ( !nItemId )
return;
mpImplData->mpBox = pBox;
- pBox->ImplFloatControl( TRUE, this );
+ pBox->ImplFloatControl( sal_True, this );
// retrieve some data from the ToolBox
Rectangle aRect = pBox->GetItemRect( nItemId );
@@ -778,14 +778,14 @@ void FloatingWindow::StartPopupMode( ToolBox* pBox, ULONG nFlags )
// -----------------------------------------------------------------------
-void FloatingWindow::ImplEndPopupMode( USHORT nFlags, ULONG nFocusId )
+void FloatingWindow::ImplEndPopupMode( sal_uInt16 nFlags, sal_uIntPtr nFocusId )
{
if ( !mbInPopupMode )
return;
ImplSVData* pSVData = ImplGetSVData();
- mbInCleanUp = TRUE; // prevent killing this window due to focus change while working with it
+ mbInCleanUp = sal_True; // prevent killing this window due to focus change while working with it
// Bei allen nachfolgenden PopupMode-Fenster den Modus auch beenden
while ( pSVData->maWinData.mpFirstFloat && pSVData->maWinData.mpFirstFloat != this )
@@ -796,13 +796,13 @@ void FloatingWindow::ImplEndPopupMode( USHORT nFlags, ULONG nFocusId )
pSVData->maWinData.mpFirstFloat = mpNextFloat;
mpNextFloat = NULL;
- ULONG nPopupModeFlags = mnPopupModeFlags;
+ sal_uIntPtr nPopupModeFlags = mnPopupModeFlags;
// Wenn nicht abgerissen wurde, dann Fenster wieder Hiden
if ( !(nFlags & FLOATWIN_POPUPMODEEND_TEAROFF) ||
!(nPopupModeFlags & FLOATWIN_POPUPMODE_ALLOWTEAROFF) )
{
- Show( FALSE, SHOW_NOFOCUSCHANGE );
+ Show( sal_False, SHOW_NOFOCUSCHANGE );
// Focus evt. auf ein entsprechendes FloatingWindow weiterschalten
if ( nFocusId )
@@ -810,13 +810,13 @@ void FloatingWindow::ImplEndPopupMode( USHORT nFlags, ULONG nFocusId )
else if ( pSVData->maWinData.mpFocusWin && pSVData->maWinData.mpFirstFloat &&
ImplIsWindowOrChild( pSVData->maWinData.mpFocusWin ) )
pSVData->maWinData.mpFirstFloat->GrabFocus();
- mbPopupModeTearOff = FALSE;
+ mbPopupModeTearOff = sal_False;
}
else
{
- mbPopupModeTearOff = TRUE;
+ mbPopupModeTearOff = sal_True;
if ( nFocusId )
- Window::EndSaveFocus( nFocusId, FALSE );
+ Window::EndSaveFocus( nFocusId, sal_False );
}
EnableSaveBackground( mbOldSaveBackMode );
@@ -828,7 +828,7 @@ void FloatingWindow::ImplEndPopupMode( USHORT nFlags, ULONG nFocusId )
// ToolBox wieder auf normal schalten
if ( mpImplData->mpBox )
{
- mpImplData->mpBox->ImplFloatControl( FALSE, this );
+ mpImplData->mpBox->ImplFloatControl( sal_False, this );
mpImplData->mpBox = NULL;
}
@@ -849,12 +849,12 @@ void FloatingWindow::ImplEndPopupMode( USHORT nFlags, ULONG nFocusId )
}
}
- mbInCleanUp = FALSE;
+ mbInCleanUp = sal_False;
}
// -----------------------------------------------------------------------
-void FloatingWindow::EndPopupMode( USHORT nFlags )
+void FloatingWindow::EndPopupMode( sal_uInt16 nFlags )
{
ImplEndPopupMode( nFlags );
}
diff --git a/vcl/source/window/keycod.cxx b/vcl/source/window/keycod.cxx
index bcc5536fd028..af52cbe563d5 100644
--- a/vcl/source/window/keycod.cxx
+++ b/vcl/source/window/keycod.cxx
@@ -46,7 +46,7 @@
// =======================================================================
-static USHORT aImplKeyFuncTab[(KEYFUNC_FRONT+1)*4] =
+static sal_uInt16 aImplKeyFuncTab[(KEYFUNC_FRONT+1)*4] =
{
0, 0, 0, 0, // KEYFUNC_DONTKNOW
KEY_N | KEY_MOD1, 0, 0, 0, // KEYFUNC_NEW
@@ -71,9 +71,9 @@ static USHORT aImplKeyFuncTab[(KEYFUNC_FRONT+1)*4] =
// -----------------------------------------------------------------------
-void ImplGetKeyCode( KeyFuncType eFunc, USHORT& rCode1, USHORT& rCode2, USHORT& rCode3, USHORT& rCode4 )
+void ImplGetKeyCode( KeyFuncType eFunc, sal_uInt16& rCode1, sal_uInt16& rCode2, sal_uInt16& rCode3, sal_uInt16& rCode4 )
{
- USHORT nIndex = (USHORT)eFunc;
+ sal_uInt16 nIndex = (sal_uInt16)eFunc;
nIndex *= 4;
rCode1 = aImplKeyFuncTab[nIndex];
rCode2 = aImplKeyFuncTab[nIndex+1];
@@ -85,7 +85,7 @@ void ImplGetKeyCode( KeyFuncType eFunc, USHORT& rCode1, USHORT& rCode2, USHORT&
KeyCode::KeyCode( KeyFuncType eFunction )
{
- USHORT nDummy;
+ sal_uInt16 nDummy;
ImplGetKeyCode( eFunction, nCode, nDummy, nDummy, nDummy );
eFunc = eFunction;
}
@@ -101,18 +101,18 @@ KeyCode::KeyCode( const ResId& rResId )
{
pResMgr->Increment( sizeof( RSHEADER_TYPE ) );
- ULONG nKeyCode = pResMgr->ReadLong();
- ULONG nModifier = pResMgr->ReadLong();
- ULONG nKeyFunc = pResMgr->ReadLong();
+ sal_uIntPtr nKeyCode = pResMgr->ReadLong();
+ sal_uIntPtr nModifier = pResMgr->ReadLong();
+ sal_uIntPtr nKeyFunc = pResMgr->ReadLong();
eFunc = (KeyFuncType)nKeyFunc;
if ( eFunc != KEYFUNC_DONTKNOW )
{
- USHORT nDummy;
+ sal_uInt16 nDummy;
ImplGetKeyCode( eFunc, nCode, nDummy, nDummy, nDummy );
}
else
- nCode = sal::static_int_cast<USHORT>(nKeyCode | nModifier);
+ nCode = sal::static_int_cast<sal_uInt16>(nKeyCode | nModifier);
}
}
@@ -141,15 +141,15 @@ KeyFuncType KeyCode::GetFunction() const
if ( eFunc != KEYFUNC_DONTKNOW )
return eFunc;
- USHORT nCompCode = GetModifier() | GetCode();
+ sal_uInt16 nCompCode = GetModifier() | GetCode();
if ( nCompCode )
{
- for ( USHORT i = (USHORT)KEYFUNC_NEW; i < (USHORT)KEYFUNC_FRONT; i++ )
+ for ( sal_uInt16 i = (sal_uInt16)KEYFUNC_NEW; i < (sal_uInt16)KEYFUNC_FRONT; i++ )
{
- USHORT nKeyCode1;
- USHORT nKeyCode2;
- USHORT nKeyCode3;
- USHORT nKeyCode4;
+ sal_uInt16 nKeyCode1;
+ sal_uInt16 nKeyCode2;
+ sal_uInt16 nKeyCode3;
+ sal_uInt16 nKeyCode4;
ImplGetKeyCode( (KeyFuncType)i, nKeyCode1, nKeyCode2, nKeyCode3, nKeyCode4 );
if ( (nCompCode == nKeyCode1) || (nCompCode == nKeyCode2) || (nCompCode == nKeyCode3) || (nCompCode == nKeyCode4) )
return (KeyFuncType)i;
diff --git a/vcl/source/window/keyevent.cxx b/vcl/source/window/keyevent.cxx
index f4011b9be16e..9d6854430611 100644
--- a/vcl/source/window/keyevent.cxx
+++ b/vcl/source/window/keyevent.cxx
@@ -74,8 +74,8 @@ KeyEvent KeyEvent::LogicalTextDirectionality (TextDirectionality eMode) const
{
KeyEvent aClone(*this);
- USHORT nCode = maKeyCode.GetCode();
- USHORT nMod = maKeyCode.GetAllModifier();
+ sal_uInt16 nCode = maKeyCode.GetCode();
+ sal_uInt16 nMod = maKeyCode.GetAllModifier();
switch (eMode)
{
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index cebe1d1f596c..4679915d3627 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -80,9 +80,9 @@ namespace vcl
struct MenuLayoutData : public ControlLayoutData
{
- std::vector< USHORT > m_aLineItemIds;
- std::vector< USHORT > m_aLineItemPositions;
- std::map< USHORT, Rectangle > m_aVisibleItemBoundRects;
+ std::vector< sal_uInt16 > m_aLineItemIds;
+ std::vector< sal_uInt16 > m_aLineItemPositions;
+ std::map< sal_uInt16, Rectangle > m_aVisibleItemBoundRects;
};
}
@@ -104,32 +104,32 @@ DBG_NAME( Menu )
#include <xwphook.h>
-// return TRUE if hilite should be executed: left mouse button down
+// return sal_True if hilite should be executed: left mouse button down
// or xwp mouse hook enabled
-static BOOL ImplHilite( const MouseEvent& rMEvt )
+static sal_Bool ImplHilite( const MouseEvent& rMEvt )
{
- static BOOL init = FALSE;
+ static sal_Bool init = sal_False;
static HOOKCONFIG hc;
// read XWP settings at program startup
- if (init == FALSE) {
- BOOL rc;
- ULONG cb = sizeof(HOOKCONFIG);
+ if (init == sal_False) {
+ sal_Bool rc;
+ sal_uIntPtr cb = sizeof(HOOKCONFIG);
memset(&hc, 0, sizeof(HOOKCONFIG));
rc = PrfQueryProfileData( HINI_USER, INIAPP_XWPHOOK, INIKEY_HOOK_CONFIG,
&hc, &cb);
- init = TRUE;
+ init = sal_True;
}
// check mouse left button
if (rMEvt.GetButtons() == MOUSE_LEFT)
- return TRUE;
+ return sal_True;
// return xwp flag
return hc.fSlidingMenus;
}
#endif
-static BOOL ImplAccelDisabled()
+static sal_Bool ImplAccelDisabled()
{
// display of accelerator strings may be suppressed via configuration
static int nAccelDisabled = -1;
@@ -142,12 +142,12 @@ static BOOL ImplAccelDisabled()
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SuppressAccelerators" ) ) );
nAccelDisabled = aStr.equalsIgnoreAsciiCaseAscii( "true" ) ? 1 : 0;
}
- return (nAccelDisabled == 1) ? TRUE : FALSE;
+ return (nAccelDisabled == 1) ? sal_True : sal_False;
}
struct MenuItemData
{
- USHORT nId; // SV Id
+ sal_uInt16 nId; // SV Id
MenuItemType eType; // MenuItem-Type
MenuItemBits nBits; // MenuItem-Bits
Menu* pSubMenu; // Pointer auf das SubMenu
@@ -157,15 +157,15 @@ struct MenuItemData
XubString aTipHelpText; // TipHelp-String (eg, expanded filenames)
XubString aCommandStr; // CommandString
XubString aHelpCommandStr; // Help command string (to reference external help)
- ULONG nHelpId; // Help-Id
- ULONG nUserValue; // User value
+ sal_uIntPtr nHelpId; // Help-Id
+ sal_uIntPtr nUserValue; // User value
Image aImage; // Image
KeyCode aAccelKey; // Accelerator-Key
- BOOL bChecked; // Checked
- BOOL bEnabled; // Enabled
- BOOL bVisible; // Visible (note: this flag will not override MENU_FLAG_HIDEDISABLEDENTRIES when true)
- BOOL bIsTemporary; // Temporary inserted ('No selection possible')
- BOOL bMirrorMode;
+ sal_Bool bChecked; // Checked
+ sal_Bool bEnabled; // Enabled
+ sal_Bool bVisible; // Visible (note: this flag will not override MENU_FLAG_HIDEDISABLEDENTRIES when true)
+ sal_Bool bIsTemporary; // Temporary inserted ('No selection possible')
+ sal_Bool bMirrorMode;
long nItemImageAngle;
Size aSz; // nur temporaer gueltig
XubString aAccessibleName; // accessible name
@@ -210,22 +210,22 @@ public:
MenuItemList() : List( 16, 4 ) {}
~MenuItemList();
- MenuItemData* Insert( USHORT nId, MenuItemType eType, MenuItemBits nBits,
+ MenuItemData* Insert( sal_uInt16 nId, MenuItemType eType, MenuItemBits nBits,
const XubString& rStr, const Image& rImage,
- Menu* pMenu, USHORT nPos );
- void InsertSeparator( USHORT nPos );
- void Remove( USHORT nPos );
+ Menu* pMenu, sal_uInt16 nPos );
+ void InsertSeparator( sal_uInt16 nPos );
+ void Remove( sal_uInt16 nPos );
- MenuItemData* GetData( USHORT nSVId, USHORT& rPos ) const;
- MenuItemData* GetData( USHORT nSVId ) const
- { USHORT nTemp; return GetData( nSVId, nTemp ); }
- MenuItemData* GetDataFromPos( ULONG nPos ) const
+ MenuItemData* GetData( sal_uInt16 nSVId, sal_uInt16& rPos ) const;
+ MenuItemData* GetData( sal_uInt16 nSVId ) const
+ { sal_uInt16 nTemp; return GetData( nSVId, nTemp ); }
+ MenuItemData* GetDataFromPos( sal_uIntPtr nPos ) const
{ return (MenuItemData*)List::GetObject( nPos ); }
- MenuItemData* SearchItem( xub_Unicode cSelectChar, KeyCode aKeyCode, USHORT& rPos, USHORT& nDuplicates, USHORT nCurrentPos ) const;
- USHORT GetItemCount( xub_Unicode cSelectChar ) const;
- USHORT GetItemCount( KeyCode aKeyCode ) const;
+ MenuItemData* SearchItem( xub_Unicode cSelectChar, KeyCode aKeyCode, sal_uInt16& rPos, sal_uInt16& nDuplicates, sal_uInt16 nCurrentPos ) const;
+ sal_uInt16 GetItemCount( xub_Unicode cSelectChar ) const;
+ sal_uInt16 GetItemCount( KeyCode aKeyCode ) const;
uno::Reference< i18n::XCharacterClassification > GetCharClass() const;
};
@@ -234,17 +234,17 @@ public:
MenuItemList::~MenuItemList()
{
- for ( ULONG n = Count(); n; )
+ for ( sal_uIntPtr n = Count(); n; )
{
MenuItemData* pData = GetDataFromPos( --n );
delete pData;
}
}
-MenuItemData* MenuItemList::Insert( USHORT nId, MenuItemType eType,
+MenuItemData* MenuItemList::Insert( sal_uInt16 nId, MenuItemType eType,
MenuItemBits nBits,
const XubString& rStr, const Image& rImage,
- Menu* pMenu, USHORT nPos )
+ Menu* pMenu, sal_uInt16 nPos )
{
MenuItemData* pData = new MenuItemData( rStr, rImage );
pData->nId = nId;
@@ -254,11 +254,11 @@ MenuItemData* MenuItemList::Insert( USHORT nId, MenuItemType eType,
pData->pAutoSubMenu = NULL;
pData->nHelpId = 0;
pData->nUserValue = 0;
- pData->bChecked = FALSE;
- pData->bEnabled = TRUE;
- pData->bVisible = TRUE;
- pData->bIsTemporary = FALSE;
- pData->bMirrorMode = FALSE;
+ pData->bChecked = sal_False;
+ pData->bEnabled = sal_True;
+ pData->bVisible = sal_True;
+ pData->bIsTemporary = sal_False;
+ pData->bMirrorMode = sal_False;
pData->nItemImageAngle = 0;
SalItemParams aSalMIData;
@@ -276,7 +276,7 @@ MenuItemData* MenuItemList::Insert( USHORT nId, MenuItemType eType,
return pData;
}
-void MenuItemList::InsertSeparator( USHORT nPos )
+void MenuItemList::InsertSeparator( sal_uInt16 nPos )
{
MenuItemData* pData = new MenuItemData;
pData->nId = 0;
@@ -286,11 +286,11 @@ void MenuItemList::InsertSeparator( USHORT nPos )
pData->pAutoSubMenu = NULL;
pData->nHelpId = 0;
pData->nUserValue = 0;
- pData->bChecked = FALSE;
- pData->bEnabled = TRUE;
- pData->bVisible = TRUE;
- pData->bIsTemporary = FALSE;
- pData->bMirrorMode = FALSE;
+ pData->bChecked = sal_False;
+ pData->bEnabled = sal_True;
+ pData->bVisible = sal_True;
+ pData->bIsTemporary = sal_False;
+ pData->bMirrorMode = sal_False;
pData->nItemImageAngle = 0;
SalItemParams aSalMIData;
@@ -307,14 +307,14 @@ void MenuItemList::InsertSeparator( USHORT nPos )
List::Insert( (void*)pData, nPos );
}
-void MenuItemList::Remove( USHORT nPos )
+void MenuItemList::Remove( sal_uInt16 nPos )
{
- MenuItemData* pData = (MenuItemData*)List::Remove( (ULONG)nPos );
+ MenuItemData* pData = (MenuItemData*)List::Remove( (sal_uIntPtr)nPos );
if ( pData )
delete pData;
}
-MenuItemData* MenuItemList::GetData( USHORT nSVId, USHORT& rPos ) const
+MenuItemData* MenuItemList::GetData( sal_uInt16 nSVId, sal_uInt16& rPos ) const
{
rPos = 0;
MenuItemData* pData = (MenuItemData*)GetObject( rPos );
@@ -330,11 +330,11 @@ MenuItemData* MenuItemList::GetData( USHORT nSVId, USHORT& rPos ) const
return NULL;
}
-MenuItemData* MenuItemList::SearchItem( xub_Unicode cSelectChar, KeyCode aKeyCode, USHORT& rPos, USHORT& nDuplicates, USHORT nCurrentPos ) const
+MenuItemData* MenuItemList::SearchItem( xub_Unicode cSelectChar, KeyCode aKeyCode, sal_uInt16& rPos, sal_uInt16& nDuplicates, sal_uInt16 nCurrentPos ) const
{
const vcl::I18nHelper& rI18nHelper = Application::GetSettings().GetUILocaleI18nHelper();
- USHORT nListCount = (USHORT)Count();
+ sal_uInt16 nListCount = (sal_uInt16)Count();
// try character code first
nDuplicates = GetItemCount( cSelectChar ); // return number of duplicates
@@ -367,7 +367,7 @@ MenuItemData* MenuItemList::SearchItem( xub_Unicode cSelectChar, KeyCode aKeyCod
MenuItemData* pData = GetDataFromPos( rPos );
if ( pData->bEnabled )
{
- USHORT n = pData->aText.Search( '~' );
+ sal_uInt16 n = pData->aText.Search( '~' );
if ( n != STRING_NOTFOUND )
{
KeyCode mnKeyCode;
@@ -391,13 +391,13 @@ MenuItemData* MenuItemList::SearchItem( xub_Unicode cSelectChar, KeyCode aKeyCod
return NULL;
}
-USHORT MenuItemList::GetItemCount( xub_Unicode cSelectChar ) const
+sal_uInt16 MenuItemList::GetItemCount( xub_Unicode cSelectChar ) const
{
// returns number of entries with same mnemonic
const vcl::I18nHelper& rI18nHelper = Application::GetSettings().GetUILocaleI18nHelper();
- USHORT nItems = 0, nPos;
- for ( nPos = (USHORT)Count(); nPos; )
+ sal_uInt16 nItems = 0, nPos;
+ for ( nPos = (sal_uInt16)Count(); nPos; )
{
MenuItemData* pData = GetDataFromPos( --nPos );
if ( pData->bEnabled && rI18nHelper.MatchMnemonic( pData->aText, cSelectChar ) )
@@ -407,7 +407,7 @@ USHORT MenuItemList::GetItemCount( xub_Unicode cSelectChar ) const
return nItems;
}
-USHORT MenuItemList::GetItemCount( KeyCode aKeyCode ) const
+sal_uInt16 MenuItemList::GetItemCount( KeyCode aKeyCode ) const
{
// returns number of entries with same mnemonic
// uses key codes instead of character codes
@@ -416,13 +416,13 @@ USHORT MenuItemList::GetItemCount( KeyCode aKeyCode ) const
if( aKeyCode.GetCode() >= KEY_A && aKeyCode.GetCode() <= KEY_Z )
ascii = sal::static_int_cast<char>('A' + (aKeyCode.GetCode() - KEY_A));
- USHORT nItems = 0, nPos;
- for ( nPos = (USHORT)Count(); nPos; )
+ sal_uInt16 nItems = 0, nPos;
+ for ( nPos = (sal_uInt16)Count(); nPos; )
{
MenuItemData* pData = GetDataFromPos( --nPos );
if ( pData->bEnabled )
{
- USHORT n = pData->aText.Search( '~' );
+ sal_uInt16 n = pData->aText.Search( '~' );
if ( n != STRING_NOTFOUND )
{
KeyCode mnKeyCode;
@@ -464,21 +464,21 @@ private:
Timer aHighlightChangedTimer;
Timer aSubmenuCloseTimer;
Timer aScrollTimer;
- ULONG nSaveFocusId;
+ sal_uIntPtr nSaveFocusId;
// long nStartY;
- USHORT nHighlightedItem; // gehighlightetes/selektiertes Item
- USHORT nMBDownPos;
- USHORT nScrollerHeight;
- USHORT nFirstEntry;
- USHORT nBorder;
- USHORT nPosInParent;
- BOOL bInExecute;
-
- BOOL bScrollMenu;
- BOOL bScrollUp;
- BOOL bScrollDown;
- BOOL bIgnoreFirstMove;
- BOOL bKeyInput;
+ sal_uInt16 nHighlightedItem; // gehighlightetes/selektiertes Item
+ sal_uInt16 nMBDownPos;
+ sal_uInt16 nScrollerHeight;
+ sal_uInt16 nFirstEntry;
+ sal_uInt16 nBorder;
+ sal_uInt16 nPosInParent;
+ sal_Bool bInExecute;
+
+ sal_Bool bScrollMenu;
+ sal_Bool bScrollUp;
+ sal_Bool bScrollDown;
+ sal_Bool bIgnoreFirstMove;
+ sal_Bool bKeyInput;
DECL_LINK( PopupEnd, FloatingWindow* );
DECL_LINK( HighlightChanged, Timer* );
@@ -489,16 +489,16 @@ private:
void StateChanged( StateChangedType nType );
void DataChanged( const DataChangedEvent& rDCEvt );
protected:
- Region ImplCalcClipRegion( BOOL bIncludeLogo = TRUE ) const;
+ Region ImplCalcClipRegion( sal_Bool bIncludeLogo = sal_True ) const;
void ImplInitClipRegion();
- void ImplDrawScroller( BOOL bUp );
+ void ImplDrawScroller( sal_Bool bUp );
using Window::ImplScroll;
void ImplScroll( const Point& rMousePos );
- void ImplScroll( BOOL bUp );
- void ImplCursorUpDown( BOOL bUp, BOOL bHomeEnd = FALSE );
- void ImplHighlightItem( const MouseEvent& rMEvt, BOOL bMBDown );
+ void ImplScroll( sal_Bool bUp );
+ void ImplCursorUpDown( sal_Bool bUp, sal_Bool bHomeEnd = sal_False );
+ void ImplHighlightItem( const MouseEvent& rMEvt, sal_Bool bMBDown );
long ImplGetStartY() const;
- Rectangle ImplGetItemRect( USHORT nPos );
+ Rectangle ImplGetItemRect( sal_uInt16 nPos );
public:
MenuFloatingWindow( Menu* pMenu, Window* pParent, WinBits nStyle );
@@ -515,27 +515,27 @@ public:
virtual void RequestHelp( const HelpEvent& rHEvt );
virtual void Resize();
- void SetFocusId( ULONG nId ) { nSaveFocusId = nId; }
- ULONG GetFocusId() const { return nSaveFocusId; }
+ void SetFocusId( sal_uIntPtr nId ) { nSaveFocusId = nId; }
+ sal_uIntPtr GetFocusId() const { return nSaveFocusId; }
- void EnableScrollMenu( BOOL b );
- BOOL IsScrollMenu() const { return bScrollMenu; }
- USHORT GetScrollerHeight() const { return nScrollerHeight; }
+ void EnableScrollMenu( sal_Bool b );
+ sal_Bool IsScrollMenu() const { return bScrollMenu; }
+ sal_uInt16 GetScrollerHeight() const { return nScrollerHeight; }
void Execute();
- void StopExecute( ULONG nFocusId = 0 );
+ void StopExecute( sal_uIntPtr nFocusId = 0 );
void EndExecute();
- void EndExecute( USHORT nSelectId );
+ void EndExecute( sal_uInt16 nSelectId );
PopupMenu* GetActivePopup() const { return pActivePopup; }
void KillActivePopup( PopupMenu* pThisOnly = NULL );
- void HighlightItem( USHORT nPos, BOOL bHighlight );
- void ChangeHighlightItem( USHORT n, BOOL bStartPopupTimer );
- USHORT GetHighlightedItem() const { return nHighlightedItem; }
+ void HighlightItem( sal_uInt16 nPos, sal_Bool bHighlight );
+ void ChangeHighlightItem( sal_uInt16 n, sal_Bool bStartPopupTimer );
+ sal_uInt16 GetHighlightedItem() const { return nHighlightedItem; }
- void SetPosInParent( USHORT nPos ) { nPosInParent = nPos; }
- USHORT GetPosInParent() const { return nPosInParent; }
+ void SetPosInParent( sal_uInt16 nPos ) { nPosInParent = nPos; }
+ sal_uInt16 GetPosInParent() const { return nPosInParent; }
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
};
@@ -607,10 +607,10 @@ void DecoToolBox::calcMinSize()
}
else
{
- USHORT nItems = GetItemCount();
- for( USHORT i = 0; i < nItems; i++ )
+ sal_uInt16 nItems = GetItemCount();
+ for( sal_uInt16 i = 0; i < nItems; i++ )
{
- USHORT nId = GetItemId( i );
+ sal_uInt16 nId = GetItemId( i );
aTbx.InsertItem( nId, GetItemImage( nId ) );
}
}
@@ -672,7 +672,7 @@ class MenuBarWindow : public Window
private:
struct AddButtonEntry
{
- USHORT m_nId;
+ sal_uInt16 m_nId;
Link m_aSelectLink;
Link m_aHighlightLink;
@@ -681,25 +681,25 @@ private:
Menu* pMenu;
PopupMenu* pActivePopup;
- USHORT nHighlightedItem;
- ULONG nSaveFocusId;
- BOOL mbAutoPopup;
- BOOL bIgnoreFirstMove;
- BOOL bStayActive;
+ sal_uInt16 nHighlightedItem;
+ sal_uIntPtr nSaveFocusId;
+ sal_Bool mbAutoPopup;
+ sal_Bool bIgnoreFirstMove;
+ sal_Bool bStayActive;
DecoToolBox aCloser;
PushButton aFloatBtn;
PushButton aHideBtn;
- std::map< USHORT, AddButtonEntry > m_aAddButtons;
+ std::map< sal_uInt16, AddButtonEntry > m_aAddButtons;
- void HighlightItem( USHORT nPos, BOOL bHighlight );
- void ChangeHighlightItem( USHORT n, BOOL bSelectPopupEntry, BOOL bAllowRestoreFocus = TRUE, BOOL bDefaultToDocument = TRUE );
+ void HighlightItem( sal_uInt16 nPos, sal_Bool bHighlight );
+ void ChangeHighlightItem( sal_uInt16 n, sal_Bool bSelectPopupEntry, sal_Bool bAllowRestoreFocus = sal_True, sal_Bool bDefaultToDocument = sal_True );
- USHORT ImplFindEntry( const Point& rMousePos ) const;
- void ImplCreatePopup( BOOL bPreSelectFirst );
- BOOL ImplHandleKeyEvent( const KeyEvent& rKEvent, BOOL bFromMenu = TRUE );
- Rectangle ImplGetItemRect( USHORT nPos );
+ sal_uInt16 ImplFindEntry( const Point& rMousePos ) const;
+ void ImplCreatePopup( sal_Bool bPreSelectFirst );
+ sal_Bool ImplHandleKeyEvent( const KeyEvent& rKEvent, sal_Bool bFromMenu = sal_True );
+ Rectangle ImplGetItemRect( sal_uInt16 nPos );
void ImplInitStyleSettings();
@@ -718,7 +718,7 @@ public:
MenuBarWindow( Window* pParent );
~MenuBarWindow();
- void ShowButtons( BOOL bClose, BOOL bFloat, BOOL bHide );
+ void ShowButtons( sal_Bool bClose, sal_Bool bFloat, sal_Bool bHide );
virtual void MouseMove( const MouseEvent& rMEvt );
virtual void MouseButtonDown( const MouseEvent& rMEvt );
@@ -728,26 +728,26 @@ public:
virtual void Resize();
virtual void RequestHelp( const HelpEvent& rHEvt );
- void SetFocusId( ULONG nId ) { nSaveFocusId = nId; }
- ULONG GetFocusId() const { return nSaveFocusId; }
+ void SetFocusId( sal_uIntPtr nId ) { nSaveFocusId = nId; }
+ sal_uIntPtr GetFocusId() const { return nSaveFocusId; }
void SetMenu( MenuBar* pMenu );
void KillActivePopup();
PopupMenu* GetActivePopup() const { return pActivePopup; }
void PopupClosed( Menu* pMenu );
- USHORT GetHighlightedItem() const { return nHighlightedItem; }
+ sal_uInt16 GetHighlightedItem() const { return nHighlightedItem; }
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
- void SetAutoPopup( BOOL bAuto ) { mbAutoPopup = bAuto; }
+ void SetAutoPopup( sal_Bool bAuto ) { mbAutoPopup = bAuto; }
void ImplLayoutChanged();
Size MinCloseButtonSize();
// add an arbitrary button to the menubar (will appear next to closer)
- USHORT AddMenuBarButton( const Image&, const Link&, const String&, USHORT nPos );
- void SetMenuBarButtonHighlightHdl( USHORT nId, const Link& );
- Rectangle GetMenuBarButtonRectPixel( USHORT nId );
- void RemoveMenuBarButton( USHORT nId );
- bool HandleMenuButtonEvent( USHORT i_nButtonId );
+ sal_uInt16 AddMenuBarButton( const Image&, const Link&, const String&, sal_uInt16 nPos );
+ void SetMenuBarButtonHighlightHdl( sal_uInt16 nId, const Link& );
+ Rectangle GetMenuBarButtonRectPixel( sal_uInt16 nId );
+ void RemoveMenuBarButton( sal_uInt16 nId );
+ bool HandleMenuButtonEvent( sal_uInt16 i_nButtonId );
};
static void ImplAddNWFSeparator( Window *pThis, const MenubarValue& rMenubarValue )
@@ -777,24 +777,24 @@ static void ImplSetMenuItemData( MenuItemData* pData )
pData->eType = MENUITEM_STRINGIMAGE;
}
-static ULONG ImplChangeTipTimeout( ULONG nTimeout, Window *pWindow )
+static sal_uIntPtr ImplChangeTipTimeout( sal_uIntPtr nTimeout, Window *pWindow )
{
AllSettings aAllSettings( pWindow->GetSettings() );
HelpSettings aHelpSettings( aAllSettings.GetHelpSettings() );
- ULONG nRet = aHelpSettings.GetTipTimeout();
+ sal_uIntPtr nRet = aHelpSettings.GetTipTimeout();
aHelpSettings.SetTipTimeout( nTimeout );
aAllSettings.SetHelpSettings( aHelpSettings );
pWindow->SetSettings( aAllSettings );
return nRet;
}
-static BOOL ImplHandleHelpEvent( Window* pMenuWindow, Menu* pMenu, USHORT nHighlightedItem, const HelpEvent& rHEvt, const Rectangle &rHighlightRect )
+static sal_Bool ImplHandleHelpEvent( Window* pMenuWindow, Menu* pMenu, sal_uInt16 nHighlightedItem, const HelpEvent& rHEvt, const Rectangle &rHighlightRect )
{
if( ! pMenu )
- return FALSE;
+ return sal_False;
- BOOL bDone = FALSE;
- USHORT nId = 0;
+ sal_Bool bDone = sal_False;
+ sal_uInt16 nId = 0;
if ( nHighlightedItem != ITEMPOS_INVALID )
{
@@ -817,23 +817,23 @@ static BOOL ImplHandleHelpEvent( Window* pMenuWindow, Menu* pMenu, USHORT nHighl
else
{
// give user a chance to read the full filename
- ULONG oldTimeout=ImplChangeTipTimeout( 60000, pMenuWindow );
+ sal_uIntPtr oldTimeout=ImplChangeTipTimeout( 60000, pMenuWindow );
// call always, even when strlen==0 to correctly remove tip
Help::ShowQuickHelp( pMenuWindow, aRect, pMenu->GetTipHelpText( nId ) );
ImplChangeTipTimeout( oldTimeout, pMenuWindow );
}
- bDone = TRUE;
+ bDone = sal_True;
}
else if ( ( rHEvt.GetMode() & HELPMODE_QUICK ) && pMenuWindow )
{
Point aPos = rHEvt.GetMousePosPixel();
Rectangle aRect( aPos, Size() );
// give user a chance to read the full filename
- ULONG oldTimeout=ImplChangeTipTimeout( 60000, pMenuWindow );
+ sal_uIntPtr oldTimeout=ImplChangeTipTimeout( 60000, pMenuWindow );
// call always, even when strlen==0 to correctly remove tip
Help::ShowQuickHelp( pMenuWindow, aRect, pMenu->GetTipHelpText( nId ) );
ImplChangeTipTimeout( oldTimeout, pMenuWindow );
- bDone = TRUE;
+ bDone = sal_True;
}
else if ( rHEvt.GetMode() & (HELPMODE_CONTEXT | HELPMODE_EXTENDED) )
{
@@ -844,7 +844,7 @@ static BOOL ImplHandleHelpEvent( Window* pMenuWindow, Menu* pMenu, USHORT nHighl
// Ist eine ID vorhanden, dann Hilfe mit der ID aufrufen, sonst
// den Hilfe-Index
String aCommand = pMenu->GetItemCommand( nId );
- ULONG nHelpId = pMenu->GetHelpId( nId );
+ sal_uIntPtr nHelpId = pMenu->GetHelpId( nId );
if ( aCommand.Len() )
pHelp->Start( aCommand, NULL );
@@ -853,7 +853,7 @@ static BOOL ImplHandleHelpEvent( Window* pMenuWindow, Menu* pMenu, USHORT nHighl
else
pHelp->Start( OOO_HELP_INDEX, NULL );
}
- bDone = TRUE;
+ bDone = sal_True;
}
return bDone;
}
@@ -863,7 +863,7 @@ static int ImplGetTopDockingAreaHeight( Window *pWindow )
// find docking area that is top aligned and return its height
// note: dockingareas are direct children of the SystemWindow
int height=0;
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
if( pWindow->ImplGetFrameWindow() )
{
Window *pWin = pWindow->ImplGetFrameWindow()->GetWindow( WINDOW_FIRSTCHILD); //mpWindowImpl->mpFirstChild;
@@ -877,7 +877,7 @@ static int ImplGetTopDockingAreaHeight( Window *pWindow )
DockingAreaWindow *pDockingArea = dynamic_cast< DockingAreaWindow* >( pWin );
if( pDockingArea && pDockingArea->GetAlign() == WINDOWALIGN_TOP )
{
- bDone = TRUE;
+ bDone = sal_True;
if( pDockingArea->IsVisible() )
height = pDockingArea->GetOutputSizePixel().Height();
}
@@ -896,13 +896,13 @@ static int ImplGetTopDockingAreaHeight( Window *pWindow )
Menu::Menu()
{
DBG_CTOR( Menu, NULL );
- bIsMenuBar = FALSE;
+ bIsMenuBar = sal_False;
ImplInit();
}
// this constructor makes sure we're creating the native menu
// with the correct type (ie, MenuBar vs. PopupMenu)
-Menu::Menu( BOOL bMenubar )
+Menu::Menu( sal_Bool bMenubar )
{
DBG_CTOR( Menu, NULL );
bIsMenuBar = bMenubar;
@@ -938,7 +938,7 @@ Menu::~Menu()
if ( nEventId )
Application::RemoveUserEvent( nEventId );
- bKilled = TRUE;
+ bKilled = sal_True;
delete pItemList;
delete pLogo;
@@ -959,16 +959,16 @@ void Menu::ImplInit()
mpSalMenu = NULL;
nMenuFlags = MENU_FLAG_SHOWCHECKIMAGES;
nDefaultItem = 0;
- //bIsMenuBar = FALSE; // this is now set in the ctor, must not be changed here!!!
+ //bIsMenuBar = sal_False; // this is now set in the ctor, must not be changed here!!!
nSelectedId = 0;
pItemList = new MenuItemList;
pLogo = NULL;
pStartedFrom = NULL;
pWindow = NULL;
nEventId = 0;
- bCanceled = FALSE;
- bInCallback = FALSE;
- bKilled = FALSE;
+ bCanceled = sal_False;
+ bInCallback = sal_False;
+ bKilled = sal_False;
mpLayoutData = NULL;
// Native-support: returns NULL if not supported
@@ -989,13 +989,13 @@ void Menu::ImplLoadRes( const ResId& rResId )
rResId.SetRT( RSC_MENU );
GetRes( rResId );
- ULONG nObjMask = ReadLongRes();
+ sal_uIntPtr nObjMask = ReadLongRes();
if( nObjMask & RSC_MENU_ITEMS )
{
- ULONG nObjFollows = ReadLongRes();
+ sal_uIntPtr nObjFollows = ReadLongRes();
// MenuItems einfuegen
- for( ULONG i = 0; i < nObjFollows; i++ )
+ for( sal_uIntPtr i = 0; i < nObjFollows; i++ )
{
InsertItem( ResId( (RSHEADER_TYPE*)GetClassRes(), *pMgr ) );
IncrementRes( GetObjSizeRes( (RSHEADER_TYPE*)GetClassRes() ) );
@@ -1010,13 +1010,13 @@ void Menu::ImplLoadRes( const ResId& rResId )
aTitleText = ReadStringRes();
}
if( nObjMask & RSC_MENU_DEFAULTITEMID )
- SetDefaultItem( sal::static_int_cast<USHORT>(ReadLongRes()) );
+ SetDefaultItem( sal::static_int_cast<sal_uInt16>(ReadLongRes()) );
}
void Menu::CreateAutoMnemonics()
{
MnemonicGenerator aMnemonicGenerator;
- ULONG n;
+ sal_uIntPtr n;
for ( n = 0; n < pItemList->Count(); n++ )
{
MenuItemData* pData = pItemList->GetDataFromPos(n);
@@ -1033,44 +1033,44 @@ void Menu::CreateAutoMnemonics()
void Menu::Activate()
{
- bInCallback = TRUE;
+ bInCallback = sal_True;
ImplCallEventListeners( VCLEVENT_MENU_ACTIVATE, ITEMPOS_INVALID );
if ( !aActivateHdl.Call( this ) )
{
Menu* pStartMenu = ImplGetStartMenu();
if ( pStartMenu && ( pStartMenu != this ) )
{
- pStartMenu->bInCallback = TRUE;
+ pStartMenu->bInCallback = sal_True;
// MT 11/01: Call EventListener here? I don't know...
pStartMenu->aActivateHdl.Call( this );
- pStartMenu->bInCallback = FALSE;
+ pStartMenu->bInCallback = sal_False;
}
}
- bInCallback = FALSE;
+ bInCallback = sal_False;
}
void Menu::Deactivate()
{
- for ( USHORT n = (USHORT)pItemList->Count(); n; )
+ for ( sal_uInt16 n = (sal_uInt16)pItemList->Count(); n; )
{
MenuItemData* pData = pItemList->GetDataFromPos( --n );
if ( pData->bIsTemporary )
pItemList->Remove( n );
}
- bInCallback = TRUE;
+ bInCallback = sal_True;
Menu* pStartMenu = ImplGetStartMenu();
ImplCallEventListeners( VCLEVENT_MENU_DEACTIVATE, ITEMPOS_INVALID );
if ( !aDeactivateHdl.Call( this ) )
{
if ( pStartMenu && ( pStartMenu != this ) )
{
- pStartMenu->bInCallback = TRUE;
+ pStartMenu->bInCallback = sal_True;
pStartMenu->aDeactivateHdl.Call( this );
- pStartMenu->bInCallback = FALSE;
+ pStartMenu->bInCallback = sal_False;
}
}
- bInCallback = FALSE;
+ bInCallback = sal_False;
if ( this == pStartMenu )
GetpApp()->HideHelpStatusText();
@@ -1094,11 +1094,11 @@ void Menu::ImplSelect()
MenuItemData* pData = GetItemList()->GetData( nSelectedId );
if ( pData && (pData->nBits & MIB_AUTOCHECK) )
{
- BOOL bChecked = IsItemChecked( nSelectedId );
+ sal_Bool bChecked = IsItemChecked( nSelectedId );
if ( pData->nBits & MIB_RADIOCHECK )
{
if ( !bChecked )
- CheckItem( nSelectedId, TRUE );
+ CheckItem( nSelectedId, sal_True );
}
else
CheckItem( nSelectedId, !bChecked );
@@ -1139,7 +1139,7 @@ void Menu::RequestHelp( const HelpEvent& )
{
}
-void Menu::ImplCallEventListeners( ULONG nEvent, USHORT nPos )
+void Menu::ImplCallEventListeners( sal_uIntPtr nEvent, sal_uInt16 nPos )
{
VclMenuEvent aEvent( this, nEvent, nPos );
@@ -1186,14 +1186,14 @@ void Menu::RemoveEventListener( const Link& rEventListener )
// mpDummy4_WindowChildEventListeners->remove( rEventListener );
//}
-void Menu::InsertItem( USHORT nItemId, const XubString& rStr, MenuItemBits nItemBits, USHORT nPos )
+void Menu::InsertItem( sal_uInt16 nItemId, const XubString& rStr, MenuItemBits nItemBits, sal_uInt16 nPos )
{
DBG_ASSERT( nItemId, "Menu::InsertItem(): ItemId == 0" );
DBG_ASSERT( GetItemPos( nItemId ) == MENU_ITEM_NOTFOUND,
"Menu::InsertItem(): ItemId already exists" );
// if Position > ItemCount, append
- if ( nPos >= (USHORT)pItemList->Count() )
+ if ( nPos >= (sal_uInt16)pItemList->Count() )
nPos = MENU_APPEND;
// put Item in MenuItemList
@@ -1215,39 +1215,39 @@ void Menu::InsertItem( USHORT nItemId, const XubString& rStr, MenuItemBits nItem
ImplCallEventListeners( VCLEVENT_MENU_INSERTITEM, nPos );
}
-void Menu::InsertItem( USHORT nItemId, const Image& rImage,
- MenuItemBits nItemBits, USHORT nPos )
+void Menu::InsertItem( sal_uInt16 nItemId, const Image& rImage,
+ MenuItemBits nItemBits, sal_uInt16 nPos )
{
InsertItem( nItemId, ImplGetSVEmptyStr(), nItemBits, nPos );
SetItemImage( nItemId, rImage );
}
-void Menu::InsertItem( USHORT nItemId,
+void Menu::InsertItem( sal_uInt16 nItemId,
const XubString& rStr, const Image& rImage,
- MenuItemBits nItemBits, USHORT nPos )
+ MenuItemBits nItemBits, sal_uInt16 nPos )
{
InsertItem( nItemId, rStr, nItemBits, nPos );
SetItemImage( nItemId, rImage );
}
-void Menu::InsertItem( const ResId& rResId, USHORT nPos )
+void Menu::InsertItem( const ResId& rResId, sal_uInt16 nPos )
{
ResMgr* pMgr = rResId.GetResMgr();
if( ! pMgr )
return;
- ULONG nObjMask;
+ sal_uIntPtr nObjMask;
GetRes( rResId.SetRT( RSC_MENUITEM ) );
nObjMask = ReadLongRes();
- BOOL bSep = FALSE;
+ sal_Bool bSep = sal_False;
if ( nObjMask & RSC_MENUITEM_SEPARATOR )
- bSep = (BOOL)ReadShortRes();
+ bSep = (sal_Bool)ReadShortRes();
- USHORT nItemId = 1;
+ sal_uInt16 nItemId = 1;
if ( nObjMask & RSC_MENUITEM_ID )
- nItemId = sal::static_int_cast<USHORT>(ReadLongRes());
+ nItemId = sal::static_int_cast<sal_uInt16>(ReadLongRes());
MenuItemBits nStatus = 0;
if ( nObjMask & RSC_MENUITEM_STATUS )
@@ -1283,7 +1283,7 @@ void Menu::InsertItem( const ResId& rResId, USHORT nPos )
SetHelpText( nItemId, aHelpText );
}
- ULONG nHelpId = 0;
+ sal_uIntPtr nHelpId = 0;
if ( nObjMask & RSC_MENUITEM_HELPID )
{
nHelpId = ReadLongRes();
@@ -1303,12 +1303,12 @@ void Menu::InsertItem( const ResId& rResId, USHORT nPos )
if( nObjMask & RSC_MENUITEM_CHECKED )
{
if ( !bSep )
- CheckItem( nItemId, (BOOL)ReadShortRes() );
+ CheckItem( nItemId, (sal_Bool)ReadShortRes() );
}
if ( nObjMask & RSC_MENUITEM_DISABLE )
{
if ( !bSep )
- EnableItem( nItemId, !(BOOL)ReadShortRes() );
+ EnableItem( nItemId, !(sal_Bool)ReadShortRes() );
}
if ( nObjMask & RSC_MENUITEM_COMMAND )
{
@@ -1335,21 +1335,21 @@ void Menu::InsertItem( const ResId& rResId, USHORT nPos )
delete mpLayoutData, mpLayoutData = NULL;
}
-void Menu::InsertSeparator( USHORT nPos )
+void Menu::InsertSeparator( sal_uInt16 nPos )
{
// do nothing if its a menu bar
if ( bIsMenuBar )
return;
// if position > ItemCount, append
- if ( nPos >= (USHORT)pItemList->Count() )
+ if ( nPos >= (sal_uInt16)pItemList->Count() )
nPos = MENU_APPEND;
// put separator in item list
pItemList->InsertSeparator( nPos );
// update native menu
- USHORT itemPos = nPos != MENU_APPEND ? nPos : (USHORT)pItemList->Count() - 1;
+ sal_uInt16 itemPos = nPos != MENU_APPEND ? nPos : (sal_uInt16)pItemList->Count() - 1;
MenuItemData *pData = pItemList->GetDataFromPos( itemPos );
if( ImplGetSalMenu() && pData && pData->pSalMenuItem )
ImplGetSalMenu()->InsertItem( pData->pSalMenuItem, nPos );
@@ -1359,9 +1359,9 @@ void Menu::InsertSeparator( USHORT nPos )
ImplCallEventListeners( VCLEVENT_MENU_INSERTITEM, nPos );
}
-void Menu::RemoveItem( USHORT nPos )
+void Menu::RemoveItem( sal_uInt16 nPos )
{
- BOOL bRemove = FALSE;
+ sal_Bool bRemove = sal_False;
if ( nPos < GetItemCount() )
{
@@ -1370,7 +1370,7 @@ void Menu::RemoveItem( USHORT nPos )
ImplGetSalMenu()->RemoveItem( nPos );
pItemList->Remove( nPos );
- bRemove = TRUE;
+ bRemove = sal_True;
}
Window* pWin = ImplGetWindow();
@@ -1386,8 +1386,8 @@ void Menu::RemoveItem( USHORT nPos )
ImplCallEventListeners( VCLEVENT_MENU_REMOVEITEM, nPos );
}
-void ImplCopyItem( Menu* pThis, const Menu& rMenu, USHORT nPos, USHORT nNewPos,
- USHORT nMode = 0 )
+void ImplCopyItem( Menu* pThis, const Menu& rMenu, sal_uInt16 nPos, sal_uInt16 nNewPos,
+ sal_uInt16 nMode = 0 )
{
MenuItemType eType = rMenu.GetItemType( nPos );
@@ -1398,7 +1398,7 @@ void ImplCopyItem( Menu* pThis, const Menu& rMenu, USHORT nPos, USHORT nNewPos,
pThis->InsertSeparator( nNewPos );
else
{
- USHORT nId = rMenu.GetItemId( nPos );
+ sal_uInt16 nId = rMenu.GetItemId( nPos );
DBG_ASSERT( pThis->GetItemPos( nId ) == MENU_ITEM_NOTFOUND,
"Menu::CopyItem(): ItemId already exists" );
@@ -1413,9 +1413,9 @@ void ImplCopyItem( Menu* pThis, const Menu& rMenu, USHORT nPos, USHORT nNewPos,
pThis->InsertItem( nId, pData->aImage, pData->nBits, nNewPos );
if ( rMenu.IsItemChecked( nId ) )
- pThis->CheckItem( nId, TRUE );
+ pThis->CheckItem( nId, sal_True );
if ( !rMenu.IsItemEnabled( nId ) )
- pThis->EnableItem( nId, FALSE );
+ pThis->EnableItem( nId, sal_False );
pThis->SetHelpId( nId, pData->nHelpId );
pThis->SetHelpText( nId, pData->aHelpText );
pThis->SetAccelKey( nId, pData->aAccelKey );
@@ -1438,26 +1438,26 @@ void ImplCopyItem( Menu* pThis, const Menu& rMenu, USHORT nPos, USHORT nNewPos,
}
}
-void Menu::CopyItem( const Menu& rMenu, USHORT nPos, USHORT nNewPos )
+void Menu::CopyItem( const Menu& rMenu, sal_uInt16 nPos, sal_uInt16 nNewPos )
{
ImplCopyItem( this, rMenu, nPos, nNewPos );
}
void Menu::Clear()
{
- for ( USHORT i = GetItemCount(); i; i-- )
+ for ( sal_uInt16 i = GetItemCount(); i; i-- )
RemoveItem( 0 );
}
-USHORT Menu::GetItemCount() const
+sal_uInt16 Menu::GetItemCount() const
{
- return (USHORT)pItemList->Count();
+ return (sal_uInt16)pItemList->Count();
}
-USHORT Menu::ImplGetVisibleItemCount() const
+sal_uInt16 Menu::ImplGetVisibleItemCount() const
{
- USHORT nItems = 0;
- for ( USHORT n = (USHORT)pItemList->Count(); n; )
+ sal_uInt16 nItems = 0;
+ for ( sal_uInt16 n = (sal_uInt16)pItemList->Count(); n; )
{
if ( ImplIsVisible( --n ) )
nItems++;
@@ -1465,9 +1465,9 @@ USHORT Menu::ImplGetVisibleItemCount() const
return nItems;
}
-USHORT Menu::ImplGetFirstVisible() const
+sal_uInt16 Menu::ImplGetFirstVisible() const
{
- for ( USHORT n = 0; n < pItemList->Count(); n++ )
+ for ( sal_uInt16 n = 0; n < pItemList->Count(); n++ )
{
if ( ImplIsVisible( n ) )
return n;
@@ -1475,9 +1475,9 @@ USHORT Menu::ImplGetFirstVisible() const
return ITEMPOS_INVALID;
}
-USHORT Menu::ImplGetPrevVisible( USHORT nPos ) const
+sal_uInt16 Menu::ImplGetPrevVisible( sal_uInt16 nPos ) const
{
- for ( USHORT n = nPos; n; )
+ for ( sal_uInt16 n = nPos; n; )
{
if ( n && ImplIsVisible( --n ) )
return n;
@@ -1485,9 +1485,9 @@ USHORT Menu::ImplGetPrevVisible( USHORT nPos ) const
return ITEMPOS_INVALID;
}
-USHORT Menu::ImplGetNextVisible( USHORT nPos ) const
+sal_uInt16 Menu::ImplGetNextVisible( sal_uInt16 nPos ) const
{
- for ( USHORT n = nPos+1; n < pItemList->Count(); n++ )
+ for ( sal_uInt16 n = nPos+1; n < pItemList->Count(); n++ )
{
if ( ImplIsVisible( n ) )
return n;
@@ -1495,7 +1495,7 @@ USHORT Menu::ImplGetNextVisible( USHORT nPos ) const
return ITEMPOS_INVALID;
}
-USHORT Menu::GetItemId( USHORT nPos ) const
+sal_uInt16 Menu::GetItemId( sal_uInt16 nPos ) const
{
MenuItemData* pData = pItemList->GetDataFromPos( nPos );
@@ -1505,9 +1505,9 @@ USHORT Menu::GetItemId( USHORT nPos ) const
return 0;
}
-USHORT Menu::GetItemPos( USHORT nItemId ) const
+sal_uInt16 Menu::GetItemPos( sal_uInt16 nItemId ) const
{
- USHORT nPos;
+ sal_uInt16 nPos;
MenuItemData* pData = pItemList->GetData( nItemId, nPos );
if ( pData )
@@ -1516,7 +1516,7 @@ USHORT Menu::GetItemPos( USHORT nItemId ) const
return MENU_ITEM_NOTFOUND;
}
-MenuItemType Menu::GetItemType( USHORT nPos ) const
+MenuItemType Menu::GetItemType( sal_uInt16 nPos ) const
{
MenuItemData* pData = pItemList->GetDataFromPos( nPos );
@@ -1526,19 +1526,19 @@ MenuItemType Menu::GetItemType( USHORT nPos ) const
return MENUITEM_DONTKNOW;
}
-USHORT Menu::GetCurItemId() const
+sal_uInt16 Menu::GetCurItemId() const
{
return nSelectedId;
}
-void Menu::SetItemBits( USHORT nItemId, MenuItemBits nBits )
+void Menu::SetItemBits( sal_uInt16 nItemId, MenuItemBits nBits )
{
MenuItemData* pData = pItemList->GetData( nItemId );
if ( pData )
pData->nBits = nBits;
}
-MenuItemBits Menu::GetItemBits( USHORT nItemId ) const
+MenuItemBits Menu::GetItemBits( sal_uInt16 nItemId ) const
{
MenuItemBits nBits = 0;
MenuItemData* pData = pItemList->GetData( nItemId );
@@ -1547,22 +1547,22 @@ MenuItemBits Menu::GetItemBits( USHORT nItemId ) const
return nBits;
}
-void Menu::SetUserValue( USHORT nItemId, ULONG nValue )
+void Menu::SetUserValue( sal_uInt16 nItemId, sal_uIntPtr nValue )
{
MenuItemData* pData = pItemList->GetData( nItemId );
if ( pData )
pData->nUserValue = nValue;
}
-ULONG Menu::GetUserValue( USHORT nItemId ) const
+sal_uIntPtr Menu::GetUserValue( sal_uInt16 nItemId ) const
{
MenuItemData* pData = pItemList->GetData( nItemId );
return pData ? pData->nUserValue : 0;
}
-void Menu::SetPopupMenu( USHORT nItemId, PopupMenu* pMenu )
+void Menu::SetPopupMenu( sal_uInt16 nItemId, PopupMenu* pMenu )
{
- USHORT nPos;
+ sal_uInt16 nPos;
MenuItemData* pData = pItemList->GetData( nItemId, nPos );
// Item does not exist -> return NULL
@@ -1592,7 +1592,7 @@ void Menu::SetPopupMenu( USHORT nItemId, PopupMenu* pMenu )
ImplCallEventListeners( VCLEVENT_MENU_SUBMENUCHANGED, nPos );
}
-PopupMenu* Menu::GetPopupMenu( USHORT nItemId ) const
+PopupMenu* Menu::GetPopupMenu( sal_uInt16 nItemId ) const
{
MenuItemData* pData = pItemList->GetData( nItemId );
@@ -1602,9 +1602,9 @@ PopupMenu* Menu::GetPopupMenu( USHORT nItemId ) const
return NULL;
}
-void Menu::SetAccelKey( USHORT nItemId, const KeyCode& rKeyCode )
+void Menu::SetAccelKey( sal_uInt16 nItemId, const KeyCode& rKeyCode )
{
- USHORT nPos;
+ sal_uInt16 nPos;
MenuItemData* pData = pItemList->GetData( nItemId, nPos );
if ( !pData )
@@ -1620,7 +1620,7 @@ void Menu::SetAccelKey( USHORT nItemId, const KeyCode& rKeyCode )
ImplGetSalMenu()->SetAccelerator( nPos, pData->pSalMenuItem, rKeyCode, rKeyCode.GetName() );
}
-KeyCode Menu::GetAccelKey( USHORT nItemId ) const
+KeyCode Menu::GetAccelKey( sal_uInt16 nItemId ) const
{
MenuItemData* pData = pItemList->GetData( nItemId );
@@ -1630,16 +1630,16 @@ KeyCode Menu::GetAccelKey( USHORT nItemId ) const
return KeyCode();
}
-KeyEvent Menu::GetActivationKey( USHORT nItemId ) const
+KeyEvent Menu::GetActivationKey( sal_uInt16 nItemId ) const
{
KeyEvent aRet;
MenuItemData* pData = pItemList->GetData( nItemId );
if( pData )
{
- USHORT nPos = pData->aText.Search( '~' );
+ sal_uInt16 nPos = pData->aText.Search( '~' );
if( nPos != STRING_NOTFOUND && nPos < pData->aText.Len()-1 )
{
- USHORT nCode = 0;
+ sal_uInt16 nCode = 0;
sal_Unicode cAccel = pData->aText.GetChar( nPos+1 );
if( cAccel >= 'a' && cAccel <= 'z' )
nCode = KEY_A + (cAccel-'a');
@@ -1655,9 +1655,9 @@ KeyEvent Menu::GetActivationKey( USHORT nItemId ) const
return aRet;
}
-void Menu::CheckItem( USHORT nItemId, BOOL bCheck )
+void Menu::CheckItem( sal_uInt16 nItemId, sal_Bool bCheck )
{
- USHORT nPos;
+ sal_uInt16 nPos;
MenuItemData* pData = pItemList->GetData( nItemId, nPos );
if ( !pData || pData->bChecked == bCheck )
@@ -1668,9 +1668,9 @@ void Menu::CheckItem( USHORT nItemId, BOOL bCheck )
(pData->nBits & MIB_RADIOCHECK) )
{
MenuItemData* pGroupData;
- USHORT nGroupPos;
- USHORT nItemCount = GetItemCount();
- BOOL bFound = FALSE;
+ sal_uInt16 nGroupPos;
+ sal_uInt16 nItemCount = GetItemCount();
+ sal_Bool bFound = sal_False;
nGroupPos = nPos;
while ( nGroupPos )
@@ -1680,8 +1680,8 @@ void Menu::CheckItem( USHORT nItemId, BOOL bCheck )
{
if ( IsItemChecked( pGroupData->nId ) )
{
- CheckItem( pGroupData->nId, FALSE );
- bFound = TRUE;
+ CheckItem( pGroupData->nId, sal_False );
+ bFound = sal_True;
break;
}
}
@@ -1700,7 +1700,7 @@ void Menu::CheckItem( USHORT nItemId, BOOL bCheck )
{
if ( IsItemChecked( pGroupData->nId ) )
{
- CheckItem( pGroupData->nId, FALSE );
+ CheckItem( pGroupData->nId, sal_False );
break;
}
}
@@ -1720,20 +1720,20 @@ void Menu::CheckItem( USHORT nItemId, BOOL bCheck )
ImplCallEventListeners( bCheck ? VCLEVENT_MENU_ITEMCHECKED : VCLEVENT_MENU_ITEMUNCHECKED, nPos );
}
-BOOL Menu::IsItemChecked( USHORT nItemId ) const
+sal_Bool Menu::IsItemChecked( sal_uInt16 nItemId ) const
{
- USHORT nPos;
+ sal_uInt16 nPos;
MenuItemData* pData = pItemList->GetData( nItemId, nPos );
if ( !pData )
- return FALSE;
+ return sal_False;
return pData->bChecked;
}
-void Menu::EnableItem( USHORT nItemId, BOOL bEnable )
+void Menu::EnableItem( sal_uInt16 nItemId, sal_Bool bEnable )
{
- USHORT nPos;
+ sal_uInt16 nPos;
MenuItemData* pItemData = pItemList->GetData( nItemId, nPos );
if ( pItemData && ( pItemData->bEnabled != bEnable ) )
@@ -1745,8 +1745,8 @@ void Menu::EnableItem( USHORT nItemId, BOOL bEnable )
{
DBG_ASSERT( bIsMenuBar, "Menu::EnableItem - Popup visible!" );
long nX = 0;
- ULONG nCount = pItemList->Count();
- for ( ULONG n = 0; n < nCount; n++ )
+ sal_uIntPtr nCount = pItemList->Count();
+ for ( sal_uIntPtr n = 0; n < nCount; n++ )
{
MenuItemData* pData = pItemList->GetDataFromPos( n );
if ( n == nPos )
@@ -1765,20 +1765,20 @@ void Menu::EnableItem( USHORT nItemId, BOOL bEnable )
}
}
-BOOL Menu::IsItemEnabled( USHORT nItemId ) const
+sal_Bool Menu::IsItemEnabled( sal_uInt16 nItemId ) const
{
- USHORT nPos;
+ sal_uInt16 nPos;
MenuItemData* pData = pItemList->GetData( nItemId, nPos );
if ( !pData )
- return FALSE;
+ return sal_False;
return pData->bEnabled;
}
-void Menu::ShowItem( USHORT nItemId, BOOL bVisible )
+void Menu::ShowItem( sal_uInt16 nItemId, sal_Bool bVisible )
{
- USHORT nPos;
+ sal_uInt16 nPos;
MenuItemData* pData = pItemList->GetData( nItemId, nPos );
DBG_ASSERT( !bIsMenuBar, "Menu::ShowItem - ignored for menu bar entries!" );
@@ -1800,9 +1800,9 @@ void Menu::ShowItem( USHORT nItemId, BOOL bVisible )
}
}
-void Menu::SetItemText( USHORT nItemId, const XubString& rStr )
+void Menu::SetItemText( sal_uInt16 nItemId, const XubString& rStr )
{
- USHORT nPos;
+ sal_uInt16 nPos;
MenuItemData* pData = pItemList->GetData( nItemId, nPos );
if ( !pData )
@@ -1829,9 +1829,9 @@ void Menu::SetItemText( USHORT nItemId, const XubString& rStr )
}
}
-XubString Menu::GetItemText( USHORT nItemId ) const
+XubString Menu::GetItemText( sal_uInt16 nItemId ) const
{
- USHORT nPos;
+ sal_uInt16 nPos;
MenuItemData* pData = pItemList->GetData( nItemId, nPos );
if ( pData )
@@ -1840,9 +1840,9 @@ XubString Menu::GetItemText( USHORT nItemId ) const
return ImplGetSVEmptyStr();
}
-void Menu::SetItemImage( USHORT nItemId, const Image& rImage )
+void Menu::SetItemImage( sal_uInt16 nItemId, const Image& rImage )
{
- USHORT nPos;
+ sal_uInt16 nPos;
MenuItemData* pData = pItemList->GetData( nItemId, nPos );
if ( !pData )
@@ -1866,9 +1866,9 @@ static inline Image ImplRotImage( const Image& rImage, long nAngle10 )
return Image( aBmpEx );
}
-void Menu::SetItemImageAngle( USHORT nItemId, long nAngle10 )
+void Menu::SetItemImageAngle( sal_uInt16 nItemId, long nAngle10 )
{
- USHORT nPos;
+ sal_uInt16 nPos;
MenuItemData* pData = pItemList->GetData( nItemId, nPos );
if ( pData )
@@ -1893,9 +1893,9 @@ static inline Image ImplMirrorImage( const Image& rImage )
return Image( aBmpEx );
}
-void Menu::SetItemImageMirrorMode( USHORT nItemId, BOOL bMirror )
+void Menu::SetItemImageMirrorMode( sal_uInt16 nItemId, sal_Bool bMirror )
{
- USHORT nPos;
+ sal_uInt16 nPos;
MenuItemData* pData = pItemList->GetData( nItemId, nPos );
if ( pData )
@@ -1911,7 +1911,7 @@ void Menu::SetItemImageMirrorMode( USHORT nItemId, BOOL bMirror )
}
}
-Image Menu::GetItemImage( USHORT nItemId ) const
+Image Menu::GetItemImage( sal_uInt16 nItemId ) const
{
MenuItemData* pData = pItemList->GetData( nItemId );
@@ -1921,7 +1921,7 @@ Image Menu::GetItemImage( USHORT nItemId ) const
return Image();
}
-long Menu::GetItemImageAngle( USHORT nItemId ) const
+long Menu::GetItemImageAngle( sal_uInt16 nItemId ) const
{
MenuItemData* pData = pItemList->GetData( nItemId );
@@ -1931,17 +1931,17 @@ long Menu::GetItemImageAngle( USHORT nItemId ) const
return 0;
}
-BOOL Menu::GetItemImageMirrorMode( USHORT nItemId ) const
+sal_Bool Menu::GetItemImageMirrorMode( sal_uInt16 nItemId ) const
{
MenuItemData* pData = pItemList->GetData( nItemId );
if ( pData )
return pData->bMirrorMode;
else
- return FALSE;
+ return sal_False;
}
-void Menu::SetItemCommand( USHORT nItemId, const String& rCommand )
+void Menu::SetItemCommand( sal_uInt16 nItemId, const String& rCommand )
{
MenuItemData* pData = pItemList->GetData( nItemId );
@@ -1949,7 +1949,7 @@ void Menu::SetItemCommand( USHORT nItemId, const String& rCommand )
pData->aCommandStr = rCommand;
}
-const XubString& Menu::GetItemCommand( USHORT nItemId ) const
+const XubString& Menu::GetItemCommand( sal_uInt16 nItemId ) const
{
MenuItemData* pData = pItemList->GetData( nItemId );
@@ -1959,7 +1959,7 @@ const XubString& Menu::GetItemCommand( USHORT nItemId ) const
return ImplGetSVEmptyStr();
}
-void Menu::SetHelpCommand( USHORT nItemId, const XubString& rStr )
+void Menu::SetHelpCommand( sal_uInt16 nItemId, const XubString& rStr )
{
MenuItemData* pData = pItemList->GetData( nItemId );
@@ -1967,7 +1967,7 @@ void Menu::SetHelpCommand( USHORT nItemId, const XubString& rStr )
pData->aHelpCommandStr = rStr;
}
-const XubString& Menu::GetHelpCommand( USHORT nItemId ) const
+const XubString& Menu::GetHelpCommand( sal_uInt16 nItemId ) const
{
MenuItemData* pData = pItemList->GetData( nItemId );
@@ -1977,7 +1977,7 @@ const XubString& Menu::GetHelpCommand( USHORT nItemId ) const
return ImplGetSVEmptyStr();
}
-void Menu::SetHelpText( USHORT nItemId, const XubString& rStr )
+void Menu::SetHelpText( sal_uInt16 nItemId, const XubString& rStr )
{
MenuItemData* pData = pItemList->GetData( nItemId );
@@ -1985,7 +1985,7 @@ void Menu::SetHelpText( USHORT nItemId, const XubString& rStr )
pData->aHelpText = rStr;
}
-const XubString& Menu::ImplGetHelpText( USHORT nItemId ) const
+const XubString& Menu::ImplGetHelpText( sal_uInt16 nItemId ) const
{
MenuItemData* pData = pItemList->GetData( nItemId );
@@ -2011,12 +2011,12 @@ const XubString& Menu::ImplGetHelpText( USHORT nItemId ) const
return ImplGetSVEmptyStr();
}
-const XubString& Menu::GetHelpText( USHORT nItemId ) const
+const XubString& Menu::GetHelpText( sal_uInt16 nItemId ) const
{
return ImplGetHelpText( nItemId );
}
-void Menu::SetTipHelpText( USHORT nItemId, const XubString& rStr )
+void Menu::SetTipHelpText( sal_uInt16 nItemId, const XubString& rStr )
{
MenuItemData* pData = pItemList->GetData( nItemId );
@@ -2024,7 +2024,7 @@ void Menu::SetTipHelpText( USHORT nItemId, const XubString& rStr )
pData->aTipHelpText = rStr;
}
-const XubString& Menu::GetTipHelpText( USHORT nItemId ) const
+const XubString& Menu::GetTipHelpText( sal_uInt16 nItemId ) const
{
MenuItemData* pData = pItemList->GetData( nItemId );
@@ -2034,7 +2034,7 @@ const XubString& Menu::GetTipHelpText( USHORT nItemId ) const
return ImplGetSVEmptyStr();
}
-void Menu::SetHelpId( USHORT nItemId, ULONG nHelpId )
+void Menu::SetHelpId( sal_uInt16 nItemId, sal_uIntPtr nHelpId )
{
MenuItemData* pData = pItemList->GetData( nItemId );
@@ -2042,7 +2042,7 @@ void Menu::SetHelpId( USHORT nItemId, ULONG nHelpId )
pData->nHelpId = nHelpId;
}
-ULONG Menu::GetHelpId( USHORT nItemId ) const
+sal_uIntPtr Menu::GetHelpId( sal_uInt16 nItemId ) const
{
MenuItemData* pData = pItemList->GetData( nItemId );
@@ -2058,8 +2058,8 @@ Menu& Menu::operator=( const Menu& rMenu )
Clear();
// Items kopieren
- USHORT nCount = rMenu.GetItemCount();
- for ( USHORT i = 0; i < nCount; i++ )
+ sal_uInt16 nCount = rMenu.GetItemCount();
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
ImplCopyItem( this, rMenu, i, MENU_APPEND, 1 );
nDefaultItem = rMenu.nDefaultItem;
@@ -2073,24 +2073,24 @@ Menu& Menu::operator=( const Menu& rMenu )
return *this;
}
-BOOL Menu::ImplIsVisible( USHORT nPos ) const
+sal_Bool Menu::ImplIsVisible( sal_uInt16 nPos ) const
{
- BOOL bVisible = TRUE;
+ sal_Bool bVisible = sal_True;
MenuItemData* pData = pItemList->GetDataFromPos( nPos );
// check general visibility first
if( pData && !pData->bVisible )
- bVisible = FALSE;
+ bVisible = sal_False;
if ( bVisible && pData && pData->eType == MENUITEM_SEPARATOR )
{
if( nPos == 0 ) // no separator should be shown at the very beginning
- bVisible = FALSE;
+ bVisible = sal_False;
else
{
// always avoid adjacent separators
- USHORT nCount = (USHORT) pItemList->Count();
- USHORT n;
+ sal_uInt16 nCount = (sal_uInt16) pItemList->Count();
+ sal_uInt16 n;
MenuItemData* pNextData = NULL;
// search next visible item
for( n = nPos + 1; n < nCount; n++ )
@@ -2103,10 +2103,10 @@ BOOL Menu::ImplIsVisible( USHORT nPos ) const
}
}
if( n == nCount ) // no next visible item
- bVisible = FALSE;
+ bVisible = sal_False;
// check for separator
if( pNextData && pNextData->bVisible && pNextData->eType == MENUITEM_SEPARATOR )
- bVisible = FALSE;
+ bVisible = sal_False;
if( bVisible )
{
@@ -2120,7 +2120,7 @@ BOOL Menu::ImplIsVisible( USHORT nPos ) const
}
}
if( n == 0 ) // no previous visible item
- bVisible = FALSE;
+ bVisible = sal_False;
}
}
}
@@ -2131,10 +2131,10 @@ BOOL Menu::ImplIsVisible( USHORT nPos ) const
!( nMenuFlags & MENU_FLAG_ALWAYSSHOWDISABLEDENTRIES ) )
{
if( !pData ) // e.g. nPos == ITEMPOS_INVALID
- bVisible = FALSE;
+ bVisible = sal_False;
else if ( pData->eType != MENUITEM_SEPARATOR ) // separators handled above
{
- // bVisible = pData->bEnabled && ( !pData->pSubMenu || pData->pSubMenu->HasValidEntries( TRUE ) );
+ // bVisible = pData->bEnabled && ( !pData->pSubMenu || pData->pSubMenu->HasValidEntries( sal_True ) );
bVisible = pData->bEnabled; // SubMenus nicht pruefen, weil sie ggf. erst im Activate() gefuellt werden.
}
}
@@ -2142,34 +2142,34 @@ BOOL Menu::ImplIsVisible( USHORT nPos ) const
return bVisible;
}
-BOOL Menu::IsItemVisible( USHORT nItemId ) const
+sal_Bool Menu::IsItemVisible( sal_uInt16 nItemId ) const
{
return IsMenuVisible() && ImplIsVisible( GetItemPos( nItemId ) );
}
-BOOL Menu::IsItemPosVisible( USHORT nItemPos ) const
+sal_Bool Menu::IsItemPosVisible( sal_uInt16 nItemPos ) const
{
return IsMenuVisible() && ImplIsVisible( nItemPos );
}
-BOOL Menu::IsMenuVisible() const
+sal_Bool Menu::IsMenuVisible() const
{
return pWindow && pWindow->IsReallyVisible();
}
-BOOL Menu::ImplIsSelectable( USHORT nPos ) const
+sal_Bool Menu::ImplIsSelectable( sal_uInt16 nPos ) const
{
- BOOL bSelectable = TRUE;
+ sal_Bool bSelectable = sal_True;
MenuItemData* pData = pItemList->GetDataFromPos( nPos );
// check general visibility first
if ( pData && ( pData->nBits & MIB_NOSELECT ) )
- bSelectable = FALSE;
+ bSelectable = sal_False;
return bSelectable;
}
-void Menu::SelectItem( USHORT nItemId )
+void Menu::SelectItem( sal_uInt16 nItemId )
{
if( bIsMenuBar )
static_cast<MenuBar*>(this)->SelectEntry( nItemId );
@@ -2284,7 +2284,7 @@ Size Menu::ImplCalcSize( Window* pWin )
if ( rSettings.GetUseImagesInMenus() )
{
nMinMenuItemHeight = 16;
- for ( USHORT i = (USHORT)pItemList->Count(); i; )
+ for ( sal_uInt16 i = (sal_uInt16)pItemList->Count(); i; )
{
MenuItemData* pData = pItemList->GetDataFromPos( --i );
if ( ImplIsVisible( i ) && (( pData->eType == MENUITEM_IMAGE ) || ( pData->eType == MENUITEM_STRINGIMAGE )))
@@ -2299,7 +2299,7 @@ Size Menu::ImplCalcSize( Window* pWin )
}
}
- for ( USHORT n = (USHORT)pItemList->Count(); n; )
+ for ( sal_uInt16 n = (sal_uInt16)pItemList->Count(); n; )
{
MenuItemData* pData = pItemList->GetDataFromPos( --n );
@@ -2397,8 +2397,8 @@ Size Menu::ImplCalcSize( Window* pWin )
if ( !bIsMenuBar )
{
- USHORT gfxExtra = (USHORT) Max( nExtra, 7L ); // #107710# increase space between checkmarks/images/text
- nCheckPos = (USHORT)nExtra;
+ sal_uInt16 gfxExtra = (sal_uInt16) Max( nExtra, 7L ); // #107710# increase space between checkmarks/images/text
+ nCheckPos = (sal_uInt16)nExtra;
if (nMenuFlags & MENU_FLAG_SHOWCHECKIMAGES)
{
long nImgOrChkWidth = 0;
@@ -2408,12 +2408,12 @@ Size Menu::ImplCalcSize( Window* pWin )
else // non NWF case
nImgOrChkWidth = nFontHeight/2 + gfxExtra;
nImgOrChkWidth = Max( nImgOrChkWidth, aMaxImgSz.Width() + gfxExtra );
- nTextPos = (USHORT)(nImagePos + nImgOrChkWidth);
+ nTextPos = (sal_uInt16)(nImagePos + nImgOrChkWidth);
}
else
{
nImagePos = nCheckPos;
- nTextPos = (USHORT)(nImagePos + Max( aMaxImgSz.Width(), nCheckWidth ));
+ nTextPos = (sal_uInt16)(nImagePos + Max( aMaxImgSz.Width(), nCheckWidth ));
}
nTextPos = nTextPos + gfxExtra;
@@ -2426,7 +2426,7 @@ Size Menu::ImplCalcSize( Window* pWin )
}
else
{
- nTextPos = (USHORT)(2*nExtra);
+ nTextPos = (sal_uInt16)(2*nExtra);
aSz.Height() = nFontHeight+6;
// get menubar height from native methods if supported
@@ -2468,7 +2468,7 @@ Size Menu::ImplCalcSize( Window* pWin )
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;
@@ -2486,11 +2486,11 @@ 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 );
}
}
-void Menu::ImplPaint( Window* pWin, USHORT nBorder, long nStartY, MenuItemData* pThisItemOnly, BOOL bHighlighted, bool bLayout ) const
+void Menu::ImplPaint( Window* pWin, sal_uInt16 nBorder, long nStartY, MenuItemData* pThisItemOnly, sal_Bool bHighlighted, bool bLayout ) const
{
// Fuer Symbole: nFontHeight x nFontHeight
long nFontHeight = pWin->GetTextHeight();
@@ -2516,10 +2516,10 @@ void Menu::ImplPaint( Window* pWin, USHORT nBorder, long nStartY, MenuItemData*
}
Size aOutSz = pWin->GetOutputSizePixel();
- USHORT nCount = (USHORT)pItemList->Count();
+ sal_uInt16 nCount = (sal_uInt16)pItemList->Count();
if( bLayout )
mpLayoutData->m_aVisibleItemBoundRects.clear();
- for ( USHORT n = 0; n < nCount; n++ )
+ for ( sal_uInt16 n = 0; n < nCount; n++ )
{
MenuItemData* pData = pItemList->GetDataFromPos( n );
if ( ImplIsVisible( n ) && ( !pThisItemOnly || ( pData == pThisItemOnly ) ) )
@@ -2536,9 +2536,9 @@ void Menu::ImplPaint( Window* pWin, USHORT nBorder, long nStartY, MenuItemData*
long nTextOffsetY = ((pData->aSz.Height()-nFontHeight)/2);
if( bIsMenuBar )
nTextOffsetY += (aOutSz.Height()-pData->aSz.Height()) / 2;
- USHORT nTextStyle = 0;
- USHORT nSymbolStyle = 0;
- USHORT nImageStyle = 0;
+ sal_uInt16 nTextStyle = 0;
+ sal_uInt16 nSymbolStyle = 0;
+ sal_uInt16 nImageStyle = 0;
// SubMenus ohne Items werden nicht mehr disablte dargestellt,
// wenn keine Items enthalten sind, da die Anwendung selber
// darauf achten muss. Ansonsten gibt es Faelle, wo beim
@@ -2656,7 +2656,7 @@ void Menu::ImplPaint( Window* pWin, USHORT nBorder, long nStartY, MenuItemData*
aTmpPos.X() = aPos.X() + nTextPos;
aTmpPos.Y() = aPos.Y();
aTmpPos.Y() += nTextOffsetY;
- USHORT nStyle = nTextStyle|TEXT_DRAW_MNEMONIC;
+ sal_uInt16 nStyle = nTextStyle|TEXT_DRAW_MNEMONIC;
if ( pData->bIsTemporary )
nStyle |= TEXT_DRAW_DISABLE;
MetricVector* pVector = bLayout ? &mpLayoutData->m_aUnicodeBoundRects : NULL;
@@ -2788,7 +2788,7 @@ Menu* Menu::ImplGetStartMenu()
return pStart;
}
-void Menu::ImplCallHighlight( USHORT nHighlightedItem )
+void Menu::ImplCallHighlight( sal_uInt16 nHighlightedItem )
{
nSelectedId = 0;
MenuItemData* pData = pItemList->GetDataFromPos( nHighlightedItem );
@@ -2810,7 +2810,7 @@ Menu* Menu::ImplFindSelectMenu()
{
Menu* pSelMenu = nEventId ? this : NULL;
- for ( ULONG n = GetItemList()->Count(); n && !pSelMenu; )
+ for ( sal_uIntPtr n = GetItemList()->Count(); n && !pSelMenu; )
{
MenuItemData* pData = GetItemList()->GetDataFromPos( --n );
@@ -2821,11 +2821,11 @@ Menu* Menu::ImplFindSelectMenu()
return pSelMenu;
}
-Menu* Menu::ImplFindMenu( USHORT nItemId )
+Menu* Menu::ImplFindMenu( sal_uInt16 nItemId )
{
Menu* pSelMenu = NULL;
- for ( ULONG n = GetItemList()->Count(); n && !pSelMenu; )
+ for ( sal_uIntPtr n = GetItemList()->Count(); n && !pSelMenu; )
{
MenuItemData* pData = GetItemList()->GetDataFromPos( --n );
@@ -2838,25 +2838,25 @@ Menu* Menu::ImplFindMenu( USHORT nItemId )
return pSelMenu;
}
-void Menu::RemoveDisabledEntries( BOOL bCheckPopups, BOOL bRemoveEmptyPopups )
+void Menu::RemoveDisabledEntries( sal_Bool bCheckPopups, sal_Bool bRemoveEmptyPopups )
{
- for ( USHORT n = 0; n < GetItemCount(); n++ )
+ for ( sal_uInt16 n = 0; n < GetItemCount(); n++ )
{
- BOOL bRemove = FALSE;
+ sal_Bool bRemove = sal_False;
MenuItemData* pItem = pItemList->GetDataFromPos( n );
if ( pItem->eType == MENUITEM_SEPARATOR )
{
if ( !n || ( GetItemType( n-1 ) == MENUITEM_SEPARATOR ) )
- bRemove = TRUE;
+ bRemove = sal_True;
}
else
bRemove = !pItem->bEnabled;
if ( bCheckPopups && pItem->pSubMenu )
{
- pItem->pSubMenu->RemoveDisabledEntries( TRUE );
+ pItem->pSubMenu->RemoveDisabledEntries( sal_True );
if ( bRemoveEmptyPopups && !pItem->pSubMenu->GetItemCount() )
- bRemove = TRUE;
+ bRemove = sal_True;
}
if ( bRemove )
@@ -2865,7 +2865,7 @@ void Menu::RemoveDisabledEntries( BOOL bCheckPopups, BOOL bRemoveEmptyPopups )
if ( GetItemCount() )
{
- USHORT nLast = GetItemCount() - 1;
+ sal_uInt16 nLast = GetItemCount() - 1;
MenuItemData* pItem = pItemList->GetDataFromPos( nLast );
if ( pItem->eType == MENUITEM_SEPARATOR )
RemoveItem( nLast );
@@ -2873,19 +2873,19 @@ void Menu::RemoveDisabledEntries( BOOL bCheckPopups, BOOL bRemoveEmptyPopups )
delete mpLayoutData, mpLayoutData = NULL;
}
-BOOL Menu::HasValidEntries( BOOL bCheckPopups )
+sal_Bool Menu::HasValidEntries( sal_Bool bCheckPopups )
{
- BOOL bValidEntries = FALSE;
- USHORT nCount = GetItemCount();
- for ( USHORT n = 0; !bValidEntries && ( n < nCount ); n++ )
+ sal_Bool bValidEntries = sal_False;
+ sal_uInt16 nCount = GetItemCount();
+ for ( sal_uInt16 n = 0; !bValidEntries && ( n < nCount ); n++ )
{
MenuItemData* pItem = pItemList->GetDataFromPos( n );
if ( pItem->bEnabled && ( pItem->eType != MENUITEM_SEPARATOR ) )
{
if ( bCheckPopups && pItem->pSubMenu )
- bValidEntries = pItem->pSubMenu->HasValidEntries( TRUE );
+ bValidEntries = pItem->pSubMenu->HasValidEntries( sal_True );
else
- bValidEntries = TRUE;
+ bValidEntries = sal_True;
}
}
return bValidEntries;
@@ -2923,12 +2923,12 @@ void Menu::ImplFillLayoutData() const
mpLayoutData = new MenuLayoutData();
if( bIsMenuBar )
{
- ImplPaint( pWindow, 0, 0, 0, FALSE, true );
+ ImplPaint( pWindow, 0, 0, 0, sal_False, true );
}
else
{
MenuFloatingWindow* pFloat = (MenuFloatingWindow*)pWindow;
- ImplPaint( pWindow, pFloat->nScrollerHeight, pFloat->ImplGetStartY(), 0, FALSE, true );
+ ImplPaint( pWindow, pFloat->nScrollerHeight, pFloat->ImplGetStartY(), 0, sal_False, true );
}
}
}
@@ -2940,7 +2940,7 @@ String Menu::GetDisplayText() const
return mpLayoutData ? mpLayoutData->m_aDisplayText : String();
}
-Rectangle Menu::GetCharacterBounds( USHORT nItemID, long nIndex ) const
+Rectangle Menu::GetCharacterBounds( sal_uInt16 nItemID, long nIndex ) const
{
long nItemIndex = -1;
if( ! mpLayoutData )
@@ -2960,7 +2960,7 @@ Rectangle Menu::GetCharacterBounds( USHORT nItemID, long nIndex ) const
}
-long Menu::GetIndexForPoint( const Point& rPoint, USHORT& rItemID ) const
+long Menu::GetIndexForPoint( const Point& rPoint, sal_uInt16& rItemID ) const
{
long nIndex = -1;
rItemID = 0;
@@ -2998,7 +2998,7 @@ Pair Menu::GetLineStartEnd( long nLine ) const
return mpLayoutData ? mpLayoutData->GetLineStartEnd( nLine ) : Pair( -1, -1 );
}
-Pair Menu::GetItemStartEnd( USHORT nItem ) const
+Pair Menu::GetItemStartEnd( sal_uInt16 nItem ) const
{
if( ! mpLayoutData )
ImplFillLayoutData();
@@ -3010,9 +3010,9 @@ Pair Menu::GetItemStartEnd( USHORT nItem ) const
return Pair( -1, -1 );
}
-USHORT Menu::GetDisplayItemId( long nLine ) const
+sal_uInt16 Menu::GetDisplayItemId( long nLine ) const
{
- USHORT nItemId = 0;
+ sal_uInt16 nItemId = 0;
if( ! mpLayoutData )
ImplFillLayoutData();
if( mpLayoutData && ( nLine >= 0 ) && ( nLine < (long)mpLayoutData->m_aLineItemIds.size() ) )
@@ -3020,19 +3020,19 @@ USHORT Menu::GetDisplayItemId( long nLine ) const
return nItemId;
}
-BOOL Menu::ConvertPoint( Point& rPoint, Window* pReferenceWindow ) const
+sal_Bool Menu::ConvertPoint( Point& rPoint, Window* pReferenceWindow ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pWindow && pReferenceWindow )
{
rPoint = pReferenceWindow->OutputToAbsoluteScreenPixel( rPoint );
rPoint = pWindow->AbsoluteScreenToOutputPixel( rPoint );
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
}
-Rectangle Menu::GetBoundingRectangle( USHORT nPos ) const
+Rectangle Menu::GetBoundingRectangle( sal_uInt16 nPos ) const
{
Rectangle aRet;
@@ -3040,16 +3040,16 @@ Rectangle Menu::GetBoundingRectangle( USHORT nPos ) const
ImplFillLayoutData();
if( mpLayoutData )
{
- std::map< USHORT, Rectangle >::const_iterator it = mpLayoutData->m_aVisibleItemBoundRects.find( nPos );
+ std::map< sal_uInt16, Rectangle >::const_iterator it = mpLayoutData->m_aVisibleItemBoundRects.find( nPos );
if( it != mpLayoutData->m_aVisibleItemBoundRects.end() )
aRet = it->second;
}
return aRet;
}
-void Menu::SetAccessibleName( USHORT nItemId, const XubString& rStr )
+void Menu::SetAccessibleName( sal_uInt16 nItemId, const XubString& rStr )
{
- USHORT nPos;
+ sal_uInt16 nPos;
MenuItemData* pData = pItemList->GetData( nItemId, nPos );
if ( pData && !rStr.Equals( pData->aAccessibleName ) )
@@ -3059,7 +3059,7 @@ void Menu::SetAccessibleName( USHORT nItemId, const XubString& rStr )
}
}
-XubString Menu::GetAccessibleName( USHORT nItemId ) const
+XubString Menu::GetAccessibleName( sal_uInt16 nItemId ) const
{
MenuItemData* pData = pItemList->GetData( nItemId );
@@ -3069,7 +3069,7 @@ XubString Menu::GetAccessibleName( USHORT nItemId ) const
return ImplGetSVEmptyStr();
}
-void Menu::SetAccessibleDescription( USHORT nItemId, const XubString& rStr )
+void Menu::SetAccessibleDescription( sal_uInt16 nItemId, const XubString& rStr )
{
MenuItemData* pData = pItemList->GetData( nItemId );
@@ -3077,7 +3077,7 @@ void Menu::SetAccessibleDescription( USHORT nItemId, const XubString& rStr )
pData->aAccessibleDescription = rStr;
}
-XubString Menu::GetAccessibleDescription( USHORT nItemId ) const
+XubString Menu::GetAccessibleDescription( sal_uInt16 nItemId ) const
{
MenuItemData* pData = pItemList->GetData( nItemId );
@@ -3094,19 +3094,19 @@ void Menu::ImplSetSalMenu( SalMenu *pSalMenu )
mpSalMenu = pSalMenu;
}
-BOOL Menu::GetSystemMenuData( SystemMenuData* pData ) const
+sal_Bool Menu::GetSystemMenuData( SystemMenuData* pData ) const
{
Menu* pMenu = (Menu*)this;
if( pData && pMenu->ImplGetSalMenu() )
{
pMenu->ImplGetSalMenu()->GetSystemMenuData( pData );
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
-bool Menu::IsHighlighted( USHORT nItemPos ) const
+bool Menu::IsHighlighted( sal_uInt16 nItemPos ) const
{
bool bRet = false;
@@ -3121,19 +3121,19 @@ bool Menu::IsHighlighted( USHORT nItemPos ) const
return bRet;
}
-void Menu::HighlightItem( USHORT nItemPos )
+void Menu::HighlightItem( sal_uInt16 nItemPos )
{
if ( pWindow )
{
if ( bIsMenuBar )
{
MenuBarWindow* pMenuWin = static_cast< MenuBarWindow* >( pWindow );
- pMenuWin->SetAutoPopup( FALSE );
- pMenuWin->ChangeHighlightItem( nItemPos, FALSE );
+ pMenuWin->SetAutoPopup( sal_False );
+ pMenuWin->ChangeHighlightItem( nItemPos, sal_False );
}
else
{
- static_cast< MenuFloatingWindow* >( pWindow )->ChangeHighlightItem( nItemPos, FALSE );
+ static_cast< MenuFloatingWindow* >( pWindow )->ChangeHighlightItem( nItemPos, sal_False );
}
}
}
@@ -3142,54 +3142,54 @@ void Menu::HighlightItem( USHORT nItemPos )
// - MenuBar -
// -----------
-MenuBar::MenuBar() : Menu( TRUE )
+MenuBar::MenuBar() : Menu( sal_True )
{
- mbDisplayable = TRUE;
- mbCloserVisible = FALSE;
- mbFloatBtnVisible = FALSE;
- mbHideBtnVisible = FALSE;
+ mbDisplayable = sal_True;
+ mbCloserVisible = sal_False;
+ mbFloatBtnVisible = sal_False;
+ mbHideBtnVisible = sal_False;
}
-MenuBar::MenuBar( const MenuBar& rMenu ) : Menu( TRUE )
+MenuBar::MenuBar( const MenuBar& rMenu ) : Menu( sal_True )
{
- mbDisplayable = TRUE;
- mbCloserVisible = FALSE;
- mbFloatBtnVisible = FALSE;
- mbHideBtnVisible = FALSE;
+ mbDisplayable = sal_True;
+ mbCloserVisible = sal_False;
+ mbFloatBtnVisible = sal_False;
+ mbHideBtnVisible = sal_False;
*this = rMenu;
- bIsMenuBar = TRUE;
+ bIsMenuBar = sal_True;
}
-MenuBar::MenuBar( const ResId& rResId ) : Menu ( TRUE )
+MenuBar::MenuBar( const ResId& rResId ) : Menu ( sal_True )
{
- mbDisplayable = TRUE;
- mbCloserVisible = FALSE;
- mbFloatBtnVisible = FALSE;
- mbHideBtnVisible = FALSE;
+ mbDisplayable = sal_True;
+ mbCloserVisible = sal_False;
+ mbFloatBtnVisible = sal_False;
+ mbHideBtnVisible = sal_False;
ImplLoadRes( rResId );
}
MenuBar::~MenuBar()
{
- ImplDestroy( this, TRUE );
+ ImplDestroy( this, sal_True );
}
-void MenuBar::ShowCloser( BOOL bShow )
+void MenuBar::ShowCloser( sal_Bool bShow )
{
ShowButtons( bShow, mbFloatBtnVisible, mbHideBtnVisible );
}
-void MenuBar::ShowFloatButton( BOOL bShow )
+void MenuBar::ShowFloatButton( sal_Bool bShow )
{
ShowButtons( mbCloserVisible, bShow, mbHideBtnVisible );
}
-void MenuBar::ShowHideButton( BOOL bShow )
+void MenuBar::ShowHideButton( sal_Bool bShow )
{
ShowButtons( mbCloserVisible, mbFloatBtnVisible, bShow );
}
-void MenuBar::ShowButtons( BOOL bClose, BOOL bFloat, BOOL bHide )
+void MenuBar::ShowButtons( sal_Bool bClose, sal_Bool bFloat, sal_Bool bHide )
{
if ( (bClose != mbCloserVisible) ||
(bFloat != mbFloatBtnVisible) ||
@@ -3203,7 +3203,7 @@ void MenuBar::ShowButtons( BOOL bClose, BOOL bFloat, BOOL bHide )
}
}
-void MenuBar::SetDisplayable( BOOL bDisplayable )
+void MenuBar::SetDisplayable( sal_Bool bDisplayable )
{
if( bDisplayable != mbDisplayable )
{
@@ -3234,7 +3234,7 @@ Window* MenuBar::ImplCreate( Window* pParent, Window* pWindow, MenuBar* pMenu )
return pWindow;
}
-void MenuBar::ImplDestroy( MenuBar* pMenu, BOOL bDelete )
+void MenuBar::ImplDestroy( MenuBar* pMenu, sal_Bool bDelete )
{
MenuBarWindow* pWindow = (MenuBarWindow*) pMenu->ImplGetWindow();
if ( pWindow && bDelete )
@@ -3245,9 +3245,9 @@ void MenuBar::ImplDestroy( MenuBar* pMenu, BOOL bDelete )
pMenu->pWindow = NULL;
}
-BOOL MenuBar::ImplHandleKeyEvent( const KeyEvent& rKEvent, BOOL bFromMenu )
+sal_Bool MenuBar::ImplHandleKeyEvent( const KeyEvent& rKEvent, sal_Bool bFromMenu )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
// No keyboard processing when system handles the menu or our menubar is invisible
if( !IsDisplayable() ||
@@ -3263,7 +3263,7 @@ BOOL MenuBar::ImplHandleKeyEvent( const KeyEvent& rKEvent, BOOL bFromMenu )
// -----------------------------------------------------------------------
-void MenuBar::SelectEntry( USHORT nId )
+void MenuBar::SelectEntry( sal_uInt16 nId )
{
MenuBarWindow* pMenuWin = (MenuBarWindow*) ImplGetWindow();
@@ -3273,14 +3273,14 @@ void MenuBar::SelectEntry( USHORT nId )
nId = GetItemPos( nId );
// #99705# popup the selected menu
- pMenuWin->SetAutoPopup( TRUE );
+ pMenuWin->SetAutoPopup( sal_True );
if( ITEMPOS_INVALID != pMenuWin->nHighlightedItem )
{
pMenuWin->KillActivePopup();
- pMenuWin->ChangeHighlightItem( ITEMPOS_INVALID, FALSE );
+ pMenuWin->ChangeHighlightItem( ITEMPOS_INVALID, sal_False );
}
if( nId != ITEMPOS_INVALID )
- pMenuWin->ChangeHighlightItem( nId, FALSE );
+ pMenuWin->ChangeHighlightItem( nId, sal_False );
}
}
@@ -3288,31 +3288,31 @@ void MenuBar::SelectEntry( USHORT nId )
// handler for native menu selection and command events
-BOOL MenuBar::HandleMenuActivateEvent( Menu *pMenu ) const
+sal_Bool MenuBar::HandleMenuActivateEvent( Menu *pMenu ) const
{
if( pMenu )
{
pMenu->pStartedFrom = (Menu*)this;
- pMenu->bInCallback = TRUE;
+ pMenu->bInCallback = sal_True;
pMenu->Activate();
- pMenu->bInCallback = FALSE;
+ pMenu->bInCallback = sal_False;
}
- return TRUE;
+ return sal_True;
}
-BOOL MenuBar::HandleMenuDeActivateEvent( Menu *pMenu ) const
+sal_Bool MenuBar::HandleMenuDeActivateEvent( Menu *pMenu ) const
{
if( pMenu )
{
pMenu->pStartedFrom = (Menu*)this;
- pMenu->bInCallback = TRUE;
+ pMenu->bInCallback = sal_True;
pMenu->Deactivate();
- pMenu->bInCallback = FALSE;
+ pMenu->bInCallback = sal_False;
}
- return TRUE;
+ return sal_True;
}
-BOOL MenuBar::HandleMenuHighlightEvent( Menu *pMenu, USHORT nHighlightEventId ) const
+sal_Bool MenuBar::HandleMenuHighlightEvent( Menu *pMenu, sal_uInt16 nHighlightEventId ) const
{
if( !pMenu )
pMenu = ((Menu*) this)->ImplFindMenu( nHighlightEventId );
@@ -3325,13 +3325,13 @@ BOOL MenuBar::HandleMenuHighlightEvent( Menu *pMenu, USHORT nHighlightEventId )
pMenu->nSelectedId = nHighlightEventId;
pMenu->pStartedFrom = (Menu*)this;
pMenu->ImplCallHighlight( pMenu->mnHighlightedItemPos );
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
-BOOL MenuBar::HandleMenuCommandEvent( Menu *pMenu, USHORT nCommandEventId ) const
+sal_Bool MenuBar::HandleMenuCommandEvent( Menu *pMenu, sal_uInt16 nCommandEventId ) const
{
if( !pMenu )
pMenu = ((Menu*) this)->ImplFindMenu( nCommandEventId );
@@ -3340,47 +3340,47 @@ BOOL MenuBar::HandleMenuCommandEvent( Menu *pMenu, USHORT nCommandEventId ) cons
pMenu->nSelectedId = nCommandEventId;
pMenu->pStartedFrom = (Menu*)this;
pMenu->ImplSelect();
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
-USHORT MenuBar::AddMenuBarButton( const Image& i_rImage, const Link& i_rLink, USHORT i_nPos )
+sal_uInt16 MenuBar::AddMenuBarButton( const Image& i_rImage, const Link& i_rLink, sal_uInt16 i_nPos )
{
return AddMenuBarButton( i_rImage, i_rLink, String(), i_nPos );
}
-USHORT MenuBar::AddMenuBarButton( const Image& i_rImage, const Link& i_rLink, const String& i_rToolTip, USHORT i_nPos )
+sal_uInt16 MenuBar::AddMenuBarButton( const Image& i_rImage, const Link& i_rLink, const String& i_rToolTip, sal_uInt16 i_nPos )
{
return pWindow ? static_cast<MenuBarWindow*>(pWindow)->AddMenuBarButton( i_rImage, i_rLink, i_rToolTip, i_nPos ) : 0;
}
-void MenuBar::SetMenuBarButtonHighlightHdl( USHORT nId, const Link& rLink )
+void MenuBar::SetMenuBarButtonHighlightHdl( sal_uInt16 nId, const Link& rLink )
{
if( pWindow )
static_cast<MenuBarWindow*>(pWindow)->SetMenuBarButtonHighlightHdl( nId, rLink );
}
-Rectangle MenuBar::GetMenuBarButtonRectPixel( USHORT nId )
+Rectangle MenuBar::GetMenuBarButtonRectPixel( sal_uInt16 nId )
{
return pWindow ? static_cast<MenuBarWindow*>(pWindow)->GetMenuBarButtonRectPixel( nId ) : Rectangle();
}
-void MenuBar::RemoveMenuBarButton( USHORT nId )
+void MenuBar::RemoveMenuBarButton( sal_uInt16 nId )
{
if( pWindow )
static_cast<MenuBarWindow*>(pWindow)->RemoveMenuBarButton( nId );
}
-BOOL MenuBar::HandleMenuButtonEvent( Menu *, USHORT i_nButtonId ) const
+sal_Bool MenuBar::HandleMenuButtonEvent( Menu *, sal_uInt16 i_nButtonId ) const
{
return static_cast<MenuBarWindow*>(pWindow)->HandleMenuButtonEvent( i_nButtonId );
}
// -----------------------------------------------------------------------
-// BOOL PopupMenu::bAnyPopupInExecute = FALSE;
+// sal_Bool PopupMenu::bAnyPopupInExecute = sal_False;
PopupMenu::PopupMenu()
{
@@ -3405,9 +3405,9 @@ PopupMenu::~PopupMenu()
*pRefAutoSubMenu = NULL; // #111060# avoid second delete in ~MenuItemData
}
-BOOL PopupMenu::IsInExecute()
+sal_Bool PopupMenu::IsInExecute()
{
- return GetActivePopupMenu() ? TRUE : FALSE;
+ return GetActivePopupMenu() ? sal_True : sal_False;
}
PopupMenu* PopupMenu::GetActivePopupMenu()
@@ -3416,22 +3416,22 @@ PopupMenu* PopupMenu::GetActivePopupMenu()
return pSVData->maAppData.mpActivePopupMenu;
}
-void PopupMenu::EndExecute( USHORT nSelectId )
+void PopupMenu::EndExecute( sal_uInt16 nSelectId )
{
if ( ImplGetWindow() )
ImplGetFloatingWindow()->EndExecute( nSelectId );
}
-void PopupMenu::SelectEntry( USHORT nId )
+void PopupMenu::SelectEntry( sal_uInt16 nId )
{
if ( ImplGetWindow() )
{
if( nId != ITEMPOS_INVALID )
{
- USHORT nPos;
+ sal_uInt16 nPos;
MenuItemData* pData = GetItemList()->GetData( nId, nPos );
if ( pData->pSubMenu )
- ImplGetFloatingWindow()->ChangeHighlightItem( nPos, TRUE );
+ ImplGetFloatingWindow()->ChangeHighlightItem( nPos, sal_True );
else
ImplGetFloatingWindow()->EndExecute( nId );
}
@@ -3439,7 +3439,7 @@ void PopupMenu::SelectEntry( USHORT nId )
{
MenuFloatingWindow* pFloat = ImplGetFloatingWindow();
pFloat->GrabFocus();
- USHORT nPos;
+ sal_uInt16 nPos;
for( nPos = 0; nPos < GetItemList()->Count(); nPos++ )
{
MenuItemData* pData = (MenuItemData*)GetItemList()->GetObject( nPos );
@@ -3448,27 +3448,27 @@ void PopupMenu::SelectEntry( USHORT nId )
pFloat->KillActivePopup();
}
}
- pFloat->ChangeHighlightItem( ITEMPOS_INVALID, FALSE );
+ pFloat->ChangeHighlightItem( ITEMPOS_INVALID, sal_False );
}
}
}
-void PopupMenu::SetSelectedEntry( USHORT nId )
+void PopupMenu::SetSelectedEntry( sal_uInt16 nId )
{
nSelectedId = nId;
}
-USHORT PopupMenu::Execute( Window* pExecWindow, const Point& rPopupPos )
+sal_uInt16 PopupMenu::Execute( Window* pExecWindow, const Point& rPopupPos )
{
return Execute( pExecWindow, Rectangle( rPopupPos, rPopupPos ), POPUPMENU_EXECUTE_DOWN );
}
-USHORT PopupMenu::Execute( Window* pExecWindow, const Rectangle& rRect, USHORT nFlags )
+sal_uInt16 PopupMenu::Execute( Window* pExecWindow, const Rectangle& rRect, sal_uInt16 nFlags )
{
ENSURE_OR_RETURN( pExecWindow, "PopupMenu::Execute: need a non-NULL window!", 0 );
- ULONG nPopupModeFlags = 0;
+ sal_uIntPtr nPopupModeFlags = 0;
if ( nFlags & POPUPMENU_EXECUTE_DOWN )
nPopupModeFlags = FLOATWIN_POPUPMODE_DOWN;
else if ( nFlags & POPUPMENU_EXECUTE_UP )
@@ -3483,10 +3483,10 @@ USHORT PopupMenu::Execute( Window* pExecWindow, const Rectangle& rRect, USHORT n
if (nFlags & POPUPMENU_NOMOUSEUPCLOSE ) // allow popup menus to stay open on mouse button up
nPopupModeFlags |= FLOATWIN_POPUPMODE_NOMOUSEUPCLOSE; // useful if the menu was opened on mousebutton down (eg toolbox configuration)
- return ImplExecute( pExecWindow, rRect, nPopupModeFlags, 0, FALSE );
+ return ImplExecute( pExecWindow, rRect, nPopupModeFlags, 0, sal_False );
}
-USHORT PopupMenu::ImplExecute( Window* pW, const Rectangle& rRect, ULONG nPopupModeFlags, Menu* pSFrom, BOOL bPreSelectFirst )
+sal_uInt16 PopupMenu::ImplExecute( Window* pW, const Rectangle& rRect, sal_uIntPtr nPopupModeFlags, Menu* pSFrom, sal_Bool bPreSelectFirst )
{
if ( !pSFrom && ( PopupMenu::IsInExecute() || !GetItemCount() ) )
return 0;
@@ -3497,15 +3497,15 @@ USHORT PopupMenu::ImplExecute( Window* pW, const Rectangle& rRect, ULONG nPopupM
pStartedFrom = pSFrom;
nSelectedId = 0;
- bCanceled = FALSE;
+ bCanceled = sal_False;
- ULONG nFocusId = 0;
- BOOL bRealExecute = FALSE;
+ sal_uIntPtr nFocusId = 0;
+ sal_Bool bRealExecute = sal_False;
if ( !pStartedFrom )
{
- pSVData->maWinData.mbNoDeactivate = TRUE;
+ pSVData->maWinData.mbNoDeactivate = sal_True;
nFocusId = Window::SaveFocus();
- bRealExecute = TRUE;
+ bRealExecute = sal_True;
}
else
{
@@ -3532,9 +3532,9 @@ USHORT PopupMenu::ImplExecute( Window* pW, const Rectangle& rRect, ULONG nPopupM
ImplDelData aDelData;
pW->ImplAddDel( &aDelData );
- bInCallback = TRUE; // hier schon setzen, falls Activate ueberladen
+ bInCallback = sal_True; // hier schon setzen, falls Activate ueberladen
Activate();
- bInCallback = FALSE;
+ bInCallback = sal_False;
if ( aDelData.IsDelete() )
return 0; // Error
@@ -3560,7 +3560,7 @@ USHORT PopupMenu::ImplExecute( Window* pW, const Rectangle& rRect, ULONG nPopupM
nMenuFlags |= MENU_FLAG_HIDEDISABLEDENTRIES;
- USHORT nVisibleEntries = ImplGetVisibleItemCount();
+ sal_uInt16 nVisibleEntries = ImplGetVisibleItemCount();
if ( !nVisibleEntries )
{
ResMgr* pResMgr = ImplGetResMgr();
@@ -3569,7 +3569,7 @@ USHORT PopupMenu::ImplExecute( Window* pW, const Rectangle& rRect, ULONG nPopupM
String aTmpEntryText( ResId( SV_RESID_STRING_NOSELECTIONPOSSIBLE, *pResMgr ) );
MenuItemData* pData = pItemList->Insert(
0xFFFF, MENUITEM_STRING, 0, aTmpEntryText, Image(), NULL, 0xFFFF );
- pData->bIsTemporary = TRUE;
+ pData->bIsTemporary = sal_True;
}
}
else if ( Application::GetSettings().GetStyleSettings().GetAutoMnemonic() && !( nMenuFlags & MENU_FLAG_NOAUTOMNEMONICS ) )
@@ -3604,9 +3604,9 @@ USHORT PopupMenu::ImplExecute( Window* pW, const Rectangle& rRect, ULONG nPopupM
nMaxHeight -= nTop+nBottom;
if ( aSz.Height() > nMaxHeight )
{
- pWin->EnableScrollMenu( TRUE );
- USHORT nStart = ImplGetFirstVisible();
- USHORT nEntries = ImplCalcVisEntries( nMaxHeight, nStart );
+ pWin->EnableScrollMenu( sal_True );
+ sal_uInt16 nStart = ImplGetFirstVisible();
+ sal_uInt16 nEntries = ImplCalcVisEntries( nMaxHeight, nStart );
aSz.Height() = ImplCalcHeight( nEntries );
}
@@ -3635,7 +3635,7 @@ USHORT PopupMenu::ImplExecute( Window* pW, const Rectangle& rRect, ULONG nPopupM
}
if( pSFrom )
{
- USHORT aPos;
+ sal_uInt16 aPos;
if( pSFrom->bIsMenuBar )
aPos = ((MenuBarWindow *) pSFrom->pWindow)->GetHighlightedItem();
else
@@ -3647,14 +3647,14 @@ USHORT PopupMenu::ImplExecute( Window* pW, const Rectangle& rRect, ULONG nPopupM
}
if ( bPreSelectFirst )
{
- USHORT nCount = (USHORT)pItemList->Count();
- for ( USHORT n = 0; n < nCount; n++ )
+ sal_uInt16 nCount = (sal_uInt16)pItemList->Count();
+ for ( sal_uInt16 n = 0; n < nCount; n++ )
{
MenuItemData* pData = pItemList->GetDataFromPos( n );
if ( ( pData->bEnabled || !Application::GetSettings().GetStyleSettings().GetSkipDisabledInMenus() )
&& ( pData->eType != MENUITEM_SEPARATOR ) && ImplIsVisible( n ) && ImplIsSelectable( n ) )
{
- pWin->ChangeHighlightItem( n, FALSE );
+ pWin->ChangeHighlightItem( n, sal_False );
break;
}
}
@@ -3684,7 +3684,7 @@ USHORT PopupMenu::ImplExecute( Window* pW, const Rectangle& rRect, ULONG nPopupM
if ( nFocusId )
{
pWin->SetFocusId( 0 );
- pSVData->maWinData.mbNoDeactivate = FALSE;
+ pSVData->maWinData.mbNoDeactivate = sal_False;
}
pWin->ImplEndPopupMode( 0, nFocusId );
@@ -3715,18 +3715,18 @@ USHORT PopupMenu::ImplExecute( Window* pW, const Rectangle& rRect, ULONG nPopupM
return bRealExecute ? nSelectedId : 0;
}
-USHORT PopupMenu::ImplCalcVisEntries( long nMaxHeight, USHORT nStartEntry, USHORT* pLastVisible ) const
+sal_uInt16 PopupMenu::ImplCalcVisEntries( long nMaxHeight, sal_uInt16 nStartEntry, sal_uInt16* pLastVisible ) const
{
nMaxHeight -= 2 * ImplGetFloatingWindow()->GetScrollerHeight();
long nHeight = 0;
- USHORT nEntries = (USHORT) pItemList->Count();
- USHORT nVisEntries = 0;
+ sal_uInt16 nEntries = (sal_uInt16) pItemList->Count();
+ sal_uInt16 nVisEntries = 0;
if ( pLastVisible )
*pLastVisible = 0;
- for ( USHORT n = nStartEntry; n < nEntries; n++ )
+ for ( sal_uInt16 n = nStartEntry; n < nEntries; n++ )
{
if ( ImplIsVisible( n ) )
{
@@ -3743,14 +3743,14 @@ USHORT PopupMenu::ImplCalcVisEntries( long nMaxHeight, USHORT nStartEntry, USHOR
return nVisEntries;
}
-long PopupMenu::ImplCalcHeight( USHORT nEntries ) const
+long PopupMenu::ImplCalcHeight( sal_uInt16 nEntries ) const
{
long nHeight = 0;
- USHORT nFound = 0;
- for ( USHORT n = 0; ( nFound < nEntries ) && ( n < pItemList->Count() ); n++ )
+ sal_uInt16 nFound = 0;
+ for ( sal_uInt16 n = 0; ( nFound < nEntries ) && ( n < pItemList->Count() ); n++ )
{
- if ( ImplIsVisible( (USHORT) n ) )
+ if ( ImplIsVisible( (sal_uInt16) n ) )
{
MenuItemData* pData = pItemList->GetDataFromPos( n );
nHeight += pData->aSz.Height();
@@ -3764,7 +3764,7 @@ long PopupMenu::ImplCalcHeight( USHORT nEntries ) const
}
-static void ImplInitMenuWindow( Window* pWin, BOOL bFont, BOOL bMenuBar )
+static void ImplInitMenuWindow( Window* pWin, sal_Bool bFont, sal_Bool bMenuBar )
{
const StyleSettings& rStyleSettings = pWin->GetSettings().GetStyleSettings();
@@ -3781,7 +3781,7 @@ static void ImplInitMenuWindow( Window* pWin, BOOL bFont, BOOL bMenuBar )
Wallpaper aWallpaper;
aWallpaper.SetStyle( WALLPAPER_APPLICATIONGRADIENT );
pWin->SetBackground( aWallpaper );
- pWin->SetPaintTransparent( FALSE );
+ pWin->SetPaintTransparent( sal_False );
pWin->SetParentClipMode( 0 );
}
}
@@ -3806,12 +3806,12 @@ static void ImplInitMenuWindow( Window* pWin, BOOL bFont, BOOL bMenuBar )
MenuFloatingWindow::MenuFloatingWindow( Menu* pMen, Window* pParent, WinBits nStyle ) :
FloatingWindow( pParent, nStyle )
{
- mpWindowImpl->mbMenuFloatingWindow= TRUE;
+ mpWindowImpl->mbMenuFloatingWindow= sal_True;
pMenu = pMen;
pActivePopup = 0;
nSaveFocusId = 0;
- bInExecute = FALSE;
- bScrollMenu = FALSE;
+ bInExecute = sal_False;
+ bScrollMenu = sal_False;
nHighlightedItem = ITEMPOS_INVALID;
nMBDownPos = ITEMPOS_INVALID;
nPosInParent = ITEMPOS_INVALID;
@@ -3819,13 +3819,13 @@ MenuFloatingWindow::MenuFloatingWindow( Menu* pMen, Window* pParent, WinBits nSt
// nStartY = 0;
nBorder = EXTRASPACEY;
nFirstEntry = 0;
- bScrollUp = FALSE;
- bScrollDown = FALSE;
- bIgnoreFirstMove = TRUE;
- bKeyInput = FALSE;
+ bScrollUp = sal_False;
+ bScrollDown = sal_False;
+ bIgnoreFirstMove = sal_True;
+ bKeyInput = sal_False;
EnableSaveBackground();
- ImplInitMenuWindow( this, TRUE, FALSE );
+ ImplInitMenuWindow( this, sal_True, sal_False );
SetPopupModeEndHdl( LINK( this, MenuFloatingWindow, PopupEnd ) );
@@ -3851,7 +3851,7 @@ void MenuFloatingWindow::doShutdown()
{
// #102461# remove highlight in parent
MenuItemData* pData;
- USHORT i, nCount = (USHORT)pMenu->pStartedFrom->pItemList->Count();
+ sal_uInt16 i, nCount = (sal_uInt16)pMenu->pStartedFrom->pItemList->Count();
for(i = 0; i < nCount; i++)
{
pData = pMenu->pStartedFrom->pItemList->GetDataFromPos( i );
@@ -3862,7 +3862,7 @@ void MenuFloatingWindow::doShutdown()
{
MenuFloatingWindow* pPWin = (MenuFloatingWindow*)pMenu->pStartedFrom->ImplGetWindow();
if( pPWin )
- pPWin->HighlightItem( i, FALSE );
+ pPWin->HighlightItem( i, sal_False );
}
}
@@ -3898,13 +3898,13 @@ long MenuFloatingWindow::ImplGetStartY() const
long nY = 0;
if( pMenu )
{
- for ( USHORT n = 0; n < nFirstEntry; n++ )
+ for ( sal_uInt16 n = 0; n < nFirstEntry; n++ )
nY += pMenu->GetItemList()->GetDataFromPos( n )->aSz.Height();
}
return -nY;
}
-Region MenuFloatingWindow::ImplCalcClipRegion( BOOL bIncludeLogo ) const
+Region MenuFloatingWindow::ImplCalcClipRegion( sal_Bool bIncludeLogo ) const
{
Size aOutSz = GetOutputSizePixel();
Point aPos;
@@ -3934,7 +3934,7 @@ void MenuFloatingWindow::ImplInitClipRegion()
}
}
-void MenuFloatingWindow::ImplHighlightItem( const MouseEvent& rMEvt, BOOL bMBDown )
+void MenuFloatingWindow::ImplHighlightItem( const MouseEvent& rMEvt, sal_Bool bMBDown )
{
if( ! pMenu )
return;
@@ -3944,10 +3944,10 @@ void MenuFloatingWindow::ImplHighlightItem( const MouseEvent& rMEvt, BOOL bMBDow
Size aOutSz = GetOutputSizePixel();
if ( ( nMouseY >= nY ) && ( nMouseY < ( aOutSz.Height() - nY ) ) )
{
- BOOL bHighlighted = FALSE;
- USHORT nCount = (USHORT)pMenu->pItemList->Count();
+ sal_Bool bHighlighted = sal_False;
+ sal_uInt16 nCount = (sal_uInt16)pMenu->pItemList->Count();
nY += ImplGetStartY(); // ggf. gescrollt.
- for ( USHORT n = 0; !bHighlighted && ( n < nCount ); n++ )
+ for ( sal_uInt16 n = 0; !bHighlighted && ( n < nCount ); n++ )
{
if ( pMenu->ImplIsVisible( n ) )
{
@@ -3956,7 +3956,7 @@ void MenuFloatingWindow::ImplHighlightItem( const MouseEvent& rMEvt, BOOL bMBDow
nY += pItemData->aSz.Height();
if ( ( nOldY <= nMouseY ) && ( nY > nMouseY ) && pMenu->ImplIsSelectable( n ) )
{
- BOOL bPopupArea = TRUE;
+ sal_Bool bPopupArea = sal_True;
if ( pItemData->nBits & MIB_POPUPSELECT )
{
// Nur wenn ueber dem Pfeil geklickt wurde...
@@ -3969,10 +3969,10 @@ void MenuFloatingWindow::ImplHighlightItem( const MouseEvent& rMEvt, BOOL bMBDow
{
if ( n != nHighlightedItem )
{
- ChangeHighlightItem( (USHORT)n, FALSE );
+ ChangeHighlightItem( (sal_uInt16)n, sal_False );
}
- BOOL bAllowNewPopup = TRUE;
+ sal_Bool bAllowNewPopup = sal_True;
if ( pActivePopup )
{
MenuItemData* pData = pMenu->pItemList->GetDataFromPos( n );
@@ -3990,7 +3990,7 @@ void MenuFloatingWindow::ImplHighlightItem( const MouseEvent& rMEvt, BOOL bMBDow
{
if ( n != nHighlightedItem )
{
- ChangeHighlightItem( (USHORT)n, TRUE );
+ ChangeHighlightItem( (sal_uInt16)n, sal_True );
}
else if ( pItemData->nBits & MIB_POPUPSELECT )
{
@@ -3998,17 +3998,17 @@ void MenuFloatingWindow::ImplHighlightItem( const MouseEvent& rMEvt, BOOL bMBDow
HighlightChanged( NULL );
}
}
- bHighlighted = TRUE;
+ bHighlighted = sal_True;
}
}
}
if ( !bHighlighted )
- ChangeHighlightItem( ITEMPOS_INVALID, TRUE );
+ ChangeHighlightItem( ITEMPOS_INVALID, sal_True );
}
else
{
ImplScroll( rMEvt.GetPosPixel() );
- ChangeHighlightItem( ITEMPOS_INVALID, TRUE );
+ ChangeHighlightItem( ITEMPOS_INVALID, sal_True );
}
}
@@ -4022,12 +4022,12 @@ IMPL_LINK( MenuFloatingWindow, PopupEnd, FloatingWindow*, EMPTYARG )
{
//DBG_ASSERT( !pActivePopup->ImplGetWindow(), "PopupEnd, obwohl pActivePopup MIT Window!" );
KillActivePopup(); // should be ok to just remove it
- //pActivePopup->bCanceled = TRUE;
+ //pActivePopup->bCanceled = sal_True;
}
- bInExecute = FALSE;
- pMenu->bInCallback = TRUE;
+ bInExecute = sal_False;
+ pMenu->bInCallback = sal_True;
pMenu->Deactivate();
- pMenu->bInCallback = FALSE;
+ pMenu->bInCallback = sal_False;
}
else
{
@@ -4077,7 +4077,7 @@ IMPL_LINK( MenuFloatingWindow, HighlightChanged, Timer*, pTimer )
{
if ( pActivePopup && ( pActivePopup != pItemData->pSubMenu ) )
{
- ULONG nOldFlags = GetPopupModeFlags();
+ sal_uIntPtr nOldFlags = GetPopupModeFlags();
SetPopupModeFlags( GetPopupModeFlags() | FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE );
KillActivePopup();
SetPopupModeFlags( nOldFlags );
@@ -4087,7 +4087,7 @@ IMPL_LINK( MenuFloatingWindow, HighlightChanged, Timer*, pTimer )
pActivePopup = (PopupMenu*)pItemData->pSubMenu;
long nY = nScrollerHeight+ImplGetStartY();
MenuItemData* pData = 0;
- for ( ULONG n = 0; n < nHighlightedItem; n++ )
+ for ( sal_uIntPtr n = 0; n < nHighlightedItem; n++ )
{
pData = pMenu->pItemList->GetDataFromPos( n );
nY += pData->aSz.Height();
@@ -4118,9 +4118,9 @@ IMPL_LINK( MenuFloatingWindow, HighlightChanged, Timer*, pTimer )
// die lange im Activate Rescheduled haben und jetzt schon nicht mehr
// angezeigt werden sollen.
Menu* pTest = pActivePopup;
- ULONG nOldFlags = GetPopupModeFlags();
+ sal_uIntPtr nOldFlags = GetPopupModeFlags();
SetPopupModeFlags( GetPopupModeFlags() | FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE );
- USHORT nRet = pActivePopup->ImplExecute( this, Rectangle( aItemTopLeft, aItemBottomRight ), FLOATWIN_POPUPMODE_RIGHT, pMenu, pTimer ? FALSE : TRUE );
+ sal_uInt16 nRet = pActivePopup->ImplExecute( this, Rectangle( aItemTopLeft, aItemBottomRight ), FLOATWIN_POPUPMODE_RIGHT, pMenu, pTimer ? sal_False : sal_True );
SetPopupModeFlags( nOldFlags );
// nRet != 0, wenn es waerend Activate() abgeschossen wurde...
@@ -4155,11 +4155,11 @@ IMPL_LINK( MenuFloatingWindow, ShowHideListener, VclWindowEvent*, pEvent )
return 0;
}
-void MenuFloatingWindow::EnableScrollMenu( BOOL b )
+void MenuFloatingWindow::EnableScrollMenu( sal_Bool b )
{
bScrollMenu = b;
- nScrollerHeight = b ? (USHORT) GetSettings().GetStyleSettings().GetScrollBarSize() /2 : 0;
- bScrollDown = TRUE;
+ nScrollerHeight = b ? (sal_uInt16) GetSettings().GetStyleSettings().GetScrollBarSize() /2 : 0;
+ bScrollDown = sal_True;
ImplInitClipRegion();
}
@@ -4169,8 +4169,8 @@ void MenuFloatingWindow::Execute()
pSVData->maAppData.mpActivePopupMenu = (PopupMenu*)pMenu;
- bInExecute = TRUE;
-// bCallingSelect = FALSE;
+ bInExecute = sal_True;
+// bCallingSelect = sal_False;
while ( bInExecute )
Application::Yield();
@@ -4181,24 +4181,24 @@ void MenuFloatingWindow::Execute()
// Application::Yield();
}
-void MenuFloatingWindow::StopExecute( ULONG nFocusId )
+void MenuFloatingWindow::StopExecute( sal_uIntPtr nFocusId )
{
// Focus wieder herstellen
// (kann schon im Select wieder hergestellt wurden sein)
if ( nSaveFocusId )
{
- Window::EndSaveFocus( nFocusId, FALSE );
+ Window::EndSaveFocus( nFocusId, sal_False );
nFocusId = nSaveFocusId;
if ( nFocusId )
{
nSaveFocusId = 0;
- ImplGetSVData()->maWinData.mbNoDeactivate = FALSE;
+ ImplGetSVData()->maWinData.mbNoDeactivate = sal_False;
}
}
ImplEndPopupMode( 0, nFocusId );
aHighlightChangedTimer.Stop();
- bInExecute = FALSE;
+ bInExecute = sal_False;
if ( pActivePopup )
{
KillActivePopup();
@@ -4216,15 +4216,15 @@ void MenuFloatingWindow::KillActivePopup( PopupMenu* pThisOnly )
if( ((FloatingWindow *) pActivePopup->pWindow)->IsInCleanUp() )
return; // kill it later
if ( pActivePopup->bInCallback )
- pActivePopup->bCanceled = TRUE;
+ pActivePopup->bCanceled = sal_True;
// Vor allen Aktionen schon pActivePopup = 0, falls z.B.
// PopupModeEndHdl des zu zerstoerenden Popups mal synchron gerufen wird.
PopupMenu* pPopup = pActivePopup;
pActivePopup = NULL;
- pPopup->bInCallback = TRUE;
+ pPopup->bInCallback = sal_True;
pPopup->Deactivate();
- pPopup->bInCallback = FALSE;
+ pPopup->bInCallback = sal_False;
if ( pPopup->ImplGetWindow() )
{
pPopup->ImplGetFloatingWindow()->StopExecute();
@@ -4240,14 +4240,14 @@ void MenuFloatingWindow::KillActivePopup( PopupMenu* pThisOnly )
void MenuFloatingWindow::EndExecute()
{
Menu* pStart = pMenu ? pMenu->ImplGetStartMenu() : NULL;
- ULONG nFocusId = 0;
+ sal_uIntPtr nFocusId = 0;
if ( pStart && pStart->bIsMenuBar )
{
nFocusId = ((MenuBarWindow*)((MenuBar*)pStart)->ImplGetWindow())->GetFocusId();
if ( nFocusId )
{
((MenuBarWindow*)((MenuBar*)pStart)->ImplGetWindow())->SetFocusId( 0 );
- ImplGetSVData()->maWinData.mbNoDeactivate = FALSE;
+ ImplGetSVData()->maWinData.mbNoDeactivate = sal_False;
}
}
@@ -4264,7 +4264,7 @@ void MenuFloatingWindow::EndExecute()
// Dies Fenster wird gleich zerstoert => Daten lokal merken...
Menu* pM = pMenu;
- USHORT nItem = nHighlightedItem;
+ sal_uInt16 nItem = nHighlightedItem;
pCleanUpFrom->StopExecute( nFocusId );
@@ -4282,9 +4282,9 @@ void MenuFloatingWindow::EndExecute()
}
}
-void MenuFloatingWindow::EndExecute( USHORT nId )
+void MenuFloatingWindow::EndExecute( sal_uInt16 nId )
{
- USHORT nPos;
+ sal_uInt16 nPos;
if ( pMenu && pMenu->GetItemList()->GetData( nId, nPos ) )
nHighlightedItem = nPos;
else
@@ -4301,7 +4301,7 @@ void MenuFloatingWindow::MouseButtonDown( const MouseEvent& rMEvt )
//if ( pActivePopup && pActivePopup->ImplGetWindow() && !pActivePopup->ImplGetFloatingWindow()->pActivePopup )
// pActivePopup->ImplGetFloatingWindow()->ToTop( TOTOP_NOGRABFOCUS );
- ImplHighlightItem( rMEvt, TRUE );
+ ImplHighlightItem( rMEvt, sal_True );
nMBDownPos = nHighlightedItem;
}
@@ -4311,7 +4311,7 @@ void MenuFloatingWindow::MouseButtonUp( const MouseEvent& rMEvt )
MenuItemData* pData = pMenu ? pMenu->GetItemList()->GetDataFromPos( nHighlightedItem ) : NULL;
// nMBDownPos in lokaler Variable merken und gleich zuruecksetzen,
// weil nach EndExecute zu spaet
- USHORT _nMBDownPos = nMBDownPos;
+ sal_uInt16 _nMBDownPos = nMBDownPos;
nMBDownPos = ITEMPOS_INVALID;
if ( pData && pData->bEnabled && ( pData->eType != MENUITEM_SEPARATOR ) )
{
@@ -4349,7 +4349,7 @@ void MenuFloatingWindow::MouseMove( const MouseEvent& rMEvt )
pActivePopup->ImplGetFloatingWindow()->aSubmenuCloseTimer.Start();
if( !pActivePopup || (pData && pData->pSubMenu != pActivePopup ) )
- ChangeHighlightItem( ITEMPOS_INVALID, FALSE );
+ ChangeHighlightItem( ITEMPOS_INVALID, sal_False );
#ifdef OS2
}
#endif
@@ -4364,13 +4364,13 @@ void MenuFloatingWindow::MouseMove( const MouseEvent& rMEvt )
{
aSubmenuCloseTimer.Stop();
if( bIgnoreFirstMove )
- bIgnoreFirstMove = FALSE;
+ bIgnoreFirstMove = sal_False;
else
- ImplHighlightItem( rMEvt, FALSE );
+ ImplHighlightItem( rMEvt, sal_False );
}
}
-void MenuFloatingWindow::ImplScroll( BOOL bUp )
+void MenuFloatingWindow::ImplScroll( sal_Bool bUp )
{
KillActivePopup();
Update();
@@ -4378,7 +4378,7 @@ void MenuFloatingWindow::ImplScroll( BOOL bUp )
if( ! pMenu )
return;
- HighlightItem( nHighlightedItem, FALSE );
+ HighlightItem( nHighlightedItem, sal_False );
pMenu->ImplKillLayoutData();
@@ -4393,17 +4393,17 @@ void MenuFloatingWindow::ImplScroll( BOOL bUp )
if ( !bScrollDown )
{
- bScrollDown = TRUE;
- ImplDrawScroller( FALSE );
+ bScrollDown = sal_True;
+ ImplDrawScroller( sal_False );
}
if ( pMenu->ImplGetPrevVisible( nFirstEntry ) == ITEMPOS_INVALID )
{
- bScrollUp = FALSE;
- ImplDrawScroller( TRUE );
+ bScrollUp = sal_False;
+ ImplDrawScroller( sal_True );
}
- Scroll( 0, nScrollEntryHeight, ImplCalcClipRegion( FALSE ).GetBoundRect(), SCROLL_CLIP );
+ Scroll( 0, nScrollEntryHeight, ImplCalcClipRegion( sal_False ).GetBoundRect(), SCROLL_CLIP );
}
else if ( bScrollDown && !bUp )
{
@@ -4415,24 +4415,24 @@ void MenuFloatingWindow::ImplScroll( BOOL bUp )
if ( !bScrollUp )
{
- bScrollUp = TRUE;
- ImplDrawScroller( TRUE );
+ bScrollUp = sal_True;
+ ImplDrawScroller( sal_True );
}
long nHeight = GetOutputSizePixel().Height();
- USHORT nLastVisible;
+ sal_uInt16 nLastVisible;
((PopupMenu*)pMenu)->ImplCalcVisEntries( nHeight, nFirstEntry, &nLastVisible );
if ( pMenu->ImplGetNextVisible( nLastVisible ) == ITEMPOS_INVALID )
{
- bScrollDown = FALSE;
- ImplDrawScroller( FALSE );
+ bScrollDown = sal_False;
+ ImplDrawScroller( sal_False );
}
// nStartY -= nEntryHeight;
- Scroll( 0, -nScrollEntryHeight, ImplCalcClipRegion( FALSE ).GetBoundRect(), SCROLL_CLIP );
+ Scroll( 0, -nScrollEntryHeight, ImplCalcClipRegion( sal_False ).GetBoundRect(), SCROLL_CLIP );
}
- HighlightItem( nHighlightedItem, TRUE );
+ HighlightItem( nHighlightedItem, sal_True );
}
void MenuFloatingWindow::ImplScroll( const Point& rMousePos )
@@ -4445,12 +4445,12 @@ void MenuFloatingWindow::ImplScroll( const Point& rMousePos )
if ( bScrollUp && ( nMouseY < nY ) )
{
- ImplScroll( TRUE );
+ ImplScroll( sal_True );
nDelta = nY - nMouseY;
}
else if ( bScrollDown && ( nMouseY > ( aOutSz.Height() - nY ) ) )
{
- ImplScroll( FALSE );
+ ImplScroll( sal_False );
nDelta = nMouseY - ( aOutSz.Height() - nY );
}
@@ -4472,7 +4472,7 @@ void MenuFloatingWindow::ImplScroll( const Point& rMousePos )
aScrollTimer.Start();
}
}
-void MenuFloatingWindow::ChangeHighlightItem( USHORT n, BOOL bStartPopupTimer )
+void MenuFloatingWindow::ChangeHighlightItem( sal_uInt16 n, sal_Bool bStartPopupTimer )
{
// #57934# ggf. das aktive Popup sofort schliessen, damit TH's Hintergrundsicherung funktioniert.
// #65750# Dann verzichten wir lieber auf den schmalen Streifen Hintergrundsicherung.
@@ -4487,11 +4487,11 @@ void MenuFloatingWindow::ChangeHighlightItem( USHORT n, BOOL bStartPopupTimer )
if ( nHighlightedItem != ITEMPOS_INVALID )
{
- HighlightItem( nHighlightedItem, FALSE );
+ HighlightItem( nHighlightedItem, sal_False );
pMenu->ImplCallEventListeners( VCLEVENT_MENU_DEHIGHLIGHT, nHighlightedItem );
}
- nHighlightedItem = (USHORT)n;
+ nHighlightedItem = (sal_uInt16)n;
DBG_ASSERT( pMenu->ImplIsVisible( nHighlightedItem ) || nHighlightedItem == ITEMPOS_INVALID, "ChangeHighlightItem: Not visible!" );
if( nHighlightedItem != ITEMPOS_INVALID )
{
@@ -4499,7 +4499,7 @@ void MenuFloatingWindow::ChangeHighlightItem( USHORT n, BOOL bStartPopupTimer )
{
// #102461# make sure parent entry is highlighted as well
MenuItemData* pData;
- USHORT i, nCount = (USHORT)pMenu->pStartedFrom->pItemList->Count();
+ sal_uInt16 i, nCount = (sal_uInt16)pMenu->pStartedFrom->pItemList->Count();
for(i = 0; i < nCount; i++)
{
pData = pMenu->pStartedFrom->pItemList->GetDataFromPos( i );
@@ -4511,12 +4511,12 @@ void MenuFloatingWindow::ChangeHighlightItem( USHORT n, BOOL bStartPopupTimer )
MenuFloatingWindow* pPWin = (MenuFloatingWindow*)pMenu->pStartedFrom->ImplGetWindow();
if( pPWin && pPWin->nHighlightedItem != i )
{
- pPWin->HighlightItem( i, TRUE );
+ pPWin->HighlightItem( i, sal_True );
pPWin->nHighlightedItem = i;
}
}
}
- HighlightItem( nHighlightedItem, TRUE );
+ HighlightItem( nHighlightedItem, sal_True );
pMenu->ImplCallHighlight( nHighlightedItem );
}
else
@@ -4535,7 +4535,7 @@ void MenuFloatingWindow::ChangeHighlightItem( USHORT n, BOOL bStartPopupTimer )
}
}
-void MenuFloatingWindow::HighlightItem( USHORT nPos, BOOL bHighlight )
+void MenuFloatingWindow::HighlightItem( sal_uInt16 nPos, sal_Bool bHighlight )
{
if( ! pMenu )
return;
@@ -4551,8 +4551,8 @@ void MenuFloatingWindow::HighlightItem( USHORT nPos, BOOL bHighlight )
int nOuterSpace = ImplGetSVData()->maNWFData.mnMenuFormatExtraBorder;
nY += nOuterSpace;
- USHORT nCount = (USHORT)pMenu->pItemList->Count();
- for ( USHORT n = 0; n < nCount; n++ )
+ sal_uInt16 nCount = (sal_uInt16)pMenu->pItemList->Count();
+ for ( sal_uInt16 n = 0; n < nCount; n++ )
{
MenuItemData* pData = pMenu->pItemList->GetDataFromPos( n );
if ( n == nPos )
@@ -4560,7 +4560,7 @@ void MenuFloatingWindow::HighlightItem( USHORT nPos, BOOL bHighlight )
DBG_ASSERT( pMenu->ImplIsVisible( n ), "Highlight: Item not visible!" );
if ( pData->eType != MENUITEM_SEPARATOR )
{
- BOOL bRestoreLineColor = FALSE;
+ sal_Bool bRestoreLineColor = sal_False;
Color oldLineColor;
bool bDrawItemRect = true;
@@ -4586,7 +4586,7 @@ void MenuFloatingWindow::HighlightItem( USHORT nPos, BOOL 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,
Region( aItemRect ),
CTRL_STATE_SELECTED | ( pData->bEnabled? CTRL_STATE_ENABLED: 0 ),
ImplControlValue(),
@@ -4610,7 +4610,7 @@ void MenuFloatingWindow::HighlightItem( USHORT nPos, BOOL bHighlight )
SetFillColor();
oldLineColor = GetLineColor();
SetLineColor( GetSettings().GetStyleSettings().GetMenuHighlightColor() );
- bRestoreLineColor = TRUE;
+ bRestoreLineColor = sal_True;
}
}
else
@@ -4629,7 +4629,7 @@ void MenuFloatingWindow::HighlightItem( USHORT nPos, BOOL bHighlight )
}
}
-Rectangle MenuFloatingWindow::ImplGetItemRect( USHORT nPos )
+Rectangle MenuFloatingWindow::ImplGetItemRect( sal_uInt16 nPos )
{
if( ! pMenu )
return Rectangle();
@@ -4643,8 +4643,8 @@ Rectangle MenuFloatingWindow::ImplGetItemRect( USHORT nPos )
if ( pMenu->pLogo )
nX = pMenu->pLogo->aBitmap.GetSizePixel().Width();
- USHORT nCount = (USHORT)pMenu->pItemList->Count();
- for ( USHORT n = 0; n < nCount; n++ )
+ sal_uInt16 nCount = (sal_uInt16)pMenu->pItemList->Count();
+ for ( sal_uInt16 n = 0; n < nCount; n++ )
{
MenuItemData* pData = pMenu->pItemList->GetDataFromPos( n );
if ( n == nPos )
@@ -4667,14 +4667,14 @@ Rectangle MenuFloatingWindow::ImplGetItemRect( USHORT nPos )
}
-void MenuFloatingWindow::ImplCursorUpDown( BOOL bUp, BOOL bHomeEnd )
+void MenuFloatingWindow::ImplCursorUpDown( sal_Bool bUp, sal_Bool bHomeEnd )
{
if( ! pMenu )
return;
const StyleSettings& rSettings = GetSettings().GetStyleSettings();
- USHORT n = nHighlightedItem;
+ sal_uInt16 n = nHighlightedItem;
if ( n == ITEMPOS_INVALID )
{
if ( bUp )
@@ -4683,7 +4683,7 @@ void MenuFloatingWindow::ImplCursorUpDown( BOOL bUp, BOOL bHomeEnd )
n = pMenu->GetItemCount()-1;
}
- USHORT nLoop = n;
+ sal_uInt16 nLoop = n;
if( bHomeEnd )
{
@@ -4695,7 +4695,7 @@ void MenuFloatingWindow::ImplCursorUpDown( BOOL bUp, BOOL bHomeEnd )
}
else
{
- n = (USHORT)-1;
+ n = (sal_uInt16)-1;
nLoop = n+1;
}
}
@@ -4731,21 +4731,21 @@ void MenuFloatingWindow::ImplCursorUpDown( BOOL bUp, BOOL bHomeEnd )
// Selektion noch im sichtbaren Bereich?
if ( IsScrollMenu() )
{
- ChangeHighlightItem( ITEMPOS_INVALID, FALSE );
+ ChangeHighlightItem( ITEMPOS_INVALID, sal_False );
while ( n < nFirstEntry )
- ImplScroll( TRUE );
+ ImplScroll( sal_True );
Size aOutSz = GetOutputSizePixel();
- USHORT nLastVisible;
+ sal_uInt16 nLastVisible;
((PopupMenu*)pMenu)->ImplCalcVisEntries( aOutSz.Height(), nFirstEntry, &nLastVisible );
while ( n > nLastVisible )
{
- ImplScroll( FALSE );
+ ImplScroll( sal_False );
((PopupMenu*)pMenu)->ImplCalcVisEntries( aOutSz.Height(), nFirstEntry, &nLastVisible );
}
}
- ChangeHighlightItem( n, FALSE );
+ ChangeHighlightItem( n, sal_False );
break;
}
} while ( n != nLoop );
@@ -4756,8 +4756,8 @@ void MenuFloatingWindow::KeyInput( const KeyEvent& rKEvent )
ImplDelData aDelData;
ImplAddDel( &aDelData );
- USHORT nCode = rKEvent.GetKeyCode().GetCode();
- bKeyInput = TRUE;
+ sal_uInt16 nCode = rKEvent.GetKeyCode().GetCode();
+ bKeyInput = sal_True;
switch ( nCode )
{
case KEY_UP:
@@ -4769,7 +4769,7 @@ void MenuFloatingWindow::KeyInput( const KeyEvent& rKEvent )
case KEY_END:
case KEY_HOME:
{
- ImplCursorUpDown( nCode == KEY_END, TRUE );
+ ImplCursorUpDown( nCode == KEY_END, sal_True );
}
break;
case KEY_F6:
@@ -4825,14 +4825,14 @@ void MenuFloatingWindow::KeyInput( const KeyEvent& rKEvent )
{
if( pMenu )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
if ( nHighlightedItem != ITEMPOS_INVALID )
{
MenuItemData* pData = pMenu->GetItemList()->GetDataFromPos( nHighlightedItem );
if ( pData && pData->pSubMenu )
{
HighlightChanged( 0 );
- bDone = TRUE;
+ bDone = sal_True;
}
}
if ( !bDone )
@@ -4880,14 +4880,14 @@ void MenuFloatingWindow::KeyInput( const KeyEvent& rKEvent )
default:
{
xub_Unicode nCharCode = rKEvent.GetCharCode();
- USHORT nPos = 0;
- USHORT nDuplicates = 0;
+ sal_uInt16 nPos = 0;
+ sal_uInt16 nDuplicates = 0;
MenuItemData* pData = (nCharCode && pMenu) ? pMenu->GetItemList()->SearchItem( nCharCode, rKEvent.GetKeyCode(), nPos, nDuplicates, nHighlightedItem ) : NULL;
if ( pData )
{
if ( pData->pSubMenu || nDuplicates > 1 )
{
- ChangeHighlightItem( nPos, FALSE );
+ ChangeHighlightItem( nPos, sal_False );
HighlightChanged( 0 );
}
else
@@ -4909,7 +4909,7 @@ void MenuFloatingWindow::KeyInput( const KeyEvent& rKEvent )
if ( !aDelData.IsDelete() )
{
ImplRemoveDel( &aDelData );
- bKeyInput = FALSE;
+ bKeyInput = sal_False;
}
}
@@ -4933,16 +4933,16 @@ void MenuFloatingWindow::Paint( const Rectangle& )
}
if ( IsScrollMenu() )
{
- ImplDrawScroller( TRUE );
- ImplDrawScroller( FALSE );
+ ImplDrawScroller( sal_True );
+ ImplDrawScroller( sal_False );
}
SetFillColor( GetSettings().GetStyleSettings().GetMenuColor() );
pMenu->ImplPaint( this, nScrollerHeight, ImplGetStartY() );
if ( nHighlightedItem != ITEMPOS_INVALID )
- HighlightItem( nHighlightedItem, TRUE );
+ HighlightItem( nHighlightedItem, sal_True );
}
-void MenuFloatingWindow::ImplDrawScroller( BOOL bUp )
+void MenuFloatingWindow::ImplDrawScroller( sal_Bool bUp )
{
if( ! pMenu )
return;
@@ -4957,7 +4957,7 @@ void MenuFloatingWindow::ImplDrawScroller( BOOL bUp )
DecorationView aDecoView( this );
SymbolType eSymbol = bUp ? SYMBOL_SPIN_UP : SYMBOL_SPIN_DOWN;
- USHORT nStyle = 0;
+ sal_uInt16 nStyle = 0;
if ( ( bUp && !bScrollUp ) || ( !bUp && !bScrollDown ) )
nStyle |= SYMBOL_DRAW_DISABLE;
@@ -4968,7 +4968,7 @@ void MenuFloatingWindow::ImplDrawScroller( BOOL bUp )
void MenuFloatingWindow::RequestHelp( const HelpEvent& rHEvt )
{
- USHORT nId = nHighlightedItem;
+ sal_uInt16 nId = nHighlightedItem;
Menu* pM = pMenu;
Window* pW = this;
@@ -4992,7 +4992,7 @@ void MenuFloatingWindow::StateChanged( StateChangedType nType )
if ( ( nType == STATE_CHANGE_CONTROLFOREGROUND ) || ( nType == STATE_CHANGE_CONTROLBACKGROUND ) )
{
- ImplInitMenuWindow( this, FALSE, FALSE );
+ ImplInitMenuWindow( this, sal_False, sal_False );
Invalidate();
}
}
@@ -5006,7 +5006,7 @@ void MenuFloatingWindow::DataChanged( const DataChangedEvent& rDCEvt )
((rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE)) )
{
- ImplInitMenuWindow( this, FALSE, FALSE );
+ ImplInitMenuWindow( this, sal_False, sal_False );
Invalidate();
}
}
@@ -5046,10 +5046,10 @@ MenuBarWindow::MenuBarWindow( Window* pParent ) :
pActivePopup = NULL;
nSaveFocusId = 0;
nHighlightedItem = ITEMPOS_INVALID;
- mbAutoPopup = TRUE;
+ mbAutoPopup = sal_True;
nSaveFocusId = 0;
- bIgnoreFirstMove = TRUE;
- bStayActive = FALSE;
+ bIgnoreFirstMove = sal_True;
+ bStayActive = sal_False;
ResMgr* pResMgr = ImplGetResMgr();
@@ -5063,7 +5063,7 @@ MenuBarWindow::MenuBarWindow( Window* pParent ) :
aCloser.SetOutStyle( TOOLBOX_STYLE_FLAT );
aCloser.SetBackground();
- aCloser.SetPaintTransparent( TRUE );
+ aCloser.SetPaintTransparent( sal_True );
aCloser.SetParentClipMode( PARENTCLIPMODE_NOCLIP );
aCloser.InsertItem( IID_DOCUMENTCLOSE,
@@ -5097,7 +5097,7 @@ void MenuBarWindow::SetMenu( MenuBar* pMen )
pMenu = pMen;
KillActivePopup();
nHighlightedItem = ITEMPOS_INVALID;
- ImplInitMenuWindow( this, TRUE, TRUE );
+ ImplInitMenuWindow( this, sal_True, sal_True );
if ( pMen )
{
aCloser.ShowItem( IID_DOCUMENTCLOSE, pMen->HasCloser() );
@@ -5117,7 +5117,7 @@ void MenuBarWindow::SetMenu( MenuBar* pMen )
}
}
-void MenuBarWindow::ShowButtons( BOOL bClose, BOOL bFloat, BOOL bHide )
+void MenuBarWindow::ShowButtons( sal_Bool bClose, sal_Bool bFloat, sal_Bool bHide )
{
aCloser.ShowItem( IID_DOCUMENTCLOSE, bClose );
aCloser.Show( bClose || ! m_aAddButtons.empty() );
@@ -5145,7 +5145,7 @@ IMPL_LINK( MenuBarWindow, CloserHdl, PushButton*, EMPTYARG )
}
else
{
- std::map<USHORT,AddButtonEntry>::iterator it = m_aAddButtons.find( aCloser.GetCurItemId() );
+ std::map<sal_uInt16,AddButtonEntry>::iterator it = m_aAddButtons.find( aCloser.GetCurItemId() );
if( it != m_aAddButtons.end() )
{
MenuBar::MenuBarButtonCallbackArg aArg;
@@ -5171,10 +5171,10 @@ IMPL_LINK( MenuBarWindow, ToolboxEventHdl, VclWindowEvent*, pEvent )
aArg.nId = aCloser.GetHighlightItemId();
else if( pEvent->GetId() == VCLEVENT_TOOLBOX_HIGHLIGHTOFF )
{
- USHORT nPos = static_cast< USHORT >(reinterpret_cast<sal_IntPtr>(pEvent->GetData()));
+ sal_uInt16 nPos = static_cast< sal_uInt16 >(reinterpret_cast<sal_IntPtr>(pEvent->GetData()));
aArg.nId = aCloser.GetItemId( nPos );
}
- std::map< USHORT, AddButtonEntry >::iterator it = m_aAddButtons.find( aArg.nId );
+ std::map< sal_uInt16, AddButtonEntry >::iterator it = m_aAddButtons.find( aArg.nId );
if( it != m_aAddButtons.end() )
{
it->second.m_aHighlightLink.Call( &aArg );
@@ -5204,12 +5204,12 @@ IMPL_LINK( MenuBarWindow, HideHdl, PushButton*, EMPTYARG )
return pMenu ? ((MenuBar*)pMenu)->GetHideButtonClickHdl().Call( pMenu ) : 0;
}
-void MenuBarWindow::ImplCreatePopup( BOOL bPreSelectFirst )
+void MenuBarWindow::ImplCreatePopup( sal_Bool bPreSelectFirst )
{
MenuItemData* pItemData = pMenu ? pMenu->GetItemList()->GetDataFromPos( nHighlightedItem ) : NULL;
if ( pItemData )
{
- bIgnoreFirstMove = TRUE;
+ bIgnoreFirstMove = sal_True;
if ( pActivePopup && ( pActivePopup != pItemData->pSubMenu ) )
{
KillActivePopup();
@@ -5219,7 +5219,7 @@ void MenuBarWindow::ImplCreatePopup( BOOL bPreSelectFirst )
pActivePopup = (PopupMenu*)pItemData->pSubMenu;
long nX = 0;
MenuItemData* pData = 0;
- for ( ULONG n = 0; n < nHighlightedItem; n++ )
+ for ( sal_uIntPtr n = 0; n < nHighlightedItem; n++ )
{
pData = pMenu->GetItemList()->GetDataFromPos( n );
nX += pData->aSz.Width();
@@ -5266,11 +5266,11 @@ void MenuBarWindow::KillActivePopup()
return; // kill it later
if ( pActivePopup->bInCallback )
- pActivePopup->bCanceled = TRUE;
+ pActivePopup->bCanceled = sal_True;
- pActivePopup->bInCallback = TRUE;
+ pActivePopup->bInCallback = sal_True;
pActivePopup->Deactivate();
- pActivePopup->bInCallback = FALSE;
+ pActivePopup->bInCallback = sal_False;
// Abfrage auf pActivePopup, falls im Deactivate abgeschossen...
if ( pActivePopup && pActivePopup->ImplGetWindow() )
{
@@ -5288,22 +5288,22 @@ void MenuBarWindow::PopupClosed( Menu* pPopup )
if ( pPopup == pActivePopup )
{
KillActivePopup();
- ChangeHighlightItem( ITEMPOS_INVALID, FALSE, ImplGetFrameWindow()->ImplGetFrameData()->mbHasFocus, FALSE );
+ ChangeHighlightItem( ITEMPOS_INVALID, sal_False, ImplGetFrameWindow()->ImplGetFrameData()->mbHasFocus, sal_False );
}
}
void MenuBarWindow::MouseButtonDown( const MouseEvent& rMEvt )
{
- mbAutoPopup = TRUE;
- USHORT nEntry = ImplFindEntry( rMEvt.GetPosPixel() );
+ mbAutoPopup = sal_True;
+ sal_uInt16 nEntry = ImplFindEntry( rMEvt.GetPosPixel() );
if ( ( nEntry != ITEMPOS_INVALID ) && ( nEntry != nHighlightedItem ) )
{
- ChangeHighlightItem( nEntry, FALSE );
+ ChangeHighlightItem( nEntry, sal_False );
}
else
{
KillActivePopup();
- ChangeHighlightItem( ITEMPOS_INVALID, FALSE );
+ ChangeHighlightItem( ITEMPOS_INVALID, sal_False );
}
}
@@ -5319,20 +5319,20 @@ void MenuBarWindow::MouseMove( const MouseEvent& rMEvt )
if( bIgnoreFirstMove )
{
- bIgnoreFirstMove = FALSE;
+ bIgnoreFirstMove = sal_False;
return;
}
- USHORT nEntry = ImplFindEntry( rMEvt.GetPosPixel() );
+ sal_uInt16 nEntry = ImplFindEntry( rMEvt.GetPosPixel() );
if ( ( nEntry != ITEMPOS_INVALID )
#ifdef OS2
&& ( ImplHilite(rMEvt) )
#endif
&& ( nEntry != nHighlightedItem ) )
- ChangeHighlightItem( nEntry, FALSE );
+ ChangeHighlightItem( nEntry, sal_False );
}
-void MenuBarWindow::ChangeHighlightItem( USHORT n, BOOL bSelectEntry, BOOL bAllowRestoreFocus, BOOL bDefaultToDocument)
+void MenuBarWindow::ChangeHighlightItem( sal_uInt16 n, sal_Bool bSelectEntry, sal_Bool bAllowRestoreFocus, sal_Bool bDefaultToDocument)
{
if( ! pMenu )
return;
@@ -5343,21 +5343,21 @@ void MenuBarWindow::ChangeHighlightItem( USHORT n, BOOL bSelectEntry, BOOL bAllo
KillActivePopup(); // pActivePopup ggf. ohne pWin, wenn in Activate() Rescheduled wurde
// Activate am MenuBar immer nur einmal pro Vorgang...
- BOOL bJustActivated = FALSE;
+ sal_Bool bJustActivated = sal_False;
if ( ( nHighlightedItem == ITEMPOS_INVALID ) && ( n != ITEMPOS_INVALID ) )
{
- ImplGetSVData()->maWinData.mbNoDeactivate = TRUE;
+ ImplGetSVData()->maWinData.mbNoDeactivate = sal_True;
if( !bStayActive )
{
// #105406# avoid saving the focus when we already have the focus
- BOOL bNoSaveFocus = (this == ImplGetSVData()->maWinData.mpFocusWin );
+ sal_Bool bNoSaveFocus = (this == ImplGetSVData()->maWinData.mpFocusWin );
if( nSaveFocusId )
{
if( !ImplGetSVData()->maWinData.mbNoSaveFocus )
{
// we didn't clean up last time
- Window::EndSaveFocus( nSaveFocusId, FALSE ); // clean up
+ Window::EndSaveFocus( nSaveFocusId, sal_False ); // clean up
nSaveFocusId = 0;
if( !bNoSaveFocus )
nSaveFocusId = Window::SaveFocus(); // only save focus when initially activated
@@ -5373,21 +5373,21 @@ void MenuBarWindow::ChangeHighlightItem( USHORT n, BOOL bSelectEntry, BOOL bAllo
}
}
else
- bStayActive = FALSE;
- pMenu->bInCallback = TRUE; // hier schon setzen, falls Activate ueberladen
+ bStayActive = sal_False;
+ pMenu->bInCallback = sal_True; // hier schon setzen, falls Activate ueberladen
pMenu->Activate();
- pMenu->bInCallback = FALSE;
- bJustActivated = TRUE;
+ pMenu->bInCallback = sal_False;
+ bJustActivated = sal_True;
}
else if ( ( nHighlightedItem != ITEMPOS_INVALID ) && ( n == ITEMPOS_INVALID ) )
{
- pMenu->bInCallback = TRUE;
+ pMenu->bInCallback = sal_True;
pMenu->Deactivate();
- pMenu->bInCallback = FALSE;
- ImplGetSVData()->maWinData.mbNoDeactivate = FALSE;
+ pMenu->bInCallback = sal_False;
+ ImplGetSVData()->maWinData.mbNoDeactivate = sal_False;
if( !ImplGetSVData()->maWinData.mbNoSaveFocus )
{
- ULONG nTempFocusId = nSaveFocusId;
+ sal_uIntPtr nTempFocusId = nSaveFocusId;
nSaveFocusId = 0;
Window::EndSaveFocus( nTempFocusId, bAllowRestoreFocus );
// #105406# restore focus to document if we could not save focus before
@@ -5398,13 +5398,13 @@ void MenuBarWindow::ChangeHighlightItem( USHORT n, BOOL bSelectEntry, BOOL bAllo
if ( nHighlightedItem != ITEMPOS_INVALID )
{
- HighlightItem( nHighlightedItem, FALSE );
+ HighlightItem( nHighlightedItem, sal_False );
pMenu->ImplCallEventListeners( VCLEVENT_MENU_DEHIGHLIGHT, nHighlightedItem );
}
- nHighlightedItem = (USHORT)n;
+ nHighlightedItem = (sal_uInt16)n;
DBG_ASSERT( ( nHighlightedItem == ITEMPOS_INVALID ) || pMenu->ImplIsVisible( nHighlightedItem ), "ChangeHighlightItem: Not visible!" );
- HighlightItem( nHighlightedItem, TRUE );
+ HighlightItem( nHighlightedItem, sal_True );
pMenu->ImplCallHighlight( nHighlightedItem );
if( mbAutoPopup )
@@ -5415,14 +5415,14 @@ void MenuBarWindow::ChangeHighlightItem( USHORT n, BOOL bSelectEntry, BOOL bAllo
GrabFocus();
}
-void MenuBarWindow::HighlightItem( USHORT nPos, BOOL bHighlight )
+void MenuBarWindow::HighlightItem( sal_uInt16 nPos, sal_Bool bHighlight )
{
if( ! pMenu )
return;
long nX = 0;
- ULONG nCount = pMenu->pItemList->Count();
- for ( ULONG n = 0; n < nCount; n++ )
+ sal_uIntPtr nCount = pMenu->pItemList->Count();
+ for ( sal_uIntPtr n = 0; n < nCount; n++ )
{
MenuItemData* pData = pMenu->pItemList->GetDataFromPos( n );
if ( n == nPos )
@@ -5498,14 +5498,14 @@ void MenuBarWindow::HighlightItem( USHORT nPos, BOOL bHighlight )
}
}
-Rectangle MenuBarWindow::ImplGetItemRect( USHORT nPos )
+Rectangle MenuBarWindow::ImplGetItemRect( sal_uInt16 nPos )
{
Rectangle aRect;
if( pMenu )
{
long nX = 0;
- ULONG nCount = pMenu->pItemList->Count();
- for ( ULONG n = 0; n < nCount; n++ )
+ sal_uIntPtr nCount = pMenu->pItemList->Count();
+ for ( sal_uIntPtr n = 0; n < nCount; n++ )
{
MenuItemData* pData = pMenu->pItemList->GetDataFromPos( n );
if ( n == nPos )
@@ -5528,16 +5528,16 @@ void MenuBarWindow::KeyInput( const KeyEvent& rKEvent )
Window::KeyInput( rKEvent );
}
-BOOL MenuBarWindow::ImplHandleKeyEvent( const KeyEvent& rKEvent, BOOL bFromMenu )
+sal_Bool MenuBarWindow::ImplHandleKeyEvent( const KeyEvent& rKEvent, sal_Bool bFromMenu )
{
if( ! pMenu )
- return FALSE;
+ return sal_False;
if ( pMenu->bInCallback )
- return TRUE; // schlucken
+ return sal_True; // schlucken
- BOOL bDone = FALSE;
- USHORT nCode = rKEvent.GetKeyCode().GetCode();
+ sal_Bool bDone = sal_False;
+ sal_uInt16 nCode = rKEvent.GetKeyCode().GetCode();
if( GetParent() )
{
@@ -5546,7 +5546,7 @@ BOOL MenuBarWindow::ImplHandleKeyEvent( const KeyEvent& rKEvent, BOOL bFromMenu
SystemWindow *pSysWin = (SystemWindow*)GetParent()->GetWindow( WINDOW_CLIENT );
if( pSysWin->GetTaskPaneList() )
if( pSysWin->GetTaskPaneList()->HandleKeyEvent( rKEvent ) )
- return TRUE;
+ return sal_True;
}
}
@@ -5555,22 +5555,22 @@ BOOL MenuBarWindow::ImplHandleKeyEvent( const KeyEvent& rKEvent, BOOL bFromMenu
mbAutoPopup = ImplGetSVData()->maNWFData.mbOpenMenuOnF10;
if ( nHighlightedItem == ITEMPOS_INVALID )
{
- ChangeHighlightItem( 0, FALSE );
+ ChangeHighlightItem( 0, sal_False );
GrabFocus();
}
else
{
- ChangeHighlightItem( ITEMPOS_INVALID, FALSE );
+ ChangeHighlightItem( ITEMPOS_INVALID, sal_False );
nSaveFocusId = 0;
}
- bDone = TRUE;
+ bDone = sal_True;
}
else if ( bFromMenu )
{
if ( ( nCode == KEY_LEFT ) || ( nCode == KEY_RIGHT ) ||
( nCode == KEY_HOME ) || ( nCode == KEY_END ) )
{
- USHORT n = nHighlightedItem;
+ sal_uInt16 n = nHighlightedItem;
if ( n == ITEMPOS_INVALID )
{
if ( nCode == KEY_LEFT)
@@ -5590,10 +5590,10 @@ BOOL MenuBarWindow::ImplHandleKeyEvent( const KeyEvent& rKEvent, BOOL bFromMenu
bWasHighlight = (pSubWindow->GetHighlightedItem() != ITEMPOS_INVALID);
}
- USHORT nLoop = n;
+ sal_uInt16 nLoop = n;
if( nCode == KEY_HOME )
- { n = (USHORT)-1; nLoop = n+1; }
+ { n = (sal_uInt16)-1; nLoop = n+1; }
if( nCode == KEY_END )
{ n = pMenu->GetItemCount(); nLoop = n-1; }
@@ -5616,14 +5616,14 @@ BOOL MenuBarWindow::ImplHandleKeyEvent( const KeyEvent& rKEvent, BOOL bFromMenu
MenuItemData* pData = (MenuItemData*)pMenu->GetItemList()->GetDataFromPos( n );
if ( ( pData->eType != MENUITEM_SEPARATOR ) && pMenu->ImplIsVisible( n ) )
{
- BOOL bDoSelect = TRUE;
+ sal_Bool bDoSelect = sal_True;
if( ImplGetSVData()->maNWFData.mbOpenMenuOnF10 )
bDoSelect = bWasHighlight;
ChangeHighlightItem( n, bDoSelect );
break;
}
} while ( n != nLoop );
- bDone = TRUE;
+ bDone = sal_True;
}
else if ( nCode == KEY_RETURN )
{
@@ -5631,36 +5631,36 @@ BOOL MenuBarWindow::ImplHandleKeyEvent( const KeyEvent& rKEvent, BOOL bFromMenu
else
if ( !mbAutoPopup )
{
- ImplCreatePopup( TRUE );
- mbAutoPopup = TRUE;
+ ImplCreatePopup( sal_True );
+ mbAutoPopup = sal_True;
}
- bDone = TRUE;
+ bDone = sal_True;
}
else if ( ( nCode == KEY_UP ) || ( nCode == KEY_DOWN ) )
{
if ( !mbAutoPopup )
{
- ImplCreatePopup( TRUE );
- mbAutoPopup = TRUE;
+ ImplCreatePopup( sal_True );
+ mbAutoPopup = sal_True;
}
- bDone = TRUE;
+ bDone = sal_True;
}
else if ( nCode == KEY_ESCAPE || ( nCode == KEY_F6 && rKEvent.GetKeyCode().IsMod1() ) )
{
if( pActivePopup )
{
// bring focus to menu bar without any open popup
- mbAutoPopup = FALSE;
- USHORT n = nHighlightedItem;
+ mbAutoPopup = sal_False;
+ sal_uInt16 n = nHighlightedItem;
nHighlightedItem = ITEMPOS_INVALID;
- bStayActive = TRUE;
- ChangeHighlightItem( n, FALSE );
- bStayActive = FALSE;
+ bStayActive = sal_True;
+ ChangeHighlightItem( n, sal_False );
+ bStayActive = sal_False;
KillActivePopup();
GrabFocus();
}
else
- ChangeHighlightItem( ITEMPOS_INVALID, FALSE );
+ ChangeHighlightItem( ITEMPOS_INVALID, sal_False );
if( nCode == KEY_F6 && rKEvent.GetKeyCode().IsMod1() )
{
@@ -5668,7 +5668,7 @@ BOOL MenuBarWindow::ImplHandleKeyEvent( const KeyEvent& rKEvent, BOOL bFromMenu
GrabFocusToDocument();
}
- bDone = TRUE;
+ bDone = sal_True;
}
}
@@ -5677,19 +5677,19 @@ BOOL MenuBarWindow::ImplHandleKeyEvent( const KeyEvent& rKEvent, BOOL bFromMenu
xub_Unicode nCharCode = rKEvent.GetCharCode();
if ( nCharCode )
{
- USHORT nEntry, nDuplicates;
+ sal_uInt16 nEntry, nDuplicates;
MenuItemData* pData = pMenu->GetItemList()->SearchItem( nCharCode, rKEvent.GetKeyCode(), nEntry, nDuplicates, nHighlightedItem );
if ( pData && (nEntry != ITEMPOS_INVALID) )
{
- mbAutoPopup = TRUE;
- ChangeHighlightItem( nEntry, TRUE );
- bDone = TRUE;
+ mbAutoPopup = sal_True;
+ ChangeHighlightItem( nEntry, sal_True );
+ bDone = sal_True;
}
else
{
// Wegen Systemmenu und anderen System-HotKeys, nur
// eigenstaendige Character-Kombinationen auswerten
- USHORT nKeyCode = rKEvent.GetKeyCode().GetCode();
+ sal_uInt16 nKeyCode = rKEvent.GetKeyCode().GetCode();
if ( ((nKeyCode >= KEY_A) && (nKeyCode <= KEY_Z)) )
Sound::Beep();
}
@@ -5726,7 +5726,7 @@ void MenuBarWindow::Paint( const Rectangle& )
SetFillColor( GetSettings().GetStyleSettings().GetMenuColor() );
pMenu->ImplPaint( this, 0 );
if ( nHighlightedItem != ITEMPOS_INVALID )
- HighlightItem( nHighlightedItem, TRUE );
+ HighlightItem( nHighlightedItem, sal_True );
// in high contrast mode draw a separating line on the lower edge
if( ! IsNativeControlSupported( CTRL_MENUBAR, PART_ENTIRE_CONTROL) &&
@@ -5778,20 +5778,20 @@ void MenuBarWindow::Resize()
Invalidate();
}
-USHORT MenuBarWindow::ImplFindEntry( const Point& rMousePos ) const
+sal_uInt16 MenuBarWindow::ImplFindEntry( const Point& rMousePos ) const
{
if( pMenu )
{
long nX = 0;
- USHORT nCount = (USHORT)pMenu->pItemList->Count();
- for ( USHORT n = 0; n < nCount; n++ )
+ sal_uInt16 nCount = (sal_uInt16)pMenu->pItemList->Count();
+ for ( sal_uInt16 n = 0; n < nCount; n++ )
{
MenuItemData* pData = pMenu->pItemList->GetDataFromPos( n );
if ( pMenu->ImplIsVisible( n ) )
{
nX += pData->aSz.Width();
if ( nX > rMousePos.X() )
- return (USHORT)n;
+ return (sal_uInt16)n;
}
}
}
@@ -5800,9 +5800,9 @@ USHORT MenuBarWindow::ImplFindEntry( const Point& rMousePos ) const
void MenuBarWindow::RequestHelp( const HelpEvent& rHEvt )
{
- USHORT nId = nHighlightedItem;
+ sal_uInt16 nId = nHighlightedItem;
if ( rHEvt.GetMode() & (HELPMODE_CONTEXT | HELPMODE_EXTENDED) )
- ChangeHighlightItem( ITEMPOS_INVALID, TRUE );
+ ChangeHighlightItem( ITEMPOS_INVALID, sal_True );
Rectangle aHighlightRect( ImplGetItemRect( nHighlightedItem ) );
if( !ImplHandleHelpEvent( this, pMenu, nId, rHEvt, aHighlightRect ) )
@@ -5816,7 +5816,7 @@ void MenuBarWindow::StateChanged( StateChangedType nType )
if ( ( nType == STATE_CHANGE_CONTROLFOREGROUND ) ||
( nType == STATE_CHANGE_CONTROLBACKGROUND ) )
{
- ImplInitMenuWindow( this, FALSE, TRUE );
+ ImplInitMenuWindow( this, sal_False, sal_True );
Invalidate();
}
else if( pMenu )
@@ -5828,7 +5828,7 @@ void MenuBarWindow::ImplLayoutChanged()
{
if( pMenu )
{
- ImplInitMenuWindow( this, TRUE, TRUE );
+ ImplInitMenuWindow( this, sal_True, sal_True );
// Falls sich der Font geaendert hat.
long nHeight = pMenu->ImplCalcSize( this ).Height();
@@ -5880,16 +5880,16 @@ void MenuBarWindow::DataChanged( const DataChangedEvent& rDCEvt )
void MenuBarWindow::LoseFocus()
{
- if ( !HasChildPathFocus( TRUE ) )
- ChangeHighlightItem( ITEMPOS_INVALID, FALSE, FALSE );
+ if ( !HasChildPathFocus( sal_True ) )
+ ChangeHighlightItem( ITEMPOS_INVALID, sal_False, sal_False );
}
void MenuBarWindow::GetFocus()
{
if ( nHighlightedItem == ITEMPOS_INVALID )
{
- mbAutoPopup = FALSE; // do not open menu when activated by focus handling like taskpane cycling
- ChangeHighlightItem( 0, FALSE );
+ mbAutoPopup = sal_False; // do not open menu when activated by focus handling like taskpane cycling
+ ChangeHighlightItem( 0, sal_False );
}
}
@@ -5903,13 +5903,13 @@ void MenuBarWindow::GetFocus()
return xAcc;
}
-USHORT MenuBarWindow::AddMenuBarButton( const Image& i_rImage, const Link& i_rLink, const String& i_rToolTip, USHORT i_nPos )
+sal_uInt16 MenuBarWindow::AddMenuBarButton( const Image& i_rImage, const Link& i_rLink, const String& i_rToolTip, sal_uInt16 i_nPos )
{
// find first free button id
- USHORT nId = IID_DOCUMENTCLOSE;
- std::map< USHORT, AddButtonEntry >::const_iterator it;
+ sal_uInt16 nId = IID_DOCUMENTCLOSE;
+ std::map< sal_uInt16, AddButtonEntry >::const_iterator it;
if( i_nPos > m_aAddButtons.size() )
- i_nPos = static_cast<USHORT>(m_aAddButtons.size());
+ i_nPos = static_cast<sal_uInt16>(m_aAddButtons.size());
do
{
nId++;
@@ -5932,14 +5932,14 @@ USHORT MenuBarWindow::AddMenuBarButton( const Image& i_rImage, const Link& i_rLi
return nId;
}
-void MenuBarWindow::SetMenuBarButtonHighlightHdl( USHORT nId, const Link& rLink )
+void MenuBarWindow::SetMenuBarButtonHighlightHdl( sal_uInt16 nId, const Link& rLink )
{
- std::map< USHORT, AddButtonEntry >::iterator it = m_aAddButtons.find( nId );
+ std::map< sal_uInt16, AddButtonEntry >::iterator it = m_aAddButtons.find( nId );
if( it != m_aAddButtons.end() )
it->second.m_aHighlightLink = rLink;
}
-Rectangle MenuBarWindow::GetMenuBarButtonRectPixel( USHORT nId )
+Rectangle MenuBarWindow::GetMenuBarButtonRectPixel( sal_uInt16 nId )
{
Rectangle aRect;
if( m_aAddButtons.find( nId ) != m_aAddButtons.end() )
@@ -5964,9 +5964,9 @@ Rectangle MenuBarWindow::GetMenuBarButtonRectPixel( USHORT nId )
return aRect;
}
-void MenuBarWindow::RemoveMenuBarButton( USHORT nId )
+void MenuBarWindow::RemoveMenuBarButton( sal_uInt16 nId )
{
- USHORT nPos = aCloser.GetItemPos( nId );
+ sal_uInt16 nPos = aCloser.GetItemPos( nId );
aCloser.RemoveItem( nPos );
m_aAddButtons.erase( nId );
aCloser.calcMinSize();
@@ -5976,9 +5976,9 @@ void MenuBarWindow::RemoveMenuBarButton( USHORT nId )
pMenu->mpSalMenu->RemoveMenuBarButton( nId );
}
-bool MenuBarWindow::HandleMenuButtonEvent( USHORT i_nButtonId )
+bool MenuBarWindow::HandleMenuButtonEvent( sal_uInt16 i_nButtonId )
{
- std::map< USHORT, AddButtonEntry >::iterator it = m_aAddButtons.find( i_nButtonId );
+ std::map< sal_uInt16, AddButtonEntry >::iterator it = m_aAddButtons.find( i_nButtonId );
if( it != m_aAddButtons.end() )
{
MenuBar::MenuBarButtonCallbackArg aArg;
@@ -5987,5 +5987,5 @@ bool MenuBarWindow::HandleMenuButtonEvent( USHORT i_nButtonId )
aArg.pMenuBar = dynamic_cast<MenuBar*>(pMenu);
return it->second.m_aSelectLink.Call( &aArg );
}
- return FALSE;
+ return sal_False;
}
diff --git a/vcl/source/window/mnemonic.cxx b/vcl/source/window/mnemonic.cxx
index c2c6c18135f2..c6d6afa4a2d2 100644
--- a/vcl/source/window/mnemonic.cxx
+++ b/vcl/source/window/mnemonic.cxx
@@ -48,9 +48,9 @@ MnemonicGenerator::MnemonicGenerator()
// -----------------------------------------------------------------------
-USHORT MnemonicGenerator::ImplGetMnemonicIndex( sal_Unicode c )
+sal_uInt16 MnemonicGenerator::ImplGetMnemonicIndex( sal_Unicode c )
{
- static USHORT const aImplMnemonicRangeTab[MNEMONIC_RANGES*2] =
+ static sal_uInt16 const aImplMnemonicRangeTab[MNEMONIC_RANGES*2] =
{
MNEMONIC_RANGE_1_START, MNEMONIC_RANGE_1_END,
MNEMONIC_RANGE_2_START, MNEMONIC_RANGE_2_END,
@@ -58,8 +58,8 @@ USHORT MnemonicGenerator::ImplGetMnemonicIndex( sal_Unicode c )
MNEMONIC_RANGE_4_START, MNEMONIC_RANGE_4_END
};
- USHORT nMnemonicIndex = 0;
- for ( USHORT i = 0; i < MNEMONIC_RANGES; i++ )
+ sal_uInt16 nMnemonicIndex = 0;
+ for ( sal_uInt16 i = 0; i < MNEMONIC_RANGES; i++ )
{
if ( (c >= aImplMnemonicRangeTab[i*2]) &&
(c <= aImplMnemonicRangeTab[i*2+1]) )
@@ -106,7 +106,7 @@ void MnemonicGenerator::RegisterMnemonic( const XubString& rKey )
sal_Unicode cMnemonic = ImplFindMnemonic( aKey );
if ( cMnemonic )
{
- USHORT nMnemonicIndex = ImplGetMnemonicIndex( cMnemonic );
+ sal_uInt16 nMnemonicIndex = ImplGetMnemonicIndex( cMnemonic );
if ( nMnemonicIndex != MNEMONIC_INDEX_NOTFOUND )
maMnemonics[nMnemonicIndex] = 0;
}
@@ -118,7 +118,7 @@ void MnemonicGenerator::RegisterMnemonic( const XubString& rKey )
{
sal_Unicode c = aKey.GetChar( nIndex );
- USHORT nMnemonicIndex = ImplGetMnemonicIndex( c );
+ sal_uInt16 nMnemonicIndex = ImplGetMnemonicIndex( c );
if ( nMnemonicIndex != MNEMONIC_INDEX_NOTFOUND )
{
if ( maMnemonics[nMnemonicIndex] && (maMnemonics[nMnemonicIndex] < 0xFF) )
@@ -132,24 +132,24 @@ void MnemonicGenerator::RegisterMnemonic( const XubString& rKey )
// -----------------------------------------------------------------------
-BOOL MnemonicGenerator::CreateMnemonic( XubString& rKey )
+sal_Bool MnemonicGenerator::CreateMnemonic( XubString& rKey )
{
if ( !rKey.Len() || ImplFindMnemonic( rKey ) )
- return FALSE;
+ return sal_False;
const ::com::sun::star::lang::Locale& rLocale = Application::GetSettings().GetUILocale();
uno::Reference < i18n::XCharacterClassification > xCharClass = GetCharClass();
// Don't crash even when we don't have access to i18n service
if ( !xCharClass.is() )
- return FALSE;
+ return sal_False;
XubString aKey = xCharClass->toUpper( rKey, 0, rKey.Len(), rLocale );
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = sal_False;
xub_StrLen nLen = aKey.Len();
- BOOL bCJK = FALSE;
+ sal_Bool bCJK = sal_False;
switch( Application::GetSettings().GetUILanguage() )
{
case LANGUAGE_JAPANESE:
@@ -160,7 +160,7 @@ BOOL MnemonicGenerator::CreateMnemonic( XubString& rKey )
case LANGUAGE_CHINESE_MACAU:
case LANGUAGE_KOREAN:
case LANGUAGE_KOREAN_JOHAB:
- bCJK = TRUE;
+ bCJK = sal_True;
break;
default:
break;
@@ -172,8 +172,8 @@ BOOL MnemonicGenerator::CreateMnemonic( XubString& rKey )
// #110720#, avoid CJK-style mnemonics for latin-only strings that do not contain useful mnemonic chars
if( bCJK )
{
- BOOL bLatinOnly = TRUE;
- BOOL bMnemonicIndexFound = FALSE;
+ sal_Bool bLatinOnly = sal_True;
+ sal_Bool bMnemonicIndexFound = sal_False;
sal_Unicode c;
xub_StrLen nIndex;
@@ -183,19 +183,19 @@ BOOL MnemonicGenerator::CreateMnemonic( XubString& rKey )
if ( ((c >= 0x3000) && (c <= 0xD7FF)) || // cjk
((c >= 0xFF61) && (c <= 0xFFDC)) ) // halfwidth forms
{
- bLatinOnly = FALSE;
+ bLatinOnly = sal_False;
break;
}
if( ImplGetMnemonicIndex( c ) != MNEMONIC_INDEX_NOTFOUND )
- bMnemonicIndexFound = TRUE;
+ bMnemonicIndexFound = sal_True;
}
if( bLatinOnly && !bMnemonicIndexFound )
- return FALSE;
+ return sal_False;
}
int nCJK = 0;
- USHORT nMnemonicIndex;
+ sal_uInt16 nMnemonicIndex;
sal_Unicode c;
xub_StrLen nIndex = 0;
if( !bCJK )
@@ -225,7 +225,7 @@ BOOL MnemonicGenerator::CreateMnemonic( XubString& rKey )
{
maMnemonics[nMnemonicIndex] = 0;
rKey.Insert( MNEMONIC_CHAR, nIndex );
- bChanged = TRUE;
+ bChanged = sal_True;
break;
}
}
@@ -246,8 +246,8 @@ BOOL MnemonicGenerator::CreateMnemonic( XubString& rKey )
// 2) search for a unique/uncommon character
if ( !bChanged )
{
- USHORT nBestCount = 0xFFFF;
- USHORT nBestMnemonicIndex = 0;
+ sal_uInt16 nBestCount = 0xFFFF;
+ sal_uInt16 nBestMnemonicIndex = 0;
xub_StrLen nBestIndex = 0;
nIndex = 0;
do
@@ -277,7 +277,7 @@ BOOL MnemonicGenerator::CreateMnemonic( XubString& rKey )
{
maMnemonics[nBestMnemonicIndex] = 0;
rKey.Insert( MNEMONIC_CHAR, nBestIndex );
- bChanged = TRUE;
+ bChanged = sal_True;
}
}
}
@@ -325,7 +325,7 @@ BOOL MnemonicGenerator::CreateMnemonic( XubString& rKey )
nIndex--;
}
rKey.Insert( aStr, nIndex );
- bChanged = TRUE;
+ bChanged = sal_True;
break;
}
}
@@ -350,7 +350,7 @@ BOOL MnemonicGenerator::CreateMnemonic( XubString& rKey )
// {
// maMnemonics[nMnemonicIndex] = 0;
// rKey.Insert( MNEMONIC_CHAR, nIndex );
-// bChanged = TRUE;
+// bChanged = sal_True;
// break;
// }
//
diff --git a/vcl/source/window/mnemonicengine.cxx b/vcl/source/window/mnemonicengine.cxx
index 241aea1cf336..f277ee0c1265 100644
--- a/vcl/source/window/mnemonicengine.cxx
+++ b/vcl/source/window/mnemonicengine.cxx
@@ -102,7 +102,7 @@ namespace vcl
//--------------------------------------------------------------------
bool MnemonicEngine::HandleKeyEvent( const KeyEvent& _rKEvt )
{
- BOOL bAccelKey = _rKEvt.GetKeyCode().IsMod2();
+ sal_Bool bAccelKey = _rKEvt.GetKeyCode().IsMod2();
if ( !bAccelKey )
return false;
diff --git a/vcl/source/window/mouseevent.cxx b/vcl/source/window/mouseevent.cxx
index 4bfe08b3f3d8..afb0b5f68a07 100644
--- a/vcl/source/window/mouseevent.cxx
+++ b/vcl/source/window/mouseevent.cxx
@@ -38,7 +38,7 @@
MouseEvent::MouseEvent( const ::com::sun::star::awt::MouseEvent& rEvent )
: maPos( rEvent.X, rEvent.Y )
, mnMode( 0 )
-, mnClicks( static_cast< USHORT >( rEvent.ClickCount ) )
+, mnClicks( static_cast< sal_uInt16 >( rEvent.ClickCount ) )
, mnCode( 0 )
{
if( rEvent.Modifiers )
diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx
index 7f7a65cd7fb9..487476e97fc2 100644
--- a/vcl/source/window/msgbox.cxx
+++ b/vcl/source/window/msgbox.cxx
@@ -76,10 +76,10 @@ void MessBox::ImplInitMessBoxData()
mpFixedText = NULL;
mpFixedImage = NULL;
mnSoundType = 0;
- mbHelpBtn = FALSE;
- mbSound = TRUE;
+ mbHelpBtn = sal_False;
+ mbSound = sal_True;
mpCheckBox = NULL;
- mbCheck = FALSE;
+ mbCheck = sal_False;
}
// -----------------------------------------------------------------------
@@ -87,11 +87,11 @@ void MessBox::ImplInitMessBoxData()
void MessBox::ImplInitButtons()
{
WinBits nStyle = GetStyle();
- USHORT nOKFlags = BUTTONDIALOG_OKBUTTON;
- USHORT nCancelFlags = BUTTONDIALOG_CANCELBUTTON;
- USHORT nRetryFlags = 0;
- USHORT nYesFlags = 0;
- USHORT nNoFlags = 0;
+ sal_uInt16 nOKFlags = BUTTONDIALOG_OKBUTTON;
+ sal_uInt16 nCancelFlags = BUTTONDIALOG_CANCELBUTTON;
+ sal_uInt16 nRetryFlags = 0;
+ sal_uInt16 nYesFlags = 0;
+ sal_uInt16 nNoFlags = 0;
if ( nStyle & WB_OK_CANCEL )
{
@@ -139,8 +139,8 @@ void MessBox::ImplInitButtons()
}
else if ( nStyle & WB_ABORT_RETRY_IGNORE )
{
- USHORT nAbortFlags = 0;
- USHORT nIgnoreFlags = 0;
+ sal_uInt16 nAbortFlags = 0;
+ sal_uInt16 nIgnoreFlags = 0;
if ( nStyle & WB_DEF_CANCEL )
nAbortFlags |= BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_FOCUSBUTTON;
@@ -192,16 +192,16 @@ MessBox::MessBox( Window* pParent, const ResId& rResId ) :
ImplInitMessBoxData();
GetRes( rResId.SetRT( RSC_MESSBOX ) );
- USHORT nHiButtons = ReadShortRes();
- USHORT nLoButtons = ReadShortRes();
- USHORT nHiDefButton = ReadShortRes();
- USHORT nLoDefButton = ReadShortRes();
- USHORT nHiHelpId = ReadShortRes();
- USHORT nLoHelpId = ReadShortRes();
- /* USHORT bSysModal = */ ReadShortRes();
- SetHelpId( ((ULONG)nHiHelpId << 16) + nLoHelpId );
- WinBits nBits = (((ULONG)nHiButtons << 16) + nLoButtons) |
- (((ULONG)nHiDefButton << 16) + nLoDefButton);
+ sal_uInt16 nHiButtons = ReadShortRes();
+ sal_uInt16 nLoButtons = ReadShortRes();
+ sal_uInt16 nHiDefButton = ReadShortRes();
+ sal_uInt16 nLoDefButton = ReadShortRes();
+ sal_uInt16 nHiHelpId = ReadShortRes();
+ sal_uInt16 nLoHelpId = ReadShortRes();
+ /* sal_uInt16 bSysModal = */ ReadShortRes();
+ SetHelpId( ((sal_uIntPtr)nHiHelpId << 16) + nLoHelpId );
+ WinBits nBits = (((sal_uIntPtr)nHiButtons << 16) + nLoButtons) |
+ (((sal_uIntPtr)nHiDefButton << 16) + nLoDefButton);
ImplInit( pParent, nBits | WB_MOVEABLE | WB_HORZ | WB_CENTER );
ImplLoadRes( rResId );
@@ -238,7 +238,7 @@ void MessBox::ImplPosControls()
if ( !mbHelpBtn )
{
AddButton( BUTTON_HELP, BUTTONID_HELP, BUTTONDIALOG_HELPBUTTON, 3 );
- mbHelpBtn = TRUE;
+ mbHelpBtn = sal_True;
}
}
else
@@ -246,7 +246,7 @@ void MessBox::ImplPosControls()
if ( mbHelpBtn )
{
RemoveButton( BUTTONID_HELP );
- mbHelpBtn = FALSE;
+ mbHelpBtn = sal_False;
}
}
@@ -264,7 +264,7 @@ void MessBox::ImplPosControls()
long nMaxLineWidth;
long nWidth;
WinBits nWinStyle = WB_LEFT | WB_WORDBREAK | WB_NOLABEL | WB_INFO;
- USHORT nTextStyle = TEXT_DRAW_MULTILINE | TEXT_DRAW_TOP | TEXT_DRAW_LEFT;
+ sal_uInt16 nTextStyle = TEXT_DRAW_MULTILINE | TEXT_DRAW_TOP | TEXT_DRAW_LEFT;
if ( mpFixedText )
delete mpFixedText;
@@ -283,7 +283,7 @@ void MessBox::ImplPosControls()
// Message-Text um Tabs bereinigen
XubString aTabStr( RTL_CONSTASCII_USTRINGPARAM( " " ) );
- USHORT nIndex = 0;
+ sal_uInt16 nIndex = 0;
while ( nIndex != STRING_NOTFOUND )
nIndex = aMessText.SearchAndReplace( '\t', aTabStr, nIndex );
@@ -444,14 +444,14 @@ void MessBox::StateChanged( StateChangedType nType )
// -----------------------------------------------------------------------
-BOOL MessBox::GetCheckBoxState() const
+sal_Bool MessBox::GetCheckBoxState() const
{
return mpCheckBox ? mpCheckBox->IsChecked() : mbCheck;
}
// -----------------------------------------------------------------------
-void MessBox::SetCheckBoxState( BOOL bCheck )
+void MessBox::SetCheckBoxState( sal_Bool bCheck )
{
if( mpCheckBox ) mpCheckBox->Check( bCheck );
mbCheck = bCheck;
@@ -468,15 +468,15 @@ void MessBox::SetDefaultCheckBoxText()
// -----------------------------------------------------------------------
-BOOL MessBox::SetModeImage( const Image& rImage, BmpColorMode eMode )
+sal_Bool MessBox::SetModeImage( const Image& rImage, BmpColorMode eMode )
{
if( eMode == BMP_COLOR_NORMAL )
SetImage( rImage );
else if( eMode == BMP_COLOR_HIGHCONTRAST )
maImageHC = rImage;
else
- return FALSE;
- return TRUE;
+ return sal_False;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -499,7 +499,7 @@ void InfoBox::ImplInitInfoBoxData()
SetImage( GetSettings().GetStyleSettings().GetHighContrastMode() ?
InfoBox::GetStandardImageHC() : InfoBox::GetStandardImage() );
- mnSoundType = ((USHORT)SOUND_INFO)+1;
+ mnSoundType = ((sal_uInt16)SOUND_INFO)+1;
}
// -----------------------------------------------------------------------
@@ -543,7 +543,7 @@ void WarningBox::ImplInitWarningBoxData()
SetText( Application::GetDisplayName() );
SetImage( WarningBox::GetStandardImage() );
- mnSoundType = ((USHORT)SOUND_WARNING)+1;
+ mnSoundType = ((sal_uInt16)SOUND_WARNING)+1;
}
// -----------------------------------------------------------------------
@@ -590,7 +590,7 @@ void ErrorBox::ImplInitErrorBoxData()
SetImage( GetSettings().GetStyleSettings().GetHighContrastMode() ?
ErrorBox::GetStandardImageHC() : ErrorBox::GetStandardImage() );
- mnSoundType = ((USHORT)SOUND_ERROR)+1;
+ mnSoundType = ((sal_uInt16)SOUND_ERROR)+1;
}
// -----------------------------------------------------------------------
@@ -636,7 +636,7 @@ void QueryBox::ImplInitQueryBoxData()
SetImage( GetSettings().GetStyleSettings().GetHighContrastMode() ?
QueryBox::GetStandardImageHC() : QueryBox::GetStandardImage() );
- mnSoundType = ((USHORT)SOUND_QUERY)+1;
+ mnSoundType = ((sal_uInt16)SOUND_QUERY)+1;
}
// -----------------------------------------------------------------------
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 35077b1cff0e..875dd7950780 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -70,7 +70,7 @@ PrintDialog::PrintPreviewWindow::PrintPreviewWindow( Window* i_pParent, const Re
, maPageVDev( *this )
, maToolTipString( String( VclResId( SV_PRINT_PRINTPREVIEW_TXT ) ) )
{
- SetPaintTransparent( TRUE );
+ SetPaintTransparent( sal_True );
SetBackground();
if( useHCColorReplacement() )
maPageVDev.SetBackground( GetSettings().GetStyleSettings().GetWindowColor() );
@@ -205,7 +205,7 @@ void PrintDialog::PrintPreviewWindow::Resize()
fZoom /= 2.0;
}
- maPageVDev.SetOutputSizePixel( aScaledSize, FALSE );
+ maPageVDev.SetOutputSizePixel( aScaledSize, sal_False );
}
void PrintDialog::PrintPreviewWindow::Paint( const Rectangle& )
@@ -311,7 +311,7 @@ void PrintDialog::PrintPreviewWindow::setPreview( const GDIMetaFile& i_rNewPrevi
maOrigSize = i_rOrigSize;
maReplacementString = i_rReplacement;
maPageVDev.SetReferenceDevice( i_nDPIX, i_nDPIY );
- maPageVDev.EnableOutput( TRUE );
+ maPageVDev.EnableOutput( sal_True );
Resize();
Invalidate();
}
@@ -409,13 +409,13 @@ PrintDialog::NUpTabPage::NUpTabPage( Window* i_pParent, const ResId& rResId )
FreeResource();
maNupOrderWin.Show();
- maPagesBtn.Check( TRUE );
- maBrochureBtn.Show( FALSE );
+ maPagesBtn.Check( sal_True );
+ maBrochureBtn.Show( sal_False );
// setup field units for metric fields
const LocaleDataWrapper& rLocWrap( maPageMarginEdt.GetLocaleDataWrapper() );
FieldUnit eUnit = FUNIT_MM;
- USHORT nDigits = 0;
+ sal_uInt16 nDigits = 0;
if( rLocWrap.getMeasurementSystemEnum() == MEASURE_US )
{
eUnit = FUNIT_INCH;
@@ -460,7 +460,7 @@ PrintDialog::NUpTabPage::~NUpTabPage()
void PrintDialog::NUpTabPage::enableNupControls( bool bEnable )
{
- maNupPagesBox.Enable( TRUE );
+ maNupPagesBox.Enable( sal_True );
maNupNumPagesTxt.Enable( bEnable );
maNupColEdt.Enable( bEnable );
maNupTimesTxt.Enable( bEnable );
@@ -714,8 +714,8 @@ void PrintDialog::JobTabPage::readFromSettings()
if( aValue.equalsIgnoreAsciiCaseAscii( "alwaysoff" ) )
{
mnCollateUIMode = 1;
- maCollateBox.Check( FALSE );
- maCollateBox.Enable( FALSE );
+ maCollateBox.Check( sal_False );
+ maCollateBox.Enable( sal_False );
}
else
{
@@ -847,8 +847,8 @@ PrintDialog::PrintDialog( Window* i_pParent, const boost::shared_ptr<PrinterCont
// set symbols on forward and backward button
maBackwardBtn.SetSymbol( SYMBOL_PREV );
maForwardBtn.SetSymbol( SYMBOL_NEXT );
- maBackwardBtn.ImplSetSmallSymbol( TRUE );
- maForwardBtn.ImplSetSmallSymbol( TRUE );
+ maBackwardBtn.ImplSetSmallSymbol( sal_True );
+ maForwardBtn.ImplSetSmallSymbol( sal_True );
maPageStr = maNumPagesText.GetText();
@@ -1072,10 +1072,10 @@ void PrintDialog::readFromSettings()
SettingsConfigItem* pItem = SettingsConfigItem::get();
rtl::OUString aValue = pItem->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintDialog" ) ),
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LastPage" ) ) );
- USHORT nCount = maTabCtrl.GetPageCount();
- for( USHORT i = 0; i < nCount; i++ )
+ sal_uInt16 nCount = maTabCtrl.GetPageCount();
+ for( sal_uInt16 i = 0; i < nCount; i++ )
{
- USHORT nPageId = maTabCtrl.GetPageId( i );
+ sal_uInt16 nPageId = maTabCtrl.GetPageId( i );
if( aValue.equals( maTabCtrl.GetPageText( nPageId ) ) )
{
maTabCtrl.SelectTabPage( nPageId );
@@ -1115,7 +1115,7 @@ int PrintDialog::getCopyCount()
bool PrintDialog::isCollate()
{
- return maJobPage.maCopyCountField.GetValue() > 1 ? maJobPage.maCollateBox.IsChecked() : FALSE;
+ return maJobPage.maCopyCountField.GetValue() > 1 ? maJobPage.maCollateBox.IsChecked() : sal_False;
}
bool PrintDialog::isSingleJobs()
@@ -1174,7 +1174,7 @@ void PrintDialog::setupOptionalUI()
vcl::RowOrColumn* pCurColumn = 0;
Window* pCurParent = 0, *pDynamicPageParent = 0;
- USHORT nOptPageId = 9, nCurSubGroup = 0;
+ sal_uInt16 nOptPageId = 9, nCurSubGroup = 0;
bool bOnStaticPage = false;
bool bSubgroupOnStaticPage = false;
@@ -1552,9 +1552,9 @@ void PrintDialog::setupOptionalUI()
PropertyValue* pVal = maPController->getValue( aPropertyName );
if( pVal && pVal->Value.hasValue() )
pVal->Value >>= nSelectVal;
- pList->SelectEntryPos( static_cast<USHORT>(nSelectVal) );
+ pList->SelectEntryPos( static_cast<sal_uInt16>(nSelectVal) );
pList->SetSelectHdl( LINK( this, PrintDialog, UIOption_SelectHdl ) );
- pList->SetDropDownLineCount( static_cast<USHORT>(aChoices.getLength()) );
+ pList->SetDropDownLineCount( static_cast<sal_uInt16>(aChoices.getLength()) );
pList->Show();
// set help id
@@ -1648,9 +1648,9 @@ void PrintDialog::setupOptionalUI()
if( maNUpPage.mxPagesBtnLabel.get() )
{
maNUpPage.maPagesBoxTitleTxt.SetText( maNUpPage.maPagesBtn.GetText() );
- maNUpPage.maPagesBoxTitleTxt.Show( TRUE );
+ maNUpPage.maPagesBoxTitleTxt.Show( sal_True );
maNUpPage.mxPagesBtnLabel->setLabel( &maNUpPage.maPagesBoxTitleTxt );
- maNUpPage.maPagesBtn.Show( FALSE );
+ maNUpPage.maPagesBtn.Show( sal_False );
}
}
@@ -1661,7 +1661,7 @@ void PrintDialog::setupOptionalUI()
if( maJobPage.mxPrintRange->countElements() == 0 )
{
maJobPage.mxPrintRange->show( false, false );
- maJobPage.maCopySpacer.Show( FALSE );
+ maJobPage.maCopySpacer.Show( sal_False );
}
#ifdef WNT
@@ -1745,7 +1745,7 @@ void PrintDialog::checkControlDependencies()
if( maJobPage.maCopyCountField.GetValue() > 1 )
maJobPage.maCollateBox.Enable( maJobPage.mnCollateUIMode == 0 );
else
- maJobPage.maCollateBox.Enable( FALSE );
+ maJobPage.maCollateBox.Enable( sal_False );
Image aImg( maJobPage.maCollateBox.IsChecked() ? maJobPage.maCollateImg : maJobPage.maNoCollateImg );
Image aHCImg( maJobPage.maCollateBox.IsChecked() ? maJobPage.maCollateHCImg : maJobPage.maNoCollateHCImg );
@@ -2315,7 +2315,7 @@ void PrintDialog::updateWindowFromProperty( const rtl::OUString& i_rProperty )
ListBox* pList = dynamic_cast< ListBox* >( rWindows.front() );
if( pList )
{
- pList->SelectEntryPos( static_cast< USHORT >(nVal) );
+ pList->SelectEntryPos( static_cast< sal_uInt16 >(nVal) );
}
else if( nVal >= 0 && nVal < sal_Int32(rWindows.size() ) )
{
@@ -2580,9 +2580,9 @@ void PrintProgressDialog::Paint( const Rectangle& )
nOffset,
nWidth,
mnProgressHeight,
- static_cast<USHORT>(0),
- static_cast<USHORT>(10000*mnCur/mnMax),
- static_cast<USHORT>(10000/nMaxCount),
+ static_cast<sal_uInt16>(0),
+ static_cast<sal_uInt16>(10000*mnCur/mnMax),
+ static_cast<sal_uInt16>(10000/nMaxCount),
maProgressRect
);
Pop();
diff --git a/vcl/source/window/scrwnd.cxx b/vcl/source/window/scrwnd.cxx
index 735add842518..9ed6103e5b01 100644
--- a/vcl/source/window/scrwnd.cxx
+++ b/vcl/source/window/scrwnd.cxx
@@ -77,12 +77,12 @@ ImplWheelWindow::ImplWheelWindow( Window* pParent ) :
DBG_ASSERT( pParent, "ImplWheelWindow::ImplWheelWindow(): Parent not set!" );
const Size aSize( pParent->GetOutputSizePixel() );
- const USHORT nFlags = ImplGetSVData()->maWinData.mnAutoScrollFlags;
- const BOOL bHorz = ( nFlags & AUTOSCROLL_HORZ ) != 0;
- const BOOL bVert = ( nFlags & AUTOSCROLL_VERT ) != 0;
+ const sal_uInt16 nFlags = ImplGetSVData()->maWinData.mnAutoScrollFlags;
+ const sal_Bool bHorz = ( nFlags & AUTOSCROLL_HORZ ) != 0;
+ const sal_Bool bVert = ( nFlags & AUTOSCROLL_VERT ) != 0;
// calculate maximum speed distance
- mnMaxWidth = (ULONG) ( 0.4 * hypot( (double) aSize.Width(), aSize.Height() ) );
+ mnMaxWidth = (sal_uIntPtr) ( 0.4 * hypot( (double) aSize.Width(), aSize.Height() ) );
// create wheel window
SetTitleType( FLOATWIN_TITLE_NONE );
@@ -124,7 +124,7 @@ void ImplWheelWindow::ImplStop()
{
ReleaseMouse();
mpTimer->Stop();
- Show(FALSE);
+ Show(sal_False);
}
// ------------------------------------------------------------------------
@@ -156,7 +156,7 @@ void ImplWheelWindow::ImplCreateImageList()
// ------------------------------------------------------------------------
-void ImplWheelWindow::ImplSetWheelMode( ULONG nWheelMode )
+void ImplWheelWindow::ImplSetWheelMode( sal_uIntPtr nWheelMode )
{
if( nWheelMode != mnWheelMode )
{
@@ -181,7 +181,7 @@ void ImplWheelWindow::ImplSetWheelMode( ULONG nWheelMode )
void ImplWheelWindow::ImplDrawWheel()
{
- USHORT nId;
+ sal_uInt16 nId;
switch( mnWheelMode )
{
@@ -209,13 +209,13 @@ void ImplWheelWindow::ImplRecalcScrollValues()
}
else
{
- ULONG nCurTime;
+ sal_uIntPtr nCurTime;
// calc current time
if( mnMaxWidth )
{
const double fExp = ( (double) mnActDist / mnMaxWidth ) * log10( (double) MAX_TIME / MIN_TIME );
- nCurTime = (ULONG) ( MAX_TIME / pow( 10., fExp ) );
+ nCurTime = (sal_uIntPtr) ( MAX_TIME / pow( 10., fExp ) );
}
else
nCurTime = MAX_TIME;
@@ -259,9 +259,9 @@ void ImplWheelWindow::ImplRecalcScrollValues()
PointerStyle ImplWheelWindow::ImplGetMousePointer( long nDistX, long nDistY )
{
PointerStyle eStyle;
- const USHORT nFlags = ImplGetSVData()->maWinData.mnAutoScrollFlags;
- const BOOL bHorz = ( nFlags & AUTOSCROLL_HORZ ) != 0;
- const BOOL bVert = ( nFlags & AUTOSCROLL_VERT ) != 0;
+ const sal_uInt16 nFlags = ImplGetSVData()->maWinData.mnAutoScrollFlags;
+ const sal_Bool bHorz = ( nFlags & AUTOSCROLL_HORZ ) != 0;
+ const sal_Bool bVert = ( nFlags & AUTOSCROLL_VERT ) != 0;
if( bHorz || bVert )
{
@@ -339,13 +339,13 @@ void ImplWheelWindow::MouseMove( const MouseEvent& rMEvt )
const long nDistX = aMousePos.X() - maCenter.X();
const long nDistY = aMousePos.Y() - maCenter.Y();
- mnActDist = (ULONG) hypot( (double) nDistX, nDistY );
+ mnActDist = (sal_uIntPtr) hypot( (double) nDistX, nDistY );
const PointerStyle eActStyle = ImplGetMousePointer( nDistX, nDistY );
- const USHORT nFlags = ImplGetSVData()->maWinData.mnAutoScrollFlags;
- const BOOL bHorz = ( nFlags & AUTOSCROLL_HORZ ) != 0;
- const BOOL bVert = ( nFlags & AUTOSCROLL_VERT ) != 0;
- const BOOL bOuter = mnActDist > WHEEL_RADIUS;
+ const sal_uInt16 nFlags = ImplGetSVData()->maWinData.mnAutoScrollFlags;
+ const sal_Bool bHorz = ( nFlags & AUTOSCROLL_HORZ ) != 0;
+ const sal_Bool bVert = ( nFlags & AUTOSCROLL_VERT ) != 0;
+ const sal_Bool bOuter = mnActDist > WHEEL_RADIUS;
if( bOuter && ( maLastMousePos != aMousePos ) )
{
@@ -397,12 +397,12 @@ IMPL_LINK( ImplWheelWindow, ImplScrollHdl, Timer*, EMPTYARG )
const Point aMousePos( pWindow->OutputToScreenPixel( pWindow->GetPointerPosPixel() ) );
Point aCmdMousePos( pWindow->ImplFrameToOutput( aMousePos ) );
CommandScrollData aScrollData( mnActDeltaX, mnActDeltaY );
- CommandEvent aCEvt( aCmdMousePos, COMMAND_AUTOSCROLL, TRUE, &aScrollData );
+ CommandEvent aCEvt( aCmdMousePos, COMMAND_AUTOSCROLL, sal_True, &aScrollData );
NotifyEvent aNCmdEvt( EVENT_COMMAND, pWindow, &aCEvt );
if ( !ImplCallPreNotify( aNCmdEvt ) )
{
- const ULONG nTime = Time::GetSystemTicks();
+ const sal_uIntPtr nTime = Time::GetSystemTicks();
ImplDelData aDel( this );
pWindow->Command( aCEvt );
if( aDel.IsDead() )
diff --git a/vcl/source/window/scrwnd.hxx b/vcl/source/window/scrwnd.hxx
index d808fa73e321..a4a95e8b3c48 100644
--- a/vcl/source/window/scrwnd.hxx
+++ b/vcl/source/window/scrwnd.hxx
@@ -57,12 +57,12 @@ private:
Point maLastMousePos;
Point maCenter;
Timer* mpTimer;
- ULONG mnRepaintTime;
- ULONG mnTimeout;
- ULONG mnWheelMode;
- ULONG mnMaxWidth;
- ULONG mnActWidth;
- ULONG mnActDist;
+ sal_uIntPtr mnRepaintTime;
+ sal_uIntPtr mnTimeout;
+ sal_uIntPtr mnWheelMode;
+ sal_uIntPtr mnMaxWidth;
+ sal_uIntPtr mnActWidth;
+ sal_uIntPtr mnActDist;
long mnActDeltaX;
long mnActDeltaY;
@@ -87,6 +87,6 @@ public:
~ImplWheelWindow();
void ImplStop();
- void ImplSetWheelMode( ULONG nWheelMode );
- ULONG ImplGetWheelMode() const { return mnWheelMode; }
+ void ImplSetWheelMode( sal_uIntPtr nWheelMode );
+ sal_uIntPtr ImplGetWheelMode() const { return mnWheelMode; }
};
diff --git a/vcl/source/window/seleng.cxx b/vcl/source/window/seleng.cxx
index d4ee01c26d61..a61d2e7290bf 100644
--- a/vcl/source/window/seleng.cxx
+++ b/vcl/source/window/seleng.cxx
@@ -36,7 +36,7 @@
-inline BOOL SelectionEngine::ShouldDeselect( BOOL bModifierKey1 ) const
+inline sal_Bool SelectionEngine::ShouldDeselect( sal_Bool bModifierKey1 ) const
{
// return !( eSelMode == MULTIPLE_SELECTION && bModifierKey1 );
return eSelMode != MULTIPLE_SELECTION || !bModifierKey1;
@@ -139,7 +139,7 @@ void SelectionEngine::ActivateDragMode()
|*
*************************************************************************/
-void SelectionEngine::CursorPosChanging( BOOL bShift, BOOL bMod1 )
+void SelectionEngine::CursorPosChanging( sal_Bool bShift, sal_Bool bMod1 )
{
if ( !pFunctionSet )
return;
@@ -197,19 +197,19 @@ void SelectionEngine::CursorPosChanging( BOOL bShift, BOOL bMod1 )
|*
*************************************************************************/
-BOOL SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt )
+sal_Bool SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt )
{
nFlags &= (~SELENG_CMDEVT);
if ( !pFunctionSet || !pWin )
- return FALSE;
+ return sal_False;
const bool bRightClickCursorPositioning =
rMEvt.IsRight() && rMEvt.GetClicks() == 1 && !IsInSelection();
if ( (rMEvt.GetClicks() > 1 || rMEvt.IsRight()) && !bRightClickCursorPositioning )
- return FALSE;
+ return sal_False;
- USHORT nModifier = rMEvt.GetModifier() | nLockedMods;
+ sal_uInt16 nModifier = rMEvt.GetModifier() | nLockedMods;
if ( nModifier & KEY_MOD2 )
- return FALSE;
+ return sal_False;
// in SingleSelection: Control-Taste filtern (damit auch
// mit Ctrl-Click ein D&D gestartet werden kann)
if ( nModifier == KEY_MOD1 && eSelMode == SINGLE_SELECTION )
@@ -225,14 +225,14 @@ BOOL SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt )
{
case 0: // KEY_NO_KEY
{
- BOOL bSelAtPoint = pFunctionSet->IsSelectionAtPoint( aPos );
+ sal_Bool bSelAtPoint = pFunctionSet->IsSelectionAtPoint( aPos );
nFlags &= (~SELENG_IN_ADD);
if ( (nFlags & SELENG_DRG_ENAB) && bSelAtPoint )
{
nFlags |= SELENG_WAIT_UPEVT;
nFlags &= ~(SELENG_IN_SEL);
pWin->ReleaseMouse();
- return TRUE; //auf STARTDRAG-Command-Event warten
+ return sal_True; //auf STARTDRAG-Command-Event warten
}
if ( eSelMode != SINGLE_SELECTION )
{
@@ -240,14 +240,14 @@ BOOL SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt )
pFunctionSet->DeselectAll();
else
pFunctionSet->DestroyAnchor();
- nFlags &= (~SELENG_HAS_ANCH); // bHasAnchor = FALSE;
+ nFlags &= (~SELENG_HAS_ANCH); // bHasAnchor = sal_False;
}
pFunctionSet->SetCursorAtPoint( aPos );
// Sonderbehandlung Single-Selection, damit Select+Drag
// in einem Zug moeglich ist
if (eSelMode == SINGLE_SELECTION && (nFlags & SELENG_DRG_ENAB))
nFlags |= SELENG_WAIT_UPEVT;
- return TRUE;
+ return sal_True;
}
case KEY_SHIFT:
@@ -255,7 +255,7 @@ BOOL SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt )
{
pWin->ReleaseMouse();
nFlags &= (~SELENG_IN_SEL);
- return FALSE;
+ return sal_False;
}
if ( nFlags & SELENG_ADD_ALW )
nFlags |= SELENG_IN_ADD;
@@ -270,7 +270,7 @@ BOOL SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt )
nFlags |= SELENG_HAS_ANCH;
}
pFunctionSet->SetCursorAtPoint( aPos );
- return TRUE;
+ return sal_True;
case KEY_MOD1:
// Control nur bei Mehrfachselektion erlaubt
@@ -278,7 +278,7 @@ BOOL SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt )
{
nFlags &= (~SELENG_IN_SEL);
pWin->ReleaseMouse();
- return TRUE; // Mausclick verschlucken
+ return sal_True; // Mausclick verschlucken
}
if ( nFlags & SELENG_HAS_ANCH )
{
@@ -289,32 +289,32 @@ BOOL SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt )
if ( pFunctionSet->IsSelectionAtPoint( aPos ) )
{
pFunctionSet->DeselectAtPoint( aPos );
- pFunctionSet->SetCursorAtPoint( aPos, TRUE );
+ pFunctionSet->SetCursorAtPoint( aPos, sal_True );
}
else
{
pFunctionSet->SetCursorAtPoint( aPos );
}
- return TRUE;
+ return sal_True;
case KEY_SHIFT + KEY_MOD1:
if ( eSelMode != MULTIPLE_SELECTION )
{
pWin->ReleaseMouse();
nFlags &= (~SELENG_IN_SEL);
- return FALSE;
+ return sal_False;
}
- nFlags |= SELENG_IN_ADD; //bIsInAddMode = TRUE;
+ nFlags |= SELENG_IN_ADD; //bIsInAddMode = sal_True;
if ( !(nFlags & SELENG_HAS_ANCH) )
{
pFunctionSet->CreateAnchor();
nFlags |= SELENG_HAS_ANCH;
}
pFunctionSet->SetCursorAtPoint( aPos );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -327,14 +327,14 @@ BOOL SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt )
|*
*************************************************************************/
-BOOL SelectionEngine::SelMouseButtonUp( const MouseEvent& /* rMEvt */ )
+sal_Bool SelectionEngine::SelMouseButtonUp( const MouseEvent& /* rMEvt */ )
{
aWTimer.Stop();
//DbgOut("Up");
if( !pFunctionSet || !pWin )
{
nFlags &= ~(SELENG_CMDEVT | SELENG_WAIT_UPEVT | SELENG_IN_SEL);
- return FALSE;
+ return sal_False;
}
pWin->ReleaseMouse();
@@ -343,7 +343,7 @@ BOOL SelectionEngine::SelMouseButtonUp( const MouseEvent& /* rMEvt */ )
{
// MouseButtonDown in Sel aber kein CommandEvent eingetrudelt
// ==> deselektieren
- USHORT nModifier = aLastMove.GetModifier() | nLockedMods;
+ sal_uInt16 nModifier = aLastMove.GetModifier() | nLockedMods;
if( nModifier == KEY_MOD1 || IsAlwaysAdding() )
{
if( !(nModifier & KEY_SHIFT) )
@@ -353,7 +353,7 @@ BOOL SelectionEngine::SelMouseButtonUp( const MouseEvent& /* rMEvt */ )
}
pFunctionSet->DeselectAtPoint( aLastMove.GetPosPixel() );
nFlags &= (~SELENG_HAS_ANCH); // nix Anker
- pFunctionSet->SetCursorAtPoint( aLastMove.GetPosPixel(), TRUE );
+ pFunctionSet->SetCursorAtPoint( aLastMove.GetPosPixel(), sal_True );
}
else
{
@@ -364,7 +364,7 @@ BOOL SelectionEngine::SelMouseButtonUp( const MouseEvent& /* rMEvt */ )
}
nFlags &= ~(SELENG_CMDEVT | SELENG_WAIT_UPEVT | SELENG_IN_SEL);
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -377,21 +377,21 @@ BOOL SelectionEngine::SelMouseButtonUp( const MouseEvent& /* rMEvt */ )
|*
*************************************************************************/
-BOOL SelectionEngine::SelMouseMove( const MouseEvent& rMEvt )
+sal_Bool SelectionEngine::SelMouseMove( const MouseEvent& rMEvt )
{
if ( !pFunctionSet || !(nFlags & SELENG_IN_SEL) ||
(nFlags & (SELENG_CMDEVT | SELENG_WAIT_UPEVT)) )
- return FALSE;
+ return sal_False;
if( !(nFlags & SELENG_EXPANDONMOVE) )
- return FALSE; // auf DragEvent warten!
+ return sal_False; // auf DragEvent warten!
aLastMove = rMEvt;
// wenn die Maus ausserhalb der Area steht, dann wird die
// Frequenz des SetCursorAtPoint() nur durch den Timer bestimmt
if( aWTimer.IsActive() && !aArea.IsInside( rMEvt.GetPosPixel() ))
- return TRUE;
+ return sal_True;
aWTimer.Start();
@@ -408,7 +408,7 @@ BOOL SelectionEngine::SelMouseMove( const MouseEvent& rMEvt )
//DbgOut("Move:SetCursor");
pFunctionSet->SetCursorAtPoint( rMEvt.GetPosPixel() );
- return TRUE;
+ return sal_True;
}
/*************************************************************************
diff --git a/vcl/source/window/split.cxx b/vcl/source/window/split.cxx
index b4553a4cf8a7..face35a179d8 100644
--- a/vcl/source/window/split.cxx
+++ b/vcl/source/window/split.cxx
@@ -62,13 +62,13 @@ namespace
void Splitter::ImplInitSplitterData()
{
- ImplGetWindowImpl()->mbSplitter = TRUE;
+ ImplGetWindowImpl()->mbSplitter = sal_True;
mpRefWin = NULL;
mnSplitPos = 0;
mnLastSplitPos = 0;
mnStartSplitPos = 0;
- mbDragFull = FALSE;
- mbKbdSplitting = FALSE;
+ mbDragFull = sal_False;
+ mbKbdSplitting = sal_False;
mbInKeyEvent = 0;
mnKeyboardStepSize = SPLITTER_DEFAULTSTEPSIZE;
}
@@ -90,13 +90,13 @@ void Splitter::ImplInit( Window* pParent, WinBits nWinStyle )
if ( nWinStyle & WB_HSCROLL )
{
ePointerStyle = POINTER_HSPLIT;
- mbHorzSplit = TRUE;
+ mbHorzSplit = sal_True;
SetSizePixel( Size( nB, nA ) );
}
else
{
ePointerStyle = POINTER_VSPLIT;
- mbHorzSplit = FALSE;
+ mbHorzSplit = sal_False;
SetSizePixel( Size( nA, nB ) );
}
@@ -219,11 +219,11 @@ Splitter* Splitter::ImplFindSibling()
// -----------------------------------------------------------------------
-BOOL Splitter::ImplSplitterActive()
+sal_Bool Splitter::ImplSplitterActive()
{
// is splitter in document or at scrollbar handle ?
- BOOL bActive = TRUE;
+ sal_Bool bActive = sal_True;
const StyleSettings& rSettings = GetSettings().GetStyleSettings();
long nA = rSettings.GetScrollBarSize();
long nB = rSettings.GetSplitSize();
@@ -232,12 +232,12 @@ BOOL Splitter::ImplSplitterActive()
if ( mbHorzSplit )
{
if( aSize.Width() == nB && aSize.Height() == nA )
- bActive = FALSE;
+ bActive = sal_False;
}
else
{
if( aSize.Width() == nA && aSize.Height() == nB )
- bActive = FALSE;
+ bActive = sal_False;
}
return bActive;
}
@@ -353,13 +353,13 @@ void Splitter::Tracking( const TrackingEvent& rTEvt )
void Splitter::ImplKbdTracking( KeyCode aKeyCode )
{
- USHORT nCode = aKeyCode.GetCode();
+ sal_uInt16 nCode = aKeyCode.GetCode();
if ( nCode == KEY_ESCAPE || nCode == KEY_RETURN )
{
if( !mbKbdSplitting )
return;
else
- mbKbdSplitting = FALSE;
+ mbKbdSplitting = sal_False;
if ( nCode != KEY_ESCAPE )
{
@@ -554,7 +554,7 @@ void Splitter::ImplStartKbdSplitting()
if( mbKbdSplitting )
return;
- mbKbdSplitting = TRUE;
+ mbKbdSplitting = sal_True;
StartSplit();
@@ -626,7 +626,7 @@ void Splitter::LoseFocus()
{
KeyCode aReturnKey( KEY_RETURN );
ImplKbdTracking( aReturnKey );
- mbKbdSplitting = FALSE;
+ mbKbdSplitting = sal_False;
}
Invalidate();
}
@@ -642,7 +642,7 @@ void Splitter::KeyInput( const KeyEvent& rKEvt )
Splitter *pSibling = ImplFindSibling();
KeyCode aKeyCode = rKEvt.GetKeyCode();
- USHORT nCode = aKeyCode.GetCode();
+ sal_uInt16 nCode = aKeyCode.GetCode();
switch ( nCode )
{
case KEY_UP:
diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx
index 689c56cbe619..a698e13c7695 100644
--- a/vcl/source/window/splitwin.cxx
+++ b/vcl/source/window/splitwin.cxx
@@ -67,10 +67,10 @@ struct ImplSplitItem
ImplSplitSet* mpSet;
Window* mpWindow;
Window* mpOrgParent;
- USHORT mnId;
+ sal_uInt16 mnId;
SplitWindowItemBits mnBits;
- BOOL mbFixed;
- BOOL mbSubSize;
+ sal_Bool mbFixed;
+ sal_Bool mbSubSize;
};
struct ImplSplitSet
@@ -80,9 +80,9 @@ struct ImplSplitSet
Bitmap* mpBitmap;
long mnLastSize;
long mnSplitSize;
- USHORT mnItems;
- USHORT mnId;
- BOOL mbCalcPix;
+ sal_uInt16 mnItems;
+ sal_uInt16 mnId;
+ sal_Bool mbCalcPix;
};
#define SPLITWIN_SPLITSIZE 3
@@ -91,10 +91,10 @@ struct ImplSplitSet
#define SPLITWIN_SPLITSIZEAUTOHIDE 36
#define SPLITWIN_SPLITSIZEFADE 36
-#define SPLIT_HORZ ((USHORT)0x0001)
-#define SPLIT_VERT ((USHORT)0x0002)
-#define SPLIT_WINDOW ((USHORT)0x0004)
-#define SPLIT_NOSPLIT ((USHORT)0x8000)
+#define SPLIT_HORZ ((sal_uInt16)0x0001)
+#define SPLIT_VERT ((sal_uInt16)0x0002)
+#define SPLIT_WINDOW ((sal_uInt16)0x0004)
+#define SPLIT_NOSPLIT ((sal_uInt16)0x8000)
// -----------------------------------------------------------------------
@@ -102,7 +102,7 @@ DECLARE_LIST( ImplSplitList, SplitWindow* )
// =======================================================================
-static void ImplCalcBorder( WindowAlign eAlign, BOOL bNoAlign,
+static void ImplCalcBorder( WindowAlign eAlign, sal_Bool bNoAlign,
long& rLeft, long& rTop,
long& rRight, long& rBottom )
{
@@ -292,13 +292,13 @@ void SplitWindow::ImplDrawBorderLine( SplitWindow* pWin )
// -----------------------------------------------------------------------
-static ImplSplitSet* ImplFindSet( ImplSplitSet* pSet, USHORT nId )
+static ImplSplitSet* ImplFindSet( ImplSplitSet* pSet, sal_uInt16 nId )
{
if ( pSet->mnId == nId )
return pSet;
- USHORT i;
- USHORT nItems = pSet->mnItems;
+ sal_uInt16 i;
+ sal_uInt16 nItems = pSet->mnItems;
ImplSplitItem* pItems = pSet->mpItems;
for ( i = 0; i < nItems; i++ )
@@ -322,10 +322,10 @@ static ImplSplitSet* ImplFindSet( ImplSplitSet* pSet, USHORT nId )
// -----------------------------------------------------------------------
-static ImplSplitSet* ImplFindItem( ImplSplitSet* pSet, USHORT nId, USHORT& rPos )
+static ImplSplitSet* ImplFindItem( ImplSplitSet* pSet, sal_uInt16 nId, sal_uInt16& rPos )
{
- USHORT i;
- USHORT nItems = pSet->mnItems;
+ sal_uInt16 i;
+ sal_uInt16 nItems = pSet->mnItems;
ImplSplitItem* pItems = pSet->mpItems;
for ( i = 0; i < nItems; i++ )
@@ -352,10 +352,10 @@ static ImplSplitSet* ImplFindItem( ImplSplitSet* pSet, USHORT nId, USHORT& rPos
// -----------------------------------------------------------------------
-static USHORT ImplFindItem( ImplSplitSet* pSet, Window* pWindow )
+static sal_uInt16 ImplFindItem( ImplSplitSet* pSet, Window* pWindow )
{
- USHORT i;
- USHORT nItems = pSet->mnItems;
+ sal_uInt16 i;
+ sal_uInt16 nItems = pSet->mnItems;
ImplSplitItem* pItems = pSet->mpItems;
for ( i = 0; i < nItems; i++ )
@@ -366,7 +366,7 @@ static USHORT ImplFindItem( ImplSplitSet* pSet, Window* pWindow )
{
if ( pItems[i].mpSet )
{
- USHORT nId = ImplFindItem( pItems[i].mpSet, pWindow );
+ sal_uInt16 nId = ImplFindItem( pItems[i].mpSet, pWindow );
if ( nId )
return nId;
}
@@ -378,11 +378,11 @@ static USHORT ImplFindItem( ImplSplitSet* pSet, Window* pWindow )
// -----------------------------------------------------------------------
-static USHORT ImplFindItem( ImplSplitSet* pSet, const Point& rPos,
- BOOL bRows, BOOL bDown = TRUE )
+static sal_uInt16 ImplFindItem( ImplSplitSet* pSet, const Point& rPos,
+ sal_Bool bRows, sal_Bool bDown = sal_True )
{
- USHORT i;
- USHORT nItems = pSet->mnItems;
+ sal_uInt16 i;
+ sal_uInt16 nItems = pSet->mnItems;
ImplSplitItem* pItems = pSet->mpItems;
for ( i = 0; i < nItems; i++ )
@@ -428,8 +428,8 @@ static USHORT ImplFindItem( ImplSplitSet* pSet, const Point& rPos,
static void ImplDeleteSet( ImplSplitSet* pSet )
{
- USHORT i;
- USHORT nItems = pSet->mnItems;
+ sal_uInt16 i;
+ sal_uInt16 nItems = pSet->mnItems;
ImplSplitItem* pItems = pSet->mpItems;
for ( i = 0; i < nItems; i++ )
@@ -453,7 +453,7 @@ static void ImplDeleteSet( ImplSplitSet* pSet )
static void ImplSetSplitSize( ImplSplitSet* pSet, long nNewSize )
{
pSet->mnSplitSize = nNewSize;
- for ( USHORT i = 0; i < pSet->mnItems; i++ )
+ for ( sal_uInt16 i = 0; i < pSet->mnItems; i++ )
{
if ( pSet->mpItems[i].mpSet )
ImplSetSplitSize( pSet->mpItems[i].mpSet, nNewSize );
@@ -465,18 +465,18 @@ static void ImplSetSplitSize( ImplSplitSet* pSet, long nNewSize )
static void ImplCalcSet( ImplSplitSet* pSet,
long nSetLeft, long nSetTop,
long nSetWidth, long nSetHeight,
- BOOL bRows, BOOL bDown = TRUE )
+ sal_Bool bRows, sal_Bool bDown = sal_True )
{
if ( !pSet->mpItems )
return;
- USHORT i;
- USHORT j;
- USHORT nMins;
- USHORT nCalcItems;
- USHORT nItems = pSet->mnItems;
- USHORT nVisItems;
- USHORT nAbsItems;
+ sal_uInt16 i;
+ sal_uInt16 j;
+ sal_uInt16 nMins;
+ sal_uInt16 nCalcItems;
+ sal_uInt16 nItems = pSet->mnItems;
+ sal_uInt16 nVisItems;
+ sal_uInt16 nAbsItems;
long nCalcSize;
long nSizeDelta;
long nCurSize;
@@ -490,7 +490,7 @@ static void ImplCalcSet( ImplSplitSet* pSet,
long nMaxPos;
long* pSize;
ImplSplitItem* pItems = pSet->mpItems;
- BOOL bEmpty;
+ sal_Bool bEmpty;
// Anzahl sichtbarer Items ermitteln
nVisItems = 0;
@@ -570,7 +570,7 @@ static void ImplCalcSet( ImplSplitSet* pSet,
nCurSize += pItems[i].mnPixSize;
}
- pSet->mbCalcPix = FALSE;
+ pSet->mbCalcPix = sal_False;
pSet->mnLastSize = nCalcSize;
// Fenster einpassen
@@ -594,7 +594,7 @@ static void ImplCalcSet( ImplSplitSet* pSet,
}
}
// Rundungsfehler werden hier nicht ausgelichen
- if ( (nAbsItems < (USHORT)(Abs( nSizeDelta ))) && nSizeWinSize )
+ if ( (nAbsItems < (sal_uInt16)(Abs( nSizeDelta ))) && nSizeWinSize )
{
for ( i = 0; i < nItems; i++ )
{
@@ -621,10 +621,10 @@ static void ImplCalcSet( ImplSplitSet* pSet,
{
for ( i = 0; i < nItems; i++ )
{
- pItems[i].mbSubSize = FALSE;
+ pItems[i].mbSubSize = sal_False;
if ( j >= 2 )
- pItems[i].mbSubSize = TRUE;
+ pItems[i].mbSubSize = sal_True;
else
{
if ( !(pItems[i].mnBits & SWIB_INVISIBLE) )
@@ -632,11 +632,11 @@ static void ImplCalcSet( ImplSplitSet* pSet,
if ( (nSizeDelta > 0) || pItems[i].mnPixSize )
{
if ( j >= 1 )
- pItems[i].mbSubSize = TRUE;
+ pItems[i].mbSubSize = sal_True;
else
{
if ( (j == 0) && (pItems[i].mnBits & (SWIB_RELATIVESIZE | SWIB_PERCENTSIZE)) )
- pItems[i].mbSubSize = TRUE;
+ pItems[i].mbSubSize = sal_True;
}
}
}
@@ -733,20 +733,20 @@ static void ImplCalcSet( ImplSplitSet* pSet,
pItems[i].mnOldHeight = pItems[i].mnHeight;
if ( pItems[i].mnBits & SWIB_INVISIBLE )
- bEmpty = TRUE;
+ bEmpty = sal_True;
else
{
- bEmpty = FALSE;
+ bEmpty = sal_False;
if ( bDown )
{
if ( nPos+pItems[i].mnPixSize > nMaxPos )
- bEmpty = TRUE;
+ bEmpty = sal_True;
}
else
{
nPos -= pItems[i].mnPixSize;
if ( nPos < nMaxPos )
- bEmpty = TRUE;
+ bEmpty = sal_True;
}
}
@@ -817,9 +817,9 @@ static void ImplCalcSet( ImplSplitSet* pSet,
// Fixed setzen
for ( i = 0; i < nItems; i++ )
{
- pItems[i].mbFixed = FALSE;
+ pItems[i].mbFixed = sal_False;
if ( pItems[i].mnBits & SWIB_FIXED )
- pItems[i].mbFixed = TRUE;
+ pItems[i].mbFixed = sal_True;
else
{
// Wenn Child-Set vorhanden, ist dieses Item auch Fixed, wenn
@@ -830,7 +830,7 @@ static void ImplCalcSet( ImplSplitSet* pSet,
{
if ( pItems[i].mpSet->mpItems[j].mbFixed )
{
- pItems[i].mbFixed = TRUE;
+ pItems[i].mbFixed = sal_True;
break;
}
}
@@ -841,11 +841,11 @@ static void ImplCalcSet( ImplSplitSet* pSet,
// -----------------------------------------------------------------------
-void SplitWindow::ImplCalcSet2( SplitWindow* pWindow, ImplSplitSet* pSet, BOOL bHide,
- BOOL bRows, BOOL /*bDown*/ )
+void SplitWindow::ImplCalcSet2( SplitWindow* pWindow, ImplSplitSet* pSet, sal_Bool bHide,
+ sal_Bool bRows, sal_Bool /*bDown*/ )
{
- USHORT i;
- USHORT nItems = pSet->mnItems;
+ sal_uInt16 i;
+ sal_uInt16 nItems = pSet->mnItems;
ImplSplitItem* pItems = pSet->mpItems;
if ( pWindow->IsReallyVisible() && pWindow->IsUpdateMode() && pWindow->mbInvalidate )
@@ -915,9 +915,9 @@ void SplitWindow::ImplCalcSet2( SplitWindow* pWindow, ImplSplitSet* pSet, BOOL b
{
if ( pItems[i].mpSet )
{
- BOOL bTempHide = bHide;
+ sal_Bool bTempHide = bHide;
if ( !pItems[i].mnWidth || !pItems[i].mnHeight )
- bTempHide = TRUE;
+ bTempHide = sal_True;
ImplCalcSet2( pWindow, pItems[i].mpSet, bTempHide,
((pItems[i].mnBits & SWIB_COLSET) == 0) );
}
@@ -944,10 +944,10 @@ void SplitWindow::ImplCalcSet2( SplitWindow* pWindow, ImplSplitSet* pSet, BOOL b
// -----------------------------------------------------------------------
-static void ImplCalcLogSize( ImplSplitItem* pItems, USHORT nItems )
+static void ImplCalcLogSize( ImplSplitItem* pItems, sal_uInt16 nItems )
{
// Original-Groessen updaten
- USHORT i;
+ sal_uInt16 i;
long nRelSize = 0;
long nPerSize = 0;
for ( i = 0; i < nItems; i++ )
@@ -1012,8 +1012,8 @@ void SplitWindow::ImplDrawBack( SplitWindow* pWindow, const Rectangle& rRect,
void SplitWindow::ImplDrawBack( SplitWindow* pWindow, ImplSplitSet* pSet )
{
- USHORT i;
- USHORT nItems = pSet->mnItems;
+ sal_uInt16 i;
+ sal_uInt16 nItems = pSet->mnItems;
ImplSplitItem* pItems = pSet->mpItems;
// Beim Mainset auch den Hintergrund zeichnen
@@ -1055,20 +1055,20 @@ void SplitWindow::ImplDrawBack( SplitWindow* pWindow, ImplSplitSet* pSet )
// -----------------------------------------------------------------------
static void ImplDrawSplit( SplitWindow* pWindow, ImplSplitSet* pSet,
- BOOL bRows, BOOL bDown = TRUE )
+ sal_Bool bRows, sal_Bool bDown = sal_True )
{
if ( !pSet->mpItems )
return;
- USHORT i;
- USHORT nItems = pSet->mnItems;
+ sal_uInt16 i;
+ sal_uInt16 nItems = pSet->mnItems;
long nPos;
long nTop;
long nBottom;
ImplSplitItem* pItems = pSet->mpItems;
const StyleSettings& rStyleSettings = pWindow->GetSettings().GetStyleSettings();
- BOOL bFlat = (pWindow->GetStyle() & WB_FLATSPLITDRAW) == WB_FLATSPLITDRAW;
+ sal_Bool bFlat = (pWindow->GetStyle() & WB_FLATSPLITDRAW) == WB_FLATSPLITDRAW;
for ( i = 0; i < nItems-1; i++ )
{
@@ -1149,16 +1149,16 @@ static void ImplDrawSplit( SplitWindow* pWindow, ImplSplitSet* pSet,
// -----------------------------------------------------------------------
-USHORT SplitWindow::ImplTestSplit( ImplSplitSet* pSet, const Point& rPos,
- long& rMouseOff, ImplSplitSet** ppFoundSet, USHORT& rFoundPos,
- BOOL bRows, BOOL /*bDown*/ )
+sal_uInt16 SplitWindow::ImplTestSplit( ImplSplitSet* pSet, const Point& rPos,
+ long& rMouseOff, ImplSplitSet** ppFoundSet, sal_uInt16& rFoundPos,
+ sal_Bool bRows, sal_Bool /*bDown*/ )
{
if ( !pSet->mpItems )
return 0;
- USHORT i;
- USHORT nSplitTest;
- USHORT nItems = pSet->mnItems;
+ sal_uInt16 i;
+ sal_uInt16 nSplitTest;
+ sal_uInt16 nItems = pSet->mnItems;
long nMPos1;
long nMPos2;
long nPos;
@@ -1229,8 +1229,8 @@ USHORT SplitWindow::ImplTestSplit( ImplSplitSet* pSet, const Point& rPos,
// -----------------------------------------------------------------------
-USHORT SplitWindow::ImplTestSplit( SplitWindow* pWindow, const Point& rPos,
- long& rMouseOff, ImplSplitSet** ppFoundSet, USHORT& rFoundPos )
+sal_uInt16 SplitWindow::ImplTestSplit( SplitWindow* pWindow, const Point& rPos,
+ long& rMouseOff, ImplSplitSet** ppFoundSet, sal_uInt16& rFoundPos )
{
// Resizeable SplitWindow muss anders behandelt werden
if ( pWindow->mnWinStyle & WB_SIZEABLE )
@@ -1342,7 +1342,7 @@ void SplitWindow::ImplInit( Window* pParent, WinBits nStyle )
pNewSet->mnItems = 0;
pNewSet->mnId = 0;
pNewSet->mnSplitSize = SPLITWIN_SPLITSIZE;
- pNewSet->mbCalcPix = TRUE;
+ pNewSet->mbCalcPix = sal_True;
mpMainSet = pNewSet;
mpBaseSet = pNewSet;
@@ -1363,29 +1363,29 @@ void SplitWindow::ImplInit( Window* pParent, WinBits nStyle )
mnMouseModifier = 0;
mnMStartPos = 0;
mnMSplitPos = 0;
- mbDragFull = FALSE;
- mbHorz = TRUE;
- mbBottomRight = FALSE;
- mbCalc = FALSE;
- mbRecalc = TRUE;
- mbInvalidate = TRUE;
- mbAutoHide = FALSE;
- mbFadeIn = FALSE;
- mbFadeOut = FALSE;
- mbAutoHideIn = FALSE;
- mbAutoHideDown = FALSE;
- mbFadeInDown = FALSE;
- mbFadeOutDown = FALSE;
- mbAutoHidePressed = FALSE;
- mbFadeInPressed = FALSE;
- mbFadeOutPressed = FALSE;
- mbFadeNoButtonMode = FALSE;
- mbNoAlign = FALSE;
+ mbDragFull = sal_False;
+ mbHorz = sal_True;
+ mbBottomRight = sal_False;
+ mbCalc = sal_False;
+ mbRecalc = sal_True;
+ mbInvalidate = sal_True;
+ mbAutoHide = sal_False;
+ mbFadeIn = sal_False;
+ mbFadeOut = sal_False;
+ mbAutoHideIn = sal_False;
+ mbAutoHideDown = sal_False;
+ mbFadeInDown = sal_False;
+ mbFadeOutDown = sal_False;
+ mbAutoHidePressed = sal_False;
+ mbFadeInPressed = sal_False;
+ mbFadeOutPressed = sal_False;
+ mbFadeNoButtonMode = sal_False;
+ mbNoAlign = sal_False;
if ( nStyle & WB_NOSPLITDRAW )
{
pNewSet->mnSplitSize -= 2;
- mbInvalidate = FALSE;
+ mbInvalidate = sal_False;
}
if ( nStyle & WB_BORDER )
@@ -1518,7 +1518,7 @@ Size SplitWindow::CalcLayoutSizePixel( const Size& aNewSize )
{
long nCurSize;
long nCalcSize = 0;
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < mpMainSet->mnItems; i++ )
{
@@ -1586,7 +1586,7 @@ void SplitWindow::ImplCalcLayout()
{
long nCurSize;
long nCalcSize = 0;
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < mpMainSet->mnItems; i++ )
{
@@ -1605,9 +1605,9 @@ void SplitWindow::ImplCalcLayout()
nCurSize -= nSplitSize;
nCurSize -= (mpMainSet->mnItems-1)*mpMainSet->mnSplitSize;
- mbRecalc = FALSE;
+ mbRecalc = sal_False;
ImplSetWindowSize( nCalcSize-nCurSize );
- mbRecalc = TRUE;
+ mbRecalc = sal_True;
}
}
@@ -1648,15 +1648,15 @@ void SplitWindow::ImplCalcLayout()
// Sets rekursiv berechnen
ImplCalcSet( mpMainSet, nL, nT, nW, nH, mbHorz, !mbBottomRight );
- ImplCalcSet2( this, mpMainSet, FALSE, mbHorz, !mbBottomRight );
- mbCalc = FALSE;
+ ImplCalcSet2( this, mpMainSet, sal_False, mbHorz, !mbBottomRight );
+ mbCalc = sal_False;
}
// -----------------------------------------------------------------------
void SplitWindow::ImplUpdate()
{
- mbCalc = TRUE;
+ mbCalc = sal_True;
if ( IsReallyShown() && IsUpdateMode() && mbRecalc )
{
@@ -1696,7 +1696,7 @@ void SplitWindow::ImplUpdateSet( ImplSplitSet* pSet )
else
{
ImplSplitItem* pItem;
- USHORT nPos;
+ sal_uInt16 nPos;
pSet = ImplFindItem( mpMainSet, pSet->mnId, nPos );
pItem = &(pSet->mpItems[nPos]);
@@ -1736,7 +1736,7 @@ void SplitWindow::ImplSplitMousePos( Point& rMousePos )
// -----------------------------------------------------------------------
-void SplitWindow::ImplGetButtonRect( Rectangle& rRect, long nEx, BOOL bTest ) const
+void SplitWindow::ImplGetButtonRect( Rectangle& rRect, long nEx, sal_Bool bTest ) const
{
long nSplitSize = mpMainSet->mnSplitSize-2;
if ( mbAutoHide || mbFadeOut || mbFadeIn )
@@ -1809,7 +1809,7 @@ void SplitWindow::ImplGetButtonRect( Rectangle& rRect, long nEx, BOOL bTest ) co
// -----------------------------------------------------------------------
-void SplitWindow::ImplGetAutoHideRect( Rectangle& rRect, BOOL bTest ) const
+void SplitWindow::ImplGetAutoHideRect( Rectangle& rRect, sal_Bool bTest ) const
{
Rectangle aRect;
@@ -1826,7 +1826,7 @@ void SplitWindow::ImplGetAutoHideRect( Rectangle& rRect, BOOL bTest ) const
// -----------------------------------------------------------------------
-void SplitWindow::ImplGetFadeInRect( Rectangle& rRect, BOOL bTest ) const
+void SplitWindow::ImplGetFadeInRect( Rectangle& rRect, sal_Bool bTest ) const
{
Rectangle aRect;
@@ -1838,12 +1838,12 @@ void SplitWindow::ImplGetFadeInRect( Rectangle& rRect, BOOL bTest ) const
// -----------------------------------------------------------------------
-void SplitWindow::ImplGetFadeOutRect( Rectangle& rRect, BOOL ) const
+void SplitWindow::ImplGetFadeOutRect( Rectangle& rRect, sal_Bool ) const
{
Rectangle aRect;
if ( mbFadeOut )
- ImplGetButtonRect( aRect, 0, FALSE );
+ ImplGetButtonRect( aRect, 0, sal_False );
rRect = aRect;
}
@@ -1918,7 +1918,7 @@ void SplitWindow::ImplDrawButtonRect( const Rectangle& rRect, long nSize )
// -----------------------------------------------------------------------
-void SplitWindow::ImplDrawAutoHide( BOOL bInPaint )
+void SplitWindow::ImplDrawAutoHide( sal_Bool bInPaint )
{
if ( mbAutoHide )
{
@@ -1963,7 +1963,7 @@ void SplitWindow::ImplDrawAutoHide( BOOL bInPaint )
}
// Image ermitteln und zurueckgeben
- USHORT nId;
+ sal_uInt16 nId;
if ( mbAutoHidePressed )
{
if ( mbAutoHideIn )
@@ -1995,7 +1995,7 @@ void SplitWindow::ImplDrawAutoHide( BOOL bInPaint )
// -----------------------------------------------------------------------
-void SplitWindow::ImplDrawFadeArrow( const Point& rPt, BOOL bHorz, BOOL bLeft )
+void SplitWindow::ImplDrawFadeArrow( const Point& rPt, sal_Bool bHorz, sal_Bool bLeft )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
@@ -2051,14 +2051,14 @@ void SplitWindow::ImplDrawFadeArrow( const Point& rPt, BOOL bHorz, BOOL bLeft )
}
}
-void SplitWindow::ImplDrawGrip( const Rectangle& rRect, BOOL bHorz, BOOL bLeft )
+void SplitWindow::ImplDrawGrip( const Rectangle& rRect, sal_Bool bHorz, sal_Bool bLeft )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
if( rRect.IsInside( GetPointerPosPixel() ) )
{
DrawWallpaper( rRect, Wallpaper( Color( COL_WHITE ) ) );
- DrawSelectionBackground( rRect, 2, FALSE, FALSE, FALSE );
+ DrawSelectionBackground( rRect, 2, sal_False, sal_False, sal_False );
}
if( bHorz )
@@ -2109,7 +2109,7 @@ void SplitWindow::ImplDrawGrip( const Rectangle& rRect, BOOL bHorz, BOOL bLeft )
}
}
-void SplitWindow::ImplDrawFadeIn( BOOL bInPaint )
+void SplitWindow::ImplDrawFadeIn( sal_Bool bInPaint )
{
if ( mbFadeIn )
{
@@ -2117,17 +2117,17 @@ void SplitWindow::ImplDrawFadeIn( BOOL bInPaint )
Image aImage;
ImplGetFadeInRect( aTempRect );
- BOOL bLeft;
+ sal_Bool bLeft;
if ( meAlign == WINDOWALIGN_TOP )
- bLeft = FALSE;
+ bLeft = sal_False;
else if ( meAlign == WINDOWALIGN_BOTTOM )
- bLeft = TRUE;
+ bLeft = sal_True;
else if ( meAlign == WINDOWALIGN_LEFT )
- bLeft = FALSE;
+ bLeft = sal_False;
else if ( meAlign == WINDOWALIGN_RIGHT )
- bLeft = TRUE;
+ bLeft = sal_True;
else
- bLeft = TRUE;
+ bLeft = sal_True;
if ( !bInPaint )
Erase( aTempRect );
@@ -2138,7 +2138,7 @@ void SplitWindow::ImplDrawFadeIn( BOOL bInPaint )
// -----------------------------------------------------------------------
-void SplitWindow::ImplDrawFadeOut( BOOL bInPaint )
+void SplitWindow::ImplDrawFadeOut( sal_Bool bInPaint )
{
if ( mbFadeOut )
{
@@ -2146,17 +2146,17 @@ void SplitWindow::ImplDrawFadeOut( BOOL bInPaint )
Image aImage;
ImplGetFadeOutRect( aTempRect );
- BOOL bLeft;
+ sal_Bool bLeft;
if ( meAlign == WINDOWALIGN_TOP )
- bLeft = TRUE;
+ bLeft = sal_True;
else if ( meAlign == WINDOWALIGN_BOTTOM )
- bLeft = FALSE;
+ bLeft = sal_False;
else if ( meAlign == WINDOWALIGN_LEFT )
- bLeft = TRUE;
+ bLeft = sal_True;
else if ( meAlign == WINDOWALIGN_RIGHT )
- bLeft = FALSE;
+ bLeft = sal_False;
else
- bLeft = TRUE;
+ bLeft = sal_True;
if ( !bInPaint )
Erase( aTempRect );
@@ -2175,15 +2175,15 @@ void SplitWindow::ImplStartSplit( const MouseEvent& rMEvt )
{
ImplSplitItem* pSplitItem;
long nCurMaxSize;
- USHORT nTemp;
- BOOL bDown;
- BOOL bPropSmaller;
+ sal_uInt16 nTemp;
+ sal_Bool bDown;
+ sal_Bool bPropSmaller;
mnMouseModifier = rMEvt.GetModifier();
if ( !(mnMouseModifier & KEY_SHIFT) || (mnSplitPos+1 >= mpSplitSet->mnItems) )
- bPropSmaller = FALSE;
+ bPropSmaller = sal_False;
else
- bPropSmaller = TRUE;
+ bPropSmaller = sal_True;
// Hier kann noch die maximale Groesse gesetzt werden
StartSplit();
@@ -2201,9 +2201,9 @@ void SplitWindow::ImplStartSplit( const MouseEvent& rMEvt )
if ( mpSplitSet->mpItems )
{
- bDown = TRUE;
+ bDown = sal_True;
if ( (mpSplitSet == mpMainSet) && mbBottomRight )
- bDown = FALSE;
+ bDown = sal_False;
pSplitItem = &(mpSplitSet->mpItems[mnSplitPos]);
maDragRect.Left() = pSplitItem->mnLeft;
@@ -2334,9 +2334,9 @@ void SplitWindow::ImplStartSplit( const MouseEvent& rMEvt )
else
{
ImplSplitItem* pItems = mpSplitSet->mpItems;
- USHORT nItems = mpSplitSet->mnItems;
+ sal_uInt16 nItems = mpSplitSet->mnItems;
mpLastSizes = new long[nItems*2];
- for ( USHORT i = 0; i < nItems; i++ )
+ for ( sal_uInt16 i = 0; i < nItems; i++ )
{
mpLastSizes[i*2] = pItems[i].mnSize;
mpLastSizes[i*2+1] = pItems[i].mnPixSize;
@@ -2411,35 +2411,35 @@ void SplitWindow::MouseButtonDown( const MouseEvent& rMEvt )
Point aMousePosPixel = rMEvt.GetPosPixel();
Rectangle aTestRect;
- mbFadeNoButtonMode = FALSE;
- ImplGetAutoHideRect( aTestRect, TRUE );
+ mbFadeNoButtonMode = sal_False;
+ ImplGetAutoHideRect( aTestRect, sal_True );
if ( aTestRect.IsInside( aMousePosPixel ) )
{
- mbAutoHideDown = TRUE;
- mbAutoHidePressed = TRUE;
- ImplDrawAutoHide( FALSE );
+ mbAutoHideDown = sal_True;
+ mbAutoHidePressed = sal_True;
+ ImplDrawAutoHide( sal_False );
}
else
{
- ImplGetFadeOutRect( aTestRect, TRUE );
+ ImplGetFadeOutRect( aTestRect, sal_True );
if ( aTestRect.IsInside( aMousePosPixel ) )
{
- mbFadeOutDown = TRUE;
- mbFadeOutPressed = TRUE;
- ImplDrawFadeOut( FALSE );
+ mbFadeOutDown = sal_True;
+ mbFadeOutPressed = sal_True;
+ ImplDrawFadeOut( sal_False );
}
else
{
- ImplGetFadeInRect( aTestRect, TRUE );
+ ImplGetFadeInRect( aTestRect, sal_True );
if ( aTestRect.IsInside( aMousePosPixel ) )
{
- mbFadeInDown = TRUE;
- mbFadeInPressed = TRUE;
- ImplDrawFadeIn( FALSE );
+ mbFadeInDown = sal_True;
+ mbFadeInPressed = sal_True;
+ ImplDrawFadeIn( sal_False );
}
else if ( !aTestRect.IsEmpty() && !(mnWinStyle & WB_SIZEABLE) )
{
- mbFadeNoButtonMode = TRUE;
+ mbFadeNoButtonMode = sal_True;
FadeIn();
return;
}
@@ -2461,8 +2461,8 @@ void SplitWindow::MouseMove( const MouseEvent& rMEvt )
Point aPos = rMEvt.GetPosPixel();
long nTemp;
ImplSplitSet* pTempSplitSet;
- USHORT nTempSplitPos;
- USHORT nSplitTest = ImplTestSplit( this, aPos, nTemp, &pTempSplitSet, nTempSplitPos );
+ sal_uInt16 nTempSplitPos;
+ sal_uInt16 nSplitTest = ImplTestSplit( this, aPos, nTemp, &pTempSplitSet, nTempSplitPos );
PointerStyle eStyle = POINTER_ARROW;
Rectangle aAutoHideRect;
Rectangle aFadeInRect;
@@ -2499,30 +2499,30 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt )
{
if ( rTEvt.IsTrackingEnded() )
{
- mbAutoHideDown = FALSE;
+ mbAutoHideDown = sal_False;
if ( mbAutoHidePressed )
{
- mbAutoHidePressed = FALSE;
+ mbAutoHidePressed = sal_False;
if ( !rTEvt.IsTrackingCanceled() )
{
mbAutoHideIn = !mbAutoHideIn;
- ImplDrawAutoHide( FALSE );
+ ImplDrawAutoHide( sal_False );
AutoHide();
}
else
- ImplDrawAutoHide( FALSE );
+ ImplDrawAutoHide( sal_False );
}
}
else
{
Rectangle aTestRect;
- ImplGetAutoHideRect( aTestRect, TRUE );
- BOOL bNewPressed = aTestRect.IsInside( aMousePosPixel );
+ ImplGetAutoHideRect( aTestRect, sal_True );
+ sal_Bool bNewPressed = aTestRect.IsInside( aMousePosPixel );
if ( bNewPressed != mbAutoHidePressed )
{
mbAutoHidePressed = bNewPressed;
- ImplDrawAutoHide( FALSE );
+ ImplDrawAutoHide( sal_False );
}
}
}
@@ -2530,11 +2530,11 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt )
{
if ( rTEvt.IsTrackingEnded() )
{
- mbFadeInDown = FALSE;
+ mbFadeInDown = sal_False;
if ( mbFadeInPressed )
{
- mbFadeInPressed = FALSE;
- ImplDrawFadeIn( FALSE );
+ mbFadeInPressed = sal_False;
+ ImplDrawFadeIn( sal_False );
if ( !rTEvt.IsTrackingCanceled() )
FadeIn();
@@ -2543,12 +2543,12 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt )
else
{
Rectangle aTestRect;
- ImplGetFadeInRect( aTestRect, TRUE );
- BOOL bNewPressed = aTestRect.IsInside( aMousePosPixel );
+ ImplGetFadeInRect( aTestRect, sal_True );
+ sal_Bool bNewPressed = aTestRect.IsInside( aMousePosPixel );
if ( bNewPressed != mbFadeInPressed )
{
mbFadeInPressed = bNewPressed;
- ImplDrawFadeIn( FALSE );
+ ImplDrawFadeIn( sal_False );
}
}
}
@@ -2556,11 +2556,11 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt )
{
if ( rTEvt.IsTrackingEnded() )
{
- mbFadeOutDown = FALSE;
+ mbFadeOutDown = sal_False;
if ( mbFadeOutPressed )
{
- mbFadeOutPressed = FALSE;
- ImplDrawFadeOut( FALSE );
+ mbFadeOutPressed = sal_False;
+ ImplDrawFadeOut( sal_False );
if ( !rTEvt.IsTrackingCanceled() )
FadeOut();
@@ -2569,12 +2569,12 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt )
else
{
Rectangle aTestRect;
- ImplGetFadeOutRect( aTestRect, TRUE );
- BOOL bNewPressed = aTestRect.IsInside( aMousePosPixel );
- if ( bNewPressed == FALSE )
+ ImplGetFadeOutRect( aTestRect, sal_True );
+ sal_Bool bNewPressed = aTestRect.IsInside( aMousePosPixel );
+ if ( bNewPressed == sal_False )
{
mbFadeOutPressed = bNewPressed;
- ImplDrawFadeOut( FALSE );
+ ImplDrawFadeOut( sal_False );
// We need a mouseevent with a position inside the button for the
// ImplStartSplit function!
@@ -2584,14 +2584,14 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt )
aOrgMEvt.GetModifier() );
ImplStartSplit( aNewMEvt );
- mbFadeOutDown = FALSE;
+ mbFadeOutDown = sal_False;
}
}
}
else
{
ImplSplitMousePos( aMousePosPixel );
- BOOL bSplit = TRUE;
+ sal_Bool bSplit = sal_True;
if ( mbDragFull )
{
if ( rTEvt.IsTrackingEnded() )
@@ -2599,8 +2599,8 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt )
if ( rTEvt.IsTrackingCanceled() )
{
ImplSplitItem* pItems = mpSplitSet->mpItems;
- USHORT nItems = mpSplitSet->mnItems;
- for ( USHORT i = 0; i < nItems; i++ )
+ sal_uInt16 nItems = mpSplitSet->mnItems;
+ for ( sal_uInt16 i = 0; i < nItems; i++ )
{
pItems[i].mnSize = mpLastSizes[i*2];
pItems[i].mnPixSize = mpLastSizes[i*2+1];
@@ -2608,7 +2608,7 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt )
ImplUpdate();
Split();
}
- bSplit = FALSE;
+ bSplit = sal_False;
}
}
else
@@ -2621,14 +2621,14 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt )
else
{
ImplDrawSplitTracking( this, aMousePosPixel );
- bSplit = FALSE;
+ bSplit = sal_False;
}
}
if ( bSplit )
{
- BOOL bPropSmaller = (mnMouseModifier & KEY_SHIFT) ? TRUE : FALSE;
- BOOL bPropGreater = (mnMouseModifier & KEY_MOD1) ? TRUE : FALSE;
+ sal_Bool bPropSmaller = (mnMouseModifier & KEY_SHIFT) ? sal_True : sal_False;
+ sal_Bool bPropGreater = (mnMouseModifier & KEY_MOD1) ? sal_True : sal_False;
long nDelta = mnMSplitPos-mnMStartPos;
if ( (mnSplitTest & SPLIT_WINDOW) && !mpMainSet->mpItems )
@@ -2712,9 +2712,9 @@ void SplitWindow::Paint( const Rectangle& )
ImplDrawBorder( this );
ImplDrawBorderLine( this );
- ImplDrawFadeOut( TRUE );
- ImplDrawFadeIn( TRUE );
- ImplDrawAutoHide( TRUE );
+ ImplDrawFadeOut( sal_True );
+ ImplDrawFadeIn( sal_True );
+ ImplDrawAutoHide( sal_True );
// FrameSet-Hintergruende zeichnen
ImplDrawBack( this, mpMainSet );
@@ -2752,9 +2752,9 @@ void SplitWindow::RequestHelp( const HelpEvent& rHEvt )
{
Point aMousePosPixel = ScreenToOutputPixel( rHEvt.GetMousePosPixel() );
Rectangle aHelpRect;
- USHORT nHelpResId = 0;
+ sal_uInt16 nHelpResId = 0;
- ImplGetAutoHideRect( aHelpRect, TRUE );
+ ImplGetAutoHideRect( aHelpRect, sal_True );
if ( aHelpRect.IsInside( aMousePosPixel ) )
{
if ( mbAutoHideIn )
@@ -2764,12 +2764,12 @@ void SplitWindow::RequestHelp( const HelpEvent& rHEvt )
}
else
{
- ImplGetFadeInRect( aHelpRect, TRUE );
+ ImplGetFadeInRect( aHelpRect, sal_True );
if ( aHelpRect.IsInside( aMousePosPixel ) )
nHelpResId = SV_HELPTEXT_FADEIN;
else
{
- ImplGetFadeOutRect( aHelpRect, TRUE );
+ ImplGetFadeOutRect( aHelpRect, sal_True );
if ( aHelpRect.IsInside( aMousePosPixel ) )
nHelpResId = SV_HELPTEXT_FADEOUT;
}
@@ -2840,12 +2840,12 @@ void SplitWindow::DataChanged( const DataChangedEvent& rDCEvt )
// -----------------------------------------------------------------------
-void SplitWindow::InsertItem( USHORT nId, Window* pWindow, long nSize,
- USHORT nPos, USHORT nSetId,
+void SplitWindow::InsertItem( sal_uInt16 nId, Window* pWindow, long nSize,
+ sal_uInt16 nPos, sal_uInt16 nSetId,
SplitWindowItemBits nBits )
{
#ifdef DBG_UTIL
- USHORT nDbgDummy;
+ sal_uInt16 nDbgDummy;
DBG_ASSERT( ImplFindSet( mpMainSet, nSetId ), "SplitWindow::InsertItem() - Set not exists" );
DBG_ASSERT( !ImplFindItem( mpMainSet, nId, nDbgDummy ), "SplitWindow::InsertItem() - Id already exists" );
#endif
@@ -2869,7 +2869,7 @@ void SplitWindow::InsertItem( USHORT nId, Window* pWindow, long nSize,
delete[] pSet->mpItems;
pSet->mpItems = pNewItems;
pSet->mnItems++;
- pSet->mbCalcPix = TRUE;
+ pSet->mbCalcPix = sal_True;
// Item anlegen und erweitern
pItem = &(pSet->mpItems[nPos]);
@@ -2897,7 +2897,7 @@ void SplitWindow::InsertItem( USHORT nId, Window* pWindow, long nSize,
pNewSet->mnItems = 0;
pNewSet->mnId = nId;
pNewSet->mnSplitSize = pSet->mnSplitSize;
- pNewSet->mbCalcPix = TRUE;
+ pNewSet->mbCalcPix = sal_True;
pItem->mpSet = pNewSet;
}
@@ -2907,8 +2907,8 @@ void SplitWindow::InsertItem( USHORT nId, Window* pWindow, long nSize,
// -----------------------------------------------------------------------
-void SplitWindow::InsertItem( USHORT nId, long nSize,
- USHORT nPos, USHORT nSetId,
+void SplitWindow::InsertItem( sal_uInt16 nId, long nSize,
+ sal_uInt16 nPos, sal_uInt16 nSetId,
SplitWindowItemBits nBits )
{
InsertItem( nId, NULL, nSize, nPos, nSetId, nBits );
@@ -2916,15 +2916,15 @@ void SplitWindow::InsertItem( USHORT nId, long nSize,
// -----------------------------------------------------------------------
-void SplitWindow::MoveItem( USHORT nId, USHORT nNewPos, USHORT nNewSetId )
+void SplitWindow::MoveItem( sal_uInt16 nId, sal_uInt16 nNewPos, sal_uInt16 nNewSetId )
{
#ifdef DBG_UTIL
- USHORT nDbgDummy;
+ sal_uInt16 nDbgDummy;
DBG_ASSERT( ImplFindItem( mpMainSet, nId, nDbgDummy ), "SplitWindow::MoveItem() - Id not found" );
DBG_ASSERT( ImplFindSet( mpMainSet, nNewSetId ), "SplitWindow::MoveItem() - Set not exists" );
#endif
- USHORT nPos;
+ sal_uInt16 nPos;
ImplSplitSet* pNewSet = ImplFindSet( mpMainSet, nNewSetId );
ImplSplitSet* pSet = ImplFindItem( mpMainSet, nId, nPos );
ImplSplitItem aTempItem;
@@ -2957,7 +2957,7 @@ void SplitWindow::MoveItem( USHORT nId, USHORT nNewPos, USHORT nNewSetId )
nNewPos = pNewSet->mnItems;
memcpy( &aTempItem, &(pSet->mpItems[nPos]), sizeof( aTempItem ) );
pSet->mnItems--;
- pSet->mbCalcPix = TRUE;
+ pSet->mbCalcPix = sal_True;
if ( pSet->mnItems )
{
memmove( pSet->mpItems+nPos, pSet->mpItems+nPos+1,
@@ -2979,7 +2979,7 @@ void SplitWindow::MoveItem( USHORT nId, USHORT nNewPos, USHORT nNewSetId )
delete[] pNewSet->mpItems;
pNewSet->mpItems = pNewItems;
pNewSet->mnItems++;
- pNewSet->mbCalcPix = TRUE;
+ pNewSet->mbCalcPix = sal_True;
memcpy( &(pNewSet->mpItems[nNewPos]), &aTempItem, sizeof( aTempItem ) );
ImplUpdate();
}
@@ -2987,15 +2987,15 @@ void SplitWindow::MoveItem( USHORT nId, USHORT nNewPos, USHORT nNewSetId )
// -----------------------------------------------------------------------
-void SplitWindow::RemoveItem( USHORT nId, BOOL bHide )
+void SplitWindow::RemoveItem( sal_uInt16 nId, sal_Bool bHide )
{
#ifdef DBG_UTIL
- USHORT nDbgDummy;
+ sal_uInt16 nDbgDummy;
DBG_ASSERT( ImplFindItem( mpMainSet, nId, nDbgDummy ), "SplitWindow::RemoveItem() - Id not found" );
#endif
// Set suchen
- USHORT nPos;
+ sal_uInt16 nPos;
ImplSplitSet* pSet = ImplFindItem( mpMainSet, nId, nPos );
ImplSplitItem* pItem = &(pSet->mpItems[nPos]);
Window* pWindow = pItem->mpWindow;
@@ -3007,7 +3007,7 @@ void SplitWindow::RemoveItem( USHORT nId, BOOL bHide )
// Item entfernen
pSet->mnItems--;
- pSet->mbCalcPix = TRUE;
+ pSet->mbCalcPix = sal_True;
if ( pSet->mnItems )
{
memmove( pSet->mpItems+nPos, pSet->mpItems+nPos+1,
@@ -3049,7 +3049,7 @@ void SplitWindow::Clear()
mpMainSet->mnItems = 0;
mpMainSet->mnId = 0;
mpMainSet->mnSplitSize = SPLITWIN_SPLITSIZE;
- mpMainSet->mbCalcPix = TRUE;
+ mpMainSet->mbCalcPix = sal_True;
if ( mnWinStyle & WB_NOSPLITDRAW )
mpMainSet->mnSplitSize -= 2;
mpBaseSet = mpMainSet;
@@ -3060,22 +3060,22 @@ void SplitWindow::Clear()
// -----------------------------------------------------------------------
-void SplitWindow::SetBaseSet( USHORT nSetId )
+void SplitWindow::SetBaseSet( sal_uInt16 nSetId )
{
mpBaseSet = ImplFindSet( mpMainSet, nSetId );
}
// -----------------------------------------------------------------------
-USHORT SplitWindow::GetBaseSet() const
+sal_uInt16 SplitWindow::GetBaseSet() const
{
return mpBaseSet->mnId;
}
// -----------------------------------------------------------------------
-void SplitWindow::SetSplitSize( USHORT nSetId, long nSplitSize,
- BOOL bWithChilds )
+void SplitWindow::SetSplitSize( sal_uInt16 nSetId, long nSplitSize,
+ sal_Bool bWithChilds )
{
ImplSplitSet* pSet = ImplFindSet( mpMainSet, nSetId );
if ( pSet )
@@ -3090,7 +3090,7 @@ void SplitWindow::SetSplitSize( USHORT nSetId, long nSplitSize,
// -----------------------------------------------------------------------
-long SplitWindow::GetSplitSize( USHORT nSetId ) const
+long SplitWindow::GetSplitSize( sal_uInt16 nSetId ) const
{
ImplSplitSet* pSet = ImplFindSet( mpMainSet, nSetId );
if ( pSet )
@@ -3101,7 +3101,7 @@ long SplitWindow::GetSplitSize( USHORT nSetId ) const
// -----------------------------------------------------------------------
-void SplitWindow::SetItemBackground( USHORT nSetId )
+void SplitWindow::SetItemBackground( sal_uInt16 nSetId )
{
Wallpaper aWall;
SetItemBackground( nSetId, aWall );
@@ -3109,13 +3109,13 @@ void SplitWindow::SetItemBackground( USHORT nSetId )
// -----------------------------------------------------------------------
-void SplitWindow::SetItemBackground( USHORT nSetId, const Wallpaper& rWallpaper )
+void SplitWindow::SetItemBackground( sal_uInt16 nSetId, const Wallpaper& rWallpaper )
{
ImplSplitSet* pSet = ImplFindSet( mpMainSet, nSetId );
if ( pSet )
{
- BOOL bUpdate = TRUE;
+ sal_Bool bUpdate = sal_True;
if ( rWallpaper.GetStyle() == WALLPAPER_NULL )
{
@@ -3125,12 +3125,12 @@ void SplitWindow::SetItemBackground( USHORT nSetId, const Wallpaper& rWallpaper
pSet->mpWallpaper = NULL;
}
else
- bUpdate = FALSE;
+ bUpdate = sal_False;
}
else
{
// Ab jetzt muss immer invalidiert werden
- mbInvalidate = TRUE;
+ mbInvalidate = sal_True;
if ( !pSet->mpWallpaper )
pSet->mpWallpaper = new Wallpaper( rWallpaper );
@@ -3149,7 +3149,7 @@ void SplitWindow::SetItemBackground( USHORT nSetId, const Wallpaper& rWallpaper
// -----------------------------------------------------------------------
-Wallpaper SplitWindow::GetItemBackground( USHORT nSetId ) const
+Wallpaper SplitWindow::GetItemBackground( sal_uInt16 nSetId ) const
{
ImplSplitSet* pSet = ImplFindSet( mpMainSet, nSetId );
@@ -3164,25 +3164,25 @@ Wallpaper SplitWindow::GetItemBackground( USHORT nSetId ) const
// -----------------------------------------------------------------------
-BOOL SplitWindow::IsItemBackground( USHORT nSetId ) const
+sal_Bool SplitWindow::IsItemBackground( sal_uInt16 nSetId ) const
{
ImplSplitSet* pSet = ImplFindSet( mpMainSet, nSetId );
if ( pSet && pSet->mpWallpaper )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-void SplitWindow::SetItemBitmap( USHORT nSetId, const Bitmap& rBitmap )
+void SplitWindow::SetItemBitmap( sal_uInt16 nSetId, const Bitmap& rBitmap )
{
ImplSplitSet* pSet = ImplFindSet( mpMainSet, nSetId );
if ( pSet )
{
- BOOL bUpdate = TRUE;
+ sal_Bool bUpdate = sal_True;
if ( !rBitmap )
{
@@ -3192,12 +3192,12 @@ void SplitWindow::SetItemBitmap( USHORT nSetId, const Bitmap& rBitmap )
pSet->mpBitmap = NULL;
}
else
- bUpdate = FALSE;
+ bUpdate = sal_False;
}
else
{
// Ab jetzt muss immer invalidiert werden
- mbInvalidate = TRUE;
+ mbInvalidate = sal_True;
if ( !pSet->mpBitmap )
pSet->mpBitmap = new Bitmap( rBitmap );
@@ -3216,7 +3216,7 @@ void SplitWindow::SetItemBitmap( USHORT nSetId, const Bitmap& rBitmap )
// -----------------------------------------------------------------------
-Bitmap SplitWindow::GetItemBitmap( USHORT nSetId ) const
+Bitmap SplitWindow::GetItemBitmap( sal_uInt16 nSetId ) const
{
ImplSplitSet* pSet = ImplFindSet( mpMainSet, nSetId );
@@ -3231,15 +3231,15 @@ Bitmap SplitWindow::GetItemBitmap( USHORT nSetId ) const
// -----------------------------------------------------------------------
-void SplitWindow::SplitItem( USHORT nId, long nNewSize,
- BOOL bPropSmall, BOOL bPropGreat )
+void SplitWindow::SplitItem( sal_uInt16 nId, long nNewSize,
+ sal_Bool bPropSmall, sal_Bool bPropGreat )
{
- USHORT nItems;
- USHORT nPos;
- USHORT nMin;
- USHORT nMax;
- USHORT i;
- USHORT n;
+ sal_uInt16 nItems;
+ sal_uInt16 nPos;
+ sal_uInt16 nMin;
+ sal_uInt16 nMax;
+ sal_uInt16 i;
+ sal_uInt16 n;
long nDelta;
long nTempDelta;
ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos );
@@ -3276,8 +3276,8 @@ void SplitWindow::SplitItem( USHORT nId, long nNewSize,
}
// Wenn das Fenster sizeable ist, wird das TopSet anders behandelt
- BOOL bSmall = TRUE;
- BOOL bGreat = TRUE;
+ sal_Bool bSmall = sal_True;
+ sal_Bool bGreat = sal_True;
if ( (pSet == mpMainSet) && (mnWinStyle & WB_SIZEABLE) )
{
if ( nPos < pSet->mnItems-1 )
@@ -3287,29 +3287,29 @@ void SplitWindow::SplitItem( USHORT nId, long nNewSize,
((nDelta < 0) && bPropGreat)) )
{
if ( nDelta < 0 )
- bGreat = FALSE;
+ bGreat = sal_False;
else
- bSmall = FALSE;
+ bSmall = sal_False;
}
}
else
{
if ( nDelta < 0 )
- bGreat = FALSE;
+ bGreat = sal_False;
else
- bSmall = FALSE;
+ bSmall = sal_False;
}
}
else if ( nPos >= nMax )
{
- bSmall = FALSE;
- bGreat = FALSE;
+ bSmall = sal_False;
+ bGreat = sal_False;
}
else if ( nPos && (nPos >= pSet->mnItems-1) )
{
nPos--;
nDelta *= -1;
- BOOL bTemp = bPropSmall;
+ sal_Bool bTemp = bPropSmall;
bPropSmall = bPropGreat;
bPropGreat = bTemp;
}
@@ -3462,9 +3462,9 @@ void SplitWindow::SplitItem( USHORT nId, long nNewSize,
// -----------------------------------------------------------------------
-void SplitWindow::SetItemSize( USHORT nId, long nNewSize )
+void SplitWindow::SetItemSize( sal_uInt16 nId, long nNewSize )
{
- USHORT nPos;
+ sal_uInt16 nPos;
ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos );
ImplSplitItem* pItem;
@@ -3477,16 +3477,16 @@ void SplitWindow::SetItemSize( USHORT nId, long nNewSize )
{
// Neue Groesse setzen und neu durchrechnen
pItem->mnSize = nNewSize;
- pSet->mbCalcPix = TRUE;
+ pSet->mbCalcPix = sal_True;
ImplUpdate();
}
}
// -----------------------------------------------------------------------
-long SplitWindow::GetItemSize( USHORT nId ) const
+long SplitWindow::GetItemSize( sal_uInt16 nId ) const
{
- USHORT nPos;
+ sal_uInt16 nPos;
ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos );
if ( pSet )
@@ -3497,9 +3497,9 @@ long SplitWindow::GetItemSize( USHORT nId ) const
// -----------------------------------------------------------------------
-long SplitWindow::GetItemSize( USHORT nId, SplitWindowItemBits nBits ) const
+long SplitWindow::GetItemSize( sal_uInt16 nId, SplitWindowItemBits nBits ) const
{
- USHORT nPos;
+ sal_uInt16 nPos;
ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos );
if ( pSet )
@@ -3513,9 +3513,9 @@ long SplitWindow::GetItemSize( USHORT nId, SplitWindowItemBits nBits ) const
long nRelSize = 0;
long nPerSize = 0;
ImplSplitItem* pItems;
- USHORT nItems;
+ sal_uInt16 nItems;
SplitWindowItemBits nTempBits;
- USHORT i;
+ sal_uInt16 i;
nItems = pSet->mnItems;
pItems = pSet->mpItems;
for ( i = 0; i < nItems; i++ )
@@ -3554,9 +3554,9 @@ long SplitWindow::GetItemSize( USHORT nId, SplitWindowItemBits nBits ) const
// -----------------------------------------------------------------------
-void SplitWindow::SetItemBits( USHORT nId, SplitWindowItemBits nNewBits )
+void SplitWindow::SetItemBits( sal_uInt16 nId, SplitWindowItemBits nNewBits )
{
- USHORT nPos;
+ sal_uInt16 nPos;
ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos );
ImplSplitItem* pItem;
@@ -3571,16 +3571,16 @@ void SplitWindow::SetItemBits( USHORT nId, SplitWindowItemBits nNewBits )
{
// Neue Bits setzen und neu durchrechnen
pItem->mnBits = nNewBits;
- pSet->mbCalcPix = TRUE;
+ pSet->mbCalcPix = sal_True;
ImplUpdate();
}
}
// -----------------------------------------------------------------------
-SplitWindowItemBits SplitWindow::GetItemBits( USHORT nId ) const
+SplitWindowItemBits SplitWindow::GetItemBits( sal_uInt16 nId ) const
{
- USHORT nPos;
+ sal_uInt16 nPos;
ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos );
if ( pSet )
@@ -3591,9 +3591,9 @@ SplitWindowItemBits SplitWindow::GetItemBits( USHORT nId ) const
// -----------------------------------------------------------------------
-Window* SplitWindow::GetItemWindow( USHORT nId ) const
+Window* SplitWindow::GetItemWindow( sal_uInt16 nId ) const
{
- USHORT nPos;
+ sal_uInt16 nPos;
ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos );
if ( pSet )
@@ -3604,9 +3604,9 @@ Window* SplitWindow::GetItemWindow( USHORT nId ) const
// -----------------------------------------------------------------------
-USHORT SplitWindow::GetSet( USHORT nId ) const
+sal_uInt16 SplitWindow::GetSet( sal_uInt16 nId ) const
{
- USHORT nPos;
+ sal_uInt16 nPos;
ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos );
if ( pSet )
@@ -3617,55 +3617,55 @@ USHORT SplitWindow::GetSet( USHORT nId ) const
// -----------------------------------------------------------------------
-BOOL SplitWindow::GetSet( USHORT nId, USHORT& rSetId, USHORT& rPos ) const
+sal_Bool SplitWindow::GetSet( sal_uInt16 nId, sal_uInt16& rSetId, sal_uInt16& rPos ) const
{
ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, rPos );
if ( pSet )
{
rSetId = pSet->mnId;
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL SplitWindow::IsItemValid( USHORT nId ) const
+sal_Bool SplitWindow::IsItemValid( sal_uInt16 nId ) const
{
- USHORT nPos;
+ sal_uInt16 nPos;
ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos );
if ( pSet )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-USHORT SplitWindow::GetItemId( Window* pWindow ) const
+sal_uInt16 SplitWindow::GetItemId( Window* pWindow ) const
{
return ImplFindItem( mpBaseSet, pWindow );
}
// -----------------------------------------------------------------------
-USHORT SplitWindow::GetItemId( const Point& rPos ) const
+sal_uInt16 SplitWindow::GetItemId( const Point& rPos ) const
{
return ImplFindItem( mpBaseSet, rPos, mbHorz, !mbBottomRight );
}
// -----------------------------------------------------------------------
-USHORT SplitWindow::GetItemPos( USHORT nId, USHORT nSetId ) const
+sal_uInt16 SplitWindow::GetItemPos( sal_uInt16 nId, sal_uInt16 nSetId ) const
{
ImplSplitSet* pSet = ImplFindSet( mpBaseSet, nSetId );
- USHORT nPos = SPLITWINDOW_ITEM_NOTFOUND;
+ sal_uInt16 nPos = SPLITWINDOW_ITEM_NOTFOUND;
if ( pSet )
{
- for ( USHORT i = 0; i < pSet->mnItems; i++ )
+ for ( sal_uInt16 i = 0; i < pSet->mnItems; i++ )
{
if ( pSet->mpItems[i].mnId == nId )
{
@@ -3680,7 +3680,7 @@ USHORT SplitWindow::GetItemPos( USHORT nId, USHORT nSetId ) const
// -----------------------------------------------------------------------
-USHORT SplitWindow::GetItemId( USHORT nPos, USHORT nSetId ) const
+sal_uInt16 SplitWindow::GetItemId( sal_uInt16 nPos, sal_uInt16 nSetId ) const
{
ImplSplitSet* pSet = ImplFindSet( mpBaseSet, nSetId );
if ( pSet && (nPos < pSet->mnItems) )
@@ -3691,7 +3691,7 @@ USHORT SplitWindow::GetItemId( USHORT nPos, USHORT nSetId ) const
// -----------------------------------------------------------------------
-USHORT SplitWindow::GetItemCount( USHORT nSetId ) const
+sal_uInt16 SplitWindow::GetItemCount( sal_uInt16 nSetId ) const
{
ImplSplitSet* pSet = ImplFindSet( mpBaseSet, nSetId );
if ( pSet )
@@ -3706,28 +3706,28 @@ void SplitWindow::ImplNewAlign()
{
if ( mbNoAlign )
{
- mbHorz = FALSE;
- mbBottomRight = FALSE;
+ mbHorz = sal_False;
+ mbBottomRight = sal_False;
}
else if ( meAlign == WINDOWALIGN_TOP )
{
- mbHorz = TRUE;
- mbBottomRight = FALSE;
+ mbHorz = sal_True;
+ mbBottomRight = sal_False;
}
else if ( meAlign == WINDOWALIGN_BOTTOM )
{
- mbHorz = TRUE;
- mbBottomRight = TRUE;
+ mbHorz = sal_True;
+ mbBottomRight = sal_True;
}
else if ( meAlign == WINDOWALIGN_LEFT )
{
- mbHorz = FALSE;
- mbBottomRight = FALSE;
+ mbHorz = sal_False;
+ mbBottomRight = sal_False;
}
else if ( meAlign == WINDOWALIGN_RIGHT )
{
- mbHorz = FALSE;
- mbBottomRight = TRUE;
+ mbHorz = sal_False;
+ mbBottomRight = sal_True;
}
if ( mnWinStyle & WB_BORDER )
@@ -3743,7 +3743,7 @@ void SplitWindow::ImplNewAlign()
// -----------------------------------------------------------------------
-void SplitWindow::SetNoAlign( BOOL bNoAlign )
+void SplitWindow::SetNoAlign( sal_Bool bNoAlign )
{
bNoAlign = bNoAlign != 0;
if ( mbNoAlign != bNoAlign )
@@ -3767,7 +3767,7 @@ void SplitWindow::SetAlign( WindowAlign eNewAlign )
// -----------------------------------------------------------------------
Size SplitWindow::CalcWindowSizePixel( const Size& rSize, WindowAlign eAlign,
- WinBits nWinStyle, BOOL bExtra )
+ WinBits nWinStyle, sal_Bool bExtra )
{
long nLeft;
long nTop;
@@ -3775,7 +3775,7 @@ Size SplitWindow::CalcWindowSizePixel( const Size& rSize, WindowAlign eAlign,
long nBottom;
Size aSize = rSize;
- ImplCalcBorder( eAlign, FALSE, nLeft, nTop, nRight, nBottom );
+ ImplCalcBorder( eAlign, sal_False, nLeft, nTop, nRight, nBottom );
aSize.Width() += nLeft+nRight;
aSize.Height() += nTop+nBottom;
@@ -3800,7 +3800,7 @@ Size SplitWindow::CalcWindowSizePixel( const Size& rSize, WindowAlign eAlign,
// -----------------------------------------------------------------------
-void SplitWindow::ShowAutoHideButton( BOOL bShow )
+void SplitWindow::ShowAutoHideButton( sal_Bool bShow )
{
mbAutoHide = bShow;
ImplUpdate();
@@ -3808,7 +3808,7 @@ void SplitWindow::ShowAutoHideButton( BOOL bShow )
// -----------------------------------------------------------------------
-void SplitWindow::ShowFadeInHideButton( BOOL bShow )
+void SplitWindow::ShowFadeInHideButton( sal_Bool bShow )
{
mbFadeIn = bShow;
ImplUpdate();
@@ -3816,7 +3816,7 @@ void SplitWindow::ShowFadeInHideButton( BOOL bShow )
// -----------------------------------------------------------------------
-void SplitWindow::ShowFadeOutButton( BOOL bShow )
+void SplitWindow::ShowFadeOutButton( sal_Bool bShow )
{
mbFadeOut = bShow;
ImplUpdate();
@@ -3824,7 +3824,7 @@ void SplitWindow::ShowFadeOutButton( BOOL bShow )
// -----------------------------------------------------------------------
-void SplitWindow::SetAutoHideState( BOOL bAutoHide )
+void SplitWindow::SetAutoHideState( sal_Bool bAutoHide )
{
mbAutoHideIn = bAutoHide;
if ( IsReallyVisible() )
@@ -3854,7 +3854,7 @@ long SplitWindow::GetFadeInSize() const
Rectangle SplitWindow::GetAutoHideRect() const
{
Rectangle aRect;
- ImplGetAutoHideRect( aRect, TRUE );
+ ImplGetAutoHideRect( aRect, sal_True );
return aRect;
}
@@ -3863,7 +3863,7 @@ Rectangle SplitWindow::GetAutoHideRect() const
Rectangle SplitWindow::GetFadeInRect() const
{
Rectangle aRect;
- ImplGetFadeInRect( aRect, TRUE );
+ ImplGetFadeInRect( aRect, sal_True );
return aRect;
}
@@ -3872,6 +3872,6 @@ Rectangle SplitWindow::GetFadeInRect() const
Rectangle SplitWindow::GetFadeOutRect() const
{
Rectangle aRect;
- ImplGetFadeOutRect( aRect, TRUE );
+ ImplGetFadeOutRect( aRect, sal_True );
return aRect;
}
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index c139ae1ffb30..69f87705e7a4 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -80,7 +80,7 @@ StatusBar::ImplData::~ImplData()
struct ImplStatusItem
{
- USHORT mnId;
+ sal_uInt16 mnId;
StatusBarItemBits mnBits;
long mnWidth;
long mnOffset;
@@ -89,9 +89,9 @@ struct ImplStatusItem
XubString maText;
XubString maHelpText;
XubString maQuickHelpText;
- ULONG mnHelpId;
+ sal_uIntPtr mnHelpId;
void* mpUserData;
- BOOL mbVisible;
+ sal_Bool mbVisible;
XubString maAccessibleName;
XubString maCommand;
};
@@ -100,7 +100,7 @@ DECLARE_LIST( ImplStatusItemList, ImplStatusItem* )
// =======================================================================
-inline long ImplCalcProgessWidth( USHORT nMax, long nSize )
+inline long ImplCalcProgessWidth( sal_uInt16 nMax, long nSize )
{
return ((nMax*(nSize+(nSize/2)))-(nSize/2)+(STATUSBAR_PRGS_OFFSET*2));
}
@@ -108,7 +108,7 @@ inline long ImplCalcProgessWidth( USHORT nMax, long nSize )
// -----------------------------------------------------------------------
static Point ImplGetItemTextPos( const Size& rRectSize, const Size& rTextSize,
- USHORT nStyle )
+ sal_uInt16 nStyle )
{
long nX;
long nY;
@@ -128,12 +128,12 @@ static Point ImplGetItemTextPos( const Size& rRectSize, const Size& rTextSize,
// -----------------------------------------------------------------------
-BOOL StatusBar::ImplIsItemUpdate()
+sal_Bool StatusBar::ImplIsItemUpdate()
{
if ( !mbProgressMode && mbVisibleItems && IsReallyVisible() && IsUpdateMode() )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -152,11 +152,11 @@ void StatusBar::ImplInit( Window* pParent, WinBits nStyle )
mpItemList = new ImplStatusItemList;
mpImplData->mpVirDev = new VirtualDevice( *this );
mnCurItemId = 0;
- mbFormat = TRUE;
- mbVisibleItems = TRUE;
- mbProgressMode = FALSE;
- mbInUserDraw = FALSE;
- mbBottomBorder = FALSE;
+ mbFormat = sal_True;
+ mbVisibleItems = sal_True;
+ mbProgressMode = sal_False;
+ mbInUserDraw = sal_False;
+ mbBottomBorder = sal_False;
mnItemsWidth = STATUSBAR_OFFSET_X;
mnDX = 0;
mnDY = 0;
@@ -164,7 +164,7 @@ void StatusBar::ImplInit( Window* pParent, WinBits nStyle )
mnItemY = STATUSBAR_OFFSET_Y;
mnTextY = STATUSBAR_OFFSET_TEXTY;
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
SetLineColor();
SetOutputSizePixel( CalcWindowSizePixel() );
@@ -214,8 +214,8 @@ StatusBar::~StatusBar()
// -----------------------------------------------------------------------
-void StatusBar::ImplInitSettings( BOOL bFont,
- BOOL bForeground, BOOL bBackground )
+void StatusBar::ImplInitSettings( sal_Bool bFont,
+ sal_Bool bForeground, sal_Bool bBackground )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
@@ -262,7 +262,7 @@ void StatusBar::ImplInitSettings( BOOL bFont,
IsNativeControlSupported( CTRL_WINDOW_BACKGROUND, PART_BACKGROUND_WINDOW ) )
{
ImplGetWindowImpl()->mnNativeBackground = PART_BACKGROUND_WINDOW;
- EnableChildTransparentMode( TRUE );
+ EnableChildTransparentMode( sal_True );
}
}
}
@@ -275,7 +275,7 @@ void StatusBar::ImplFormat()
long nExtraWidth;
long nExtraWidth2;
long nX;
- USHORT nAutoSizeItems = 0;
+ sal_uInt16 nAutoSizeItems = 0;
// Breiten zusammenrechnen
mnItemsWidth = STATUSBAR_OFFSET_X;
@@ -346,12 +346,12 @@ void StatusBar::ImplFormat()
pItem = mpItemList->Next();
}
- mbFormat = FALSE;
+ mbFormat = sal_False;
}
// -----------------------------------------------------------------------
-Rectangle StatusBar::ImplGetItemRectPos( USHORT nPos ) const
+Rectangle StatusBar::ImplGetItemRectPos( sal_uInt16 nPos ) const
{
Rectangle aRect;
ImplStatusItem* pItem;
@@ -374,11 +374,11 @@ Rectangle StatusBar::ImplGetItemRectPos( USHORT nPos ) const
// -----------------------------------------------------------------------
-USHORT StatusBar::ImplGetFirstVisiblePos() const
+sal_uInt16 StatusBar::ImplGetFirstVisiblePos() const
{
ImplStatusItem* pItem;
- for( USHORT nPos = 0; nPos < mpItemList->Count(); nPos++ )
+ for( sal_uInt16 nPos = 0; nPos < mpItemList->Count(); nPos++ )
{
pItem = mpItemList->GetObject( nPos );
if ( pItem )
@@ -393,7 +393,7 @@ USHORT StatusBar::ImplGetFirstVisiblePos() const
// -----------------------------------------------------------------------
-void StatusBar::ImplDrawText( BOOL bOffScreen, long nOldTextWidth )
+void StatusBar::ImplDrawText( sal_Bool bOffScreen, long nOldTextWidth )
{
// Das ueberschreiben der Item-Box verhindern
Rectangle aTextRect;
@@ -407,7 +407,7 @@ void StatusBar::ImplDrawText( BOOL bOffScreen, long nOldTextWidth )
{
// Position ermitteln
XubString aStr = GetText();
- USHORT nPos = aStr.Search( _LF );
+ sal_uInt16 nPos = aStr.Search( _LF );
if ( nPos != STRING_NOTFOUND )
aStr.Erase( nPos );
@@ -430,7 +430,7 @@ void StatusBar::ImplDrawText( BOOL bOffScreen, long nOldTextWidth )
// -----------------------------------------------------------------------
-void StatusBar::ImplDrawItem( BOOL bOffScreen, USHORT nPos, BOOL bDrawText, BOOL bDrawFrame )
+void StatusBar::ImplDrawItem( sal_Bool bOffScreen, sal_uInt16 nPos, sal_Bool bDrawText, sal_Bool bDrawFrame )
{
Rectangle aRect = ImplGetItemRectPos( nPos );
@@ -472,12 +472,12 @@ void StatusBar::ImplDrawItem( BOOL bOffScreen, USHORT nPos, BOOL bDrawText, BOOL
{
if ( bOffScreen )
{
- mbInUserDraw = TRUE;
+ mbInUserDraw = sal_True;
mpImplData->mpVirDev->EnableRTL( IsRTLEnabled() );
UserDrawEvent aODEvt( mpImplData->mpVirDev, Rectangle( Point(), aTextRectSize ), pItem->mnId );
UserDraw( aODEvt );
- mpImplData->mpVirDev->EnableRTL( FALSE );
- mbInUserDraw = FALSE;
+ mpImplData->mpVirDev->EnableRTL( sal_False );
+ mbInUserDraw = sal_False;
}
else
{
@@ -498,7 +498,7 @@ void StatusBar::ImplDrawItem( BOOL bOffScreen, USHORT nPos, BOOL bDrawText, BOOL
{
if( !(pItem->mnBits & SIB_FLAT) )
{
- USHORT nStyle;
+ sal_uInt16 nStyle;
if ( pItem->mnBits & SIB_IN )
nStyle = FRAME_DRAW_IN;
@@ -532,7 +532,7 @@ void StatusBar::ImplDrawItem( BOOL bOffScreen, USHORT nPos, BOOL bDrawText, BOOL
void DrawProgress( Window* pWindow, const Point& rPos,
long nOffset, long nPrgsWidth, long nPrgsHeight,
- USHORT nPercent1, USHORT nPercent2, USHORT nPercentCount,
+ sal_uInt16 nPercent1, sal_uInt16 nPercent2, sal_uInt16 nPercentCount,
const Rectangle& rFramePosSize
)
{
@@ -570,7 +570,7 @@ void DrawProgress( Window* pWindow, const Point& rPos,
pWindow->Push( PUSH_CLIPREGION );
pWindow->IntersectClipRegion( rFramePosSize );
}
- BOOL bNativeOK = pWindow->DrawNativeControl( CTRL_PROGRESS, PART_ENTIRE_CONTROL, aControlRegion,
+ sal_Bool bNativeOK = pWindow->DrawNativeControl( CTRL_PROGRESS, PART_ENTIRE_CONTROL, aControlRegion,
CTRL_STATE_ENABLED, aValue, rtl::OUString() );
if( bNeedErase )
pWindow->Pop();
@@ -582,8 +582,8 @@ void DrawProgress( Window* pWindow, const Point& rPos,
}
// Werte vorberechnen
- USHORT nPerc1 = nPercent1 / nPercentCount;
- USHORT nPerc2 = nPercent2 / nPercentCount;
+ sal_uInt16 nPerc1 = nPercent1 / nPercentCount;
+ sal_uInt16 nPerc2 = nPercent2 / nPercentCount;
if ( nPerc1 > nPerc2 )
{
@@ -648,8 +648,8 @@ void DrawProgress( Window* pWindow, const Point& rPos,
// -----------------------------------------------------------------------
-void StatusBar::ImplDrawProgress( BOOL bPaint,
- USHORT nPercent1, USHORT nPercent2 )
+void StatusBar::ImplDrawProgress( sal_Bool bPaint,
+ sal_uInt16 nPercent1, sal_uInt16 nPercent2 )
{
bool bNative = IsNativeControlSupported( CTRL_PROGRESS, PART_ENTIRE_CONTROL );
// bPaint: draw text also, else only update progress
@@ -692,7 +692,7 @@ void StatusBar::ImplCalcProgressRect()
// calculate size of progress rects
mnPrgsSize = maPrgsFrameRect.Bottom()-maPrgsFrameRect.Top()-(STATUSBAR_PRGS_OFFSET*2);
- USHORT nMaxPercent = STATUSBAR_PRGS_COUNT;
+ sal_uInt16 nMaxPercent = STATUSBAR_PRGS_COUNT;
long nMaxWidth = mnDX-STATUSBAR_OFFSET-1;
@@ -707,7 +707,7 @@ void StatusBar::ImplCalcProgressRect()
// save the divisor for later
mnPercentCount = 10000 / nMaxPercent;
- BOOL bNativeOK = FALSE;
+ sal_Bool bNativeOK = sal_False;
if( IsNativeControlSupported( CTRL_PROGRESS, PART_ENTIRE_CONTROL ) )
{
ImplControlValue aValue;
@@ -715,7 +715,7 @@ void StatusBar::ImplCalcProgressRect()
Region aNativeControlRegion, aNativeContentRegion;
if( (bNativeOK = GetNativeControlRegion( CTRL_PROGRESS, PART_ENTIRE_CONTROL, aControlRegion,
CTRL_STATE_ENABLED, aValue, rtl::OUString(),
- aNativeControlRegion, aNativeContentRegion ) ) != FALSE )
+ aNativeControlRegion, aNativeContentRegion ) ) != sal_False )
{
long nProgressHeight = aNativeControlRegion.GetBoundRect().GetHeight();
if( nProgressHeight > maPrgsFrameRect.GetHeight() )
@@ -741,7 +741,7 @@ void StatusBar::MouseButtonDown( const MouseEvent& rMEvt )
if ( mbVisibleItems )
{
Point aMousePos = rMEvt.GetPosPixel();
- USHORT i = 0;
+ sal_uInt16 i = 0;
// Item suchen, das geklickt wurde
ImplStatusItem* pItem = mpItemList->First();
@@ -781,22 +781,22 @@ void StatusBar::Paint( const Rectangle& )
if ( mbFormat )
ImplFormat();
- USHORT nItemCount = (USHORT)mpItemList->Count();
+ sal_uInt16 nItemCount = (sal_uInt16)mpItemList->Count();
if ( mbProgressMode )
- ImplDrawProgress( TRUE, 0, mnPercent );
+ ImplDrawProgress( sal_True, 0, mnPercent );
else
{
// Text zeichen
if ( !mbVisibleItems || (GetStyle() & WB_RIGHT) )
- ImplDrawText( FALSE, 0 );
+ ImplDrawText( sal_False, 0 );
// Items zeichnen
if ( mbVisibleItems )
{
// Items zeichnen
- for ( USHORT i = 0; i < nItemCount; i++ )
- ImplDrawItem( FALSE, i, TRUE, TRUE );
+ for ( sal_uInt16 i = 0; i < nItemCount; i++ )
+ ImplDrawItem( sal_False, i, sal_True, sal_True );
}
}
@@ -850,7 +850,7 @@ void StatusBar::Resize()
mnTextY += 2;
// Formatierung neu ausloesen
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( mbProgressMode )
ImplCalcProgressRect();
@@ -866,7 +866,7 @@ void StatusBar::RequestHelp( const HelpEvent& rHEvt )
if( rHEvt.KeyboardActivated() )
return;
- USHORT nItemId = GetItemId( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ) );
+ sal_uInt16 nItemId = GetItemId( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ) );
if ( nItemId )
{
@@ -904,7 +904,7 @@ void StatusBar::RequestHelp( const HelpEvent& rHEvt )
else if ( rHEvt.GetMode() & HELPMODE_EXTENDED )
{
String aCommand = GetItemCommand( nItemId );
- ULONG nHelpId = GetHelpId( nItemId );
+ sal_uIntPtr nHelpId = GetHelpId( nItemId );
if ( aCommand.Len() || nHelpId )
{
@@ -938,18 +938,18 @@ void StatusBar::StateChanged( StateChangedType nType )
else if ( (nType == STATE_CHANGE_ZOOM) ||
(nType == STATE_CHANGE_CONTROLFONT) )
{
- mbFormat = TRUE;
- ImplInitSettings( TRUE, FALSE, FALSE );
+ mbFormat = sal_True;
+ 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();
}
}
@@ -966,8 +966,8 @@ void StatusBar::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 );
ImplStatusItem* pItem = mpItemList->First();
long nFudge = GetTextHeight() / 4;
while ( pItem )
@@ -1010,9 +1010,9 @@ void StatusBar::UserDraw( const UserDrawEvent& )
// -----------------------------------------------------------------------
-void StatusBar::InsertItem( USHORT nItemId, ULONG nWidth,
+void StatusBar::InsertItem( sal_uInt16 nItemId, sal_uIntPtr nWidth,
StatusBarItemBits nBits,
- long nOffset, USHORT nPos )
+ long nOffset, sal_uInt16 nPos )
{
DBG_ASSERT( nItemId, "StatusBar::InsertItem(): ItemId == 0" );
DBG_ASSERT( GetItemPos( nItemId ) == STATUSBAR_ITEM_NOTFOUND,
@@ -1033,12 +1033,12 @@ void StatusBar::InsertItem( USHORT nItemId, ULONG nWidth,
pItem->mnOffset = nOffset;
pItem->mnHelpId = 0;
pItem->mpUserData = 0;
- pItem->mbVisible = TRUE;
+ pItem->mbVisible = sal_True;
// Item in die Liste einfuegen
mpItemList->Insert( pItem, nPos );
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( ImplIsItemUpdate() )
Invalidate();
@@ -1047,15 +1047,15 @@ void StatusBar::InsertItem( USHORT nItemId, ULONG nWidth,
// -----------------------------------------------------------------------
-void StatusBar::RemoveItem( USHORT nItemId )
+void StatusBar::RemoveItem( sal_uInt16 nItemId )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != STATUSBAR_ITEM_NOTFOUND )
{
ImplStatusItem* pItem = mpItemList->Remove( nPos );
delete pItem;
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( ImplIsItemUpdate() )
Invalidate();
@@ -1065,18 +1065,18 @@ void StatusBar::RemoveItem( USHORT nItemId )
// -----------------------------------------------------------------------
-void StatusBar::ShowItem( USHORT nItemId )
+void StatusBar::ShowItem( sal_uInt16 nItemId )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != STATUSBAR_ITEM_NOTFOUND )
{
ImplStatusItem* pItem = mpItemList->GetObject( nPos );
if ( !pItem->mbVisible )
{
- pItem->mbVisible = TRUE;
+ pItem->mbVisible = sal_True;
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( ImplIsItemUpdate() )
Invalidate();
@@ -1087,18 +1087,18 @@ void StatusBar::ShowItem( USHORT nItemId )
// -----------------------------------------------------------------------
-void StatusBar::HideItem( USHORT nItemId )
+void StatusBar::HideItem( sal_uInt16 nItemId )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != STATUSBAR_ITEM_NOTFOUND )
{
ImplStatusItem* pItem = mpItemList->GetObject( nPos );
if ( pItem->mbVisible )
{
- pItem->mbVisible = FALSE;
+ pItem->mbVisible = sal_False;
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( ImplIsItemUpdate() )
Invalidate();
@@ -1109,14 +1109,14 @@ void StatusBar::HideItem( USHORT nItemId )
// -----------------------------------------------------------------------
-BOOL StatusBar::IsItemVisible( USHORT nItemId ) const
+sal_Bool StatusBar::IsItemVisible( sal_uInt16 nItemId ) const
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != STATUSBAR_ITEM_NOTFOUND )
return mpItemList->GetObject( nPos )->mbVisible;
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -1125,7 +1125,7 @@ void StatusBar::ShowItems()
{
if ( !mbVisibleItems )
{
- mbVisibleItems = TRUE;
+ mbVisibleItems = sal_True;
if ( !mbProgressMode )
Invalidate();
@@ -1139,7 +1139,7 @@ void StatusBar::HideItems()
{
if ( mbVisibleItems )
{
- mbVisibleItems = FALSE;
+ mbVisibleItems = sal_False;
if ( !mbProgressMode )
Invalidate();
@@ -1163,7 +1163,7 @@ void StatusBar::CopyItems( const StatusBar& rStatusBar )
mpItemList->Clear();
// Items kopieren
- ULONG i = 0;
+ sal_uIntPtr i = 0;
pItem = rStatusBar.mpItemList->GetObject( i );
while ( pItem )
{
@@ -1172,7 +1172,7 @@ void StatusBar::CopyItems( const StatusBar& rStatusBar )
pItem = rStatusBar.mpItemList->GetObject( i );
}
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( ImplIsItemUpdate() )
Invalidate();
}
@@ -1192,7 +1192,7 @@ void StatusBar::Clear()
// Items aus der Liste loeschen
mpItemList->Clear();
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( ImplIsItemUpdate() )
Invalidate();
@@ -1201,14 +1201,14 @@ void StatusBar::Clear()
// -----------------------------------------------------------------------
-USHORT StatusBar::GetItemCount() const
+sal_uInt16 StatusBar::GetItemCount() const
{
- return (USHORT)mpItemList->Count();
+ return (sal_uInt16)mpItemList->Count();
}
// -----------------------------------------------------------------------
-USHORT StatusBar::GetItemId( USHORT nPos ) const
+sal_uInt16 StatusBar::GetItemId( sal_uInt16 nPos ) const
{
ImplStatusItem* pItem = mpItemList->GetObject( nPos );
if ( pItem )
@@ -1219,13 +1219,13 @@ USHORT StatusBar::GetItemId( USHORT nPos ) const
// -----------------------------------------------------------------------
-USHORT StatusBar::GetItemPos( USHORT nItemId ) const
+sal_uInt16 StatusBar::GetItemPos( sal_uInt16 nItemId ) const
{
ImplStatusItem* pItem = mpItemList->First();
while ( pItem )
{
if ( pItem->mnId == nItemId )
- return (USHORT)mpItemList->GetCurPos();
+ return (sal_uInt16)mpItemList->GetCurPos();
pItem = mpItemList->Next();
}
@@ -1235,12 +1235,12 @@ USHORT StatusBar::GetItemPos( USHORT nItemId ) const
// -----------------------------------------------------------------------
-USHORT StatusBar::GetItemId( const Point& rPos ) const
+sal_uInt16 StatusBar::GetItemId( const Point& rPos ) const
{
if ( AreItemsVisible() && !mbFormat )
{
- USHORT nItemCount = GetItemCount();
- USHORT nPos;
+ sal_uInt16 nItemCount = GetItemCount();
+ sal_uInt16 nPos;
for ( nPos = 0; nPos < nItemCount; nPos++ )
{
// Rechteck holen
@@ -1255,13 +1255,13 @@ USHORT StatusBar::GetItemId( const Point& rPos ) const
// -----------------------------------------------------------------------
-Rectangle StatusBar::GetItemRect( USHORT nItemId ) const
+Rectangle StatusBar::GetItemRect( sal_uInt16 nItemId ) const
{
Rectangle aRect;
if ( AreItemsVisible() && !mbFormat )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != STATUSBAR_ITEM_NOTFOUND )
{
// Rechteck holen und Rahmen abziehen
@@ -1280,11 +1280,11 @@ Rectangle StatusBar::GetItemRect( USHORT nItemId ) const
// -----------------------------------------------------------------------
-Point StatusBar::GetItemTextPos( USHORT nItemId ) const
+Point StatusBar::GetItemTextPos( sal_uInt16 nItemId ) const
{
if ( !mbFormat )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != STATUSBAR_ITEM_NOTFOUND )
{
// Rechteck holen
@@ -1310,9 +1310,9 @@ Point StatusBar::GetItemTextPos( USHORT nItemId ) const
// -----------------------------------------------------------------------
-ULONG StatusBar::GetItemWidth( USHORT nItemId ) const
+sal_uIntPtr StatusBar::GetItemWidth( sal_uInt16 nItemId ) const
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != STATUSBAR_ITEM_NOTFOUND )
return mpItemList->GetObject( nPos )->mnWidth;
@@ -1322,9 +1322,9 @@ ULONG StatusBar::GetItemWidth( USHORT nItemId ) const
// -----------------------------------------------------------------------
-StatusBarItemBits StatusBar::GetItemBits( USHORT nItemId ) const
+StatusBarItemBits StatusBar::GetItemBits( sal_uInt16 nItemId ) const
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != STATUSBAR_ITEM_NOTFOUND )
return mpItemList->GetObject( nPos )->mnBits;
@@ -1334,9 +1334,9 @@ StatusBarItemBits StatusBar::GetItemBits( USHORT nItemId ) const
// -----------------------------------------------------------------------
-long StatusBar::GetItemOffset( USHORT nItemId ) const
+long StatusBar::GetItemOffset( sal_uInt16 nItemId ) const
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != STATUSBAR_ITEM_NOTFOUND )
return mpItemList->GetObject( nPos )->mnOffset;
@@ -1346,9 +1346,9 @@ long StatusBar::GetItemOffset( USHORT nItemId ) const
// -----------------------------------------------------------------------
-void StatusBar::SetItemText( USHORT nItemId, const XubString& rText )
+void StatusBar::SetItemText( sal_uInt16 nItemId, const XubString& rText )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != STATUSBAR_ITEM_NOTFOUND )
{
@@ -1374,7 +1374,7 @@ void StatusBar::SetItemText( USHORT nItemId, const XubString& rText )
if ( pItem->mbVisible && !mbFormat && ImplIsItemUpdate() )
{
Update();
- ImplDrawItem( TRUE, nPos, TRUE, FALSE );
+ ImplDrawItem( sal_True, nPos, sal_True, sal_False );
Flush();
}
}
@@ -1383,9 +1383,9 @@ void StatusBar::SetItemText( USHORT nItemId, const XubString& rText )
// -----------------------------------------------------------------------
-const XubString& StatusBar::GetItemText( USHORT nItemId ) const
+const XubString& StatusBar::GetItemText( sal_uInt16 nItemId ) const
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != STATUSBAR_ITEM_NOTFOUND )
return mpItemList->GetObject( nPos )->maText;
@@ -1395,9 +1395,9 @@ const XubString& StatusBar::GetItemText( USHORT nItemId ) const
// -----------------------------------------------------------------------
-void StatusBar::SetItemCommand( USHORT nItemId, const XubString& rCommand )
+void StatusBar::SetItemCommand( sal_uInt16 nItemId, const XubString& rCommand )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != STATUSBAR_ITEM_NOTFOUND )
{
@@ -1410,9 +1410,9 @@ void StatusBar::SetItemCommand( USHORT nItemId, const XubString& rCommand )
// -----------------------------------------------------------------------
-const XubString& StatusBar::GetItemCommand( USHORT nItemId )
+const XubString& StatusBar::GetItemCommand( sal_uInt16 nItemId )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != STATUSBAR_ITEM_NOTFOUND )
return mpItemList->GetObject( nPos )->maCommand;
@@ -1422,9 +1422,9 @@ const XubString& StatusBar::GetItemCommand( USHORT nItemId )
// -----------------------------------------------------------------------
-void StatusBar::SetItemData( USHORT nItemId, void* pNewData )
+void StatusBar::SetItemData( sal_uInt16 nItemId, void* pNewData )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != STATUSBAR_ITEM_NOTFOUND )
{
@@ -1436,7 +1436,7 @@ void StatusBar::SetItemData( USHORT nItemId, void* pNewData )
!mbFormat && ImplIsItemUpdate() )
{
Update();
- ImplDrawItem( TRUE, nPos, FALSE, FALSE );
+ ImplDrawItem( sal_True, nPos, sal_False, sal_False );
Flush();
}
}
@@ -1444,9 +1444,9 @@ void StatusBar::SetItemData( USHORT nItemId, void* pNewData )
// -----------------------------------------------------------------------
-void* StatusBar::GetItemData( USHORT nItemId ) const
+void* StatusBar::GetItemData( sal_uInt16 nItemId ) const
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != STATUSBAR_ITEM_NOTFOUND )
return mpItemList->GetObject( nPos )->mpUserData;
@@ -1456,9 +1456,9 @@ void* StatusBar::GetItemData( USHORT nItemId ) const
// -----------------------------------------------------------------------
-void StatusBar::SetHelpText( USHORT nItemId, const XubString& rText )
+void StatusBar::SetHelpText( sal_uInt16 nItemId, const XubString& rText )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != STATUSBAR_ITEM_NOTFOUND )
mpItemList->GetObject( nPos )->maHelpText = rText;
@@ -1466,9 +1466,9 @@ void StatusBar::SetHelpText( USHORT nItemId, const XubString& rText )
// -----------------------------------------------------------------------
-const XubString& StatusBar::GetHelpText( USHORT nItemId ) const
+const XubString& StatusBar::GetHelpText( sal_uInt16 nItemId ) const
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != STATUSBAR_ITEM_NOTFOUND )
{
@@ -1493,9 +1493,9 @@ const XubString& StatusBar::GetHelpText( USHORT nItemId ) const
// -----------------------------------------------------------------------
-void StatusBar::SetQuickHelpText( USHORT nItemId, const XubString& rText )
+void StatusBar::SetQuickHelpText( sal_uInt16 nItemId, const XubString& rText )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != STATUSBAR_ITEM_NOTFOUND )
mpItemList->GetObject( nPos )->maQuickHelpText = rText;
@@ -1503,9 +1503,9 @@ void StatusBar::SetQuickHelpText( USHORT nItemId, const XubString& rText )
// -----------------------------------------------------------------------
-const XubString& StatusBar::GetQuickHelpText( USHORT nItemId ) const
+const XubString& StatusBar::GetQuickHelpText( sal_uInt16 nItemId ) const
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != STATUSBAR_ITEM_NOTFOUND )
{
@@ -1518,9 +1518,9 @@ const XubString& StatusBar::GetQuickHelpText( USHORT nItemId ) const
// -----------------------------------------------------------------------
-void StatusBar::SetHelpId( USHORT nItemId, ULONG nHelpId )
+void StatusBar::SetHelpId( sal_uInt16 nItemId, sal_uIntPtr nHelpId )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != STATUSBAR_ITEM_NOTFOUND )
mpItemList->GetObject( nPos )->mnHelpId = nHelpId;
@@ -1528,9 +1528,9 @@ void StatusBar::SetHelpId( USHORT nItemId, ULONG nHelpId )
// -----------------------------------------------------------------------
-ULONG StatusBar::GetHelpId( USHORT nItemId ) const
+sal_uIntPtr StatusBar::GetHelpId( sal_uInt16 nItemId ) const
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != STATUSBAR_ITEM_NOTFOUND )
return mpItemList->GetObject( nPos )->mnHelpId;
@@ -1552,11 +1552,11 @@ void StatusBar::ImplCalcBorder( )
}
if ( IsBottomBorder() )
mnCalcHeight -= 2;
- mbFormat = TRUE;
+ mbFormat = sal_True;
Invalidate();
}
-void StatusBar::SetBottomBorder( BOOL bBottomBorder )
+void StatusBar::SetBottomBorder( sal_Bool bBottomBorder )
{
if ( mbBottomBorder != bBottomBorder )
{
@@ -1565,7 +1565,7 @@ void StatusBar::SetBottomBorder( BOOL bBottomBorder )
}
}
-void StatusBar::SetTopBorder( BOOL bTopBorder )
+void StatusBar::SetTopBorder( sal_Bool bTopBorder )
{
if ( mpImplData->mbTopBorder != static_cast<bool>(bTopBorder) )
{
@@ -1574,7 +1574,7 @@ void StatusBar::SetTopBorder( BOOL bTopBorder )
}
}
-BOOL StatusBar::IsTopBorder() const
+sal_Bool StatusBar::IsTopBorder() const
{
return mpImplData->mbTopBorder;
}
@@ -1585,7 +1585,7 @@ void StatusBar::StartProgressMode( const XubString& rText )
{
DBG_ASSERT( !mbProgressMode, "StatusBar::StartProgressMode(): progress mode is active" );
- mbProgressMode = TRUE;
+ mbProgressMode = sal_True;
mnPercent = 0;
maPrgsTxt = rText;
@@ -1609,7 +1609,7 @@ void StatusBar::StartProgressMode( const XubString& rText )
// -----------------------------------------------------------------------
-void StatusBar::SetProgressValue( USHORT nNewPercent )
+void StatusBar::SetProgressValue( sal_uInt16 nNewPercent )
{
DBG_ASSERT( mbProgressMode, "StatusBar::SetProgressValue(): no progrss mode" );
DBG_ASSERTWARNING( nNewPercent <= 100, "StatusBar::SetProgressValue(): nPercent > 100" );
@@ -1620,7 +1620,7 @@ void StatusBar::SetProgressValue( USHORT nNewPercent )
{
Update();
SetLineColor();
- ImplDrawProgress( FALSE, mnPercent, nNewPercent );
+ ImplDrawProgress( sal_False, mnPercent, nNewPercent );
Flush();
}
mnPercent = nNewPercent;
@@ -1632,7 +1632,7 @@ void StatusBar::EndProgressMode()
{
DBG_ASSERT( mbProgressMode, "StatusBar::EndProgressMode(): no progress mode" );
- mbProgressMode = FALSE;
+ mbProgressMode = sal_False;
maPrgsTxt.Erase();
// Paint neu ausloesen um StatusBar wieder herzustellen
@@ -1679,7 +1679,7 @@ void StatusBar::SetText( const XubString& rText )
Update();
long nOldTextWidth = GetTextWidth( GetText() );
Window::SetText( rText );
- ImplDrawText( TRUE, nOldTextWidth );
+ ImplDrawText( sal_True, nOldTextWidth );
Flush();
}
}
@@ -1701,8 +1701,8 @@ void StatusBar::SetText( const XubString& rText )
Size StatusBar::CalcWindowSizePixel() const
{
- ULONG i = 0;
- ULONG nCount = mpItemList->Count();
+ sal_uIntPtr i = 0;
+ sal_uIntPtr nCount = mpItemList->Count();
long nOffset = 0;
long nCalcWidth = (STATUSBAR_OFFSET_X*2);
long nCalcHeight;
@@ -1764,9 +1764,9 @@ Size StatusBar::CalcWindowSizePixel() const
// -----------------------------------------------------------------------
-void StatusBar::SetAccessibleName( USHORT nItemId, const XubString& rName )
+void StatusBar::SetAccessibleName( sal_uInt16 nItemId, const XubString& rName )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != STATUSBAR_ITEM_NOTFOUND )
{
@@ -1782,9 +1782,9 @@ void StatusBar::SetAccessibleName( USHORT nItemId, const XubString& rName )
// -----------------------------------------------------------------------
-const XubString& StatusBar::GetAccessibleName( USHORT nItemId ) const
+const XubString& StatusBar::GetAccessibleName( sal_uInt16 nItemId ) const
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != STATUSBAR_ITEM_NOTFOUND )
return mpItemList->GetObject( nPos )->maAccessibleName;
diff --git a/vcl/source/window/syschild.cxx b/vcl/source/window/syschild.cxx
index ef71f83df1ee..7e24afc38092 100644
--- a/vcl/source/window/syschild.cxx
+++ b/vcl/source/window/syschild.cxx
@@ -51,7 +51,7 @@
// =======================================================================
long ImplSysChildProc( void* pInst, SalObject* /* pObject */,
- USHORT nEvent, const void* /* pEvent */ )
+ sal_uInt16 nEvent, const void* /* pEvent */ )
{
SystemChildWindow* pWindow = (SystemChildWindow*)pInst;
long nRet = 0;
@@ -63,33 +63,33 @@ long ImplSysChildProc( void* pInst, SalObject* /* pObject */,
// Focus holen und zwar so, das alle Handler gerufen
// werden, als ob dieses Fenster den Focus bekommt,
// ohne das der Frame den Focus wieder klaut
- pWindow->ImplGetFrameData()->mbSysObjFocus = TRUE;
- pWindow->ImplGetFrameData()->mbInSysObjToTopHdl = TRUE;
+ pWindow->ImplGetFrameData()->mbSysObjFocus = sal_True;
+ pWindow->ImplGetFrameData()->mbInSysObjToTopHdl = sal_True;
pWindow->ToTop( TOTOP_NOGRABFOCUS );
if( aDogTag.IsDead() )
break;
- pWindow->ImplGetFrameData()->mbInSysObjToTopHdl = FALSE;
- pWindow->ImplGetFrameData()->mbInSysObjFocusHdl = TRUE;
+ pWindow->ImplGetFrameData()->mbInSysObjToTopHdl = sal_False;
+ pWindow->ImplGetFrameData()->mbInSysObjFocusHdl = sal_True;
pWindow->GrabFocus();
if( aDogTag.IsDead() )
break;
- pWindow->ImplGetFrameData()->mbInSysObjFocusHdl = FALSE;
+ pWindow->ImplGetFrameData()->mbInSysObjFocusHdl = sal_False;
break;
case SALOBJ_EVENT_LOSEFOCUS:
// Hintenrum einen LoseFocus ausloesen, das der Status
// der Fenster dem entsprechenden Activate-Status
// entspricht
- pWindow->ImplGetFrameData()->mbSysObjFocus = FALSE;
+ pWindow->ImplGetFrameData()->mbSysObjFocus = sal_False;
if ( !pWindow->ImplGetFrameData()->mnFocusId )
{
- pWindow->ImplGetFrameData()->mbStartFocusState = TRUE;
+ pWindow->ImplGetFrameData()->mbStartFocusState = sal_True;
Application::PostUserEvent( pWindow->ImplGetFrameData()->mnFocusId, LINK( pWindow->ImplGetFrameWindow(), Window, ImplAsyncFocusHdl ) );
}
break;
case SALOBJ_EVENT_TOTOP:
- pWindow->ImplGetFrameData()->mbInSysObjToTopHdl = TRUE;
+ pWindow->ImplGetFrameData()->mbInSysObjToTopHdl = sal_True;
if ( !Application::GetFocusWindow() || pWindow->HasChildPathFocus() )
pWindow->ToTop( TOTOP_NOGRABFOCUS );
else
@@ -99,7 +99,7 @@ long ImplSysChildProc( void* pInst, SalObject* /* pObject */,
pWindow->GrabFocus();
if( aDogTag.IsDead() )
break;
- pWindow->ImplGetFrameData()->mbInSysObjToTopHdl = FALSE;
+ pWindow->ImplGetFrameData()->mbInSysObjToTopHdl = sal_False;
break;
}
@@ -108,7 +108,7 @@ long ImplSysChildProc( void* pInst, SalObject* /* pObject */,
// =======================================================================
-void SystemChildWindow::ImplInitSysChild( Window* pParent, WinBits nStyle, SystemWindowData *pData, BOOL bShow )
+void SystemChildWindow::ImplInitSysChild( Window* pParent, WinBits nStyle, SystemWindowData *pData, sal_Bool bShow )
{
mpWindowImpl->mpSysObj = ImplGetSVData()->mpDefInst->CreateObject( pParent->ImplGetFrame(), pData, bShow );
@@ -133,7 +133,7 @@ SystemChildWindow::SystemChildWindow( Window* pParent, WinBits nStyle ) :
// -----------------------------------------------------------------------
-SystemChildWindow::SystemChildWindow( Window* pParent, WinBits nStyle, SystemWindowData *pData, BOOL bShow ) :
+SystemChildWindow::SystemChildWindow( Window* pParent, WinBits nStyle, SystemWindowData *pData, sal_Bool bShow ) :
Window( WINDOW_SYSTEMCHILDWINDOW )
{
ImplInitSysChild( pParent, nStyle, pData, bShow );
@@ -177,16 +177,16 @@ const SystemEnvData* SystemChildWindow::GetSystemData() const
// -----------------------------------------------------------------------
-void SystemChildWindow::EnableEraseBackground( BOOL bEnable )
+void SystemChildWindow::EnableEraseBackground( sal_Bool bEnable )
{
if ( mpWindowImpl->mpSysObj )
mpWindowImpl->mpSysObj->EnableEraseBackground( bEnable );
}
-BOOL SystemChildWindow::IsEraseBackgroundEnabled()
+sal_Bool SystemChildWindow::IsEraseBackgroundEnabled()
{
if ( mpWindowImpl->mpSysObj )
return mpWindowImpl->mpSysObj->IsEraseBackgroundEnabled();
else
- return FALSE;
+ return sal_False;
}
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx
index f3624ef56f59..019ad941e5d6 100644
--- a/vcl/source/window/syswin.cxx
+++ b/vcl/source/window/syswin.cxx
@@ -80,16 +80,16 @@ SystemWindow::SystemWindow( WindowType nType ) :
Window( nType )
{
mpImplData = new ImplData;
- mpWindowImpl->mbSysWin = TRUE;
+ mpWindowImpl->mbSysWin = sal_True;
mpWindowImpl->mnActivateMode = ACTIVATE_MODE_GRABFOCUS;
mpMenuBar = NULL;
- mbPined = FALSE;
- mbRollUp = FALSE;
- mbRollFunc = FALSE;
- mbDockBtn = FALSE;
- mbHideBtn = FALSE;
- mbSysChild = FALSE;
+ mbPined = sal_False;
+ mbRollUp = sal_False;
+ mbRollFunc = sal_False;
+ mbDockBtn = sal_False;
+ mbHideBtn = sal_False;
+ mbSysChild = sal_False;
mnMenuBarMode = MENUBAR_MODE_NORMAL;
mnIcon = 0;
}
@@ -114,8 +114,8 @@ long SystemWindow::Notify( NotifyEvent& rNEvt )
if( pWin && pWin->IsSystemWindow() )
pMBar = ((SystemWindow*)pWin)->GetMenuBar();
}
- if ( pMBar && pMBar->ImplHandleKeyEvent( *rNEvt.GetKeyEvent(), FALSE ) )
- return TRUE;
+ if ( pMBar && pMBar->ImplHandleKeyEvent( *rNEvt.GetKeyEvent(), sal_False ) )
+ return sal_True;
}
return Window::Notify( rNEvt );
@@ -134,7 +134,7 @@ long SystemWindow::PreNotify( NotifyEvent& rNEvt )
{
// Ctrl-F6 goes directly to the document
GrabFocusToDocument();
- return TRUE;
+ return sal_True;
}
else
{
@@ -159,7 +159,7 @@ long SystemWindow::PreNotify( NotifyEvent& rNEvt )
pTList = pSysWin->mpImplData->mpTaskPaneList;
}
if( pTList && pTList->HandleKeyEvent( *rNEvt.GetKeyEvent() ) )
- return TRUE;
+ return sal_True;
}
}
return Window::PreNotify( rNEvt );
@@ -189,17 +189,17 @@ TaskPaneList* SystemWindow::GetTaskPaneList()
// -----------------------------------------------------------------------
-BOOL SystemWindow::Close()
+sal_Bool SystemWindow::Close()
{
ImplDelData aDelData;
ImplAddDel( &aDelData );
ImplCallEventListeners( VCLEVENT_WINDOW_CLOSE );
if ( aDelData.IsDelete() )
- return FALSE;
+ return sal_False;
ImplRemoveDel( &aDelData );
if ( mpWindowImpl->mxWindowPeer.is() && IsCreatedWithToolkit() )
- return FALSE;
+ return sal_False;
// Is Window not closeable, ignore close
Window* pBorderWin = ImplGetBorderWindow();
@@ -211,17 +211,17 @@ BOOL SystemWindow::Close()
if ( !(nStyle & WB_CLOSEABLE) )
{
Sound::Beep( SOUND_DISABLE, this );
- return FALSE;
+ return sal_False;
}
Hide();
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-void SystemWindow::TitleButtonClick( USHORT )
+void SystemWindow::TitleButtonClick( sal_uInt16 )
{
}
@@ -245,14 +245,14 @@ void SystemWindow::Resizing( Size& )
// -----------------------------------------------------------------------
-void SystemWindow::SetZLevel( BYTE nLevel )
+void SystemWindow::SetZLevel( sal_uInt8 nLevel )
{
Window* pWindow = this;
while ( pWindow->mpWindowImpl->mpBorderWindow )
pWindow = pWindow->mpWindowImpl->mpBorderWindow;
if ( pWindow->mpWindowImpl->mbOverlapWin && !pWindow->mpWindowImpl->mbFrame )
{
- BYTE nOldLevel = pWindow->mpWindowImpl->mpOverlapData->mnTopLevel;
+ sal_uInt8 nOldLevel = pWindow->mpWindowImpl->mpOverlapData->mnTopLevel;
pWindow->mpWindowImpl->mpOverlapData->mnTopLevel = nLevel;
// Wenn der neue Level groesser als der alte ist, schieben
// wir das Fenster nach hinten
@@ -298,7 +298,7 @@ const rtl::OUString& SystemWindow::GetRepresentedURL() const
// -----------------------------------------------------------------------
-void SystemWindow::SetIcon( USHORT nIcon )
+void SystemWindow::SetIcon( sal_uInt16 nIcon )
{
if ( mnIcon == nIcon )
return;
@@ -318,7 +318,7 @@ void SystemWindow::SetIcon( USHORT nIcon )
// -----------------------------------------------------------------------
-BYTE SystemWindow::GetZLevel() const
+sal_uInt8 SystemWindow::GetZLevel() const
{
const Window* pWindow = this;
while ( pWindow->mpWindowImpl->mpBorderWindow )
@@ -326,12 +326,12 @@ BYTE SystemWindow::GetZLevel() const
if ( pWindow->mpWindowImpl->mpOverlapData )
return pWindow->mpWindowImpl->mpOverlapData->mnTopLevel;
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-void SystemWindow::EnableSaveBackground( BOOL bSave )
+void SystemWindow::EnableSaveBackground( sal_Bool bSave )
{
if( ImplGetSVData()->maWinData.mbNoSaveBackground )
bSave = false;
@@ -349,7 +349,7 @@ void SystemWindow::EnableSaveBackground( BOOL bSave )
// -----------------------------------------------------------------------
-BOOL SystemWindow::IsSaveBackgroundEnabled() const
+sal_Bool SystemWindow::IsSaveBackgroundEnabled() const
{
const Window* pWindow = this;
while ( pWindow->mpWindowImpl->mpBorderWindow )
@@ -357,12 +357,12 @@ BOOL SystemWindow::IsSaveBackgroundEnabled() const
if ( pWindow->mpWindowImpl->mpOverlapData )
return pWindow->mpWindowImpl->mpOverlapData->mbSaveBack;
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-void SystemWindow::ShowTitleButton( USHORT nButton, BOOL bVisible )
+void SystemWindow::ShowTitleButton( sal_uInt16 nButton, sal_Bool bVisible )
{
if ( nButton == TITLE_BUTTON_DOCKING )
{
@@ -393,7 +393,7 @@ void SystemWindow::ShowTitleButton( USHORT nButton, BOOL bVisible )
// -----------------------------------------------------------------------
-BOOL SystemWindow::IsTitleButtonVisible( USHORT nButton ) const
+sal_Bool SystemWindow::IsTitleButtonVisible( sal_uInt16 nButton ) const
{
if ( nButton == TITLE_BUTTON_DOCKING )
return mbDockBtn;
@@ -403,7 +403,7 @@ BOOL SystemWindow::IsTitleButtonVisible( USHORT nButton ) const
// -----------------------------------------------------------------------
-void SystemWindow::SetPin( BOOL bPin )
+void SystemWindow::SetPin( sal_Bool bPin )
{
if ( bPin != mbPined )
{
@@ -420,16 +420,16 @@ void SystemWindow::RollUp()
if ( !mbRollUp )
{
maOrgSize = GetOutputSizePixel();
- mbRollFunc = TRUE;
+ mbRollFunc = sal_True;
Size aSize = maRollUpOutSize;
if ( !aSize.Width() )
aSize.Width() = GetOutputSizePixel().Width();
- mbRollUp = TRUE;
+ mbRollUp = sal_True;
if ( mpWindowImpl->mpBorderWindow )
- ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->SetRollUp( TRUE, aSize );
+ ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->SetRollUp( sal_True, aSize );
else
SetOutputSizePixel( aSize );
- mbRollFunc = FALSE;
+ mbRollFunc = sal_False;
}
}
@@ -439,9 +439,9 @@ void SystemWindow::RollDown()
{
if ( mbRollUp )
{
- mbRollUp = FALSE;
+ mbRollUp = sal_False;
if ( mpWindowImpl->mpBorderWindow )
- ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->SetRollUp( FALSE, maOrgSize );
+ ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->SetRollUp( sal_False, maOrgSize );
else
SetOutputSizePixel( maOrgSize );
}
@@ -503,7 +503,7 @@ Size SystemWindow::GetResizeOutputSizePixel() const
static void ImplWindowStateFromStr( WindowStateData& rData, const ByteString& rStr )
{
- ULONG nValidMask = 0;
+ sal_uIntPtr nValidMask = 0;
xub_StrLen nIndex = 0;
ByteString aTokenStr;
@@ -556,7 +556,7 @@ static void ImplWindowStateFromStr( WindowStateData& rData, const ByteString& rS
{
// #94144# allow Minimize again, should be masked out when read from configuration
// 91625 - ignore Minimize
- ULONG nState = (ULONG)aTokenStr.ToInt32();
+ sal_uIntPtr nState = (sal_uIntPtr)aTokenStr.ToInt32();
//nState &= ~(WINDOWSTATE_STATE_MINIMIZED);
rData.SetState( nState );
nValidMask |= WINDOWSTATE_MASK_STATE;
@@ -618,7 +618,7 @@ static void ImplWindowStateFromStr( WindowStateData& rData, const ByteString& rS
static void ImplWindowStateToStr( const WindowStateData& rData, ByteString& rStr )
{
- ULONG nValidMask = rData.GetMask();
+ sal_uIntPtr nValidMask = rData.GetMask();
if ( !nValidMask )
return;
@@ -638,7 +638,7 @@ static void ImplWindowStateToStr( const WindowStateData& rData, ByteString& rStr
{
// #94144# allow Minimize again, should be masked out when read from configuration
// 91625 - ignore Minimize
- ULONG nState = rData.GetState();
+ sal_uIntPtr nState = rData.GetState();
//nState &= ~(WINDOWSTATE_STATE_MINIMIZED);
rStr.Append( ByteString::CreateFromInt32( (long)nState ) );
}
@@ -718,7 +718,7 @@ void SystemWindow::ImplMoveToScreen( long& io_rX, long& io_rY, long i_nWidth, lo
void SystemWindow::SetWindowStateData( const WindowStateData& rData )
{
- ULONG nValidMask = rData.GetMask();
+ sal_uIntPtr nValidMask = rData.GetMask();
if ( !nValidMask )
return;
@@ -731,7 +731,7 @@ void SystemWindow::SetWindowStateData( const WindowStateData& rData )
if ( pWindow->mpWindowImpl->mbFrame )
{
- ULONG nState = rData.GetState();
+ sal_uIntPtr nState = rData.GetState();
SalFrameState aState;
aState.mnMask = rData.GetMask();
aState.mnX = rData.GetX();
@@ -770,7 +770,7 @@ void SystemWindow::SetWindowStateData( const WindowStateData& rData )
Rectangle aDesktop = GetDesktopRectPixel();
ImplSVData *pSVData = ImplGetSVData();
Window *pWin = pSVData->maWinData.mpFirstFrame;
- BOOL bWrapped = FALSE;
+ sal_Bool bWrapped = sal_False;
while( pWin )
{
if( !pWin->ImplIsRealParentPath( this ) &&
@@ -791,7 +791,7 @@ void SystemWindow::SetWindowStateData( const WindowStateData& rData )
(unsigned long) (aState.mnY + displacement + aState.mnHeight + g.nBottomDecoration) > (unsigned long) aDesktop.nBottom )
break; // further displacement not possible -> break
// avoid endless testing
- bWrapped = TRUE;
+ bWrapped = sal_True;
}
else
{
@@ -828,7 +828,7 @@ void SystemWindow::SetWindowStateData( const WindowStateData& rData )
}
else
{
- USHORT nPosSize = 0;
+ sal_uInt16 nPosSize = 0;
if ( nValidMask & WINDOWSTATE_MASK_X )
nPosSize |= WINDOW_POSSIZE_X;
if ( nValidMask & WINDOWSTATE_MASK_Y )
@@ -860,7 +860,7 @@ void SystemWindow::SetWindowStateData( const WindowStateData& rData )
// 91625 - ignore Minimize
if ( nValidMask & WINDOWSTATE_MASK_STATE )
{
- ULONG nState = rData.GetState();
+ sal_uIntPtr nState = rData.GetState();
if ( nState & WINDOWSTATE_STATE_ROLLUP )
RollUp();
else
@@ -873,7 +873,7 @@ void SystemWindow::SetWindowStateData( const WindowStateData& rData )
void SystemWindow::GetWindowStateData( WindowStateData& rData ) const
{
- ULONG nValidMask = rData.GetMask();
+ sal_uIntPtr nValidMask = rData.GetMask();
if ( !nValidMask )
return;
@@ -935,7 +935,7 @@ void SystemWindow::GetWindowStateData( WindowStateData& rData ) const
{
Point aPos = GetPosPixel();
Size aSize = GetSizePixel();
- ULONG nState = 0;
+ sal_uIntPtr nState = 0;
if ( IsRollUp() )
{
@@ -970,7 +970,7 @@ void SystemWindow::SetWindowState( const ByteString& rStr )
// -----------------------------------------------------------------------
-ByteString SystemWindow::GetWindowState( ULONG nMask ) const
+ByteString SystemWindow::GetWindowState( sal_uIntPtr nMask ) const
{
WindowStateData aData;
aData.SetMask( nMask );
@@ -1014,7 +1014,7 @@ void SystemWindow::SetMenuBar( MenuBar* pMenuBar )
ImplToBottomChild();
if ( pOldMenuBar )
{
- BOOL bDelete = (pMenuBar == 0) ? TRUE : FALSE;
+ sal_Bool bDelete = (pMenuBar == 0) ? sal_True : sal_False;
if( bDelete && pOldWindow )
{
if( mpImplData->mpTaskPaneList )
@@ -1047,7 +1047,7 @@ void SystemWindow::SetMenuBar( MenuBar* pMenuBar )
// -----------------------------------------------------------------------
-void SystemWindow::SetMenuBarMode( USHORT nMode )
+void SystemWindow::SetMenuBarMode( sal_uInt16 nMode )
{
if ( mnMenuBarMode != nMode )
{
@@ -1055,20 +1055,20 @@ void SystemWindow::SetMenuBarMode( USHORT nMode )
if ( mpWindowImpl->mpBorderWindow && (mpWindowImpl->mpBorderWindow->GetType() == WINDOW_BORDERWINDOW) )
{
if ( nMode == MENUBAR_MODE_HIDE )
- ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->SetMenuBarMode( TRUE );
+ ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->SetMenuBarMode( sal_True );
else
- ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->SetMenuBarMode( FALSE );
+ ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->SetMenuBarMode( sal_False );
}
}
}
// -----------------------------------------------------------------------
-BOOL SystemWindow::ImplIsInTaskPaneList( Window* pWin )
+sal_Bool SystemWindow::ImplIsInTaskPaneList( Window* pWin )
{
if( mpImplData && mpImplData->mpTaskPaneList )
return mpImplData->mpTaskPaneList->IsInList( pWin );
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
diff --git a/vcl/source/window/tabdlg.cxx b/vcl/source/window/tabdlg.cxx
index 874881c0c5ef..92c013218286 100644
--- a/vcl/source/window/tabdlg.cxx
+++ b/vcl/source/window/tabdlg.cxx
@@ -43,7 +43,7 @@ void TabDialog::ImplInitTabDialogData()
mpFixedLine = NULL;
mpViewWindow = NULL;
meViewAlign = WINDOWALIGN_LEFT;
- mbPosControls = TRUE;
+ mbPosControls = sal_True;
}
// -----------------------------------------------------------------------
@@ -105,7 +105,7 @@ void TabDialog::ImplPosControls()
long nViewOffY = 0;
long nViewWidth = 0;
long nViewHeight = 0;
- USHORT nViewPosFlags = WINDOW_POSSIZE_POS;
+ sal_uInt16 nViewPosFlags = WINDOW_POSSIZE_POS;
Size aViewSize = mpViewWindow->GetSizePixel();
if ( meViewAlign == WINDOWALIGN_TOP )
{
@@ -153,7 +153,7 @@ void TabDialog::ImplPosControls()
pTabControl->SetPosPixel( aTabOffset );
// Alle anderen Childs positionieren
- BOOL bTabCtrl = FALSE;
+ sal_Bool bTabCtrl = sal_False;
int nLines = 0;
long nX;
long nY = aDlgSize.Height();
@@ -171,7 +171,7 @@ void TabDialog::ImplPosControls()
if ( pChild2->IsVisible() && (pChild2 != mpViewWindow) )
{
if ( pChild2 == pTabControl )
- bTabCtrl = TRUE;
+ bTabCtrl = sal_True;
else if ( bTabCtrl )
{
if ( !nLines )
@@ -213,7 +213,7 @@ void TabDialog::ImplPosControls()
mpFixedLine->Show();
}
- mbPosControls = FALSE;
+ mbPosControls = sal_False;
}
// -----------------------------------------------------------------------
diff --git a/vcl/source/window/tabpage.cxx b/vcl/source/window/tabpage.cxx
index 7bfd115af8f9..26e9b9ec309a 100644
--- a/vcl/source/window/tabpage.cxx
+++ b/vcl/source/window/tabpage.cxx
@@ -58,7 +58,7 @@ void TabPage::ImplInit( Window* pParent, WinBits nStyle )
// if the tabpage is drawn (ie filled) by a native widget, make sure all contols will have transparent background
// otherwise they will paint with a wrong background
if( IsNativeControlSupported(CTRL_TAB_BODY, PART_ENTIRE_CONTROL) && GetParent() && (GetParent()->GetType() == WINDOW_TABCONTROL) )
- EnableChildTransparentMode( TRUE );
+ EnableChildTransparentMode( sal_True );
}
// -----------------------------------------------------------------------
@@ -68,16 +68,16 @@ void TabPage::ImplInitSettings()
Window* pParent = GetParent();
if ( pParent->IsChildTransparentModeEnabled() && !IsControlBackground() )
{
- EnableChildTransparentMode( TRUE );
+ EnableChildTransparentMode( sal_True );
SetParentClipMode( PARENTCLIPMODE_NOCLIP );
- SetPaintTransparent( TRUE );
+ SetPaintTransparent( sal_True );
SetBackground();
}
else
{
- EnableChildTransparentMode( FALSE );
+ EnableChildTransparentMode( sal_False );
SetParentClipMode( 0 );
- SetPaintTransparent( FALSE );
+ SetPaintTransparent( sal_False );
if ( IsControlBackground() )
SetBackground( GetControlBackground() );
@@ -167,7 +167,7 @@ void TabPage::Paint( const Rectangle& )
}
// -----------------------------------------------------------------------
-void TabPage::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG )
+void TabPage::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uIntPtr )
{
Point aPos = pDev->LogicToPixel( rPos );
Size aSize = pDev->LogicToPixel( rSize );
diff --git a/vcl/source/window/taskpanelist.cxx b/vcl/source/window/taskpanelist.cxx
index c09dc464b809..2ecaf93f4e93 100644
--- a/vcl/source/window/taskpanelist.cxx
+++ b/vcl/source/window/taskpanelist.cxx
@@ -159,7 +159,7 @@ void TaskPaneList::AddWindow( Window *pWindow )
}
mTaskPanes.insert( insertionPos, pWindow );
- pWindow->ImplIsInTaskPaneList( TRUE );
+ pWindow->ImplIsInTaskPaneList( sal_True );
}
}
@@ -172,25 +172,25 @@ void TaskPaneList::RemoveWindow( Window *pWindow )
if( p != mTaskPanes.end() )
{
mTaskPanes.erase( p );
- pWindow->ImplIsInTaskPaneList( FALSE );
+ pWindow->ImplIsInTaskPaneList( sal_False );
}
}
// --------------------------------------------------
-BOOL TaskPaneList::IsInList( Window *pWindow )
+sal_Bool TaskPaneList::IsInList( Window *pWindow )
{
::std::vector< Window* >::iterator p;
p = ::std::find( mTaskPanes.begin(), mTaskPanes.end(), pWindow );
if( p != mTaskPanes.end() )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
// --------------------------------------------------
-BOOL TaskPaneList::HandleKeyEvent( KeyEvent aKeyEvent )
+sal_Bool TaskPaneList::HandleKeyEvent( KeyEvent aKeyEvent )
{
// F6 cycles through everything and works always
@@ -202,10 +202,10 @@ BOOL TaskPaneList::HandleKeyEvent( KeyEvent aKeyEvent )
//
// Since the design of Ctrl-Tab looks to be inconsistent ( non-modal dialogs are not reachable
// and the shortcut conflicts with tab-control shortcut ), it is no more supported
- BOOL bSplitterOnly = FALSE;
- BOOL bFocusInList = FALSE;
+ sal_Bool bSplitterOnly = sal_False;
+ sal_Bool bFocusInList = sal_False;
KeyCode aKeyCode = aKeyEvent.GetKeyCode();
- BOOL bForward = !aKeyCode.IsShift();
+ sal_Bool bForward = !aKeyCode.IsShift();
if( aKeyCode.GetCode() == KEY_F6 ) // F6
{
bSplitterOnly = aKeyCode.IsMod1() && aKeyCode.IsShift();
@@ -215,43 +215,43 @@ BOOL TaskPaneList::HandleKeyEvent( KeyEvent aKeyEvent )
while( p != mTaskPanes.end() )
{
Window *pWin = *p;
- if( pWin->HasChildPathFocus( TRUE ) )
+ if( pWin->HasChildPathFocus( sal_True ) )
{
- bFocusInList = TRUE;
+ bFocusInList = sal_True;
// Ctrl-F6 goes directly to the document
if( !pWin->IsDialog() && aKeyCode.IsMod1() && !aKeyCode.IsShift() )
{
pWin->GrabFocusToDocument();
- return TRUE;
+ return sal_True;
}
// activate next task pane
Window *pNextWin = NULL;
if( bSplitterOnly )
- pNextWin = FindNextSplitter( *p, TRUE );
+ pNextWin = FindNextSplitter( *p, sal_True );
else
pNextWin = FindNextFloat( *p, bForward );
if( pNextWin != pWin )
{
- ImplGetSVData()->maWinData.mbNoSaveFocus = TRUE;
+ ImplGetSVData()->maWinData.mbNoSaveFocus = sal_True;
ImplTaskPaneListGrabFocus( pNextWin );
- ImplGetSVData()->maWinData.mbNoSaveFocus = FALSE;
+ ImplGetSVData()->maWinData.mbNoSaveFocus = sal_False;
}
else
{
// forward key if no splitter found
if( bSplitterOnly )
- return FALSE;
+ return sal_False;
// we did not find another taskpane, so
// put focus back into document
pWin->GrabFocusToDocument();
}
- return TRUE;
+ return sal_True;
}
else
p++;
@@ -262,24 +262,24 @@ BOOL TaskPaneList::HandleKeyEvent( KeyEvent aKeyEvent )
{
Window *pWin;
if( bSplitterOnly )
- pWin = FindNextSplitter( NULL, TRUE );
+ pWin = FindNextSplitter( NULL, sal_True );
else
pWin = FindNextFloat( NULL, bForward );
if( pWin )
{
ImplTaskPaneListGrabFocus( pWin );
- return TRUE;
+ return sal_True;
}
}
}
- return FALSE;
+ return sal_False;
}
// --------------------------------------------------
// returns next valid pane
-Window* TaskPaneList::FindNextPane( Window *pWindow, BOOL bForward )
+Window* TaskPaneList::FindNextPane( Window *pWindow, sal_Bool bForward )
{
if( bForward )
::std::stable_sort( mTaskPanes.begin(), mTaskPanes.end(), LTRSort() );
@@ -314,7 +314,7 @@ Window* TaskPaneList::FindNextPane( Window *pWindow, BOOL bForward )
// --------------------------------------------------
// returns next splitter
-Window* TaskPaneList::FindNextSplitter( Window *pWindow, BOOL bForward )
+Window* TaskPaneList::FindNextSplitter( Window *pWindow, sal_Bool bForward )
{
if( bForward )
::std::stable_sort( mTaskPanes.begin(), mTaskPanes.end(), LTRSort() );
@@ -353,7 +353,7 @@ Window* TaskPaneList::FindNextSplitter( Window *pWindow, BOOL bForward )
// --------------------------------------------------
// returns first valid item (regardless of type) if pWindow==0, otherwise returns next valid float
-Window* TaskPaneList::FindNextFloat( Window *pWindow, BOOL bForward )
+Window* TaskPaneList::FindNextFloat( Window *pWindow, sal_Bool bForward )
{
if( bForward )
::std::stable_sort( mTaskPanes.begin(), mTaskPanes.end(), LTRSort() );
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 9ad0b8734437..a3b3a1dfdbe4 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -112,24 +112,24 @@ DBG_NAMEEX( Window )
#define TB_MAX_GROUPS 100
-#define DOCK_LINEHSIZE ((USHORT)0x0001)
-#define DOCK_LINEVSIZE ((USHORT)0x0002)
-#define DOCK_LINERIGHT ((USHORT)0x1000)
-#define DOCK_LINEBOTTOM ((USHORT)0x2000)
-#define DOCK_LINELEFT ((USHORT)0x4000)
-#define DOCK_LINETOP ((USHORT)0x8000)
+#define DOCK_LINEHSIZE ((sal_uInt16)0x0001)
+#define DOCK_LINEVSIZE ((sal_uInt16)0x0002)
+#define DOCK_LINERIGHT ((sal_uInt16)0x1000)
+#define DOCK_LINEBOTTOM ((sal_uInt16)0x2000)
+#define DOCK_LINELEFT ((sal_uInt16)0x4000)
+#define DOCK_LINETOP ((sal_uInt16)0x8000)
#define DOCK_LINEOFFSET 3
// -----------------------------------------------------------------------
-static void ImplDrawButton( ToolBox* pThis, const Rectangle &rRect, USHORT highlight, BOOL bChecked, BOOL bEnabled, BOOL bIsWindow );
+static void ImplDrawButton( ToolBox* pThis, const Rectangle &rRect, sal_uInt16 highlight, sal_Bool bChecked, sal_Bool bEnabled, sal_Bool bIsWindow );
// -----------------------------------------------------------------------
struct ImplToolSize
{
long mnWidth;
long mnHeight;
- USHORT mnLines;
+ sal_uInt16 mnLines;
};
struct ImplToolSizeArray
@@ -157,12 +157,12 @@ private:
Accelerator maAccel;
long mnMinWidth;
long mnMaxWidth;
- USHORT mnLineMode;
- USHORT mnStartLines;
+ sal_uInt16 mnLineMode;
+ sal_uInt16 mnStartLines;
void* mpCustomizeData;
- BOOL mbCustomizeMode;
- BOOL mbResizeMode;
- BOOL mbShowDragRect;
+ sal_Bool mbCustomizeMode;
+ sal_Bool mbResizeMode;
+ sal_Bool mbShowDragRect;
public:
ImplTBDragMgr();
@@ -172,25 +172,25 @@ public:
{ mpBoxList->Insert( pBox ); }
void Remove( ToolBox* pBox )
{ mpBoxList->Remove( pBox ); }
- ULONG Count() const
+ sal_uIntPtr Count() const
{ return mpBoxList->Count(); }
ToolBox* FindToolBox( const Rectangle& rRect );
void StartDragging( ToolBox* pDragBox,
const Point& rPos, const Rectangle& rRect,
- USHORT nLineMode, BOOL bResizeItem,
+ sal_uInt16 nLineMode, sal_Bool bResizeItem,
void* pData = NULL );
void Dragging( const Point& rPos );
- void EndDragging( BOOL bOK = TRUE );
+ void EndDragging( sal_Bool bOK = sal_True );
void HideDragRect() { if ( mbShowDragRect ) mpDragBox->HideTracking(); }
void UpdateDragRect();
DECL_LINK( SelectHdl, Accelerator* );
void StartCustomizeMode();
void EndCustomizeMode();
- BOOL IsCustomizeMode() { return mbCustomizeMode; }
- BOOL IsResizeMode() { return mbResizeMode; }
+ sal_Bool IsCustomizeMode() { return mbCustomizeMode; }
+ sal_Bool IsResizeMode() { return mbResizeMode; }
};
// -----------------------------------------------------------------------
@@ -335,7 +335,7 @@ void ToolBox::ImplDrawGrip( ToolBox* pThis )
// execute pending paint requests
ImplCheckUpdate( pThis );
- BOOL bNativeOk = FALSE;
+ sal_Bool bNativeOk = sal_False;
if( pThis->IsNativeControlSupported( CTRL_TOOLBAR, pThis->mbHorz ? PART_THUMB_HORZ : PART_THUMB_VERT ) )
{
ImplControlValue aControlValue;
@@ -421,7 +421,7 @@ void ToolBox::ImplDrawGradientBackground( ToolBox* pThis, ImplDockingWindowWrapp
g.SetStartColor( startCol );
g.SetEndColor( endCol );
- BOOL bLineColor = pThis->IsLineColor();
+ sal_Bool bLineColor = pThis->IsLineColor();
Color aOldCol = pThis->GetLineColor();
pThis->SetLineColor( pThis->GetSettings().GetStyleSettings().GetShadowColor() );
@@ -511,7 +511,7 @@ void ToolBox::ImplDrawGradientBackground( ToolBox* pThis, ImplDockingWindowWrapp
if( pThis->mbHorz )
{
long y = 0;
- BOOL bDrawSep = FALSE; // pThis->ImplIsFloatingMode() && ( pThis->mnWinStyle & WB_LINESPACING );
+ sal_Bool bDrawSep = sal_False; // pThis->ImplIsFloatingMode() && ( pThis->mnWinStyle & WB_LINESPACING );
pThis->DrawGradient( Rectangle( 0, y, aTopLineSz.Width(), y+aTopLineSz.Height()), g );
y += aTopLineSz.Height();
@@ -553,7 +553,7 @@ void ToolBox::ImplDrawGradientBackground( ToolBox* pThis, ImplDockingWindowWrapp
}
-BOOL ToolBox::ImplDrawNativeBackground( ToolBox* pThis, const Region & )
+sal_Bool ToolBox::ImplDrawNativeBackground( ToolBox* pThis, const Region & )
{
// use NWF
Point aPt;
@@ -577,7 +577,7 @@ void ToolBox::ImplDrawTransparentBackground( ToolBox* pThis, const Region &rRegi
pThis->mpData->mbIsPaintLocked = bOldPaintLock;
}
-void ToolBox::ImplDrawConstantBackground( ToolBox* pThis, const Region &rRegion, BOOL bIsInPopupMode )
+void ToolBox::ImplDrawConstantBackground( ToolBox* pThis, const Region &rRegion, sal_Bool bIsInPopupMode )
{
// draw a constant color
if( !bIsInPopupMode )
@@ -598,7 +598,7 @@ void ToolBox::ImplDrawBackground( ToolBox* pThis, const Rectangle &rRect )
ImplCheckUpdate( pThis );
ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( pThis );
- BOOL bIsInPopupMode = pThis->ImplIsInPopupMode();
+ sal_Bool bIsInPopupMode = pThis->ImplIsInPopupMode();
Region aPaintRegion( rRect );
@@ -623,7 +623,7 @@ void ToolBox::ImplDrawBackground( ToolBox* pThis, const Rectangle &rRect )
// toolbars known to the dockingmanager will be drawn using NWF or a gradient
// docked toolbars are transparent and NWF is already used in the docking area which is their common background
// so NWF is used here for floating toolbars only
- BOOL bNativeOk = FALSE;
+ sal_Bool bNativeOk = sal_False;
if( pThis->ImplIsFloatingMode() && pThis->IsNativeControlSupported( CTRL_TOOLBAR, PART_ENTIRE_CONTROL) )
bNativeOk = ImplDrawNativeBackground( pThis, aPaintRegion );
@@ -643,7 +643,7 @@ void ToolBox::ImplDrawBackground( ToolBox* pThis, const Rectangle &rRect )
pThis->Pop();
}
-void ToolBox::ImplErase( ToolBox* pThis, const Rectangle &rRect, BOOL bHighlight, BOOL bHasOpenPopup )
+void ToolBox::ImplErase( ToolBox* pThis, const Rectangle &rRect, sal_Bool bHighlight, sal_Bool bHasOpenPopup )
{
// the background of non NWF buttons is painted in a constant color
// to have the same highlight color (transparency in DrawSelectionBackground())
@@ -762,7 +762,7 @@ const ImplToolItem *ToolBox::ImplGetFirstClippedItem( const ToolBox* pThis )
// -----------------------------------------------------------------------
-Size ToolBox::ImplCalcSize( const ToolBox* pThis, USHORT nCalcLines, USHORT nCalcMode )
+Size ToolBox::ImplCalcSize( const ToolBox* pThis, sal_uInt16 nCalcLines, sal_uInt16 nCalcMode )
{
long nMax;
long nLeft = 0;
@@ -771,45 +771,45 @@ Size ToolBox::ImplCalcSize( const ToolBox* pThis, USHORT nCalcLines, USHORT nCal
long nBottom = 0;
Size aSize;
WindowAlign eOldAlign = pThis->meAlign;
- BOOL bOldHorz = pThis->mbHorz;
- BOOL bOldAssumeDocked = pThis->mpData->mbAssumeDocked;
- BOOL bOldAssumeFloating = pThis->mpData->mbAssumeFloating;
+ sal_Bool bOldHorz = pThis->mbHorz;
+ sal_Bool bOldAssumeDocked = pThis->mpData->mbAssumeDocked;
+ sal_Bool bOldAssumeFloating = pThis->mpData->mbAssumeFloating;
if ( nCalcMode )
{
- BOOL bOldFloatingMode = pThis->ImplIsFloatingMode();
+ sal_Bool bOldFloatingMode = pThis->ImplIsFloatingMode();
- pThis->mpData->mbAssumeDocked = FALSE;
- pThis->mpData->mbAssumeFloating = FALSE;
+ pThis->mpData->mbAssumeDocked = sal_False;
+ pThis->mpData->mbAssumeFloating = sal_False;
if ( nCalcMode == TB_CALCMODE_HORZ )
{
- pThis->mpData->mbAssumeDocked = TRUE; // force non-floating mode during calculation
+ pThis->mpData->mbAssumeDocked = sal_True; // force non-floating mode during calculation
ImplCalcBorder( WINDOWALIGN_TOP, nLeft, nTop, nRight, nBottom, pThis );
- ((ToolBox*)pThis)->mbHorz = TRUE;
+ ((ToolBox*)pThis)->mbHorz = sal_True;
if ( pThis->mbHorz != bOldHorz )
((ToolBox*)pThis)->meAlign = WINDOWALIGN_TOP;
}
else if ( nCalcMode == TB_CALCMODE_VERT )
{
- pThis->mpData->mbAssumeDocked = TRUE; // force non-floating mode during calculation
+ pThis->mpData->mbAssumeDocked = sal_True; // force non-floating mode during calculation
ImplCalcBorder( WINDOWALIGN_LEFT, nLeft, nTop, nRight, nBottom, pThis );
- ((ToolBox*)pThis)->mbHorz = FALSE;
+ ((ToolBox*)pThis)->mbHorz = sal_False;
if ( pThis->mbHorz != bOldHorz )
((ToolBox*)pThis)->meAlign = WINDOWALIGN_LEFT;
}
else if ( nCalcMode == TB_CALCMODE_FLOAT )
{
- pThis->mpData->mbAssumeFloating = TRUE; // force non-floating mode during calculation
+ pThis->mpData->mbAssumeFloating = sal_True; // force non-floating mode during calculation
nLeft = nTop = nRight = nBottom = 0;
- ((ToolBox*)pThis)->mbHorz = TRUE;
+ ((ToolBox*)pThis)->mbHorz = sal_True;
if ( pThis->mbHorz != bOldHorz )
((ToolBox*)pThis)->meAlign = WINDOWALIGN_TOP;
}
if ( (pThis->meAlign != eOldAlign) || (pThis->mbHorz != bOldHorz) ||
(pThis->ImplIsFloatingMode() != bOldFloatingMode ) )
- ((ToolBox*)pThis)->mbCalc = TRUE;
+ ((ToolBox*)pThis)->mbCalc = sal_True;
}
else
ImplCalcBorder( pThis->meAlign, nLeft, nTop, nRight, nBottom, pThis );
@@ -871,7 +871,7 @@ Size ToolBox::ImplCalcSize( const ToolBox* pThis, USHORT nCalcLines, USHORT nCal
{
((ToolBox*)pThis)->meAlign = eOldAlign;
((ToolBox*)pThis)->mbHorz = bOldHorz;
- ((ToolBox*)pThis)->mbCalc = TRUE;
+ ((ToolBox*)pThis)->mbCalc = sal_True;
}
}
@@ -917,13 +917,13 @@ void ToolBox::ImplCalcFloatSizes( ToolBox* pThis )
// calc an upper bound for ImplCalcBreaks below
long upperBoundWidth = nCalcSize * pThis->mpData->m_aItems.size();
- USHORT i;
- USHORT nLines;
- USHORT nCalcLines;
- USHORT nTempLines;
+ sal_uInt16 i;
+ sal_uInt16 nLines;
+ sal_uInt16 nCalcLines;
+ sal_uInt16 nTempLines;
long nHeight;
long nMaxLineWidth;
- nCalcLines = pThis->ImplCalcBreaks( nCalcSize, &nMaxLineWidth, TRUE );
+ nCalcLines = pThis->ImplCalcBreaks( nCalcSize, &nMaxLineWidth, sal_True );
pThis->mpFloatSizeAry = new ImplToolSizeArray;
pThis->mpFloatSizeAry->mpSize = new ImplToolSize[nCalcLines];
@@ -945,7 +945,7 @@ void ToolBox::ImplCalcFloatSizes( ToolBox* pThis )
do
{
nCalcSize += pThis->mnMaxItemWidth;
- nTempLines = pThis->ImplCalcBreaks( nCalcSize, &nMaxLineWidth, TRUE );
+ nTempLines = pThis->ImplCalcBreaks( nCalcSize, &nMaxLineWidth, sal_True );
}
while ( (nCalcSize < upperBoundWidth) && (nLines < nTempLines) && (nTempLines != 1) );
if ( nTempLines < nLines )
@@ -957,7 +957,7 @@ void ToolBox::ImplCalcFloatSizes( ToolBox* pThis )
// -----------------------------------------------------------------------
-Size ToolBox::ImplCalcFloatSize( ToolBox* pThis, USHORT& rLines )
+Size ToolBox::ImplCalcFloatSize( ToolBox* pThis, sal_uInt16& rLines )
{
ImplCalcFloatSizes( pThis );
@@ -968,7 +968,7 @@ Size ToolBox::ImplCalcFloatSize( ToolBox* pThis, USHORT& rLines )
rLines = pThis->mnLines;
}
- USHORT i = 0;
+ sal_uInt16 i = 0;
while ( i < pThis->mpFloatSizeAry->mnLastEntry &&
rLines < pThis->mpFloatSizeAry->mpSize[i].mnLines )
i++;
@@ -987,7 +987,7 @@ void ToolBox::ImplCalcMinMaxFloatSize( ToolBox* pThis, Size& rMinSize, Size& rMa
{
ImplCalcFloatSizes( pThis );
- USHORT i = 0;
+ sal_uInt16 i = 0;
rMinSize = Size( pThis->mpFloatSizeAry->mpSize[i].mnWidth, pThis->mpFloatSizeAry->mpSize[i].mnHeight );
rMaxSize = Size( pThis->mpFloatSizeAry->mpSize[i].mnWidth, pThis->mpFloatSizeAry->mpSize[i].mnHeight );
while ( ++i <= pThis->mpFloatSizeAry->mnLastEntry )
@@ -1013,7 +1013,7 @@ void ToolBox::ImplSetMinMaxFloatSize( ToolBox *pThis )
{
pWrapper->SetMinOutputSizePixel( aMinSize );
pWrapper->SetMaxOutputSizePixel( aMaxSize );
- pWrapper->ShowTitleButton( TITLE_BUTTON_MENU, ( pThis->GetMenuType() & TOOLBOX_MENUTYPE_CUSTOMIZE) ? TRUE : FALSE );
+ pWrapper->ShowTitleButton( TITLE_BUTTON_MENU, ( pThis->GetMenuType() & TOOLBOX_MENUTYPE_CUSTOMIZE) ? sal_True : sal_False );
}
else
{
@@ -1026,7 +1026,7 @@ void ToolBox::ImplSetMinMaxFloatSize( ToolBox *pThis )
// -----------------------------------------------------------------------
-USHORT ToolBox::ImplCalcLines( ToolBox* pThis, long nToolSize )
+sal_uInt16 ToolBox::ImplCalcLines( ToolBox* pThis, long nToolSize )
{
long nLineHeight;
@@ -1054,12 +1054,12 @@ USHORT ToolBox::ImplCalcLines( ToolBox* pThis, long nToolSize )
if( nLines < 1 )
nLines = 1;
- return static_cast<USHORT>(nLines);
+ return static_cast<sal_uInt16>(nLines);
}
// -----------------------------------------------------------------------
-USHORT ToolBox::ImplTestLineSize( ToolBox* pThis, const Point& rPos )
+sal_uInt16 ToolBox::ImplTestLineSize( ToolBox* pThis, const Point& rPos )
{
if ( !pThis->ImplIsFloatingMode() &&
(!pThis->mbScroll || (pThis->mnLines > 1) || (pThis->mnCurLines > pThis->mnVisLines)) )
@@ -1094,9 +1094,9 @@ USHORT ToolBox::ImplTestLineSize( ToolBox* pThis, const Point& rPos )
// -----------------------------------------------------------------------
void ToolBox::ImplLineSizing( ToolBox* pThis, const Point& rPos, Rectangle& rRect,
- USHORT nLineMode )
+ sal_uInt16 nLineMode )
{
- BOOL mbHorz;
+ sal_Bool mbHorz;
long nOneLineSize;
long nCurSize;
long nMaxSize;
@@ -1106,31 +1106,31 @@ void ToolBox::ImplLineSizing( ToolBox* pThis, const Point& rPos, Rectangle& rRec
if ( nLineMode & DOCK_LINERIGHT )
{
nCurSize = rPos.X() - rRect.Left();
- mbHorz = FALSE;
+ mbHorz = sal_False;
}
else if ( nLineMode & DOCK_LINEBOTTOM )
{
nCurSize = rPos.Y() - rRect.Top();
- mbHorz = TRUE;
+ mbHorz = sal_True;
}
else if ( nLineMode & DOCK_LINELEFT )
{
nCurSize = rRect.Right() - rPos.X();
- mbHorz = FALSE;
+ mbHorz = sal_False;
}
else if ( nLineMode & DOCK_LINETOP )
{
nCurSize = rRect.Bottom() - rPos.Y();
- mbHorz = TRUE;
+ mbHorz = sal_True;
}
else {
DBG_ERROR( "ImplLineSizing: Trailing else" );
nCurSize = 0;
- mbHorz = FALSE;
+ mbHorz = sal_False;
}
Size aWinSize = pThis->GetSizePixel();
- USHORT nMaxLines = (pThis->mnLines > pThis->mnCurLines) ? pThis->mnLines : pThis->mnCurLines;
+ sal_uInt16 nMaxLines = (pThis->mnLines > pThis->mnCurLines) ? pThis->mnLines : pThis->mnCurLines;
if ( nMaxLines > TB_MAXLINES )
nMaxLines = TB_MAXLINES;
if ( mbHorz )
@@ -1148,7 +1148,7 @@ void ToolBox::ImplLineSizing( ToolBox* pThis, const Point& rPos, Rectangle& rRec
nMaxSize = aWinSize.Width();
}
- USHORT i = 1;
+ sal_uInt16 i = 1;
if ( nCurSize <= nOneLineSize )
nSize = nOneLineSize;
else
@@ -1189,9 +1189,9 @@ void ToolBox::ImplLineSizing( ToolBox* pThis, const Point& rPos, Rectangle& rRec
// -----------------------------------------------------------------------
-USHORT ToolBox::ImplFindItemPos( ToolBox* pBox, const Point& rPos )
+sal_uInt16 ToolBox::ImplFindItemPos( ToolBox* pBox, const Point& rPos )
{
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
long nLast = 0;
Point aPos = rPos;
Size aSize( pBox->mnDX, pBox->mnDY );
@@ -1258,9 +1258,9 @@ ImplTBDragMgr::ImplTBDragMgr()
mpBoxList = new ImplTBList( 4, 4 );
mnLineMode = 0;
mnStartLines = 0;
- mbCustomizeMode = FALSE;
- mbResizeMode = FALSE;
- mbShowDragRect = FALSE;
+ mbCustomizeMode = sal_False;
+ mbResizeMode = sal_False;
+ mbShowDragRect = sal_False;
mpDragBox = NULL;
maAccel.InsertItem( KEY_RETURN, KeyCode( KEY_RETURN ) );
@@ -1311,12 +1311,12 @@ ToolBox* ImplTBDragMgr::FindToolBox( const Rectangle& rRect )
void ImplTBDragMgr::StartDragging( ToolBox* pToolBox,
const Point& rPos, const Rectangle& rRect,
- USHORT nDragLineMode, BOOL bResizeItem,
+ sal_uInt16 nDragLineMode, sal_Bool bResizeItem,
void* pData )
{
mpDragBox = pToolBox;
pToolBox->CaptureMouse();
- pToolBox->mbDragging = TRUE;
+ pToolBox->mbDragging = sal_True;
Application::InsertAccel( &maAccel );
if ( nDragLineMode )
@@ -1348,7 +1348,7 @@ void ImplTBDragMgr::StartDragging( ToolBox* pToolBox,
maMouseOff.Y() = rRect.Top() - rPos.Y();
maRect = rRect;
maStartRect = rRect;
- mbShowDragRect = TRUE;
+ mbShowDragRect = sal_True;
pToolBox->ShowTracking( maRect );
}
@@ -1388,12 +1388,12 @@ void ImplTBDragMgr::Dragging( const Point& rPos )
// -----------------------------------------------------------------------
-void ImplTBDragMgr::EndDragging( BOOL bOK )
+void ImplTBDragMgr::EndDragging( sal_Bool bOK )
{
mpDragBox->HideTracking();
mpDragBox->ReleaseMouse();
- mpDragBox->mbDragging = FALSE;
- mbShowDragRect = FALSE;
+ mpDragBox->mbDragging = sal_False;
+ mbShowDragRect = sal_False;
Application::RemoveAccel( &maAccel );
if ( mnLineMode )
@@ -1401,16 +1401,16 @@ void ImplTBDragMgr::EndDragging( BOOL bOK )
if ( !bOK )
{
mpDragBox->mnDockLines = mnStartLines;
- mpDragBox->EndDocking( maStartRect, FALSE );
+ mpDragBox->EndDocking( maStartRect, sal_False );
}
else
- mpDragBox->EndDocking( maRect, FALSE );
+ mpDragBox->EndDocking( maRect, sal_False );
mnLineMode = 0;
mnStartLines = 0;
}
else
{
- USHORT nTempItem = mpDragBox->mnConfigItem;
+ sal_uInt16 nTempItem = mpDragBox->mnConfigItem;
if ( nTempItem )
{
mpDragBox->mnConfigItem = 0;
@@ -1428,7 +1428,7 @@ void ImplTBDragMgr::EndDragging( BOOL bOK )
pItem->mpWindow->SetSizePixel( aSize );
// ToolBox neu brechnen und neu ausgeben
- mpDragBox->ImplInvalidate( TRUE );
+ mpDragBox->ImplInvalidate( sal_True );
mpDragBox->Customize( ToolBoxCustomizeEvent( mpDragBox, nTempItem,
TOOLBOX_CUSTOMIZE_RESIZE,
mpCustomizeData ) );
@@ -1455,7 +1455,7 @@ void ImplTBDragMgr::EndDragging( BOOL bOK )
}
aPos = pDropBox->ScreenToOutputPixel( aPos );
- USHORT nPos = ToolBox::ImplFindItemPos( pDropBox, aPos );
+ sal_uInt16 nPos = ToolBox::ImplFindItemPos( pDropBox, aPos );
mpDragBox->Customize( ToolBoxCustomizeEvent( pDropBox, nTempItem,
nPos, mpCustomizeData ) );
}
@@ -1467,7 +1467,7 @@ void ImplTBDragMgr::EndDragging( BOOL bOK )
}
}
mpCustomizeData = NULL;
- mbResizeMode = FALSE;
+ mbResizeMode = sal_False;
mpDragBox->Deactivate();
}
@@ -1490,18 +1490,18 @@ void ImplTBDragMgr::UpdateDragRect()
IMPL_LINK( ImplTBDragMgr, SelectHdl, Accelerator*, pAccel )
{
if ( pAccel->GetCurItemId() == KEY_ESCAPE )
- EndDragging( FALSE );
+ EndDragging( sal_False );
else
- EndDragging( TRUE );
+ EndDragging( sal_True );
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
void ImplTBDragMgr::StartCustomizeMode()
{
- mbCustomizeMode = TRUE;
+ mbCustomizeMode = sal_True;
ToolBox* pBox = mpBoxList->First();
while ( pBox )
@@ -1515,7 +1515,7 @@ void ImplTBDragMgr::StartCustomizeMode()
void ImplTBDragMgr::EndCustomizeMode()
{
- mbCustomizeMode = FALSE;
+ mbCustomizeMode = sal_False;
ToolBox* pBox = mpBoxList->First();
while ( pBox )
@@ -1529,7 +1529,7 @@ void ImplTBDragMgr::EndCustomizeMode()
static void ImplDrawOutButton( OutputDevice* pOutDev, const Rectangle& rRect,
- USHORT nStyle )
+ sal_uInt16 nStyle )
{
const StyleSettings& rStyleSettings = pOutDev->GetSettings().GetStyleSettings();
Color aShadowColor = rStyleSettings.GetShadowColor();
@@ -1577,7 +1577,7 @@ void ToolBox::ImplInit( Window* pParent, WinBits nStyle )
{
// Variablen initialisieren
- ImplGetWindowImpl()->mbToolBox = TRUE;
+ ImplGetWindowImpl()->mbToolBox = sal_True;
mpBtnDev = NULL;
mpFloatSizeAry = NULL;
mpData = new ImplToolBoxPrivateData;
@@ -1608,26 +1608,26 @@ void ToolBox::ImplInit( Window* pParent, WinBits nStyle )
mnConfigItem = 0;
mnMouseClicks = 0;
mnMouseModifier = 0;
- mbDrag = FALSE;
- mbSelection = FALSE;
- mbCommandDrag = FALSE;
- mbUpper = FALSE;
- mbLower = FALSE;
- mbNextTool = FALSE;
- mbIn = FALSE;
- mbCalc = TRUE;
- mbFormat = FALSE;
- mbFullPaint = FALSE;
- mbHorz = TRUE;
+ mbDrag = sal_False;
+ mbSelection = sal_False;
+ mbCommandDrag = sal_False;
+ mbUpper = sal_False;
+ mbLower = sal_False;
+ mbNextTool = sal_False;
+ mbIn = sal_False;
+ mbCalc = sal_True;
+ mbFormat = sal_False;
+ mbFullPaint = sal_False;
+ mbHorz = sal_True;
mbScroll = (nStyle & WB_SCROLL) != 0;
- mbCustomize = FALSE;
- mbCustomizeMode = FALSE;
- mbDragging = FALSE;
- mbHideStatusText = FALSE;
- mbMenuStrings = FALSE;
- mbIsShift = FALSE;
- mbIsKeyEvent = FALSE;
- mbChangingHighlight = FALSE;
+ mbCustomize = sal_False;
+ mbCustomizeMode = sal_False;
+ mbDragging = sal_False;
+ mbHideStatusText = sal_False;
+ mbMenuStrings = sal_False;
+ mbIsShift = sal_False;
+ mbIsKeyEvent = sal_False;
+ mbChangingHighlight = sal_False;
meButtonType = BUTTON_SYMBOL;
meAlign = WINDOWALIGN_TOP;
meLastStyle = POINTER_ARROW;
@@ -1654,13 +1654,13 @@ void ToolBox::ImplInit( Window* pParent, WinBits nStyle )
ImplGetWindowImpl()->mnStyle &= ~WB_DIALOGCONTROL;
}
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
}
// -----------------------------------------------------------------------
-void ToolBox::ImplInitSettings( BOOL bFont,
- BOOL bForeground, BOOL bBackground )
+void ToolBox::ImplInitSettings( sal_Bool bFont,
+ sal_Bool bForeground, sal_Bool bBackground )
{
mpData->mbNativeButtons = IsNativeControlSupported( CTRL_TOOLBAR, PART_BUTTON );
@@ -1694,7 +1694,7 @@ void ToolBox::ImplInitSettings( BOOL bFont,
{
aColor = GetControlBackground();
SetBackground( aColor );
- SetPaintTransparent( FALSE );
+ SetPaintTransparent( sal_False );
SetParentClipMode( 0 );
}
else
@@ -1702,7 +1702,7 @@ void ToolBox::ImplInitSettings( BOOL bFont,
if( IsNativeControlSupported( CTRL_TOOLBAR, PART_ENTIRE_CONTROL ) )
{
SetBackground();
- SetPaintTransparent( TRUE );
+ SetPaintTransparent( sal_True );
SetParentClipMode( PARENTCLIPMODE_NOCLIP );
mpData->maDisplayBackground = Wallpaper( rStyleSettings.GetFaceColor() );
}
@@ -1714,7 +1714,7 @@ void ToolBox::ImplInitSettings( BOOL bFont,
aColor = rStyleSettings.GetWindowColor();
SetBackground( aColor );
- SetPaintTransparent( FALSE );
+ SetPaintTransparent( sal_False );
SetParentClipMode( 0 );
ImplUpdateImageList();
@@ -1733,7 +1733,7 @@ void ToolBox::ImplLoadRes( const ResId& rResId )
DockingWindow::ImplLoadRes( rResId );
- ULONG nObjMask;
+ sal_uIntPtr nObjMask;
nObjMask = ReadLongRes();
@@ -1744,17 +1744,17 @@ void ToolBox::ImplLoadRes( const ResId& rResId )
SetAlign( (WindowAlign)ReadLongRes() );
if ( nObjMask & RSC_TOOLBOX_LINECOUNT )
- SetLineCount( sal::static_int_cast<USHORT>(ReadLongRes()) );
+ SetLineCount( sal::static_int_cast<sal_uInt16>(ReadLongRes()) );
if ( nObjMask & RSC_TOOLBOX_CUSTOMIZE )
{
- BOOL bCust = (BOOL)ReadShortRes();
+ sal_Bool bCust = (sal_Bool)ReadShortRes();
EnableCustomize( bCust );
}
if ( nObjMask & RSC_TOOLBOX_MENUSTRINGS )
{
- BOOL bCust = (BOOL)ReadShortRes();
+ sal_Bool bCust = (sal_Bool)ReadShortRes();
EnableMenuStrings( bCust );
}
@@ -1769,10 +1769,10 @@ void ToolBox::ImplLoadRes( const ResId& rResId )
if ( nObjMask & RSC_TOOLBOX_ITEMLIST )
{
- ULONG nEle = ReadLongRes();
+ sal_uIntPtr nEle = ReadLongRes();
// Item hinzufuegen
- for ( ULONG i = 0; i < nEle; i++ )
+ for ( sal_uIntPtr i = 0; i < nEle; i++ )
{
InsertItem( ResId( (RSHEADER_TYPE *)GetClassRes(), *pMgr ) );
IncrementRes( GetObjSizeRes( (RSHEADER_TYPE *)GetClassRes() ) );
@@ -1803,7 +1803,7 @@ ToolBox::ToolBox( Window* pParent, const ResId& rResId ) :
// Groesse des FloatingWindows berechnen und umschalten, wenn die
// ToolBox initial im FloatingModus ist
if ( ImplIsFloatingMode() )
- mbHorz = TRUE;
+ mbHorz = sal_True;
else
Resize();
@@ -1854,7 +1854,7 @@ ToolBox::~ToolBox()
// -----------------------------------------------------------------------
-ImplToolItem* ToolBox::ImplGetItem( USHORT nItemId ) const
+ImplToolItem* ToolBox::ImplGetItem( sal_uInt16 nItemId ) const
{
std::vector< ImplToolItem >::iterator it = mpData->m_aItems.begin();
while ( it != mpData->m_aItems.end() )
@@ -1868,7 +1868,7 @@ ImplToolItem* ToolBox::ImplGetItem( USHORT nItemId ) const
}
// -----------------------------------------------------------------------
-static void ImplAddButtonBorder( long &rWidth, long& rHeight, USHORT aOutStyle, BOOL bNativeButtons )
+static void ImplAddButtonBorder( long &rWidth, long& rHeight, sal_uInt16 aOutStyle, sal_Bool bNativeButtons )
{
if ( aOutStyle & TOOLBOX_STYLE_OUTBUTTON )
{
@@ -1891,13 +1891,13 @@ static void ImplAddButtonBorder( long &rWidth, long& rHeight, USHORT aOutStyle,
// -----------------------------------------------------------------------
-BOOL ToolBox::ImplCalcItem()
+sal_Bool ToolBox::ImplCalcItem()
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
// recalc required ?
if ( !mbCalc )
- return FALSE;
+ return sal_False;
ImplDisableFlatButtons();
@@ -1989,27 +1989,27 @@ BOOL ToolBox::ImplCalcItem()
std::vector< ImplToolItem >::iterator it = mpData->m_aItems.begin();
while ( it != mpData->m_aItems.end() )
{
- BOOL bImage;
- BOOL bText;
+ sal_Bool bImage;
+ sal_Bool bText;
- it->mbVisibleText = FALSE; // indicates if text will definitely be drawn, influences dropdown pos
+ it->mbVisibleText = sal_False; // indicates if text will definitely be drawn, influences dropdown pos
if ( it->meType == TOOLBOXITEM_BUTTON )
{
// check if image and/or text exists
if ( !(it->maImage) )
- bImage = FALSE;
+ bImage = sal_False;
else
- bImage = TRUE;
+ bImage = sal_True;
if ( !it->maText.Len() )
- bText = FALSE;
+ bText = sal_False;
else
- bText = TRUE;
+ bText = sal_True;
ButtonType tmpButtonType = determineButtonType( &(*it), meButtonType ); // default to toolbox setting
if ( bImage || bText )
{
- it->mbEmptyBtn = FALSE;
+ it->mbEmptyBtn = sal_False;
if ( tmpButtonType == BUTTON_SYMBOL )
{
@@ -2022,7 +2022,7 @@ BOOL ToolBox::ImplCalcItem()
{
it->maItemSize = Size( GetCtrlTextWidth( it->maText )+TB_TEXTOFFSET,
GetTextHeight() );
- it->mbVisibleText = TRUE;
+ it->mbVisibleText = sal_True;
}
}
else if ( tmpButtonType == BUTTON_TEXT )
@@ -2032,7 +2032,7 @@ BOOL ToolBox::ImplCalcItem()
{
it->maItemSize = Size( GetCtrlTextWidth( it->maText )+TB_TEXTOFFSET,
GetTextHeight() );
- it->mbVisibleText = TRUE;
+ it->mbVisibleText = sal_True;
}
else
{
@@ -2060,7 +2060,7 @@ BOOL ToolBox::ImplCalcItem()
else
{ // no image and no text
it->maItemSize = Size( nDefWidth, nDefHeight );
- it->mbEmptyBtn = TRUE;
+ it->mbEmptyBtn = sal_True;
}
// Gegebenenfalls die Fensterhoehe mit beruecksichtigen
@@ -2140,8 +2140,8 @@ BOOL ToolBox::ImplCalcItem()
nMaxWidth = nFixedWidth;
}
- mbCalc = FALSE;
- mbFormat = TRUE;
+ mbCalc = sal_False;
+ mbFormat = sal_True;
// do we have to recalc the sizes ?
if ( (nMaxWidth != mnMaxItemWidth) || (nMaxHeight != mnMaxItemHeight) )
@@ -2149,25 +2149,25 @@ BOOL ToolBox::ImplCalcItem()
mnMaxItemWidth = nMaxWidth;
mnMaxItemHeight = nMaxHeight;
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-USHORT ToolBox::ImplCalcBreaks( long nWidth, long* pMaxLineWidth, BOOL bCalcHorz )
+sal_uInt16 ToolBox::ImplCalcBreaks( long nWidth, long* pMaxLineWidth, sal_Bool bCalcHorz )
{
- ULONG nLineStart = 0;
- ULONG nGroupStart = 0;
+ sal_uIntPtr nLineStart = 0;
+ sal_uIntPtr nGroupStart = 0;
long nLineWidth = 0;
long nCurWidth;
long nLastGroupLineWidth = 0;
long nMaxLineWidth = 0;
- USHORT nLines = 1;
- BOOL bWindow;
- BOOL bBreak = FALSE;
+ sal_uInt16 nLines = 1;
+ sal_Bool bWindow;
+ sal_Bool bBreak = sal_False;
long nWidthTotal = nWidth;
// when docked the menubutton will be in the first line
@@ -2179,12 +2179,12 @@ USHORT ToolBox::ImplCalcBreaks( long nWidth, long* pMaxLineWidth, BOOL bCalcHorz
while ( it != mpData->m_aItems.end() )
{
it->mbBreak = bBreak;
- bBreak = FALSE;
+ bBreak = sal_False;
if ( it->mbVisible )
{
- bWindow = FALSE;
- bBreak = FALSE;
+ bWindow = sal_False;
+ bBreak = sal_False;
nCurWidth = 0;
if ( it->meType == TOOLBOXITEM_BUTTON || it->meType == TOOLBOXITEM_SPACE )
@@ -2200,7 +2200,7 @@ USHORT ToolBox::ImplCalcBreaks( long nWidth, long* pMaxLineWidth, BOOL bCalcHorz
if ( !mbScroll || (nWinItemWidth <= nWidthTotal) )
{
nCurWidth = nWinItemWidth;
- bWindow = TRUE;
+ bWindow = sal_True;
}
else
{
@@ -2213,13 +2213,13 @@ USHORT ToolBox::ImplCalcBreaks( long nWidth, long* pMaxLineWidth, BOOL bCalcHorz
// check for line break
if ( (nLineWidth+nCurWidth > nWidthTotal) && mbScroll )
- bBreak = TRUE;
+ bBreak = sal_True;
}
else if ( it->meType == TOOLBOXITEM_SEPARATOR )
nCurWidth = it->mnSepSize;
// treat breaks as separators, except when using old style toolbars (ie. no menu button)
else if ( (it->meType == TOOLBOXITEM_BREAK) && !IsMenuEnabled() )
- bBreak = TRUE;
+ bBreak = sal_True;
if ( bBreak )
{
@@ -2235,8 +2235,8 @@ USHORT ToolBox::ImplCalcBreaks( long nWidth, long* pMaxLineWidth, BOOL bCalcHorz
nLineWidth = 0;
nLineStart = it - mpData->m_aItems.begin();
nGroupStart = nLineStart;
- it->mbBreak = TRUE;
- bBreak = FALSE;
+ it->mbBreak = sal_True;
+ bBreak = sal_False;
}
else
{
@@ -2300,7 +2300,7 @@ USHORT ToolBox::ImplCalcBreaks( long nWidth, long* pMaxLineWidth, BOOL bCalcHorz
// -----------------------------------------------------------------------
namespace
{
- BOOL ImplFollowedByVisibleButton( std::vector< ImplToolItem >::iterator _aSeparator, std::vector< ImplToolItem >::iterator _aEnd )
+ sal_Bool ImplFollowedByVisibleButton( std::vector< ImplToolItem >::iterator _aSeparator, std::vector< ImplToolItem >::iterator _aEnd )
{
std::vector< ImplToolItem >::iterator aLookup = _aSeparator;
while ( ++aLookup != _aEnd )
@@ -2309,9 +2309,9 @@ namespace
return ImplFollowedByVisibleButton( aLookup, _aEnd );
if ( ( aLookup->meType == TOOLBOXITEM_BUTTON ) && aLookup->mbVisible )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
}
@@ -2331,7 +2331,7 @@ Size ToolBox::ImplGetOptimalFloatingSize( FloatingSizeMode eMode )
if( eMode == FSMODE_AUTO || eMode == FSMODE_FAVOURHEIGHT )
{
// calc number of floating lines for current window height
- USHORT nFloatLinesHeight = ImplCalcLines( this, mnDY );
+ sal_uInt16 nFloatLinesHeight = ImplCalcLines( this, mnDY );
// calc window size according to this number
aSize1 = ImplCalcFloatSize( this, nFloatLinesHeight );
@@ -2347,9 +2347,9 @@ Size ToolBox::ImplGetOptimalFloatingSize( FloatingSizeMode eMode )
int nBorderY = 2*TB_BORDER_OFFSET2 + mnTopBorder + mnBottomBorder + 2*mnBorderY;
Size aSz( aCurrentSize );
long maxX;
- USHORT nLines = ImplCalcBreaks( aSz.Width()-nBorderX, &maxX, mbHorz );
+ sal_uInt16 nLines = ImplCalcBreaks( aSz.Width()-nBorderX, &maxX, mbHorz );
- USHORT manyLines = 1000;
+ sal_uInt16 manyLines = 1000;
Size aMinimalFloatSize = ImplCalcFloatSize( this, manyLines );
aSz.Height() = nBorderY + nLineHeight * nLines;
@@ -2386,7 +2386,7 @@ Size ToolBox::ImplGetOptimalFloatingSize( FloatingSizeMode eMode )
}
-void ToolBox::ImplFormat( BOOL bResize )
+void ToolBox::ImplFormat( sal_Bool bResize )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -2406,15 +2406,15 @@ void ToolBox::ImplFormat( BOOL bResize )
long nMax; // width of layoutarea in pixels
long nX;
long nY;
- USHORT nFormatLine;
- BOOL bMustFullPaint;
- BOOL bLastSep;
+ sal_uInt16 nFormatLine;
+ sal_Bool bMustFullPaint;
+ sal_Bool bLastSep;
std::vector< ImplToolItem >::iterator it;
std::vector< ImplToolItem >::iterator temp_it;
ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this );
- BOOL bIsInPopupMode = ImplIsInPopupMode();
+ sal_Bool bIsInPopupMode = ImplIsInPopupMode();
// FloatSizeAry gegebenenfalls loeschen
if ( mpFloatSizeAry )
@@ -2433,9 +2433,9 @@ void ToolBox::ImplFormat( BOOL bResize )
ImplUpdateDragArea( this );
if ( ImplCalcItem() )
- bMustFullPaint = TRUE;
+ bMustFullPaint = sal_True;
else
- bMustFullPaint = FALSE;
+ bMustFullPaint = sal_False;
// calculate new size during interactive resize or
@@ -2578,7 +2578,7 @@ void ToolBox::ImplFormat( BOOL bResize )
nX = nLeft; // top-left offset
nY = nTop;
nFormatLine = 1;
- bLastSep = TRUE;
+ bLastSep = sal_True;
// save old scroll rectangles and reset them
Rectangle aOldLowerRect = maLowerRect;
@@ -2712,7 +2712,7 @@ void ToolBox::ImplFormat( BOOL bResize )
// hide double separators
if ( it->meType == TOOLBOXITEM_SEPARATOR )
{
- it->mbVisible = FALSE;
+ it->mbVisible = sal_False;
if ( !bLastSep )
{
// check if any visible items have to appear behind it
@@ -2723,18 +2723,18 @@ void ToolBox::ImplFormat( BOOL bResize )
((temp_it->meType == TOOLBOXITEM_BUTTON) &&
temp_it->mbVisible) )
{
- it->mbVisible = TRUE;
+ it->mbVisible = sal_True;
break;
}
++temp_it;
}
}
- bLastSep = TRUE;
+ bLastSep = sal_True;
}
else if ( it->mbVisible )
- bLastSep = FALSE;
+ bLastSep = sal_False;
- it->mbShowWindow = FALSE;
+ it->mbShowWindow = sal_False;
// check for line break and advance nX/nY accordingly
if ( it->mbBreak )
@@ -2915,7 +2915,7 @@ void ToolBox::ImplFormat( BOOL bResize )
}
// indicate formatting is done
- mbFormat = FALSE;
+ mbFormat = sal_False;
}
// -----------------------------------------------------------------------
@@ -2926,7 +2926,7 @@ IMPL_LINK( ToolBox, ImplDropdownLongClickHdl, ToolBox*, EMPTYARG )
(mpData->m_aItems[ mnCurPos ].mnBits & TIB_DROPDOWN)
)
{
- mpData->mbDropDownByKeyboard = FALSE;
+ mpData->mbDropDownByKeyboard = sal_False;
GetDropdownClickHdl().Call( this );
// do not reset data if the dropdown handler opened a floating window
@@ -2935,7 +2935,7 @@ IMPL_LINK( ToolBox, ImplDropdownLongClickHdl, ToolBox*, EMPTYARG )
{
// no floater was opened
Deactivate();
- ImplDrawItem( mnCurPos, FALSE );
+ ImplDrawItem( mnCurPos, sal_False );
mnCurPos = TOOLBOX_ITEM_NOTFOUND;
mnCurItemId = 0;
@@ -2963,7 +2963,7 @@ IMPL_LINK( ToolBox, ImplUpdateHdl, void*, EMPTYARG )
// -----------------------------------------------------------------------
-static void ImplDrawMoreIndicator( ToolBox *pBox, const Rectangle& rRect, BOOL bSetColor, BOOL bRotate )
+static void ImplDrawMoreIndicator( ToolBox *pBox, const Rectangle& rRect, sal_Bool bSetColor, sal_Bool bRotate )
{
Color aOldFillColor = pBox->GetFillColor();
Color aOldLineColor = pBox->GetLineColor();
@@ -3018,10 +3018,10 @@ static void ImplDrawMoreIndicator( ToolBox *pBox, const Rectangle& rRect, BOOL b
pBox->SetLineColor( aOldLineColor );
}
-static void ImplDrawDropdownArrow( ToolBox *pBox, const Rectangle& rDropDownRect, BOOL bSetColor, BOOL bRotate )
+static void ImplDrawDropdownArrow( ToolBox *pBox, const Rectangle& rDropDownRect, sal_Bool bSetColor, sal_Bool bRotate )
{
- BOOL bLineColor = pBox->IsLineColor();
- BOOL bFillColor = pBox->IsFillColor();
+ sal_Bool bLineColor = pBox->IsLineColor();
+ sal_Bool bFillColor = pBox->IsFillColor();
Color aOldFillColor = pBox->GetFillColor();
Color aOldLineColor = pBox->GetLineColor();
pBox->SetLineColor();
@@ -3071,8 +3071,8 @@ static void ImplDrawDropdownArrow( ToolBox *pBox, const Rectangle& rDropDownRect
pBox->SetLineColor( );
}
-void ToolBox::ImplDrawToolArrow( ToolBox* pBox, long nX, long nY, BOOL bBlack, BOOL bColTransform,
- BOOL bLeft, BOOL bTop, long nSize )
+void ToolBox::ImplDrawToolArrow( ToolBox* pBox, long nX, long nY, sal_Bool bBlack, sal_Bool bColTransform,
+ sal_Bool bLeft, sal_Bool bTop, long nSize )
{
Color aOldFillColor = pBox->GetFillColor();
WindowAlign eAlign = pBox->meAlign;
@@ -3167,7 +3167,7 @@ void ToolBox::ImplDrawToolArrow( ToolBox* pBox, long nX, long nY, BOOL bBlack, B
}
void ToolBox::SetToolArrowClipregion( ToolBox* pBox, long nX, long nY,
- BOOL bLeft, BOOL bTop, long nSize )
+ sal_Bool bLeft, sal_Bool bTop, long nSize )
{
WindowAlign eAlign = pBox->meAlign;
long nHalfSize;
@@ -3222,7 +3222,7 @@ void ToolBox::SetToolArrowClipregion( ToolBox* pBox, long nX, long nY,
// -----------------------------------------------------------------------
-void ToolBox::ImplDrawMenubutton( ToolBox *pThis, BOOL bHighlight )
+void ToolBox::ImplDrawMenubutton( ToolBox *pThis, sal_Bool bHighlight )
{
if( !pThis->mpData->maMenubuttonItem.maRect.IsEmpty() )
{
@@ -3233,11 +3233,11 @@ void ToolBox::ImplDrawMenubutton( ToolBox *pThis, BOOL bHighlight )
// execute pending paint requests
ImplCheckUpdate( pThis );
- BOOL bFillColor = pThis->IsFillColor();
- BOOL bLineColor = pThis->IsLineColor();
+ sal_Bool bFillColor = pThis->IsFillColor();
+ sal_Bool bLineColor = pThis->IsLineColor();
Color aOldFillCol = pThis->GetFillColor();
Color aOldLineCol = pThis->GetLineColor();
- BOOL bNativeButtons = pThis->IsNativeControlSupported( CTRL_TOOLBAR, PART_BUTTON );
+ sal_Bool bNativeButtons = pThis->IsNativeControlSupported( CTRL_TOOLBAR, PART_BUTTON );
Rectangle aInnerRect( pThis->mpData->maMenubuttonItem.maRect );
if( pThis->mpData->mnMenuButtonWidth > TB_MENUBUTTON_SIZE )
@@ -3277,9 +3277,9 @@ void ToolBox::ImplDrawMenubutton( ToolBox *pThis, BOOL bHighlight )
if( bHighlight )
{
if( bNativeButtons )
- ImplDrawButton( pThis, pThis->mpData->maMenubuttonItem.maRect, 2, FALSE, TRUE, FALSE );
+ ImplDrawButton( pThis, pThis->mpData->maMenubuttonItem.maRect, 2, sal_False, sal_True, sal_False );
else
- pThis->DrawSelectionBackground( aInnerRect, 2, FALSE, FALSE, FALSE );
+ pThis->DrawSelectionBackground( aInnerRect, 2, sal_False, sal_False, sal_False );
}
else
{
@@ -3301,7 +3301,7 @@ void ToolBox::ImplDrawMenubutton( ToolBox *pThis, BOOL bHighlight )
aRect.Left() = aRect.Right() - aRect.getWidth()/3;
if( pThis->mpData->maMenuType & TOOLBOX_MENUTYPE_CUSTOMIZE )
- ImplDrawDropdownArrow( pThis, aRect, TRUE, !pThis->mbHorz );
+ ImplDrawDropdownArrow( pThis, aRect, sal_True, !pThis->mbHorz );
if( pThis->ImplHasClippedItems() )
{
@@ -3311,7 +3311,7 @@ void ToolBox::ImplDrawMenubutton( ToolBox *pThis, BOOL bHighlight )
else
aRect.Right() = aRect.Left() + aRect.getWidth()/3;
- ImplDrawMoreIndicator( pThis, aRect, TRUE, !pThis->mbHorz );
+ ImplDrawMoreIndicator( pThis, aRect, sal_True, !pThis->mbHorz );
}
// store highlight state
@@ -3331,30 +3331,30 @@ void ToolBox::ImplDrawMenubutton( ToolBox *pThis, BOOL bHighlight )
// -----------------------------------------------------------------------
-void ToolBox::ImplDrawSpin( BOOL bUpperIn, BOOL bLowerIn )
+void ToolBox::ImplDrawSpin( sal_Bool bUpperIn, sal_Bool bLowerIn )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
- BOOL bTmpUpper;
- BOOL bTmpLower;
+ sal_Bool bTmpUpper;
+ sal_Bool bTmpLower;
if ( maUpperRect.IsEmpty() || maLowerRect.IsEmpty() )
return;
if ( mnCurLine > 1 )
- bTmpUpper = TRUE;
+ bTmpUpper = sal_True;
else
- bTmpUpper = FALSE;
+ bTmpUpper = sal_False;
if ( mnCurLine+mnVisLines-1 < mnCurLines )
- bTmpLower = TRUE;
+ bTmpLower = sal_True;
else
- bTmpLower = FALSE;
+ bTmpLower = sal_False;
if ( !IsEnabled() )
{
- bTmpUpper = FALSE;
- bTmpLower = FALSE;
+ bTmpUpper = sal_False;
+ bTmpLower = sal_False;
}
ImplDrawSpinButton( this, maUpperRect, maLowerRect,
@@ -3363,7 +3363,7 @@ void ToolBox::ImplDrawSpin( BOOL bUpperIn, BOOL bLowerIn )
// -----------------------------------------------------------------------
-void ToolBox::ImplDrawNext( BOOL bIn )
+void ToolBox::ImplDrawNext( sal_Bool bIn )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -3375,7 +3375,7 @@ void ToolBox::ImplDrawNext( BOOL bIn )
// Button malen
long nX = SMALLBUTTON_OFF_NORMAL_X;
long nY = SMALLBUTTON_OFF_NORMAL_Y;
- USHORT nStyle = 0;
+ sal_uInt16 nStyle = 0;
if ( bIn == 1 )
{
nStyle |= BUTTON_DRAW_PRESSED;
@@ -3385,17 +3385,17 @@ void ToolBox::ImplDrawNext( BOOL bIn )
aDecoView.DrawButton( maNextToolRect, nStyle );
// Inhalt ausgeben
- BOOL bLeft = FALSE;
- BOOL bTop = FALSE;
+ sal_Bool bLeft = sal_False;
+ sal_Bool bTop = sal_False;
if ( mbHorz )
{
- bLeft = TRUE;
+ bLeft = sal_True;
nX += (maNextToolRect.GetWidth()-6)/2-4;
nY += (maNextToolRect.GetHeight()-6)/2-6;
}
else
{
- bTop = TRUE;
+ bTop = sal_True;
nY += (maNextToolRect.GetHeight()-6)/2-4;
nX += (maNextToolRect.GetWidth()-6)/2-6;
}
@@ -3404,17 +3404,17 @@ void ToolBox::ImplDrawNext( BOOL bIn )
nY += maNextToolRect.Top();
SetLineColor();
SetFillColor( COL_LIGHTBLUE );
- ImplDrawToolArrow( this, nX, nY, TRUE, FALSE, bLeft, bTop, 10 );
+ ImplDrawToolArrow( this, nX, nY, sal_True, sal_False, bLeft, bTop, 10 );
}
// -----------------------------------------------------------------------
-static void ImplDrawButton( ToolBox* pThis, const Rectangle &rRect, USHORT highlight, BOOL bChecked, BOOL bEnabled, BOOL bIsWindow )
+static void ImplDrawButton( ToolBox* pThis, const Rectangle &rRect, sal_uInt16 highlight, sal_Bool bChecked, sal_Bool bEnabled, sal_Bool bIsWindow )
{
// draws toolbar button background either native or using a coloured selection
- // if bIsWindow is TRUE, the corresponding item is a control and only a selection border will be drawn
+ // if bIsWindow is sal_True, the corresponding item is a control and only a selection border will be drawn
- BOOL bNativeOk = FALSE;
+ sal_Bool bNativeOk = sal_False;
if( !bIsWindow && pThis->IsNativeControlSupported( CTRL_TOOLBAR, PART_BUTTON ) )
{
ImplControlValue aControlValue;
@@ -3433,10 +3433,10 @@ static void ImplDrawButton( ToolBox* pThis, const Rectangle &rRect, USHORT highl
}
if( !bNativeOk )
- pThis->DrawSelectionBackground( rRect, bIsWindow ? 3 : highlight, bChecked, TRUE, bIsWindow, 2, NULL, NULL );
+ pThis->DrawSelectionBackground( rRect, bIsWindow ? 3 : highlight, bChecked, sal_True, bIsWindow, 2, NULL, NULL );
}
-void ToolBox::ImplDrawItem( USHORT nPos, BOOL bHighlight, BOOL bPaint, BOOL bLayout )
+void ToolBox::ImplDrawItem( sal_uInt16 nPos, sal_Bool bHighlight, sal_Bool bPaint, sal_Bool bLayout )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -3461,13 +3461,13 @@ void ToolBox::ImplDrawItem( USHORT nPos, BOOL bHighlight, BOOL bPaint, BOOL bLay
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
// no gradient background for items that have a popup open
- BOOL bHasOpenPopup = (mpFloatWin != NULL) && (mnDownItemId==pItem->mnId);
+ sal_Bool bHasOpenPopup = (mpFloatWin != NULL) && (mnDownItemId==pItem->mnId);
- BOOL bHighContrastWhite = FALSE;
+ sal_Bool bHighContrastWhite = sal_False;
// check the face color as highcontrast indicator
// because the toolbox itself might have a gradient
if( rStyleSettings.GetFaceColor() == Color( COL_WHITE ) )
- bHighContrastWhite = TRUE;
+ bHighContrastWhite = sal_True;
// draw separators in flat style only
if ( !bLayout &&
@@ -3534,18 +3534,18 @@ void ToolBox::ImplDrawItem( USHORT nPos, BOOL bHighlight, BOOL bPaint, BOOL bLay
Size aSize( GetCtrlTextWidth( pItem->maText ), GetTextHeight() );
Point aPos( pItem->maRect.Left()+2, pItem->maRect.Top() );
aPos.Y() += (pItem->maRect.GetHeight()-aSize.Height())/2;
- BOOL bClip;
+ sal_Bool bClip;
if ( (aSize.Width() > pItem->maRect.GetWidth()-2) ||
(aSize.Height() > pItem->maRect.GetHeight()-2) )
{
- bClip = TRUE;
+ bClip = sal_True;
Rectangle aTempRect( pItem->maRect.Left()+1, pItem->maRect.Top()+1,
pItem->maRect.Right()-1, pItem->maRect.Bottom()-1 );
Region aTempRegion( aTempRect );
SetClipRegion( aTempRegion );
}
else
- bClip = FALSE;
+ bClip = sal_False;
if( bLayout )
{
mpData->m_pLayoutData->m_aLineIndices.push_back( mpData->m_pLayoutData->m_aDisplayText.Len() );
@@ -3586,7 +3586,7 @@ void ToolBox::ImplDrawItem( USHORT nPos, BOOL bHighlight, BOOL bPaint, BOOL bLay
long nImageOffY=0;
long nTextOffX=0;
long nTextOffY=0;
- USHORT nStyle = 0;
+ sal_uInt16 nStyle = 0;
if ( pItem->meState == STATE_CHECK )
{
@@ -3637,8 +3637,8 @@ void ToolBox::ImplDrawItem( USHORT nPos, BOOL bHighlight, BOOL bPaint, BOOL bLay
nOffY += pItem->maRect.Top();
// determine what has to be drawn on the button: image, text or both
- BOOL bImage;
- BOOL bText;
+ sal_Bool bImage;
+ sal_Bool bText;
ButtonType tmpButtonType = determineButtonType( pItem, meButtonType ); // default to toolbox setting
pItem->DetermineButtonDrawStyle( tmpButtonType, bImage, bText );
@@ -3657,7 +3657,7 @@ void ToolBox::ImplDrawItem( USHORT nPos, BOOL bHighlight, BOOL bPaint, BOOL bLay
if ( bImage && ! bLayout )
{
const Image* pImage;
- if ( bHighlight && (!(pItem->maHighImage)) == FALSE )
+ if ( bHighlight && (!(pItem->maHighImage)) == sal_False )
pImage = &(pItem->maHighImage);
else
pImage = &(pItem->maImage);
@@ -3665,7 +3665,7 @@ void ToolBox::ImplDrawItem( USHORT nPos, BOOL bHighlight, BOOL bPaint, BOOL bLay
aImageSize = pImage->GetSizePixel();
// determine drawing flags
- USHORT nImageStyle = 0;
+ sal_uInt16 nImageStyle = 0;
if ( !pItem->mbEnabled || !IsEnabled() )
nImageStyle |= IMAGE_DRAW_DISABLE;
@@ -3696,7 +3696,7 @@ void ToolBox::ImplDrawItem( USHORT nPos, BOOL bHighlight, BOOL bPaint, BOOL bLay
if( bHasOpenPopup )
ImplDrawFloatwinBorder( pItem );
else
- ImplDrawButton( this, aButtonRect, bHighlight, pItem->meState == STATE_CHECK, pItem->mbEnabled && IsEnabled(), pItem->mbShowWindow ? TRUE : FALSE );
+ ImplDrawButton( this, aButtonRect, bHighlight, pItem->meState == STATE_CHECK, pItem->mbEnabled && IsEnabled(), pItem->mbShowWindow ? sal_True : sal_False );
if( bHighlight )
{
@@ -3708,7 +3708,7 @@ void ToolBox::ImplDrawItem( USHORT nPos, BOOL bHighlight, BOOL bPaint, BOOL bLay
}
// draw the text
- BOOL bRotate = FALSE;
+ sal_Bool bRotate = sal_False;
if ( bText )
{
nTextOffX = nOffX;
@@ -3719,7 +3719,7 @@ void ToolBox::ImplDrawItem( USHORT nPos, BOOL bHighlight, BOOL bPaint, BOOL bLay
if( pItem->mbVisibleText && !ImplIsFloatingMode() &&
((meAlign == WINDOWALIGN_LEFT) || (meAlign == WINDOWALIGN_RIGHT)) )
{
- bRotate = TRUE;
+ bRotate = sal_True;
Font aRotateFont = aOldFont;
/*
@@ -3762,10 +3762,10 @@ void ToolBox::ImplDrawItem( USHORT nPos, BOOL bHighlight, BOOL bPaint, BOOL bLay
if( bHasOpenPopup )
ImplDrawFloatwinBorder( pItem );
else
- ImplDrawButton( this, pItem->maRect, bHighlight, pItem->meState == STATE_CHECK, pItem->mbEnabled && IsEnabled(), pItem->mbShowWindow ? TRUE : FALSE );
+ ImplDrawButton( this, pItem->maRect, bHighlight, pItem->meState == STATE_CHECK, pItem->mbEnabled && IsEnabled(), pItem->mbShowWindow ? sal_True : sal_False );
}
- USHORT nTextStyle = 0;
+ sal_uInt16 nTextStyle = 0;
if ( !pItem->mbEnabled )
nTextStyle |= TEXT_DRAW_DISABLE;
if( bLayout )
@@ -3787,10 +3787,10 @@ void ToolBox::ImplDrawItem( USHORT nPos, BOOL bHighlight, BOOL bPaint, BOOL bLay
if ( pItem->mnBits & TIB_DROPDOWN )
{
Rectangle aDropDownRect( pItem->GetDropDownRect( mbHorz ) );
- BOOL bSetColor = TRUE;
+ sal_Bool bSetColor = sal_True;
if ( !pItem->mbEnabled || !IsEnabled() )
{
- bSetColor = FALSE;
+ bSetColor = sal_False;
SetFillColor( rStyleSettings.GetShadowColor() );
}
@@ -3804,7 +3804,7 @@ void ToolBox::ImplDrawItem( USHORT nPos, BOOL bHighlight, BOOL bPaint, BOOL bLay
if( bHasOpenPopup )
ImplDrawFloatwinBorder( pItem );
else
- ImplDrawButton( this, aDropDownRect, bHighlight, pItem->meState == STATE_CHECK, pItem->mbEnabled && IsEnabled(), FALSE );
+ ImplDrawButton( this, aDropDownRect, bHighlight, pItem->meState == STATE_CHECK, pItem->mbEnabled && IsEnabled(), sal_False );
}
}
ImplDrawDropdownArrow( this, aDropDownRect, bSetColor, bRotate );
@@ -3819,7 +3819,7 @@ void ToolBox::ImplDrawItem( USHORT nPos, BOOL bHighlight, BOOL bPaint, BOOL bLay
void ToolBox::ImplStartCustomizeMode()
{
- mbCustomizeMode = TRUE;
+ mbCustomizeMode = sal_True;
mpData->ImplClearLayoutData();
@@ -3838,7 +3838,7 @@ void ToolBox::ImplStartCustomizeMode()
}
}
-void ToolBox::SetCustomizeMode( BOOL bSet )
+void ToolBox::SetCustomizeMode( sal_Bool bSet )
{
if ( bSet )
ImplStartCustomizeMode();
@@ -3850,7 +3850,7 @@ void ToolBox::SetCustomizeMode( BOOL bSet )
void ToolBox::ImplEndCustomizeMode()
{
- mbCustomizeMode = FALSE;
+ mbCustomizeMode = sal_False;
mpData->ImplClearLayoutData();
@@ -3906,7 +3906,7 @@ void ToolBox::ImplDrawFloatwinBorder( ImplToolItem* pItem )
}
}
-void ToolBox::ImplFloatControl( BOOL bStart, FloatingWindow* pFloatWindow )
+void ToolBox::ImplFloatControl( sal_Bool bStart, FloatingWindow* pFloatWindow )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -3915,9 +3915,9 @@ void ToolBox::ImplFloatControl( BOOL bStart, FloatingWindow* pFloatWindow )
mpFloatWin = pFloatWindow;
// redraw item, to trigger drawing of a special border
- ImplDrawItem( mnCurPos, TRUE );
+ ImplDrawItem( mnCurPos, sal_True );
- mbDrag = FALSE;
+ mbDrag = sal_False;
EndTracking();
ReleaseMouse();
}
@@ -3927,7 +3927,7 @@ void ToolBox::ImplFloatControl( BOOL bStart, FloatingWindow* pFloatWindow )
// if focus is still in this toolbox, then the floater was opened by keyboard
// draw current item with highlight and keep old state
- BOOL bWasKeyboardActivate = mpData->mbDropDownByKeyboard;
+ sal_Bool bWasKeyboardActivate = mpData->mbDropDownByKeyboard;
if ( mnCurPos != TOOLBOX_ITEM_NOTFOUND )
@@ -3947,15 +3947,15 @@ void ToolBox::ImplFloatControl( BOOL bStart, FloatingWindow* pFloatWindow )
// -----------------------------------------------------------------------
-void ToolBox::ShowLine( BOOL bNext )
+void ToolBox::ShowLine( sal_Bool bNext )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( mpData->mbPageScroll )
{
- USHORT delta = mnVisLines;
+ sal_uInt16 delta = mnVisLines;
if ( bNext )
{
mnCurLine = mnCurLine + delta;
@@ -3983,7 +3983,7 @@ void ToolBox::ShowLine( BOOL bNext )
// -----------------------------------------------------------------------
-BOOL ToolBox::ImplHandleMouseMove( const MouseEvent& rMEvt, BOOL bRepeat )
+sal_Bool ToolBox::ImplHandleMouseMove( const MouseEvent& rMEvt, sal_Bool bRepeat )
{
Point aMousePos = rMEvt.GetPosPixel();
@@ -3996,7 +3996,7 @@ BOOL ToolBox::ImplHandleMouseMove( const MouseEvent& rMEvt, BOOL bRepeat )
{
if ( !mnCurItemId )
{
- ImplDrawItem( mnCurPos, TRUE );
+ ImplDrawItem( mnCurPos, sal_True );
mnCurItemId = pItem->mnId;
Highlight();
}
@@ -4015,48 +4015,48 @@ BOOL ToolBox::ImplHandleMouseMove( const MouseEvent& rMEvt, BOOL bRepeat )
}
}
- return TRUE;
+ return sal_True;
}
if ( mbUpper )
{
- BOOL bNewIn = maUpperRect.IsInside( aMousePos );
+ sal_Bool bNewIn = maUpperRect.IsInside( aMousePos );
if ( bNewIn != mbIn )
{
mbIn = bNewIn;
- ImplDrawSpin( mbIn, FALSE );
+ ImplDrawSpin( mbIn, sal_False );
}
- return TRUE;
+ return sal_True;
}
if ( mbLower )
{
- BOOL bNewIn = maLowerRect.IsInside( aMousePos );
+ sal_Bool bNewIn = maLowerRect.IsInside( aMousePos );
if ( bNewIn != mbIn )
{
mbIn = bNewIn;
- ImplDrawSpin( FALSE, mbIn );
+ ImplDrawSpin( sal_False, mbIn );
}
- return TRUE;
+ return sal_True;
}
if ( mbNextTool )
{
- BOOL bNewIn = maNextToolRect.IsInside( aMousePos );
+ sal_Bool bNewIn = maNextToolRect.IsInside( aMousePos );
if ( bNewIn != mbIn )
{
mbIn = bNewIn;
ImplDrawNext( mbIn );
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL ToolBox::ImplHandleMouseButtonUp( const MouseEvent& rMEvt, BOOL bCancel )
+sal_Bool ToolBox::ImplHandleMouseButtonUp( const MouseEvent& rMEvt, sal_Bool bCancel )
{
ImplDisableFlatButtons();
@@ -4080,12 +4080,12 @@ BOOL ToolBox::ImplHandleMouseButtonUp( const MouseEvent& rMEvt, BOOL bCancel )
Deactivate();
if ( mbDrag )
- mbDrag = FALSE;
+ mbDrag = sal_False;
else
{
- mbSelection = FALSE;
+ mbSelection = sal_False;
if ( mnCurPos == TOOLBOX_ITEM_NOTFOUND )
- return TRUE;
+ return sal_True;
}
// Wurde Maus ueber dem Item losgelassen
@@ -4123,7 +4123,7 @@ BOOL ToolBox::ImplHandleMouseButtonUp( const MouseEvent& rMEvt, BOOL bCancel )
ImplAddDel( &aDelData );
Select();
if ( aDelData.IsDelete() )
- return TRUE;
+ return sal_True;
ImplRemoveDel( &aDelData );
}
}
@@ -4135,11 +4135,11 @@ BOOL ToolBox::ImplHandleMouseButtonUp( const MouseEvent& rMEvt, BOOL bCancel )
// Items nicht geloescht, im Select-Handler
if ( mnCurItemId )
{
- BOOL bHighlight;
+ sal_Bool bHighlight;
if ( (mnCurItemId == mnHighItemId) && (mnOutStyle & TOOLBOX_STYLE_FLAT) )
bHighlight = 2;
else
- bHighlight = FALSE;
+ bHighlight = sal_False;
// Get current pos for the case that items are inserted/removed
// in the toolBox
mnCurPos = GetItemPos( mnCurItemId );
@@ -4157,28 +4157,28 @@ BOOL ToolBox::ImplHandleMouseButtonUp( const MouseEvent& rMEvt, BOOL bCancel )
mnDownItemId = 0;
mnMouseClicks = 0;
mnMouseModifier = 0;
- return TRUE;
+ return sal_True;
}
else if ( mbUpper || mbLower )
{
if ( mbIn )
ShowLine( !mbUpper );
- mbUpper = FALSE;
- mbLower = FALSE;
- mbIn = FALSE;
- ImplDrawSpin( FALSE, FALSE );
- return TRUE;
+ mbUpper = sal_False;
+ mbLower = sal_False;
+ mbIn = sal_False;
+ ImplDrawSpin( sal_False, sal_False );
+ return sal_True;
}
else if ( mbNextTool )
{
- mbNextTool = FALSE;
- mbIn = FALSE;
- ImplDrawNext( FALSE );
+ mbNextTool = sal_False;
+ mbIn = sal_False;
+ ImplDrawNext( sal_False );
NextToolBox();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -4200,10 +4200,10 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt )
// only highlight when the focus is not inside a child window of a toolbox
// eg, in a edit control
// and do not hilight when focus is in a different toolbox
- BOOL bDrawHotSpot = TRUE;
+ sal_Bool bDrawHotSpot = sal_True;
Window *pWin = Application::GetFocusWindow();
if( pWin && pWin->ImplGetWindowImpl()->mbToolBox && pWin != this )
- bDrawHotSpot = FALSE;
+ bDrawHotSpot = sal_False;
/*
else
if( pWin && !pWin->ImplGetWindowImpl()->mbToolBox )
@@ -4212,7 +4212,7 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt )
pWin = pWin->GetParent();
if( pWin && pWin->ImplGetWindowImpl()->mbToolBox )
{
- bDrawHotSpot = FALSE;
+ bDrawHotSpot = sal_False;
break;
}
}
@@ -4220,8 +4220,8 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt )
if ( mbSelection && bDrawHotSpot )
{
- USHORT i = 0;
- USHORT nNewPos = TOOLBOX_ITEM_NOTFOUND;
+ sal_uInt16 i = 0;
+ sal_uInt16 nNewPos = TOOLBOX_ITEM_NOTFOUND;
// Item suchen, das geklickt wurde
std::vector< ImplToolItem >::const_iterator it = mpData->m_aItems.begin();
@@ -4264,7 +4264,7 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt )
if ( mnCurPos != TOOLBOX_ITEM_NOTFOUND )
{
mnCurItemId = mnHighItemId = it->mnId;
- ImplDrawItem( mnCurPos, 2 /*TRUE*/ ); // always use shadow effect (2)
+ ImplDrawItem( mnCurPos, 2 /*sal_True*/ ); // always use shadow effect (2)
}
else
mnCurItemId = mnHighItemId = 0;
@@ -4292,7 +4292,7 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt )
{
if ( rMEvt.GetMode() & MOUSE_SIMPLEMOVE )
{
- USHORT nLinePtr = ImplTestLineSize( this, rMEvt.GetPosPixel() );
+ sal_uInt16 nLinePtr = ImplTestLineSize( this, rMEvt.GetPosPixel() );
if ( nLinePtr & DOCK_LINEHSIZE )
{
if ( meAlign == WINDOWALIGN_LEFT )
@@ -4335,7 +4335,7 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt )
if ( bDrawHotSpot && ( ((eStyle == POINTER_ARROW) && (mnOutStyle & TOOLBOX_STYLE_HANDPOINTER)) ||
(mnOutStyle & TOOLBOX_STYLE_FLAT) || !mnOutStyle ) )
{
- BOOL bClearHigh = TRUE;
+ sal_Bool bClearHigh = sal_True;
if ( !rMEvt.IsLeaveWindow() && (mnCurPos == TOOLBOX_ITEM_NOTFOUND) )
{
std::vector< ImplToolItem >::const_iterator it = mpData->m_aItems.begin();
@@ -4347,21 +4347,21 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt )
{
if ( !mnOutStyle || (mnOutStyle & TOOLBOX_STYLE_FLAT) )
{
- bClearHigh = FALSE;
+ bClearHigh = sal_False;
if ( mnHighItemId != it->mnId )
{
- USHORT nTempPos = sal::static_int_cast<USHORT>(it - mpData->m_aItems.begin());
+ sal_uInt16 nTempPos = sal::static_int_cast<sal_uInt16>(it - mpData->m_aItems.begin());
if ( mnHighItemId )
{
ImplHideFocus();
- USHORT nPos = GetItemPos( mnHighItemId );
+ sal_uInt16 nPos = GetItemPos( mnHighItemId );
ImplDrawItem( nPos );
ImplCallEventListeners( VCLEVENT_TOOLBOX_HIGHLIGHTOFF, reinterpret_cast< void* >( nPos ) );
}
if ( mpData->mbMenubuttonSelected )
{
// remove highlight from menubutton
- ImplDrawMenubutton( this, FALSE );
+ ImplDrawMenubutton( this, sal_False );
}
mnHighItemId = it->mnId;
ImplDrawItem( nTempPos, 2 );
@@ -4380,21 +4380,21 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt )
}
// only clear highlight when focus is not in toolbar
- BOOL bMenuButtonHit = mpData->maMenubuttonItem.maRect.IsInside( aMousePos );
+ sal_Bool bMenuButtonHit = mpData->maMenubuttonItem.maRect.IsInside( aMousePos );
if ( bClearHigh || bMenuButtonHit )
{
if ( !bMenuButtonHit && mpData->mbMenubuttonSelected )
{
// remove highlight from menubutton
- ImplDrawMenubutton( this, FALSE );
+ ImplDrawMenubutton( this, sal_False );
}
if( mnHighItemId )
{
- USHORT nClearPos = GetItemPos( mnHighItemId );
+ sal_uInt16 nClearPos = GetItemPos( mnHighItemId );
if ( nClearPos != TOOLBOX_ITEM_NOTFOUND )
{
- ImplDrawItem( nClearPos, (nClearPos == mnCurPos) ? TRUE : FALSE );
+ ImplDrawItem( nClearPos, (nClearPos == mnCurPos) ? sal_True : sal_False );
if( nClearPos != mnCurPos )
ImplCallEventListeners( VCLEVENT_TOOLBOX_HIGHLIGHTOFF, reinterpret_cast< void* >( nClearPos ) );
}
@@ -4404,7 +4404,7 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt )
if( bMenuButtonHit )
{
- ImplDrawMenubutton( this, TRUE );
+ ImplDrawMenubutton( this, sal_True );
}
}
}
@@ -4439,8 +4439,8 @@ void ToolBox::MouseButtonDown( const MouseEvent& rMEvt )
}
Point aMousePos = rMEvt.GetPosPixel();
- USHORT i = 0;
- USHORT nNewPos = TOOLBOX_ITEM_NOTFOUND;
+ sal_uInt16 i = 0;
+ sal_uInt16 nNewPos = TOOLBOX_ITEM_NOTFOUND;
// Item suchen, das geklickt wurde
std::vector< ImplToolItem >::const_iterator it = mpData->m_aItems.begin();
@@ -4475,12 +4475,12 @@ void ToolBox::MouseButtonDown( const MouseEvent& rMEvt )
Rectangle aItemRect = GetItemRect( it->mnId );
mnConfigItem = it->mnId;
- BOOL bResizeItem;
+ sal_Bool bResizeItem;
if ( mbCustomizeMode && it->mbShowWindow &&
(it->maRect.Right()-TB_RESIZE_OFFSET <= aMousePos.X()) )
- bResizeItem = TRUE;
+ bResizeItem = sal_True;
else
- bResizeItem = FALSE;
+ bResizeItem = sal_False;
pMgr->StartDragging( this, aMousePos, aItemRect, 0, bResizeItem );
return;
}
@@ -4494,7 +4494,7 @@ void ToolBox::MouseButtonDown( const MouseEvent& rMEvt )
// Aktuelle Daten setzen
- USHORT nTrackFlags = 0;
+ sal_uInt16 nTrackFlags = 0;
mnCurPos = i;
mnCurItemId = it->mnId;
mnDownItemId = mnCurItemId;
@@ -4506,13 +4506,13 @@ void ToolBox::MouseButtonDown( const MouseEvent& rMEvt )
if ( mbSelection )
{
- ImplDrawItem( mnCurPos, TRUE );
+ ImplDrawItem( mnCurPos, sal_True );
Highlight();
}
else
{
// Hier schon bDrag setzen, da in EndSelection ausgewertet wird
- mbDrag = TRUE;
+ mbDrag = sal_True;
// Bei Doppelklick nur den Handler rufen, aber bevor der
// Button gehiltet wird, da evt. in diesem Handler der
@@ -4523,7 +4523,7 @@ void ToolBox::MouseButtonDown( const MouseEvent& rMEvt )
if ( mbDrag )
{
- ImplDrawItem( mnCurPos, TRUE );
+ ImplDrawItem( mnCurPos, sal_True );
Highlight();
}
@@ -4535,7 +4535,7 @@ void ToolBox::MouseButtonDown( const MouseEvent& rMEvt )
// dropdownonly always triggers the dropdown handler, over the whole button area
// the drop down arrow should not trigger the item action
- mpData->mbDropDownByKeyboard = FALSE;
+ mpData->mbDropDownByKeyboard = sal_False;
GetDropdownClickHdl().Call( this );
// do not reset data if the dropdown handler opened a floating window
@@ -4544,7 +4544,7 @@ void ToolBox::MouseButtonDown( const MouseEvent& rMEvt )
{
// no floater was opened
Deactivate();
- ImplDrawItem( mnCurPos, FALSE );
+ ImplDrawItem( mnCurPos, sal_False );
mnCurPos = TOOLBOX_ITEM_NOTFOUND;
mnCurItemId = 0;
@@ -4594,9 +4594,9 @@ void ToolBox::MouseButtonDown( const MouseEvent& rMEvt )
if ( mnCurLine > 1 )
{
StartTracking();
- mbUpper = TRUE;
- mbIn = TRUE;
- ImplDrawSpin( TRUE, FALSE );
+ mbUpper = sal_True;
+ mbIn = sal_True;
+ ImplDrawSpin( sal_True, sal_False );
}
return;
}
@@ -4605,25 +4605,25 @@ void ToolBox::MouseButtonDown( const MouseEvent& rMEvt )
if ( mnCurLine+mnVisLines-1 < mnCurLines )
{
StartTracking();
- mbLower = TRUE;
- mbIn = TRUE;
- ImplDrawSpin( FALSE, TRUE );
+ mbLower = sal_True;
+ mbIn = sal_True;
+ ImplDrawSpin( sal_False, sal_True );
}
return;
}
if ( maNextToolRect.IsInside( aMousePos ) )
{
StartTracking();
- mbNextTool = TRUE;
- mbIn = TRUE;
- ImplDrawNext( TRUE );
+ mbNextTool = sal_True;
+ mbIn = sal_True;
+ ImplDrawNext( sal_True );
return;
}
// Linesizing testen
if ( (mnWinStyle & TB_WBLINESIZING) == TB_WBLINESIZING )
{
- USHORT nLineMode = ImplTestLineSize( this, aMousePos );
+ sal_uInt16 nLineMode = ImplTestLineSize( this, aMousePos );
if ( nLineMode )
{
ImplTBDragMgr* pMgr = ImplGetTBDragMgr();
@@ -4638,7 +4638,7 @@ void ToolBox::MouseButtonDown( const MouseEvent& rMEvt )
// Dragging starten
pMgr->StartDragging( this, aMousePos, Rectangle( aPos, aSize ),
- nLineMode, FALSE );
+ nLineMode, sal_False );
return;
}
}
@@ -4667,7 +4667,7 @@ void ToolBox::MouseButtonUp( const MouseEvent& rMEvt )
pMgr->EndDragging();
return;
}
- mbCommandDrag = FALSE;
+ mbCommandDrag = sal_False;
DockingWindow::MouseButtonUp( rMEvt );
}
@@ -4698,9 +4698,9 @@ void ToolBox::Paint( const Rectangle& rPaintRect )
if( mpData->mbIsPaintLocked )
return;
if ( rPaintRect == Rectangle( 0, 0, mnDX-1, mnDY-1 ) )
- mbFullPaint = TRUE;
+ mbFullPaint = sal_True;
ImplFormat();
- mbFullPaint = FALSE;
+ mbFullPaint = sal_False;
ImplDrawBackground( this, rPaintRect );
@@ -4717,28 +4717,28 @@ void ToolBox::Paint( const Rectangle& rPaintRect )
if ( mnWinStyle & WB_SCROLL )
{
if ( mnCurLines > mnLines )
- ImplDrawSpin( FALSE, FALSE );
+ ImplDrawSpin( sal_False, sal_False );
}
// NextButton zeichnen
- ImplDrawNext( FALSE );
+ ImplDrawNext( sal_False );
// Buttons zeichnen
- USHORT nHighPos;
+ sal_uInt16 nHighPos;
if ( mnHighItemId )
nHighPos = GetItemPos( mnHighItemId );
else
nHighPos = TOOLBOX_ITEM_NOTFOUND;
- USHORT nCount = (USHORT)mpData->m_aItems.size();
- for( USHORT i = 0; i < nCount; i++ )
+ sal_uInt16 nCount = (sal_uInt16)mpData->m_aItems.size();
+ for( sal_uInt16 i = 0; i < nCount; i++ )
{
ImplToolItem* pItem = &mpData->m_aItems[i];
// Nur malen, wenn Rechteck im PaintRectangle liegt
if ( !pItem->maRect.IsEmpty() && rPaintRect.IsOver( pItem->maRect ) )
{
- BOOL bHighlight = FALSE;
+ sal_Bool bHighlight = sal_False;
if ( i == mnCurPos )
bHighlight = 1;
else if ( i == nHighPos )
@@ -4781,9 +4781,9 @@ void ToolBox::Resize()
{
if ( !mbFormat )
{
- mbFormat = TRUE;
+ mbFormat = sal_True;
if( IsReallyVisible() )
- ImplFormat( TRUE );
+ ImplFormat( sal_True );
}
}
@@ -4815,7 +4815,7 @@ void ToolBox::Resize()
}
// -----------------------------------------------------------------------
-const XubString& ToolBox::ImplGetHelpText( USHORT nItemId ) const
+const XubString& ToolBox::ImplGetHelpText( sal_uInt16 nItemId ) const
{
ImplToolItem* pItem = ImplGetItem( nItemId );
@@ -4843,7 +4843,7 @@ const XubString& ToolBox::ImplGetHelpText( USHORT nItemId ) const
void ToolBox::RequestHelp( const HelpEvent& rHEvt )
{
- USHORT nItemId;
+ sal_uInt16 nItemId;
Point aHelpPos;
if( !rHEvt.KeyboardActivated() )
@@ -4895,7 +4895,7 @@ void ToolBox::RequestHelp( const HelpEvent& rHEvt )
else if ( rHEvt.GetMode() & HELPMODE_EXTENDED )
{
String aCommand = GetItemCommand( nItemId );
- ULONG nHelpId = GetHelpId( nItemId );
+ sal_uIntPtr nHelpId = GetHelpId( nItemId );
if ( aCommand.Len() || nHelpId )
{
@@ -4944,20 +4944,20 @@ long ToolBox::Notify( NotifyEvent& rNEvt )
{
KeyEvent aKEvt = *rNEvt.GetKeyEvent();
KeyCode aKeyCode = aKEvt.GetKeyCode();
- USHORT nKeyCode = aKeyCode.GetCode();
+ sal_uInt16 nKeyCode = aKeyCode.GetCode();
switch( nKeyCode )
{
case KEY_TAB:
{
// internal TAB cycling only if parent is not a dialog or if we are the ony child
// otherwise the dialog control will take over
- BOOL bNoTabCycling = ( ( ImplGetParent()->GetStyle() & (WB_DIALOGCONTROL | WB_NODIALOGCONTROL) ) == WB_DIALOGCONTROL &&
+ sal_Bool bNoTabCycling = ( ( ImplGetParent()->GetStyle() & (WB_DIALOGCONTROL | WB_NODIALOGCONTROL) ) == WB_DIALOGCONTROL &&
ImplGetParent()->GetChildCount() != 1 );
if( bNoTabCycling && ! (GetStyle() & WB_FORCETABCYCLE) )
return DockingWindow::Notify( rNEvt );
- else if( ImplChangeHighlightUpDn( aKeyCode.IsShift() ? TRUE : FALSE , bNoTabCycling ) )
- return FALSE;
+ else if( ImplChangeHighlightUpDn( aKeyCode.IsShift() ? sal_True : sal_False , bNoTabCycling ) )
+ return sal_False;
else
return DockingWindow::Notify( rNEvt );
}
@@ -4978,9 +4978,9 @@ long ToolBox::Notify( NotifyEvent& rNEvt )
}
else if( (GetGetFocusFlags() & (GETFOCUS_BACKWARD|GETFOCUS_TAB) ) == (GETFOCUS_BACKWARD|GETFOCUS_TAB))
// Shift-TAB was pressed in the parent
- ImplChangeHighlightUpDn( FALSE );
+ ImplChangeHighlightUpDn( sal_False );
else
- ImplChangeHighlightUpDn( TRUE );
+ ImplChangeHighlightUpDn( sal_True );
mnLastFocusItemId = 0;
@@ -5045,7 +5045,7 @@ void ToolBox::Command( const CommandEvent& rCEvt )
// dann mache nichts
if ( (it->meType == TOOLBOXITEM_BUTTON) &&
!it->mbShowWindow )
- mbCommandDrag = TRUE;
+ mbCommandDrag = sal_True;
break;
}
@@ -5069,10 +5069,10 @@ void ToolBox::Command( const CommandEvent& rCEvt )
if ( pData->GetMode() == COMMAND_WHEEL_SCROLL )
{
if ( (mnCurLine > 1) && (pData->GetDelta() > 0) )
- ShowLine( FALSE );
+ ShowLine( sal_False );
else if ( (mnCurLine+mnVisLines-1 < mnCurLines) && (pData->GetDelta() < 0) )
- ShowLine( TRUE );
- ImplDrawSpin( FALSE, FALSE );
+ ShowLine( sal_True );
+ ImplDrawSpin( sal_False, sal_False );
return;
}
}
@@ -5099,19 +5099,19 @@ void ToolBox::StateChanged( StateChangedType nType )
else if ( (nType == STATE_CHANGE_ZOOM) ||
(nType == STATE_CHANGE_CONTROLFONT) )
{
- mbCalc = TRUE;
- mbFormat = TRUE;
- ImplInitSettings( TRUE, FALSE, FALSE );
+ mbCalc = sal_True;
+ mbFormat = sal_True;
+ 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 ); // font, foreground, background
+ ImplInitSettings( sal_False, sal_False, sal_True ); // font, foreground, background
Invalidate();
}
}
@@ -5128,16 +5128,16 @@ void ToolBox::DataChanged( const DataChangedEvent& rDCEvt )
((rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE)) )
{
- mbCalc = TRUE;
- mbFormat = TRUE;
- ImplInitSettings( TRUE, TRUE, TRUE );
+ mbCalc = sal_True;
+ mbFormat = sal_True;
+ ImplInitSettings( sal_True, sal_True, sal_True );
Invalidate();
}
}
// -----------------------------------------------------------------------
-BOOL ToolBox::PrepareToggleFloatingMode()
+sal_Bool ToolBox::PrepareToggleFloatingMode()
{
return DockingWindow::PrepareToggleFloatingMode();
}
@@ -5148,27 +5148,27 @@ void ToolBox::ToggleFloatingMode()
{
DockingWindow::ToggleFloatingMode();
- BOOL mbOldHorz = mbHorz;
+ sal_Bool mbOldHorz = mbHorz;
if ( ImplIsFloatingMode() )
{
- mbHorz = TRUE;
+ mbHorz = sal_True;
meAlign = WINDOWALIGN_TOP;
- mbScroll = TRUE;
+ mbScroll = sal_True;
if( mbOldHorz != mbHorz )
- mbCalc = TRUE; // orientation was changed !
+ mbCalc = sal_True; // orientation was changed !
ImplSetMinMaxFloatSize( this );
SetOutputSizePixel( ImplCalcFloatSize( this, mnFloatLines ) );
}
else
{
- mbScroll = (mnWinStyle & WB_SCROLL) ? TRUE : FALSE;
+ mbScroll = (mnWinStyle & WB_SCROLL) ? sal_True : sal_False;
if ( (meAlign == WINDOWALIGN_TOP) || (meAlign == WINDOWALIGN_BOTTOM) )
- mbHorz = TRUE;
+ mbHorz = sal_True;
else
- mbHorz = FALSE;
+ mbHorz = sal_False;
// set focus back to document
ImplGetFrameWindow()->GetWindow( WINDOW_CLIENT )->GrabFocus();
@@ -5178,11 +5178,11 @@ void ToolBox::ToggleFloatingMode()
{
// if orientation changes, the toolbox has to be initialized again
// to update the direction of the gradient
- mbCalc = TRUE;
- ImplInitSettings( TRUE, TRUE, TRUE );
+ mbCalc = sal_True;
+ ImplInitSettings( sal_True, sal_True, sal_True );
}
- mbFormat = TRUE;
+ mbFormat = sal_True;
ImplFormat();
}
@@ -5198,13 +5198,13 @@ void ToolBox::StartDocking()
// -----------------------------------------------------------------------
-BOOL ToolBox::Docking( const Point& rPos, Rectangle& rRect )
+sal_Bool ToolBox::Docking( const Point& rPos, Rectangle& rRect )
{
// Wenn Dragging, dann nicht machen, da vorher schon berechnet
if ( mbDragging )
- return FALSE;
+ return sal_False;
- BOOL bFloatMode = FALSE;
+ sal_Bool bFloatMode = sal_False;
DockingWindow::Docking( rPos, rRect );
@@ -5217,7 +5217,7 @@ BOOL ToolBox::Docking( const Point& rPos, Rectangle& rRect )
// to get a floating mode as result - switch to floating size
// so the calculation only depends on the position of the rectangle, not the current
// docking state of the window
- USHORT nTemp = 0;
+ sal_uInt16 nTemp = 0;
aDockingRect.SetSize( ImplCalcFloatSize( this, nTemp ) );
// in this mode docking is never done by keyboard, so it's OK to use the mouse position
@@ -5252,7 +5252,7 @@ BOOL ToolBox::Docking( const Point& rPos, Rectangle& rRect )
// FloatWindow werden
Rectangle aIntersect = aInRect.GetIntersection( aDockingRect );
if ( aIntersect == aDockingRect )
- bFloatMode = TRUE;
+ bFloatMode = sal_True;
else
{
// docking rectangle is in the "sensible area"
@@ -5306,14 +5306,14 @@ BOOL ToolBox::Docking( const Point& rPos, Rectangle& rRect )
}
}
else
- bFloatMode = TRUE;
+ bFloatMode = sal_True;
if ( bFloatMode )
{
meDockAlign = meAlign;
if ( !mbLastFloatMode )
{
- USHORT nTemp = 0;
+ sal_uInt16 nTemp = 0;
aDockingRect.SetSize( ImplCalcFloatSize( this, nTemp ) );
}
}
@@ -5326,7 +5326,7 @@ BOOL ToolBox::Docking( const Point& rPos, Rectangle& rRect )
// -----------------------------------------------------------------------
-void ToolBox::EndDocking( const Rectangle& rRect, BOOL bFloatMode )
+void ToolBox::EndDocking( const Rectangle& rRect, sal_Bool bFloatMode )
{
if ( !IsDockingCanceled() )
{
@@ -5343,8 +5343,8 @@ void ToolBox::EndDocking( const Rectangle& rRect, BOOL bFloatMode )
void ToolBox::Resizing( Size& rSize )
{
- USHORT nCalcLines;
- USHORT nTemp;
+ sal_uInt16 nCalcLines;
+ sal_uInt16 nTemp;
// Alle Floatinggroessen berechnen
ImplCalcFloatSizes( this );
@@ -5380,20 +5380,20 @@ void ToolBox::Resizing( Size& rSize )
// -----------------------------------------------------------------------
-Size ToolBox::CalcWindowSizePixel( USHORT nCalcLines ) const
+Size ToolBox::CalcWindowSizePixel( sal_uInt16 nCalcLines ) const
{
return ImplCalcSize( this, nCalcLines );
}
-Size ToolBox::CalcWindowSizePixel( USHORT nCalcLines, WindowAlign eAlign ) const
+Size ToolBox::CalcWindowSizePixel( sal_uInt16 nCalcLines, WindowAlign eAlign ) const
{
return ImplCalcSize( this, nCalcLines,
(eAlign == WINDOWALIGN_TOP || eAlign == WINDOWALIGN_BOTTOM) ? TB_CALCMODE_HORZ : TB_CALCMODE_VERT );
}
-USHORT ToolBox::ImplCountLineBreaks( const ToolBox *pThis )
+sal_uInt16 ToolBox::ImplCountLineBreaks( const ToolBox *pThis )
{
- USHORT nLines = 0;
+ sal_uInt16 nLines = 0;
std::vector< ImplToolItem >::const_iterator it = ((ToolBox*)pThis)->mpData->m_aItems.begin();
while ( it != ((ToolBox*)pThis)->mpData->m_aItems.end() )
@@ -5408,19 +5408,19 @@ USHORT ToolBox::ImplCountLineBreaks( const ToolBox *pThis )
Size ToolBox::CalcPopupWindowSizePixel() const
{
// count number of breaks and calc corresponding floating window size
- USHORT nLines = ImplCountLineBreaks( this );
+ sal_uInt16 nLines = ImplCountLineBreaks( this );
if( nLines )
nLines++; // add the first line
else
{
// no breaks found: use quadratic layout
- nLines = (USHORT) ceil( sqrt( (double) GetItemCount() ) );
+ nLines = (sal_uInt16) ceil( sqrt( (double) GetItemCount() ) );
}
- BOOL bPopup = mpData->mbAssumePopupMode;
+ sal_Bool bPopup = mpData->mbAssumePopupMode;
ToolBox *pThis = (ToolBox*) this;
- pThis->mpData->mbAssumePopupMode = TRUE;
+ pThis->mpData->mbAssumePopupMode = sal_True;
Size aSize = CalcFloatingWindowSizePixel( nLines );
@@ -5430,24 +5430,24 @@ Size ToolBox::CalcPopupWindowSizePixel() const
Size ToolBox::CalcFloatingWindowSizePixel() const
{
- USHORT nLines = ImplCountLineBreaks( this );
+ sal_uInt16 nLines = ImplCountLineBreaks( this );
nLines++; // add the first line
return CalcFloatingWindowSizePixel( nLines );
}
-Size ToolBox::CalcFloatingWindowSizePixel( USHORT nCalcLines ) const
+Size ToolBox::CalcFloatingWindowSizePixel( sal_uInt16 nCalcLines ) const
{
- BOOL bFloat = mpData->mbAssumeFloating;
- BOOL bDocking = mpData->mbAssumeDocked;
+ sal_Bool bFloat = mpData->mbAssumeFloating;
+ sal_Bool bDocking = mpData->mbAssumeDocked;
// simulate floating mode and force reformat before calculating
ToolBox *pThis = (ToolBox*) this;
- pThis->mpData->mbAssumeFloating = TRUE;
- pThis->mpData->mbAssumeDocked = FALSE;
+ pThis->mpData->mbAssumeFloating = sal_True;
+ pThis->mpData->mbAssumeDocked = sal_False;
Size aSize = ImplCalcFloatSize( (ToolBox*) this, nCalcLines );
- pThis->mbFormat = TRUE;
+ pThis->mbFormat = sal_True;
pThis->mpData->mbAssumeFloating = bFloat;
pThis->mpData->mbAssumeDocked = bDocking;
@@ -5499,7 +5499,7 @@ Size ToolBox::CalcMinimumWindowSizePixel() const
// -----------------------------------------------------------------------
-void ToolBox::EnableCustomize( BOOL bEnable )
+void ToolBox::EnableCustomize( sal_Bool bEnable )
{
if ( bEnable != mbCustomize )
{
@@ -5529,7 +5529,7 @@ void ToolBox::StartCustomize( const Rectangle& rRect, void* pData )
aMousePos = ScreenToOutputPixel( aPos );
Pointer aPtr;
SetPointer( aPtr );
- pMgr->StartDragging( this, aMousePos, aRect, 0, FALSE, pData );
+ pMgr->StartDragging( this, aMousePos, aRect, 0, sal_False, pData );
}
// -----------------------------------------------------------------------
@@ -5550,7 +5550,7 @@ void ToolBox::EndCustomizeMode()
// -----------------------------------------------------------------------
-BOOL ToolBox::IsCustomizeMode()
+sal_Bool ToolBox::IsCustomizeMode()
{
ImplTBDragMgr* pMgr = ImplGetTBDragMgr();
return pMgr->IsCustomizeMode();
@@ -5567,7 +5567,7 @@ void ToolBox::GetFocus()
void ToolBox::LoseFocus()
{
- ImplChangeHighlight( NULL, TRUE );
+ ImplChangeHighlight( NULL, sal_True );
DockingWindow::LoseFocus();
}
@@ -5575,10 +5575,10 @@ void ToolBox::LoseFocus()
// -----------------------------------------------------------------------
// performs the action associated with an item, ie simulates clicking the item
-void ToolBox::TriggerItem( USHORT nItemId, BOOL bShift, BOOL bCtrl )
+void ToolBox::TriggerItem( sal_uInt16 nItemId, sal_Bool bShift, sal_Bool bCtrl )
{
mnHighItemId = nItemId;
- USHORT nModifier = 0;
+ sal_uInt16 nModifier = 0;
if( bShift )
nModifier |= KEY_SHIFT;
if( bCtrl )
@@ -5590,24 +5590,24 @@ void ToolBox::TriggerItem( USHORT nItemId, BOOL bShift, BOOL bCtrl )
// -----------------------------------------------------------------------
// calls the button's action handler
-// returns TRUE if action was called
-BOOL ToolBox::ImplActivateItem( KeyCode aKeyCode )
+// returns sal_True if action was called
+sal_Bool ToolBox::ImplActivateItem( KeyCode aKeyCode )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if( mnHighItemId )
{
ImplToolItem *pToolItem = ImplGetItem( mnHighItemId );
// #107712#, activate can also be called for disabled entries
if( pToolItem && !pToolItem->mbEnabled )
- return TRUE;
+ return sal_True;
if( pToolItem && pToolItem->mpWindow && HasFocus() )
{
ImplHideFocus();
- mbChangingHighlight = TRUE; // avoid focus change due to loose focus
+ mbChangingHighlight = sal_True; // avoid focus change due to loose focus
pToolItem->mpWindow->ImplControlFocus( GETFOCUS_TAB );
- mbChangingHighlight = FALSE;
+ mbChangingHighlight = sal_False;
}
else
{
@@ -5629,7 +5629,7 @@ BOOL ToolBox::ImplActivateItem( KeyCode aKeyCode )
}
}
mnMouseModifier = aKeyCode.GetModifier();
- mbIsKeyEvent = TRUE;
+ mbIsKeyEvent = sal_True;
Activate();
Click();
@@ -5642,18 +5642,18 @@ BOOL ToolBox::ImplActivateItem( KeyCode aKeyCode )
ImplRemoveDel( &aDelData );
Deactivate();
- mbIsKeyEvent = FALSE;
+ mbIsKeyEvent = sal_False;
mnMouseModifier = 0;
}
}
else
- bRet = FALSE;
+ bRet = sal_False;
return bRet;
}
// -----------------------------------------------------------------------
-BOOL ImplCloseLastPopup( Window *pParent )
+sal_Bool ImplCloseLastPopup( Window *pParent )
{
// close last popup toolbox (see also:
// ImplHandleMouseFloatMode(...) in winproc.cxx )
@@ -5665,23 +5665,23 @@ BOOL ImplCloseLastPopup( Window *pParent )
if( pLastLevelFloat && pLastLevelFloat != pParent )
{
pLastLevelFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL | FLOATWIN_POPUPMODEEND_CLOSEALL );
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
// opens a drop down toolbox item
-// returns TRUE if item was opened
-BOOL ToolBox::ImplOpenItem( KeyCode aKeyCode )
+// returns sal_True if item was opened
+sal_Bool ToolBox::ImplOpenItem( KeyCode aKeyCode )
{
- USHORT nCode = aKeyCode.GetCode();
- BOOL bRet = TRUE;
+ sal_uInt16 nCode = aKeyCode.GetCode();
+ sal_Bool bRet = sal_True;
// arrow keys should work only in the opposite direction of alignment (to not break cursor travelling)
if ( ((nCode == KEY_LEFT || nCode == KEY_RIGHT) && IsHorizontal())
|| ((nCode == KEY_UP || nCode == KEY_DOWN) && !IsHorizontal()) )
- return FALSE;
+ return sal_False;
if( IsMenuEnabled() && mpData->mbMenubuttonSelected )
{
@@ -5701,19 +5701,19 @@ BOOL ToolBox::ImplOpenItem( KeyCode aKeyCode )
mnCurPos = GetItemPos( mnCurItemId );
mnLastFocusItemId = mnCurItemId; // save item id for possible later focus restore
mnMouseModifier = aKeyCode.GetModifier();
- mbIsShift = TRUE;
- mbIsKeyEvent = TRUE;
+ mbIsShift = sal_True;
+ mbIsKeyEvent = sal_True;
Activate();
- mpData->mbDropDownByKeyboard = TRUE;
+ mpData->mbDropDownByKeyboard = sal_True;
GetDropdownClickHdl().Call( this );
- mbIsKeyEvent = FALSE;
- mbIsShift = FALSE;
+ mbIsKeyEvent = sal_False;
+ mbIsShift = sal_False;
mnMouseModifier = 0;
}
else
- bRet = FALSE;
+ bRet = sal_False;
return bRet;
}
@@ -5724,10 +5724,10 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt )
{
KeyCode aKeyCode = rKEvt.GetKeyCode();
mnKeyModifier = aKeyCode.GetModifier();
- USHORT nCode = aKeyCode.GetCode();
- BOOL bParentIsDialog = ( ( ImplGetParent()->GetStyle() & (WB_DIALOGCONTROL | WB_NODIALOGCONTROL) ) == WB_DIALOGCONTROL );
- BOOL bForwardKey = FALSE;
- BOOL bGrabFocusToDocument = FALSE;
+ sal_uInt16 nCode = aKeyCode.GetCode();
+ sal_Bool bParentIsDialog = ( ( ImplGetParent()->GetStyle() & (WB_DIALOGCONTROL | WB_NODIALOGCONTROL) ) == WB_DIALOGCONTROL );
+ sal_Bool bForwardKey = sal_False;
+ sal_Bool bGrabFocusToDocument = sal_False;
// #107776# we might be destroyed in the keyhandler
ImplDelData aDelData;
@@ -5741,7 +5741,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt )
if( aKeyCode.GetModifier() ) // allow only pure cursor keys
break;
if( !IsHorizontal() )
- ImplChangeHighlightUpDn( TRUE );
+ ImplChangeHighlightUpDn( sal_True );
else
ImplOpenItem( aKeyCode );
}
@@ -5751,7 +5751,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt )
if( aKeyCode.GetModifier() ) // allow only pure cursor keys
break;
if( IsHorizontal() )
- ImplChangeHighlightUpDn( TRUE );
+ ImplChangeHighlightUpDn( sal_True );
else
ImplOpenItem( aKeyCode );
}
@@ -5761,7 +5761,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt )
if( aKeyCode.GetModifier() ) // allow only pure cursor keys
break;
if( !IsHorizontal() )
- ImplChangeHighlightUpDn( FALSE );
+ ImplChangeHighlightUpDn( sal_False );
else
ImplOpenItem( aKeyCode );
}
@@ -5771,7 +5771,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt )
if( aKeyCode.GetModifier() ) // allow only pure cursor keys
break;
if( IsHorizontal() )
- ImplChangeHighlightUpDn( FALSE );
+ ImplChangeHighlightUpDn( sal_False );
else
ImplOpenItem( aKeyCode );
}
@@ -5783,9 +5783,9 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt )
mnCurLine = mnCurLine - mnVisLines;
else
mnCurLine = 1;
- mbFormat = TRUE;
+ mbFormat = sal_True;
ImplFormat();
- ImplDrawSpin( FALSE, FALSE );
+ ImplDrawSpin( sal_False, sal_False );
ImplChangeHighlight( ImplGetFirstValidItem( mnCurLine ) );
}
break;
@@ -5796,22 +5796,22 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt )
mnCurLine = mnCurLine + mnVisLines;
else
mnCurLine = mnCurLines;
- mbFormat = TRUE;
+ mbFormat = sal_True;
ImplFormat();
- ImplDrawSpin( FALSE, FALSE );
+ ImplDrawSpin( sal_False, sal_False );
ImplChangeHighlight( ImplGetFirstValidItem( mnCurLine ) );
}
break;
case KEY_END:
{
ImplChangeHighlight( NULL );
- ImplChangeHighlightUpDn( FALSE );
+ ImplChangeHighlightUpDn( sal_False );
}
break;
case KEY_HOME:
{
ImplChangeHighlight( NULL );
- ImplChangeHighlightUpDn( TRUE );
+ ImplChangeHighlightUpDn( sal_True );
}
break;
case KEY_ESCAPE:
@@ -5844,7 +5844,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt )
if( !pItem->mbEnabled )
{
Sound::Beep( SOUND_DISABLE, this );
- bGrabFocusToDocument = TRUE;
+ bGrabFocusToDocument = sal_True;
}
}
if( !bGrabFocusToDocument )
@@ -5853,7 +5853,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt )
break;
default:
{
- USHORT aKeyGroup = aKeyCode.GetGroup();
+ sal_uInt16 aKeyGroup = aKeyCode.GetGroup();
ImplToolItem *pItem = NULL;
if( mnHighItemId )
pItem = ImplGetItem( mnHighItemId );
@@ -5862,9 +5862,9 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt )
{
Window *pFocusWindow = Application::GetFocusWindow();
ImplHideFocus();
- mbChangingHighlight = TRUE; // avoid focus change due to loose focus
+ mbChangingHighlight = sal_True; // avoid focus change due to loose focus
pItem->mpWindow->ImplControlFocus( GETFOCUS_TAB );
- mbChangingHighlight = FALSE;
+ mbChangingHighlight = sal_False;
if( pFocusWindow != Application::GetFocusWindow() )
Application::GetFocusWindow()->KeyInput( rKEvt );
}
@@ -5874,7 +5874,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt )
// while the toolbox has the focus
// just forward function and special keys and combinations with Alt-key
if( aKeyGroup == KEYGROUP_FKEYS || aKeyGroup == KEYGROUP_MISC || aKeyCode.IsMod2() )
- bForwardKey = TRUE;
+ bForwardKey = sal_True;
}
}
}
@@ -5886,7 +5886,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt )
// #107251# move focus away if this toolbox was disabled during keyinput
if( HasFocus() && mpData->mbKeyInputDisabled && (ImplGetParent()->GetStyle() & (WB_DIALOGCONTROL | WB_NODIALOGCONTROL) ) == WB_DIALOGCONTROL)
{
- USHORT n = 0;
+ sal_uInt16 n = 0;
Window *pFocusControl = ImplGetParent()->ImplGetDlgWindow( n, DLGWINDOW_FIRST );
if ( pFocusControl && pFocusControl != this )
pFocusControl->ImplControlFocus( GETFOCUS_INIT );
@@ -5908,10 +5908,10 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt )
// -----------------------------------------------------------------------
// returns the current toolbox line of the item
-USHORT ToolBox::ImplGetItemLine( ImplToolItem* pCurrentItem )
+sal_uInt16 ToolBox::ImplGetItemLine( ImplToolItem* pCurrentItem )
{
std::vector< ImplToolItem >::const_iterator it = mpData->m_aItems.begin();
- USHORT nLine = 1;
+ sal_uInt16 nLine = 1;
while( it != mpData->m_aItems.end() )
{
if ( it->mbBreak )
@@ -5924,7 +5924,7 @@ USHORT ToolBox::ImplGetItemLine( ImplToolItem* pCurrentItem )
}
// returns the first displayable item in the given line
-ImplToolItem* ToolBox::ImplGetFirstValidItem( USHORT nLine )
+ImplToolItem* ToolBox::ImplGetFirstValidItem( sal_uInt16 nLine )
{
if( !nLine || nLine > mnCurLines )
return NULL;
@@ -5956,7 +5956,7 @@ ImplToolItem* ToolBox::ImplGetFirstValidItem( USHORT nLine )
}
// returns the last displayable item in the given line
-ImplToolItem* ToolBox::ImplGetLastValidItem( USHORT nLine )
+ImplToolItem* ToolBox::ImplGetLastValidItem( sal_uInt16 nLine )
{
if( !nLine || nLine > mnCurLines )
return NULL;
@@ -5990,11 +5990,11 @@ ImplToolItem* ToolBox::ImplGetLastValidItem( USHORT nLine )
// -----------------------------------------------------------------------
-USHORT ToolBox::ImplFindItemPos( const ImplToolItem* pItem, const std::vector< ImplToolItem >& rList )
+sal_uInt16 ToolBox::ImplFindItemPos( const ImplToolItem* pItem, const std::vector< ImplToolItem >& rList )
{
if( pItem )
{
- USHORT nPos;
+ sal_uInt16 nPos;
for( nPos = 0; nPos < rList.size(); nPos++ )
if( &rList[ nPos ] == pItem )
return nPos;
@@ -6002,34 +6002,34 @@ USHORT ToolBox::ImplFindItemPos( const ImplToolItem* pItem, const std::vector< I
return TOOLBOX_ITEM_NOTFOUND;
}
-void ToolBox::ChangeHighlight( USHORT nPos )
+void ToolBox::ChangeHighlight( sal_uInt16 nPos )
{
if ( nPos < GetItemCount() ) {
ImplGrabFocus( 0 );
- ImplChangeHighlight ( ImplGetItem ( GetItemId ( (USHORT) nPos ) ), FALSE );
+ ImplChangeHighlight ( ImplGetItem ( GetItemId ( (sal_uInt16) nPos ) ), sal_False );
}
}
-void ToolBox::ImplChangeHighlight( ImplToolItem* pItem, BOOL bNoGrabFocus )
+void ToolBox::ImplChangeHighlight( ImplToolItem* pItem, sal_Bool bNoGrabFocus )
{
// avoid recursion due to focus change
if( mbChangingHighlight )
return;
- mbChangingHighlight = TRUE;
+ mbChangingHighlight = sal_True;
ImplToolItem* pOldItem = NULL;
if ( mnHighItemId )
{
ImplHideFocus();
- USHORT nPos = GetItemPos( mnHighItemId );
+ sal_uInt16 nPos = GetItemPos( mnHighItemId );
pOldItem = ImplGetItem( mnHighItemId );
// #i89962# ImplDrawItem can cause Invalidate/Update
// which will in turn ImplShowFocus again
// set mnHighItemId to 0 already to prevent this hen/egg problem
mnHighItemId = 0;
- ImplDrawItem( nPos, FALSE );
+ ImplDrawItem( nPos, sal_False );
ImplCallEventListeners( VCLEVENT_TOOLBOX_HIGHLIGHTOFF, reinterpret_cast< void* >( nPos ) );
}
@@ -6041,21 +6041,21 @@ void ToolBox::ImplChangeHighlight( ImplToolItem* pItem, BOOL bNoGrabFocus )
if( pItem )
{
- USHORT aPos = ToolBox::ImplFindItemPos( pItem, mpData->m_aItems );
+ sal_uInt16 aPos = ToolBox::ImplFindItemPos( pItem, mpData->m_aItems );
if( aPos != TOOLBOX_ITEM_NOTFOUND)
{
// check for line breaks
- USHORT nLine = ImplGetItemLine( pItem );
+ sal_uInt16 nLine = ImplGetItemLine( pItem );
if( nLine >= mnCurLine + mnVisLines )
{
mnCurLine = nLine - mnVisLines + 1;
- mbFormat = TRUE;
+ mbFormat = sal_True;
}
else if ( nLine < mnCurLine )
{
mnCurLine = nLine;
- mbFormat = TRUE;
+ mbFormat = sal_True;
}
if( mbFormat )
@@ -6080,23 +6080,23 @@ void ToolBox::ImplChangeHighlight( ImplToolItem* pItem, BOOL bNoGrabFocus )
mnCurPos = TOOLBOX_ITEM_NOTFOUND;
}
- mbChangingHighlight = FALSE;
+ mbChangingHighlight = sal_False;
}
// -----------------------------------------------------------------------
// check for keyboard accessible items
-static BOOL ImplIsValidItem( const ImplToolItem* pItem, BOOL bNotClipped )
+static sal_Bool ImplIsValidItem( const ImplToolItem* pItem, sal_Bool bNotClipped )
{
- BOOL bValid = (pItem && pItem->meType == TOOLBOXITEM_BUTTON && pItem->mbVisible && !ImplIsFixedControl( pItem ));
+ sal_Bool bValid = (pItem && pItem->meType == TOOLBOXITEM_BUTTON && pItem->mbVisible && !ImplIsFixedControl( pItem ));
if( bValid && bNotClipped && pItem->IsClipped() )
- bValid = FALSE;
+ bValid = sal_False;
return bValid;
}
// -----------------------------------------------------------------------
-BOOL ToolBox::ImplChangeHighlightUpDn( BOOL bUp, BOOL bNoCycle )
+sal_Bool ToolBox::ImplChangeHighlightUpDn( sal_Bool bUp, sal_Bool bNoCycle )
{
ImplToolItem* pToolItem = ImplGetItem( mnHighItemId );
@@ -6113,13 +6113,13 @@ BOOL ToolBox::ImplChangeHighlightUpDn( BOOL bUp, BOOL bNoCycle )
while( it != mpData->m_aItems.begin() )
{
--it;
- if ( ImplIsValidItem( &(*it), TRUE ) )
+ if ( ImplIsValidItem( &(*it), sal_True ) )
{
pItem = &(*it);
break;
}
}
- ImplDrawMenubutton( this, FALSE );
+ ImplDrawMenubutton( this, sal_False );
ImplChangeHighlight( pItem );
}
else
@@ -6128,17 +6128,17 @@ BOOL ToolBox::ImplChangeHighlightUpDn( BOOL bUp, BOOL bNoCycle )
std::vector< ImplToolItem >::iterator it = mpData->m_aItems.begin();
while( it != mpData->m_aItems.end() )
{
- if ( ImplIsValidItem( &(*it), TRUE ) )
+ if ( ImplIsValidItem( &(*it), sal_True ) )
break;
++it;
}
if( it != mpData->m_aItems.end() )
{
- ImplDrawMenubutton( this, FALSE );
+ ImplDrawMenubutton( this, sal_False );
ImplChangeHighlight( &(*it) );
}
}
- return TRUE;
+ return sal_True;
}
if( bUp )
@@ -6147,7 +6147,7 @@ BOOL ToolBox::ImplChangeHighlightUpDn( BOOL bUp, BOOL bNoCycle )
std::vector< ImplToolItem >::iterator it = mpData->m_aItems.begin();
while( it != mpData->m_aItems.end() )
{
- if ( ImplIsValidItem( &(*it), FALSE ) )
+ if ( ImplIsValidItem( &(*it), sal_False ) )
break;
++it;
}
@@ -6156,11 +6156,11 @@ BOOL ToolBox::ImplChangeHighlightUpDn( BOOL bUp, BOOL bNoCycle )
if( (it != mpData->m_aItems.end() && &(*it) == ImplGetFirstClippedItem( this )) && IsMenuEnabled() )
{
ImplChangeHighlight( NULL );
- ImplDrawMenubutton( this, TRUE );
+ ImplDrawMenubutton( this, sal_True );
}
else
ImplChangeHighlight( (it != mpData->m_aItems.end()) ? &(*it) : NULL );
- return TRUE;
+ return sal_True;
}
else
{
@@ -6170,7 +6170,7 @@ BOOL ToolBox::ImplChangeHighlightUpDn( BOOL bUp, BOOL bNoCycle )
if( IsMenuEnabled() && !ImplIsFloatingMode() )
{
ImplChangeHighlight( NULL );
- ImplDrawMenubutton( this, TRUE );
+ ImplDrawMenubutton( this, sal_True );
}
else
{
@@ -6179,7 +6179,7 @@ BOOL ToolBox::ImplChangeHighlightUpDn( BOOL bUp, BOOL bNoCycle )
while( it != mpData->m_aItems.begin() )
{
--it;
- if ( ImplIsValidItem( &(*it), FALSE ) )
+ if ( ImplIsValidItem( &(*it), sal_False ) )
{
pItem = &(*it);
break;
@@ -6187,16 +6187,16 @@ BOOL ToolBox::ImplChangeHighlightUpDn( BOOL bUp, BOOL bNoCycle )
}
ImplChangeHighlight( pItem );
}
- return TRUE;
+ return sal_True;
}
}
if( pToolItem )
{
- ULONG pos = ToolBox::ImplFindItemPos( pToolItem, mpData->m_aItems );
- ULONG nCount = mpData->m_aItems.size();
+ sal_uIntPtr pos = ToolBox::ImplFindItemPos( pToolItem, mpData->m_aItems );
+ sal_uIntPtr nCount = mpData->m_aItems.size();
- ULONG i=0;
+ sal_uIntPtr i=0;
do
{
if( bUp )
@@ -6204,14 +6204,14 @@ BOOL ToolBox::ImplChangeHighlightUpDn( BOOL bUp, BOOL bNoCycle )
if( !pos-- )
{
if( bNoCycle )
- return FALSE;
+ return sal_False;
// highlight the menu button if it is the last item
if( IsMenuEnabled() && !ImplIsFloatingMode() )
{
ImplChangeHighlight( NULL );
- ImplDrawMenubutton( this, TRUE );
- return TRUE;
+ ImplDrawMenubutton( this, sal_True );
+ return sal_True;
}
else
pos = nCount-1;
@@ -6222,14 +6222,14 @@ BOOL ToolBox::ImplChangeHighlightUpDn( BOOL bUp, BOOL bNoCycle )
if( ++pos >= nCount )
{
if( bNoCycle )
- return FALSE;
+ return sal_False;
// highlight the menu button if it is the last item
if( IsMenuEnabled() && !ImplIsFloatingMode() )
{
ImplChangeHighlight( NULL );
- ImplDrawMenubutton( this, TRUE );
- return TRUE;
+ ImplDrawMenubutton( this, sal_True );
+ return sal_True;
}
else
pos = 0;
@@ -6238,7 +6238,7 @@ BOOL ToolBox::ImplChangeHighlightUpDn( BOOL bUp, BOOL bNoCycle )
pToolItem = &mpData->m_aItems[pos];
- if ( ImplIsValidItem( pToolItem, FALSE ) )
+ if ( ImplIsValidItem( pToolItem, sal_False ) )
break;
} while( ++i < nCount);
@@ -6247,14 +6247,14 @@ BOOL ToolBox::ImplChangeHighlightUpDn( BOOL bUp, BOOL bNoCycle )
{
// select the menu button if a clipped item would be selected
ImplChangeHighlight( NULL );
- ImplDrawMenubutton( this, TRUE );
+ ImplDrawMenubutton( this, sal_True );
}
else if( i != nCount )
ImplChangeHighlight( pToolItem );
else
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -6267,7 +6267,7 @@ void ToolBox::ImplShowFocus()
if( pItem->mpWindow )
{
Window *pWin = pItem->mpWindow->ImplGetWindowImpl()->mpBorderWindow ? pItem->mpWindow->ImplGetWindowImpl()->mpBorderWindow : pItem->mpWindow;
- pWin->ImplGetWindowImpl()->mbDrawSelectionBackground = TRUE;
+ pWin->ImplGetWindowImpl()->mbDrawSelectionBackground = sal_True;
pWin->Invalidate( 0 );
}
}
@@ -6283,7 +6283,7 @@ void ToolBox::ImplHideFocus()
if( pItem->mpWindow )
{
Window *pWin = pItem->mpWindow->ImplGetWindowImpl()->mpBorderWindow ? pItem->mpWindow->ImplGetWindowImpl()->mpBorderWindow : pItem->mpWindow;
- pWin->ImplGetWindowImpl()->mbDrawSelectionBackground = FALSE;
+ pWin->ImplGetWindowImpl()->mbDrawSelectionBackground = sal_False;
pWin->Invalidate( 0 );
}
}
@@ -6291,7 +6291,7 @@ void ToolBox::ImplHideFocus()
if ( mpData->mbMenubuttonSelected )
{
// remove highlight from menubutton
- ImplDrawMenubutton( this, FALSE );
+ ImplDrawMenubutton( this, sal_False );
}
}
@@ -6311,7 +6311,7 @@ void ToolBox::ImplDisableFlatButtons()
&hkey) )
{
DWORD dwType = 0;
- WIN_BYTE Data[6]; // possible values: "true", "false", "1", "0", DWORD
+ BYTE Data[6]; // possible values: "true", "false", "1", "0", DWORD
DWORD cbData = sizeof(Data);
if( ERROR_SUCCESS == RegQueryValueEx(hkey, "DisableFlatToolboxButtons",
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index 334cdd2d0a64..3852586bdb90 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -73,17 +73,17 @@ ImplToolBoxPrivateData::ImplToolBoxPrivateData() :
mnMenuButtonWidth = TB_MENUBUTTON_SIZE;
- mbIsLocked = FALSE;
- mbNativeButtons = FALSE;
- mbIsPaintLocked = FALSE;
- mbAssumeDocked = FALSE;
- mbAssumePopupMode = FALSE;
- mbAssumeFloating = FALSE;
- mbKeyInputDisabled = FALSE;
- mbMenubuttonSelected = FALSE;
- mbPageScroll = FALSE;
- mbWillUsePopupMode = FALSE;
- mbDropDownByKeyboard = FALSE;
+ mbIsLocked = sal_False;
+ mbNativeButtons = sal_False;
+ mbIsPaintLocked = sal_False;
+ mbAssumeDocked = sal_False;
+ mbAssumePopupMode = sal_False;
+ mbAssumeFloating = sal_False;
+ mbKeyInputDisabled = sal_False;
+ mbMenubuttonSelected = sal_False;
+ mbPageScroll = sal_False;
+ mbWillUsePopupMode = sal_False;
+ mbDropDownByKeyboard = sal_False;
}
ImplToolBoxPrivateData::~ImplToolBoxPrivateData()
@@ -103,21 +103,21 @@ ImplToolItem::ImplToolItem()
meType = TOOLBOXITEM_BUTTON;
mnBits = 0;
meState = STATE_NOCHECK;
- mbEnabled = TRUE;
- mbVisible = TRUE;
- mbEmptyBtn = TRUE;
- mbShowWindow = FALSE;
- mbBreak = FALSE;
+ mbEnabled = sal_True;
+ mbVisible = sal_True;
+ mbEmptyBtn = sal_True;
+ mbShowWindow = sal_False;
+ mbBreak = sal_False;
mnSepSize = TB_SEP_SIZE;
mnDropDownArrowWidth = TB_DROPDOWNARROWWIDTH;
mnImageAngle = 0;
- mbMirrorMode = FALSE;
- mbVisibleText = FALSE;
+ mbMirrorMode = sal_False;
+ mbVisibleText = sal_False;
}
// -----------------------------------------------------------------------
-ImplToolItem::ImplToolItem( USHORT nItemId, const Image& rImage,
+ImplToolItem::ImplToolItem( sal_uInt16 nItemId, const Image& rImage,
ToolBoxItemBits nItemBits ) :
maImage( rImage )
{
@@ -128,11 +128,11 @@ ImplToolItem::ImplToolItem( USHORT nItemId, const Image& rImage,
meType = TOOLBOXITEM_BUTTON;
mnBits = nItemBits;
meState = STATE_NOCHECK;
- mbEnabled = TRUE;
- mbVisible = TRUE;
- mbEmptyBtn = FALSE;
- mbShowWindow = FALSE;
- mbBreak = FALSE;
+ mbEnabled = sal_True;
+ mbVisible = sal_True;
+ mbEmptyBtn = sal_False;
+ mbShowWindow = sal_False;
+ mbBreak = sal_False;
mnSepSize = TB_SEP_SIZE;
mnDropDownArrowWidth = TB_DROPDOWNARROWWIDTH;
mnImageAngle = 0;
@@ -142,7 +142,7 @@ ImplToolItem::ImplToolItem( USHORT nItemId, const Image& rImage,
// -----------------------------------------------------------------------
-ImplToolItem::ImplToolItem( USHORT nItemId, const XubString& rText,
+ImplToolItem::ImplToolItem( sal_uInt16 nItemId, const XubString& rText,
ToolBoxItemBits nItemBits ) :
maText( rText )
{
@@ -153,11 +153,11 @@ ImplToolItem::ImplToolItem( USHORT nItemId, const XubString& rText,
meType = TOOLBOXITEM_BUTTON;
mnBits = nItemBits;
meState = STATE_NOCHECK;
- mbEnabled = TRUE;
- mbVisible = TRUE;
- mbEmptyBtn = FALSE;
- mbShowWindow = FALSE;
- mbBreak = FALSE;
+ mbEnabled = sal_True;
+ mbVisible = sal_True;
+ mbEmptyBtn = sal_False;
+ mbShowWindow = sal_False;
+ mbBreak = sal_False;
mnSepSize = TB_SEP_SIZE;
mnDropDownArrowWidth = TB_DROPDOWNARROWWIDTH;
mnImageAngle = 0;
@@ -167,7 +167,7 @@ ImplToolItem::ImplToolItem( USHORT nItemId, const XubString& rText,
// -----------------------------------------------------------------------
-ImplToolItem::ImplToolItem( USHORT nItemId, const Image& rImage,
+ImplToolItem::ImplToolItem( sal_uInt16 nItemId, const Image& rImage,
const XubString& rText, ToolBoxItemBits nItemBits ) :
maImage( rImage ),
maText( rText )
@@ -179,11 +179,11 @@ ImplToolItem::ImplToolItem( USHORT nItemId, const Image& rImage,
meType = TOOLBOXITEM_BUTTON;
mnBits = nItemBits;
meState = STATE_NOCHECK;
- mbEnabled = TRUE;
- mbVisible = TRUE;
- mbEmptyBtn = FALSE;
- mbShowWindow = FALSE;
- mbBreak = FALSE;
+ mbEnabled = sal_True;
+ mbVisible = sal_True;
+ mbEmptyBtn = sal_False;
+ mbShowWindow = sal_False;
+ mbBreak = sal_False;
mnSepSize = TB_SEP_SIZE;
mnDropDownArrowWidth = TB_DROPDOWNARROWWIDTH;
mnImageAngle = 0;
@@ -264,7 +264,7 @@ ImplToolItem& ImplToolItem::operator=( const ImplToolItem& rItem )
// -----------------------------------------------------------------------
-Size ImplToolItem::GetSize( BOOL bHorz, BOOL bCheckMaxWidth, long maxWidth, const Size& rDefaultSize )
+Size ImplToolItem::GetSize( sal_Bool bHorz, sal_Bool bCheckMaxWidth, long maxWidth, const Size& rDefaultSize )
{
Size aSize( rDefaultSize ); // the size of 'standard' toolbox items
// non-standard items are eg windows or buttons with text
@@ -276,13 +276,13 @@ Size ImplToolItem::GetSize( BOOL bHorz, BOOL bCheckMaxWidth, long maxWidth, cons
if ( mpWindow && bHorz )
{
// get size of item window and check if it fits
- // no windows in vertical toolbars (the default is mbShowWindow=FALSE)
+ // no windows in vertical toolbars (the default is mbShowWindow=sal_False)
Size aWinSize = mpWindow->GetSizePixel();
if ( !bCheckMaxWidth || (aWinSize.Width() <= maxWidth) )
{
aSize.Width() = aWinSize.Width();
aSize.Height() = aWinSize.Height();
- mbShowWindow = TRUE;
+ mbShowWindow = sal_True;
}
else
{
@@ -318,27 +318,27 @@ Size ImplToolItem::GetSize( BOOL bHorz, BOOL bCheckMaxWidth, long maxWidth, cons
// -----------------------------------------------------------------------
-void ImplToolItem::DetermineButtonDrawStyle( ButtonType eButtonType, BOOL& rbImage, BOOL& rbText ) const
+void ImplToolItem::DetermineButtonDrawStyle( ButtonType eButtonType, sal_Bool& rbImage, sal_Bool& rbText ) const
{
if ( meType != TOOLBOXITEM_BUTTON )
{
// no button -> draw nothing
- rbImage = rbText = FALSE;
+ rbImage = rbText = sal_False;
return;
}
- BOOL bHasImage;
- BOOL bHasText;
+ sal_Bool bHasImage;
+ sal_Bool bHasText;
// check for image and/or text
if ( !(maImage) )
- bHasImage = FALSE;
+ bHasImage = sal_False;
else
- bHasImage = TRUE;
+ bHasImage = sal_True;
if ( !maText.Len() )
- bHasText = FALSE;
+ bHasText = sal_False;
else
- bHasText = TRUE;
+ bHasText = sal_True;
// prefer images if symbolonly buttons are drawn
// prefer texts if textonly buttons are dreawn
@@ -347,38 +347,38 @@ void ImplToolItem::DetermineButtonDrawStyle( ButtonType eButtonType, BOOL& rbIma
{
if( bHasImage || !bHasText )
{
- rbImage = TRUE;
- rbText = FALSE;
+ rbImage = sal_True;
+ rbText = sal_False;
}
else
{
- rbImage = FALSE;
- rbText = TRUE;
+ rbImage = sal_False;
+ rbText = sal_True;
}
}
else if ( eButtonType == BUTTON_TEXT ) // drawing text only
{
if( bHasText || !bHasImage )
{
- rbImage = FALSE;
- rbText = TRUE;
+ rbImage = sal_False;
+ rbText = sal_True;
}
else
{
- rbImage = TRUE;
- rbText = FALSE;
+ rbImage = sal_True;
+ rbText = sal_False;
}
}
else // drawing icons and text both
{
- rbImage = TRUE;
- rbText = TRUE;
+ rbImage = sal_True;
+ rbText = sal_True;
}
}
// -----------------------------------------------------------------------
-Rectangle ImplToolItem::GetDropDownRect( BOOL bHorz ) const
+Rectangle ImplToolItem::GetDropDownRect( sal_Bool bHorz ) const
{
Rectangle aRect;
if( (mnBits & TIB_DROPDOWN) && !maRect.IsEmpty() )
@@ -396,7 +396,7 @@ Rectangle ImplToolItem::GetDropDownRect( BOOL bHorz ) const
// -----------------------------------------------------------------------
-BOOL ImplToolItem::IsClipped() const
+sal_Bool ImplToolItem::IsClipped() const
{
return ( meType == TOOLBOXITEM_BUTTON && mbVisible && maRect.IsEmpty() );
}
@@ -415,16 +415,16 @@ const XubString& ToolBox::ImplConvertMenuString( const XubString& rStr )
// -----------------------------------------------------------------------
-void ToolBox::ImplInvalidate( BOOL bNewCalc, BOOL bFullPaint )
+void ToolBox::ImplInvalidate( sal_Bool bNewCalc, sal_Bool bFullPaint )
{
ImplUpdateInputEnable();
if ( bNewCalc )
- mbCalc = TRUE;
+ mbCalc = sal_True;
if ( bFullPaint )
{
- mbFormat = TRUE;
+ mbFormat = sal_True;
// Muss ueberhaupt eine neue Ausgabe erfolgen
if ( IsReallyVisible() && IsUpdateMode() )
@@ -438,7 +438,7 @@ void ToolBox::ImplInvalidate( BOOL bNewCalc, BOOL bFullPaint )
{
if ( !mbFormat )
{
- mbFormat = TRUE;
+ mbFormat = sal_True;
// Muss ueberhaupt eine neue Ausgabe erfolgen
if ( IsReallyVisible() && IsUpdateMode() )
@@ -452,7 +452,7 @@ void ToolBox::ImplInvalidate( BOOL bNewCalc, BOOL bFullPaint )
// -----------------------------------------------------------------------
-void ToolBox::ImplUpdateItem( USHORT nIndex )
+void ToolBox::ImplUpdateItem( sal_uInt16 nIndex )
{
// Muss ueberhaupt eine neue Ausgabe erfolgen
if ( IsReallyVisible() && IsUpdateMode() )
@@ -512,7 +512,7 @@ void ToolBox::Deactivate()
if ( mbHideStatusText )
{
GetpApp()->HideHelpStatusText();
- mbHideStatusText = FALSE;
+ mbHideStatusText = sal_False;
}
}
@@ -527,7 +527,7 @@ void ToolBox::Highlight()
if ( aStr.Len() || mbHideStatusText )
{
GetpApp()->ShowHelpStatusText( aStr );
- mbHideStatusText = TRUE;
+ mbHideStatusText = sal_True;
}
}
@@ -572,10 +572,10 @@ void ToolBox::UserDraw( const UserDrawEvent& )
// -----------------------------------------------------------------------
-void ToolBox::InsertItem( const ResId& rResId, USHORT nPos )
+void ToolBox::InsertItem( const ResId& rResId, sal_uInt16 nPos )
{
- ULONG nObjMask;
- BOOL bImage = FALSE; // Wurde Image gesetzt
+ sal_uIntPtr nObjMask;
+ sal_Bool bImage = sal_False; // Wurde Image gesetzt
// Item anlegen
ImplToolItem aItem;
@@ -584,7 +584,7 @@ void ToolBox::InsertItem( const ResId& rResId, USHORT nPos )
nObjMask = ReadLongRes();
if ( nObjMask & RSC_TOOLBOXITEM_ID )
- aItem.mnId = sal::static_int_cast<USHORT>(ReadLongRes());
+ aItem.mnId = sal::static_int_cast<sal_uInt16>(ReadLongRes());
else
aItem.mnId = 1;
@@ -610,22 +610,22 @@ void ToolBox::InsertItem( const ResId& rResId, USHORT nPos )
Bitmap aBmp = Bitmap( ResId( (RSHEADER_TYPE*)GetClassRes(), *rResId.GetResMgr() ) );
IncrementRes( GetObjSizeRes( (RSHEADER_TYPE*)GetClassRes() ) );
aItem.maImage = Image( aBmp, IMAGE_STDBTN_COLOR );
- bImage = TRUE;
+ bImage = sal_True;
}
if ( nObjMask & RSC_TOOLBOXITEM_IMAGE )
{
aItem.maImage = Image( ResId( (RSHEADER_TYPE*)GetClassRes(), *rResId.GetResMgr() ) );
IncrementRes( GetObjSizeRes( (RSHEADER_TYPE*)GetClassRes() ) );
- bImage = TRUE;
+ bImage = sal_True;
}
if ( nObjMask & RSC_TOOLBOXITEM_DISABLE )
- aItem.mbEnabled = !(BOOL)ReadShortRes();
+ aItem.mbEnabled = !(sal_Bool)ReadShortRes();
if ( nObjMask & RSC_TOOLBOXITEM_STATE )
aItem.meState = (TriState)ReadLongRes();
if ( nObjMask & RSC_TOOLBOXITEM_HIDE )
- aItem.mbVisible = !((BOOL)ReadShortRes());
+ aItem.mbVisible = !((sal_Bool)ReadShortRes());
if ( nObjMask & RSC_TOOLBOXITEM_COMMAND )
aItem.maCommandStr = ReadStringRes();
@@ -636,15 +636,15 @@ void ToolBox::InsertItem( const ResId& rResId, USHORT nPos )
aItem.maImage = maImageList.GetImage( aItem.mnId );
// Wenn es sich um ein ButtonItem handelt, die ID ueberpruefen
- BOOL bNewCalc;
+ sal_Bool bNewCalc;
if ( aItem.meType != TOOLBOXITEM_BUTTON )
{
- bNewCalc = FALSE;
+ bNewCalc = sal_False;
aItem.mnId = 0;
}
else
{
- bNewCalc = TRUE;
+ bNewCalc = sal_True;
DBG_ASSERT( aItem.mnId, "ToolBox::InsertItem(): ItemId == 0" );
DBG_ASSERT( GetItemPos( aItem.mnId ) == TOOLBOX_ITEM_NOTFOUND,
@@ -659,14 +659,14 @@ void ToolBox::InsertItem( const ResId& rResId, USHORT nPos )
ImplInvalidate( bNewCalc );
// Notify
- USHORT nNewPos = sal::static_int_cast<USHORT>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos);
+ sal_uInt16 nNewPos = sal::static_int_cast<sal_uInt16>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos);
ImplCallEventListeners( VCLEVENT_TOOLBOX_ITEMADDED, reinterpret_cast< void* >( nNewPos ) );
}
// -----------------------------------------------------------------------
-void ToolBox::InsertItem( USHORT nItemId, const Image& rImage,
- ToolBoxItemBits nBits, USHORT nPos )
+void ToolBox::InsertItem( sal_uInt16 nItemId, const Image& rImage,
+ ToolBoxItemBits nBits, sal_uInt16 nPos )
{
DBG_ASSERT( nItemId, "ToolBox::InsertItem(): ItemId == 0" );
DBG_ASSERT( GetItemPos( nItemId ) == TOOLBOX_ITEM_NOTFOUND,
@@ -676,18 +676,18 @@ void ToolBox::InsertItem( USHORT nItemId, const Image& rImage,
mpData->m_aItems.insert( (nPos < mpData->m_aItems.size()) ? mpData->m_aItems.begin()+nPos : mpData->m_aItems.end(), ImplToolItem( nItemId, rImage, nBits ) );
mpData->ImplClearLayoutData();
- ImplInvalidate( TRUE );
+ ImplInvalidate( sal_True );
// Notify
- USHORT nNewPos = sal::static_int_cast<USHORT>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos);
+ sal_uInt16 nNewPos = sal::static_int_cast<sal_uInt16>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos);
ImplCallEventListeners( VCLEVENT_TOOLBOX_ITEMADDED, reinterpret_cast< void* >(nNewPos ) );
}
// -----------------------------------------------------------------------
-void ToolBox::InsertItem( USHORT nItemId, const Image& rImage,
+void ToolBox::InsertItem( sal_uInt16 nItemId, const Image& rImage,
const XubString& rText,
- ToolBoxItemBits nBits, USHORT nPos )
+ ToolBoxItemBits nBits, sal_uInt16 nPos )
{
DBG_ASSERT( nItemId, "ToolBox::InsertItem(): ItemId == 0" );
DBG_ASSERT( GetItemPos( nItemId ) == TOOLBOX_ITEM_NOTFOUND,
@@ -697,17 +697,17 @@ void ToolBox::InsertItem( USHORT nItemId, const Image& rImage,
mpData->m_aItems.insert( (nPos < mpData->m_aItems.size()) ? mpData->m_aItems.begin()+nPos : mpData->m_aItems.end(), ImplToolItem( nItemId, rImage, ImplConvertMenuString( rText ), nBits ) );
mpData->ImplClearLayoutData();
- ImplInvalidate( TRUE );
+ ImplInvalidate( sal_True );
// Notify
- USHORT nNewPos = sal::static_int_cast<USHORT>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos);
+ sal_uInt16 nNewPos = sal::static_int_cast<sal_uInt16>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos);
ImplCallEventListeners( VCLEVENT_TOOLBOX_ITEMADDED, reinterpret_cast< void* >( nNewPos ) );
}
// -----------------------------------------------------------------------
-void ToolBox::InsertItem( USHORT nItemId, const XubString& rText,
- ToolBoxItemBits nBits, USHORT nPos )
+void ToolBox::InsertItem( sal_uInt16 nItemId, const XubString& rText,
+ ToolBoxItemBits nBits, sal_uInt16 nPos )
{
DBG_ASSERT( nItemId, "ToolBox::InsertItem(): ItemId == 0" );
DBG_ASSERT( GetItemPos( nItemId ) == TOOLBOX_ITEM_NOTFOUND,
@@ -717,17 +717,17 @@ void ToolBox::InsertItem( USHORT nItemId, const XubString& rText,
mpData->m_aItems.insert( (nPos < mpData->m_aItems.size()) ? mpData->m_aItems.begin()+nPos : mpData->m_aItems.end(), ImplToolItem( nItemId, ImplConvertMenuString( rText ), nBits ) );
mpData->ImplClearLayoutData();
- ImplInvalidate( TRUE );
+ ImplInvalidate( sal_True );
// Notify
- USHORT nNewPos = sal::static_int_cast<USHORT>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos);
+ sal_uInt16 nNewPos = sal::static_int_cast<sal_uInt16>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos);
ImplCallEventListeners( VCLEVENT_TOOLBOX_ITEMADDED, reinterpret_cast< void* >( nNewPos ) );
}
// -----------------------------------------------------------------------
-void ToolBox::InsertWindow( USHORT nItemId, Window* pWindow,
- ToolBoxItemBits nBits, USHORT nPos )
+void ToolBox::InsertWindow( sal_uInt16 nItemId, Window* pWindow,
+ ToolBoxItemBits nBits, sal_uInt16 nPos )
{
DBG_ASSERT( nItemId, "ToolBox::InsertWindow(): ItemId == 0" );
DBG_ASSERT( GetItemPos( nItemId ) == TOOLBOX_ITEM_NOTFOUND,
@@ -745,80 +745,80 @@ void ToolBox::InsertWindow( USHORT nItemId, Window* pWindow,
if ( pWindow )
pWindow->Hide();
- ImplInvalidate( TRUE );
+ ImplInvalidate( sal_True );
// Notify
- USHORT nNewPos = sal::static_int_cast<USHORT>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos);
+ sal_uInt16 nNewPos = sal::static_int_cast<sal_uInt16>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos);
ImplCallEventListeners( VCLEVENT_TOOLBOX_ITEMADDED, reinterpret_cast< void* >( nNewPos ) );
}
// -----------------------------------------------------------------------
-void ToolBox::InsertSpace( USHORT nPos )
+void ToolBox::InsertSpace( sal_uInt16 nPos )
{
// Item anlegen und in die Liste einfuegen
ImplToolItem aItem;
aItem.meType = TOOLBOXITEM_SPACE;
- aItem.mbEnabled = FALSE;
+ aItem.mbEnabled = sal_False;
mpData->m_aItems.insert( (nPos < mpData->m_aItems.size()) ? mpData->m_aItems.begin()+nPos : mpData->m_aItems.end(), aItem );
mpData->ImplClearLayoutData();
- ImplInvalidate( FALSE );
+ ImplInvalidate( sal_False );
// Notify
- USHORT nNewPos = sal::static_int_cast<USHORT>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos);
+ sal_uInt16 nNewPos = sal::static_int_cast<sal_uInt16>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos);
ImplCallEventListeners( VCLEVENT_TOOLBOX_ITEMADDED, reinterpret_cast< void* >( nNewPos ) );
}
// -----------------------------------------------------------------------
-void ToolBox::InsertSeparator( USHORT nPos, USHORT nPixSize )
+void ToolBox::InsertSeparator( sal_uInt16 nPos, sal_uInt16 nPixSize )
{
// Item anlegen und in die Liste einfuegen
ImplToolItem aItem;
aItem.meType = TOOLBOXITEM_SEPARATOR;
- aItem.mbEnabled = FALSE;
+ aItem.mbEnabled = sal_False;
if ( nPixSize )
aItem.mnSepSize = nPixSize;
mpData->m_aItems.insert( (nPos < mpData->m_aItems.size()) ? mpData->m_aItems.begin()+nPos : mpData->m_aItems.end(), aItem );
mpData->ImplClearLayoutData();
- ImplInvalidate( FALSE );
+ ImplInvalidate( sal_False );
// Notify
- USHORT nNewPos = sal::static_int_cast<USHORT>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos);
+ sal_uInt16 nNewPos = sal::static_int_cast<sal_uInt16>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos);
ImplCallEventListeners( VCLEVENT_TOOLBOX_ITEMADDED, reinterpret_cast< void* >( nNewPos ) );
}
// -----------------------------------------------------------------------
-void ToolBox::InsertBreak( USHORT nPos )
+void ToolBox::InsertBreak( sal_uInt16 nPos )
{
// Item anlegen und in die Liste einfuegen
ImplToolItem aItem;
aItem.meType = TOOLBOXITEM_BREAK;
- aItem.mbEnabled = FALSE;
+ aItem.mbEnabled = sal_False;
mpData->m_aItems.insert( (nPos < mpData->m_aItems.size()) ? mpData->m_aItems.begin()+nPos : mpData->m_aItems.end(), aItem );
mpData->ImplClearLayoutData();
- ImplInvalidate( FALSE );
+ ImplInvalidate( sal_False );
// Notify
- USHORT nNewPos = sal::static_int_cast<USHORT>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos);
+ sal_uInt16 nNewPos = sal::static_int_cast<sal_uInt16>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos);
ImplCallEventListeners( VCLEVENT_TOOLBOX_ITEMADDED, reinterpret_cast< void* >( nNewPos ) );
}
// -----------------------------------------------------------------------
-void ToolBox::RemoveItem( USHORT nPos )
+void ToolBox::RemoveItem( sal_uInt16 nPos )
{
if( nPos < mpData->m_aItems.size() )
{
- BOOL bMustCalc;
+ sal_Bool bMustCalc;
if ( mpData->m_aItems[nPos].meType == TOOLBOXITEM_BUTTON )
- bMustCalc = TRUE;
+ bMustCalc = sal_True;
else
- bMustCalc = FALSE;
+ bMustCalc = sal_False;
if ( mpData->m_aItems[nPos].mpWindow )
mpData->m_aItems[nPos].mpWindow->Hide();
@@ -844,9 +844,9 @@ void ToolBox::RemoveItem( USHORT nPos )
// -----------------------------------------------------------------------
-void ToolBox::MoveItem( USHORT nItemId, USHORT nNewPos )
+void ToolBox::MoveItem( sal_uInt16 nItemId, sal_uInt16 nNewPos )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos == nNewPos )
return;
@@ -864,14 +864,14 @@ void ToolBox::MoveItem( USHORT nItemId, USHORT nNewPos )
mpData->ImplClearLayoutData();
// ToolBox neu ausgeben
- ImplInvalidate( FALSE );
+ ImplInvalidate( sal_False );
// Notify
if( nPos < nNewPos ) // only send one event, all indices above this item are invalid anyway
ImplCallEventListeners( VCLEVENT_TOOLBOX_ITEMREMOVED, reinterpret_cast< void* >( nPos ) );
else
{
- USHORT nNewPos2 = sal::static_int_cast<USHORT>(( nNewPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nNewPos);
+ sal_uInt16 nNewPos2 = sal::static_int_cast<sal_uInt16>(( nNewPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nNewPos);
ImplCallEventListeners( VCLEVENT_TOOLBOX_ITEMADDED, reinterpret_cast< void* >( nNewPos2 ) );
}
}
@@ -879,13 +879,13 @@ void ToolBox::MoveItem( USHORT nItemId, USHORT nNewPos )
// -----------------------------------------------------------------------
-void ToolBox::CopyItem( const ToolBox& rToolBox, USHORT nItemId,
- USHORT nNewPos )
+void ToolBox::CopyItem( const ToolBox& rToolBox, sal_uInt16 nItemId,
+ sal_uInt16 nNewPos )
{
DBG_ASSERT( GetItemPos( nItemId ) == TOOLBOX_ITEM_NOTFOUND,
"ToolBox::CopyItem(): ItemId already exists" );
- USHORT nPos = rToolBox.GetItemPos( nItemId );
+ sal_uInt16 nPos = rToolBox.GetItemPos( nItemId );
// Existiert Item
if ( nPos != TOOLBOX_ITEM_NOTFOUND )
@@ -894,15 +894,15 @@ void ToolBox::CopyItem( const ToolBox& rToolBox, USHORT nItemId,
ImplToolItem aNewItem = rToolBox.mpData->m_aItems[nPos];
// Bestimme Daten zuruecksetzen
aNewItem.mpWindow = NULL;
- aNewItem.mbShowWindow = FALSE;
+ aNewItem.mbShowWindow = sal_False;
mpData->m_aItems.insert( (nNewPos < mpData->m_aItems.size()) ? mpData->m_aItems.begin()+nNewPos : mpData->m_aItems.end(), aNewItem );
mpData->ImplClearLayoutData();
// ToolBox neu ausgeben
- ImplInvalidate( FALSE );
+ ImplInvalidate( sal_False );
// Notify
- USHORT nNewPos2 = sal::static_int_cast<USHORT>(( nNewPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nNewPos);
+ sal_uInt16 nNewPos2 = sal::static_int_cast<sal_uInt16>(( nNewPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nNewPos);
ImplCallEventListeners( VCLEVENT_TOOLBOX_ITEMADDED, reinterpret_cast< void* >( nNewPos2 ) );
}
}
@@ -921,10 +921,10 @@ void ToolBox::CopyItems( const ToolBox& rToolBox )
it != mpData->m_aItems.end(); ++it )
{
it->mpWindow = NULL;
- it->mbShowWindow = FALSE;
+ it->mbShowWindow = sal_False;
}
- ImplInvalidate( TRUE, TRUE );
+ ImplInvalidate( sal_True, sal_True );
// Notify
ImplCallEventListeners( VCLEVENT_TOOLBOX_ALLITEMSCHANGED );
@@ -941,7 +941,7 @@ void ToolBox::Clear()
mnCurItemId = 0;
mnHighItemId = 0;
- ImplInvalidate( TRUE, TRUE );
+ ImplInvalidate( sal_True, sal_True );
// Notify
ImplCallEventListeners( VCLEVENT_TOOLBOX_ALLITEMSCHANGED );
@@ -957,7 +957,7 @@ void ToolBox::SetButtonType( ButtonType eNewType )
// Hier besser alles neu ausgeben, da es ansonsten zu Problemen
// mit den per CopyBits kopierten Bereichen geben kann
- ImplInvalidate( TRUE );
+ ImplInvalidate( sal_True );
}
}
@@ -968,8 +968,8 @@ void ToolBox::SetToolboxButtonSize( ToolBoxButtonSize eSize )
if( mpData->meButtonSize != eSize )
{
mpData->meButtonSize = eSize;
- mbCalc = TRUE;
- mbFormat = TRUE;
+ mbCalc = sal_True;
+ mbFormat = sal_True;
}
}
@@ -984,10 +984,10 @@ const Size& ToolBox::GetDefaultImageSize() const
{
static Size aSmallButtonSize( TB_SMALLIMAGESIZE, TB_SMALLIMAGESIZE );
- static ULONG s_nSymbolsStyle = STYLE_SYMBOLS_DEFAULT;
+ static sal_uIntPtr s_nSymbolsStyle = STYLE_SYMBOLS_DEFAULT;
static Size aLargeButtonSize( TB_LARGEIMAGESIZE, TB_LARGEIMAGESIZE );
- ULONG nSymbolsStyle = Application::GetSettings().GetStyleSettings().GetCurrentSymbolsStyle();
+ sal_uIntPtr nSymbolsStyle = Application::GetSettings().GetStyleSettings().GetCurrentSymbolsStyle();
if ( s_nSymbolsStyle != nSymbolsStyle )
{
s_nSymbolsStyle = nSymbolsStyle;
@@ -1022,13 +1022,13 @@ void ToolBox::SetAlign( WindowAlign eNewAlign )
{
// Setzen, ob Items horizontal oder vertikal angeordnet werden sollen
if ( (eNewAlign == WINDOWALIGN_LEFT) || (eNewAlign == WINDOWALIGN_RIGHT) )
- mbHorz = FALSE;
+ mbHorz = sal_False;
else
- mbHorz = TRUE;
+ mbHorz = sal_True;
// Hier alles neu ausgeben, da sich Border auch aendert
- mbCalc = TRUE;
- mbFormat = TRUE;
+ mbCalc = sal_True;
+ mbFormat = sal_True;
if ( IsReallyVisible() && IsUpdateMode() )
Invalidate();
}
@@ -1037,7 +1037,7 @@ void ToolBox::SetAlign( WindowAlign eNewAlign )
// -----------------------------------------------------------------------
-void ToolBox::SetLineCount( USHORT nNewLines )
+void ToolBox::SetLineCount( sal_uInt16 nNewLines )
{
if ( !nNewLines )
nNewLines = 1;
@@ -1048,18 +1048,18 @@ void ToolBox::SetLineCount( USHORT nNewLines )
// Hier besser alles neu ausgeben, da es ansonsten zu Problemen
// mit den per CopyBits kopierten Bereichen geben kann
- ImplInvalidate( FALSE );
+ ImplInvalidate( sal_False );
}
}
// -----------------------------------------------------------------------
-void ToolBox::SetPageScroll( BOOL b )
+void ToolBox::SetPageScroll( sal_Bool b )
{
mpData->mbPageScroll = b;
}
-BOOL ToolBox::GetPageScroll()
+sal_Bool ToolBox::GetPageScroll()
{
return mpData->mbPageScroll;
}
@@ -1068,45 +1068,45 @@ BOOL ToolBox::GetPageScroll()
void ToolBox::SetNextToolBox( const XubString& rStr )
{
- BOOL bCalcNew = (!maNextToolBoxStr.Len() != !rStr.Len());
+ sal_Bool bCalcNew = (!maNextToolBoxStr.Len() != !rStr.Len());
maNextToolBoxStr = rStr;
if ( bCalcNew )
- ImplInvalidate( TRUE, FALSE );
+ ImplInvalidate( sal_True, sal_False );
}
// -----------------------------------------------------------------------
-USHORT ToolBox::GetItemCount() const
+sal_uInt16 ToolBox::GetItemCount() const
{
- return (USHORT)mpData->m_aItems.size();
+ return (sal_uInt16)mpData->m_aItems.size();
}
// -----------------------------------------------------------------------
-ToolBoxItemType ToolBox::GetItemType( USHORT nPos ) const
+ToolBoxItemType ToolBox::GetItemType( sal_uInt16 nPos ) const
{
return (nPos < mpData->m_aItems.size()) ? mpData->m_aItems[nPos].meType : TOOLBOXITEM_DONTKNOW;
}
// -----------------------------------------------------------------------
-USHORT ToolBox::GetItemPos( USHORT nItemId ) const
+sal_uInt16 ToolBox::GetItemPos( sal_uInt16 nItemId ) const
{
int nCount = mpData->m_aItems.size();
for( int nPos = 0; nPos < nCount; nPos++ )
if( mpData->m_aItems[nPos].mnId == nItemId )
- return (USHORT)nPos;
+ return (sal_uInt16)nPos;
return TOOLBOX_ITEM_NOTFOUND;
}
// -----------------------------------------------------------------------
-USHORT ToolBox::GetItemPos( const Point& rPos ) const
+sal_uInt16 ToolBox::GetItemPos( const Point& rPos ) const
{
// search the item position on the given point
- USHORT nRet = TOOLBOX_ITEM_NOTFOUND;
- USHORT nPos = 0;
+ sal_uInt16 nRet = TOOLBOX_ITEM_NOTFOUND;
+ sal_uInt16 nPos = 0;
std::vector< ImplToolItem >::const_iterator it = mpData->m_aItems.begin();
while( it != mpData->m_aItems.end() )
{
@@ -1126,14 +1126,14 @@ USHORT ToolBox::GetItemPos( const Point& rPos ) const
// -----------------------------------------------------------------------
-USHORT ToolBox::GetItemId( USHORT nPos ) const
+sal_uInt16 ToolBox::GetItemId( sal_uInt16 nPos ) const
{
return (nPos < mpData->m_aItems.size()) ? mpData->m_aItems[nPos].mnId : 0;
}
// -----------------------------------------------------------------------
-USHORT ToolBox::GetItemId( const Point& rPos ) const
+sal_uInt16 ToolBox::GetItemId( const Point& rPos ) const
{
// Item suchen, das geklickt wurde
std::vector< ImplToolItem >::const_iterator it = mpData->m_aItems.begin();
@@ -1211,25 +1211,25 @@ Point ToolBox::ImplGetPopupPosition( const Rectangle& rRect, const Size& rSize )
}
-Point ToolBox::GetItemPopupPosition( USHORT nItemId, const Size& rSize ) const
+Point ToolBox::GetItemPopupPosition( sal_uInt16 nItemId, const Size& rSize ) const
{
return ImplGetPopupPosition( GetItemRect( nItemId ), rSize );
}
// -----------------------------------------------------------------------
-Rectangle ToolBox::GetItemRect( USHORT nItemId ) const
+Rectangle ToolBox::GetItemRect( sal_uInt16 nItemId ) const
{
if ( mbCalc || mbFormat )
((ToolBox*)this)->ImplFormat();
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
return GetItemPosRect( nPos );
}
// -----------------------------------------------------------------------
-Rectangle ToolBox::GetItemPosRect( USHORT nPos ) const
+Rectangle ToolBox::GetItemPosRect( sal_uInt16 nPos ) const
{
if ( mbCalc || mbFormat )
((ToolBox*)this)->ImplFormat();
@@ -1241,18 +1241,18 @@ Rectangle ToolBox::GetItemPosRect( USHORT nPos ) const
}
// -----------------------------------------------------------------------
-Rectangle ToolBox::GetItemDropDownRect( USHORT nItemId ) const
+Rectangle ToolBox::GetItemDropDownRect( sal_uInt16 nItemId ) const
{
if ( mbCalc || mbFormat )
((ToolBox*)this)->ImplFormat();
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
return GetItemPosDropDownRect( nPos );
}
// -----------------------------------------------------------------------
-Rectangle ToolBox::GetItemPosDropDownRect( USHORT nPos ) const
+Rectangle ToolBox::GetItemPosDropDownRect( sal_uInt16 nPos ) const
{
if ( mbCalc || mbFormat )
((ToolBox*)this)->ImplFormat();
@@ -1270,24 +1270,24 @@ Rectangle ToolBox::GetMenubuttonRect() const
return mpData->maMenubuttonItem.maRect;
}
-BOOL ToolBox::ImplHasExternalMenubutton()
+sal_Bool ToolBox::ImplHasExternalMenubutton()
{
// check if the borderwindow (i.e. the decoration) provides the menu button
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( ImplIsFloatingMode() )
{
// custom menu is placed in the decoration
ImplBorderWindow *pBorderWin = dynamic_cast<ImplBorderWindow*>( GetWindow( WINDOW_BORDER ) );
if( pBorderWin && !pBorderWin->GetMenuRect().IsEmpty() )
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
}
// -----------------------------------------------------------------------
-void ToolBox::SetItemBits( USHORT nItemId, ToolBoxItemBits nBits )
+void ToolBox::SetItemBits( sal_uInt16 nItemId, ToolBoxItemBits nBits )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos < mpData->m_aItems.size() )
{
@@ -1296,15 +1296,15 @@ void ToolBox::SetItemBits( USHORT nItemId, ToolBoxItemBits nBits )
nBits &= TIB_LEFT | TIB_AUTOSIZE | TIB_DROPDOWN;
nOldBits &= TIB_LEFT | TIB_AUTOSIZE | TIB_DROPDOWN;
// trigger reformat when the item width has changed (dropdown arrow)
- BOOL bFormat = (nBits & TIB_DROPDOWN) != (nOldBits & TIB_DROPDOWN);
+ sal_Bool bFormat = (nBits & TIB_DROPDOWN) != (nOldBits & TIB_DROPDOWN);
if ( nBits != nOldBits )
- ImplInvalidate( TRUE, bFormat );
+ ImplInvalidate( sal_True, bFormat );
}
}
// -----------------------------------------------------------------------
-ToolBoxItemBits ToolBox::GetItemBits( USHORT nItemId ) const
+ToolBoxItemBits ToolBox::GetItemBits( sal_uInt16 nItemId ) const
{
ImplToolItem* pItem = ImplGetItem( nItemId );
@@ -1316,9 +1316,9 @@ ToolBoxItemBits ToolBox::GetItemBits( USHORT nItemId ) const
// -----------------------------------------------------------------------
-void ToolBox::SetItemData( USHORT nItemId, void* pNewData )
+void ToolBox::SetItemData( sal_uInt16 nItemId, void* pNewData )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos < mpData->m_aItems.size() )
{
@@ -1329,7 +1329,7 @@ void ToolBox::SetItemData( USHORT nItemId, void* pNewData )
// -----------------------------------------------------------------------
-void* ToolBox::GetItemData( USHORT nItemId ) const
+void* ToolBox::GetItemData( sal_uInt16 nItemId ) const
{
ImplToolItem* pItem = ImplGetItem( nItemId );
@@ -1341,9 +1341,9 @@ void* ToolBox::GetItemData( USHORT nItemId ) const
// -----------------------------------------------------------------------
-void ToolBox::SetItemImage( USHORT nItemId, const Image& rImage )
+void ToolBox::SetItemImage( sal_uInt16 nItemId, const Image& rImage )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != TOOLBOX_ITEM_NOTFOUND )
{
@@ -1354,7 +1354,7 @@ void ToolBox::SetItemImage( USHORT nItemId, const Image& rImage )
Size aOldSize = pItem->maImage.GetSizePixel();
pItem->maImage = rImage;
if ( aOldSize != pItem->maImage.GetSizePixel() )
- ImplInvalidate( TRUE );
+ ImplInvalidate( sal_True );
else
ImplUpdateItem( nPos );
}
@@ -1369,8 +1369,8 @@ void ToolBox::SetImageList( const ImageList& rImageList )
{
maImageList = rImageList;
- USHORT nCount = (USHORT)mpData->m_aItems.size();
- for( USHORT i = 0; i < nCount; i++ )
+ sal_uInt16 nCount = (sal_uInt16)mpData->m_aItems.size();
+ for( sal_uInt16 i = 0; i < nCount; i++ )
{
Image aImage;
if ( mpData->m_aItems[i].mnId )
@@ -1392,9 +1392,9 @@ static Image ImplRotImage( const Image& rImage, long nAngle10 )
return Image( aRotBitmapEx );
}
-void ToolBox::SetItemImageAngle( USHORT nItemId, long nAngle10 )
+void ToolBox::SetItemImageAngle( sal_uInt16 nItemId, long nAngle10 )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != TOOLBOX_ITEM_NOTFOUND )
{
@@ -1416,7 +1416,7 @@ void ToolBox::SetItemImageAngle( USHORT nItemId, long nAngle10 )
if ( !mbCalc )
{
if ( aOldSize != pItem->maImage.GetSizePixel() )
- ImplInvalidate( TRUE );
+ ImplInvalidate( sal_True );
else
ImplUpdateItem( nPos );
}
@@ -1435,9 +1435,9 @@ static Image ImplMirrorImage( const Image& rImage )
return Image( aMirrBitmapEx );
}
-void ToolBox::SetItemImageMirrorMode( USHORT nItemId, BOOL bMirror )
+void ToolBox::SetItemImageMirrorMode( sal_uInt16 nItemId, sal_Bool bMirror )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != TOOLBOX_ITEM_NOTFOUND )
{
@@ -1463,7 +1463,7 @@ void ToolBox::SetItemImageMirrorMode( USHORT nItemId, BOOL bMirror )
// -----------------------------------------------------------------------
-Image ToolBox::GetItemImage( USHORT nItemId ) const
+Image ToolBox::GetItemImage( sal_uInt16 nItemId ) const
{
ImplToolItem* pItem = ImplGetItem( nItemId );
@@ -1475,7 +1475,7 @@ Image ToolBox::GetItemImage( USHORT nItemId ) const
// -----------------------------------------------------------------------
-long ToolBox::GetItemImageAngle( USHORT nItemId ) const
+long ToolBox::GetItemImageAngle( sal_uInt16 nItemId ) const
{
ImplToolItem* pItem = ImplGetItem( nItemId );
@@ -1487,32 +1487,32 @@ long ToolBox::GetItemImageAngle( USHORT nItemId ) const
// -----------------------------------------------------------------------
-BOOL ToolBox::GetItemImageMirrorMode( USHORT nItemId ) const
+sal_Bool ToolBox::GetItemImageMirrorMode( sal_uInt16 nItemId ) const
{
ImplToolItem* pItem = ImplGetItem( nItemId );
if ( pItem )
return pItem->mbMirrorMode;
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-void ToolBox::SetItemHighImage( USHORT nItemId, const Image& rImage )
+void ToolBox::SetItemHighImage( sal_uInt16 nItemId, const Image& rImage )
{
ImplToolItem* pItem = ImplGetItem( nItemId );
if ( pItem )
{
DBG_ASSERT( (pItem->maImage.GetSizePixel() == rImage.GetSizePixel()) ||
- ((!rImage) == TRUE), "ToolBox::SetItemHighImage() - ImageSize != HighImageSize" );
+ ((!rImage) == sal_True), "ToolBox::SetItemHighImage() - ImageSize != HighImageSize" );
pItem->maHighImage = rImage;
}
}
// -----------------------------------------------------------------------
-Image ToolBox::GetItemHighImage( USHORT nItemId ) const
+Image ToolBox::GetItemHighImage( sal_uInt16 nItemId ) const
{
ImplToolItem* pItem = ImplGetItem( nItemId );
@@ -1524,9 +1524,9 @@ Image ToolBox::GetItemHighImage( USHORT nItemId ) const
// -----------------------------------------------------------------------
-void ToolBox::SetItemText( USHORT nItemId, const XubString& rText )
+void ToolBox::SetItemText( sal_uInt16 nItemId, const XubString& rText )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != TOOLBOX_ITEM_NOTFOUND )
{
@@ -1539,7 +1539,7 @@ void ToolBox::SetItemText( USHORT nItemId, const XubString& rText )
pItem->maText = ImplConvertMenuString( rText );
mpData->ImplClearLayoutData();
if ( nOldWidth != GetCtrlTextWidth( pItem->maText ) )
- ImplInvalidate( TRUE );
+ ImplInvalidate( sal_True );
else
ImplUpdateItem( nPos );
}
@@ -1556,7 +1556,7 @@ void ToolBox::SetItemText( USHORT nItemId, const XubString& rText )
// -----------------------------------------------------------------------
-const XubString& ToolBox::GetItemText( USHORT nItemId ) const
+const XubString& ToolBox::GetItemText( sal_uInt16 nItemId ) const
{
ImplToolItem* pItem = ImplGetItem( nItemId );
@@ -1568,9 +1568,9 @@ const XubString& ToolBox::GetItemText( USHORT nItemId ) const
// -----------------------------------------------------------------------
-void ToolBox::SetItemWindow( USHORT nItemId, Window* pNewWindow )
+void ToolBox::SetItemWindow( sal_uInt16 nItemId, Window* pNewWindow )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != TOOLBOX_ITEM_NOTFOUND )
{
@@ -1578,14 +1578,14 @@ void ToolBox::SetItemWindow( USHORT nItemId, Window* pNewWindow )
pItem->mpWindow = pNewWindow;
if ( pNewWindow )
pNewWindow->Hide();
- ImplInvalidate( TRUE );
+ ImplInvalidate( sal_True );
ImplCallEventListeners( VCLEVENT_TOOLBOX_ITEMWINDOWCHANGED, reinterpret_cast< void* >( nPos ) );
}
}
// -----------------------------------------------------------------------
-Window* ToolBox::GetItemWindow( USHORT nItemId ) const
+Window* ToolBox::GetItemWindow( sal_uInt16 nItemId ) const
{
ImplToolItem* pItem = ImplGetItem( nItemId );
@@ -1604,7 +1604,7 @@ void ToolBox::StartSelection()
if ( !mbSelection )
{
- mbSelection = TRUE;
+ mbSelection = sal_True;
mnCurPos = TOOLBOX_ITEM_NOTFOUND;
mnCurItemId = 0;
Activate();
@@ -1615,13 +1615,13 @@ void ToolBox::StartSelection()
void ToolBox::EndSelection()
{
- mbCommandDrag = FALSE;
+ mbCommandDrag = sal_False;
if ( mbDrag || mbSelection )
{
// Daten zuruecksetzen
- mbDrag = FALSE;
- mbSelection = FALSE;
+ mbDrag = sal_False;
+ mbSelection = sal_False;
if ( mnCurPos != TOOLBOX_ITEM_NOTFOUND )
ImplDrawItem( mnCurPos );
EndTracking();
@@ -1638,9 +1638,9 @@ void ToolBox::EndSelection()
// -----------------------------------------------------------------------
-void ToolBox::SetItemDown( USHORT nItemId, BOOL bDown, BOOL bRelease )
+void ToolBox::SetItemDown( sal_uInt16 nItemId, sal_Bool bDown, sal_Bool bRelease )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != TOOLBOX_ITEM_NOTFOUND )
{
@@ -1649,7 +1649,7 @@ void ToolBox::SetItemDown( USHORT nItemId, BOOL bDown, BOOL bRelease )
if ( nPos != mnCurPos )
{
mnCurPos = nPos;
- ImplDrawItem( mnCurPos, TRUE );
+ ImplDrawItem( mnCurPos, sal_True );
Flush();
}
}
@@ -1657,7 +1657,7 @@ void ToolBox::SetItemDown( USHORT nItemId, BOOL bDown, BOOL bRelease )
{
if ( nPos == mnCurPos )
{
- ImplDrawItem( mnCurPos, FALSE );
+ ImplDrawItem( mnCurPos, sal_False );
Flush();
mnCurPos = TOOLBOX_ITEM_NOTFOUND;
}
@@ -1667,8 +1667,8 @@ void ToolBox::SetItemDown( USHORT nItemId, BOOL bDown, BOOL bRelease )
{
if ( mbDrag || mbSelection )
{
- mbDrag = FALSE;
- mbSelection = FALSE;
+ mbDrag = sal_False;
+ mbSelection = sal_False;
EndTracking();
ReleaseMouse();
Deactivate();
@@ -1684,21 +1684,21 @@ void ToolBox::SetItemDown( USHORT nItemId, BOOL bDown, BOOL bRelease )
// -----------------------------------------------------------------------
-BOOL ToolBox::IsItemDown( USHORT nItemId ) const
+sal_Bool ToolBox::IsItemDown( sal_uInt16 nItemId ) const
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != TOOLBOX_ITEM_NOTFOUND )
return (nPos == mnCurPos);
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-void ToolBox::SetItemState( USHORT nItemId, TriState eState )
+void ToolBox::SetItemState( sal_uInt16 nItemId, TriState eState )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != TOOLBOX_ITEM_NOTFOUND )
{
@@ -1712,8 +1712,8 @@ void ToolBox::SetItemState( USHORT nItemId, TriState eState )
(pItem->mnBits & TIB_RADIOCHECK) )
{
ImplToolItem* pGroupItem;
- USHORT nGroupPos;
- USHORT nItemCount = GetItemCount();
+ sal_uInt16 nGroupPos;
+ sal_uInt16 nItemCount = GetItemCount();
nGroupPos = nPos;
while ( nGroupPos )
@@ -1758,7 +1758,7 @@ void ToolBox::SetItemState( USHORT nItemId, TriState eState )
// -----------------------------------------------------------------------
-TriState ToolBox::GetItemState( USHORT nItemId ) const
+TriState ToolBox::GetItemState( sal_uInt16 nItemId ) const
{
ImplToolItem* pItem = ImplGetItem( nItemId );
@@ -1770,15 +1770,15 @@ TriState ToolBox::GetItemState( USHORT nItemId ) const
// -----------------------------------------------------------------------
-void ToolBox::EnableItem( USHORT nItemId, BOOL bEnable )
+void ToolBox::EnableItem( sal_uInt16 nItemId, sal_Bool bEnable )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != TOOLBOX_ITEM_NOTFOUND )
{
ImplToolItem* pItem = &mpData->m_aItems[nPos];
if ( bEnable )
- bEnable = TRUE;
+ bEnable = sal_True;
if ( pItem->mbEnabled != bEnable )
{
pItem->mbEnabled = bEnable;
@@ -1802,21 +1802,21 @@ void ToolBox::EnableItem( USHORT nItemId, BOOL bEnable )
// -----------------------------------------------------------------------
-BOOL ToolBox::IsItemEnabled( USHORT nItemId ) const
+sal_Bool ToolBox::IsItemEnabled( sal_uInt16 nItemId ) const
{
ImplToolItem* pItem = ImplGetItem( nItemId );
if ( pItem )
return pItem->mbEnabled;
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-void ToolBox::ShowItem( USHORT nItemId, BOOL bVisible )
+void ToolBox::ShowItem( sal_uInt16 nItemId, sal_Bool bVisible )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
mpData->ImplClearLayoutData();
if ( nPos != TOOLBOX_ITEM_NOTFOUND )
@@ -1825,36 +1825,36 @@ void ToolBox::ShowItem( USHORT nItemId, BOOL bVisible )
if ( pItem->mbVisible != bVisible )
{
pItem->mbVisible = bVisible;
- ImplInvalidate( FALSE );
+ ImplInvalidate( sal_False );
}
}
}
// -----------------------------------------------------------------------
-BOOL ToolBox::IsItemVisible( USHORT nItemId ) const
+sal_Bool ToolBox::IsItemVisible( sal_uInt16 nItemId ) const
{
ImplToolItem* pItem = ImplGetItem( nItemId );
if ( pItem )
return pItem->mbVisible;
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL ToolBox::IsItemReallyVisible( USHORT nItemId ) const
+sal_Bool ToolBox::IsItemReallyVisible( sal_uInt16 nItemId ) const
{
// is the item on the visible area of the toolbox?
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
Rectangle aRect( mnLeftBorder, mnTopBorder, mnDX-mnRightBorder, mnDY-mnBottomBorder );
ImplToolItem* pItem = ImplGetItem( nItemId );
if ( pItem && pItem->mbVisible &&
!pItem->maRect.IsEmpty() && aRect.IsOver( pItem->maRect ) )
{
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -1862,7 +1862,7 @@ BOOL ToolBox::IsItemReallyVisible( USHORT nItemId ) const
// -----------------------------------------------------------------------
-void ToolBox::SetItemCommand( USHORT nItemId, const XubString& rCommand )
+void ToolBox::SetItemCommand( sal_uInt16 nItemId, const XubString& rCommand )
{
ImplToolItem* pItem = ImplGetItem( nItemId );
@@ -1872,7 +1872,7 @@ void ToolBox::SetItemCommand( USHORT nItemId, const XubString& rCommand )
// -----------------------------------------------------------------------
-const XubString& ToolBox::GetItemCommand( USHORT nItemId ) const
+const XubString& ToolBox::GetItemCommand( sal_uInt16 nItemId ) const
{
ImplToolItem* pItem = ImplGetItem( nItemId );
@@ -1884,7 +1884,7 @@ const XubString& ToolBox::GetItemCommand( USHORT nItemId ) const
// -----------------------------------------------------------------------
-void ToolBox::SetQuickHelpText( USHORT nItemId, const XubString& rText )
+void ToolBox::SetQuickHelpText( sal_uInt16 nItemId, const XubString& rText )
{
ImplToolItem* pItem = ImplGetItem( nItemId );
@@ -1894,7 +1894,7 @@ void ToolBox::SetQuickHelpText( USHORT nItemId, const XubString& rText )
// -----------------------------------------------------------------------
-const XubString& ToolBox::GetQuickHelpText( USHORT nItemId ) const
+const XubString& ToolBox::GetQuickHelpText( sal_uInt16 nItemId ) const
{
ImplToolItem* pItem = ImplGetItem( nItemId );
@@ -1906,7 +1906,7 @@ const XubString& ToolBox::GetQuickHelpText( USHORT nItemId ) const
// -----------------------------------------------------------------------
-void ToolBox::SetHelpText( USHORT nItemId, const XubString& rText )
+void ToolBox::SetHelpText( sal_uInt16 nItemId, const XubString& rText )
{
ImplToolItem* pItem = ImplGetItem( nItemId );
@@ -1916,14 +1916,14 @@ void ToolBox::SetHelpText( USHORT nItemId, const XubString& rText )
// -----------------------------------------------------------------------
-const XubString& ToolBox::GetHelpText( USHORT nItemId ) const
+const XubString& ToolBox::GetHelpText( sal_uInt16 nItemId ) const
{
return ImplGetHelpText( nItemId );
}
// -----------------------------------------------------------------------
-void ToolBox::SetHelpId( USHORT nItemId, ULONG nHelpId )
+void ToolBox::SetHelpId( sal_uInt16 nItemId, sal_uIntPtr nHelpId )
{
ImplToolItem* pItem = ImplGetItem( nItemId );
@@ -1933,7 +1933,7 @@ void ToolBox::SetHelpId( USHORT nItemId, ULONG nHelpId )
// -----------------------------------------------------------------------
-ULONG ToolBox::GetHelpId( USHORT nItemId ) const
+sal_uIntPtr ToolBox::GetHelpId( sal_uInt16 nItemId ) const
{
ImplToolItem* pItem = ImplGetItem( nItemId );
@@ -1950,12 +1950,12 @@ void ToolBox::SetBorder( long nX, long nY )
mnBorderX = nX;
mnBorderY = nY;
- ImplInvalidate( TRUE, TRUE );
+ ImplInvalidate( sal_True, sal_True );
}
// -----------------------------------------------------------------------
-void ToolBox::SetOutStyle( USHORT nNewStyle )
+void ToolBox::SetOutStyle( sal_uInt16 nNewStyle )
{
// always force flat looking toolbars since NWF
nNewStyle |= TOOLBOX_STYLE_FLAT;
@@ -1972,7 +1972,7 @@ void ToolBox::SetOutStyle( USHORT nNewStyle )
mnMaxItemHeight = 1;
}
- ImplInvalidate( TRUE, TRUE );
+ ImplInvalidate( sal_True, sal_True );
}
}
@@ -1980,7 +1980,7 @@ void ToolBox::SetOutStyle( USHORT nNewStyle )
void ToolBox::RecalcItems()
{
- ImplInvalidate( TRUE );
+ ImplInvalidate( sal_True );
}
// -----------------------------------------------------------------------
@@ -1995,11 +1995,11 @@ void ToolBox::ImplUpdateInputEnable()
if( it->mbEnabled )
{
// at least one useful entry
- mpData->mbKeyInputDisabled = FALSE;
+ mpData->mbKeyInputDisabled = sal_False;
return;
}
}
- mpData->mbKeyInputDisabled = TRUE;
+ mpData->mbKeyInputDisabled = sal_True;
}
// -----------------------------------------------------------------------
@@ -2008,14 +2008,14 @@ void ToolBox::ImplFillLayoutData() const
{
mpData->m_pLayoutData = new ToolBoxLayoutData();
- USHORT nCount = (USHORT)mpData->m_aItems.size();
- for( USHORT i = 0; i < nCount; i++ )
+ sal_uInt16 nCount = (sal_uInt16)mpData->m_aItems.size();
+ for( sal_uInt16 i = 0; i < nCount; i++ )
{
ImplToolItem* pItem = &mpData->m_aItems[i];
// Nur malen, wenn Rechteck im PaintRectangle liegt
if ( !pItem->maRect.IsEmpty() )
- const_cast<ToolBox*>(this)->ImplDrawItem( i, FALSE, FALSE, TRUE );
+ const_cast<ToolBox*>(this)->ImplDrawItem( i, sal_False, sal_False, sal_True );
}
}
@@ -2030,14 +2030,14 @@ String ToolBox::GetDisplayText() const
// -----------------------------------------------------------------------
-Rectangle ToolBox::GetCharacterBounds( USHORT nItemID, long nIndex ) const
+Rectangle ToolBox::GetCharacterBounds( sal_uInt16 nItemID, long nIndex ) const
{
long nItemIndex = -1;
if( ! mpData->m_pLayoutData )
ImplFillLayoutData();
if( mpData->m_pLayoutData )
{
- for( ULONG i = 0; i < mpData->m_pLayoutData->m_aLineItemIds.size(); i++ )
+ for( sal_uIntPtr i = 0; i < mpData->m_pLayoutData->m_aLineItemIds.size(); i++ )
{
if( mpData->m_pLayoutData->m_aLineItemIds[i] == nItemID )
{
@@ -2051,7 +2051,7 @@ Rectangle ToolBox::GetCharacterBounds( USHORT nItemID, long nIndex ) const
// -----------------------------------------------------------------------
-long ToolBox::GetIndexForPoint( const Point& rPoint, USHORT& rItemID ) const
+long ToolBox::GetIndexForPoint( const Point& rPoint, sal_uInt16& rItemID ) const
{
long nIndex = -1;
rItemID = 0;
@@ -2060,7 +2060,7 @@ long ToolBox::GetIndexForPoint( const Point& rPoint, USHORT& rItemID ) const
if( mpData->m_pLayoutData )
{
nIndex = mpData->m_pLayoutData->GetIndexForPoint( rPoint );
- for( ULONG i = 0; i < mpData->m_pLayoutData->m_aLineIndices.size(); i++ )
+ for( sal_uIntPtr i = 0; i < mpData->m_pLayoutData->m_aLineIndices.size(); i++ )
{
if( mpData->m_pLayoutData->m_aLineIndices[i] <= nIndex &&
(i == mpData->m_pLayoutData->m_aLineIndices.size()-1 || mpData->m_pLayoutData->m_aLineIndices[i+1] > nIndex) )
@@ -2093,12 +2093,12 @@ Pair ToolBox::GetTextStartEnd( long nText ) const
// -----------------------------------------------------------------------
-USHORT ToolBox::GetDisplayItemId( long nText ) const
+sal_uInt16 ToolBox::GetDisplayItemId( long nText ) const
{
- USHORT nItemId = 0;
+ sal_uInt16 nItemId = 0;
if( ! mpData->m_pLayoutData )
ImplFillLayoutData();
- if( mpData->m_pLayoutData && nText >= 0 && (ULONG)nText < mpData->m_pLayoutData->m_aLineItemIds.size() )
+ if( mpData->m_pLayoutData && nText >= 0 && (sal_uIntPtr)nText < mpData->m_pLayoutData->m_aLineItemIds.size() )
nItemId = mpData->m_pLayoutData->m_aLineItemIds[nText];
return nItemId;
}
@@ -2118,7 +2118,7 @@ const Link& ToolBox::GetDropdownClickHdl() const
// -----------------------------------------------------------------------
-void ToolBox::SetMenuType( USHORT aType )
+void ToolBox::SetMenuType( sal_uInt16 aType )
{
if( aType != mpData->maMenuType )
{
@@ -2128,9 +2128,9 @@ void ToolBox::SetMenuType( USHORT aType )
// the menu button may have to be moved into the decoration which changes the layout
ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this );
if( pWrapper )
- pWrapper->ShowTitleButton( TITLE_BUTTON_MENU, ( aType & TOOLBOX_MENUTYPE_CUSTOMIZE) ? TRUE : FALSE );
+ pWrapper->ShowTitleButton( TITLE_BUTTON_MENU, ( aType & TOOLBOX_MENUTYPE_CUSTOMIZE) ? sal_True : sal_False );
- mbFormat = TRUE;
+ mbFormat = sal_True;
ImplFormat();
ImplSetMinMaxFloatSize( this );
}
@@ -2143,12 +2143,12 @@ void ToolBox::SetMenuType( USHORT aType )
}
}
-USHORT ToolBox::GetMenuType() const
+sal_uInt16 ToolBox::GetMenuType() const
{
return mpData->maMenuType;
}
-BOOL ToolBox::IsMenuEnabled() const
+sal_Bool ToolBox::IsMenuEnabled() const
{
return mpData->maMenuType != TOOLBOX_MENUTYPE_NONE;
}
@@ -2170,7 +2170,7 @@ const Link& ToolBox::GetMenuButtonHdl() const
// -----------------------------------------------------------------------
-BOOL ToolBox::ImplHasClippedItems()
+sal_Bool ToolBox::ImplHasClippedItems()
{
// are any items currently clipped ?
ImplFormat();
@@ -2178,10 +2178,10 @@ BOOL ToolBox::ImplHasClippedItems()
while ( it != mpData->m_aItems.end() )
{
if( it->IsClipped() )
- return TRUE;
+ return sal_True;
it++;
}
- return FALSE;
+ return sal_False;
}
void ToolBox::ImplUpdateCustomMenu()
@@ -2192,7 +2192,7 @@ void ToolBox::ImplUpdateCustomMenu()
PopupMenu *pMenu = GetMenu();
- USHORT i = 0;
+ sal_uInt16 i = 0;
// remove old entries
while( i < pMenu->GetItemCount() )
{
@@ -2213,7 +2213,7 @@ void ToolBox::ImplUpdateCustomMenu()
{
if( it->IsClipped() )
{
- USHORT id = it->mnId + TOOLBOX_MENUITEM_START;
+ sal_uInt16 id = it->mnId + TOOLBOX_MENUITEM_START;
pMenu->InsertItem( id, it->maText, it->maImage, 0, 0 );
pMenu->EnableItem( id, it->mbEnabled );
pMenu->CheckItem( id, it->meState == STATE_CHECK );
@@ -2226,9 +2226,9 @@ IMPL_LINK( ToolBox, ImplCustomMenuListener, VclMenuEvent*, pEvent )
{
if( pEvent->GetMenu() == GetMenu() && pEvent->GetId() == VCLEVENT_MENU_SELECT )
{
- USHORT id = GetMenu()->GetItemId( pEvent->GetItemPos() );
+ sal_uInt16 id = GetMenu()->GetItemId( pEvent->GetItemPos() );
if( id >= TOOLBOX_MENUITEM_START )
- TriggerItem( id - TOOLBOX_MENUITEM_START, FALSE, FALSE );
+ TriggerItem( id - TOOLBOX_MENUITEM_START, sal_False, sal_False );
}
return 0;
}
@@ -2276,7 +2276,7 @@ void ToolBox::ImplExecuteCustomMenu()
}
}
- USHORT uId = GetMenu()->Execute( pWin, Rectangle( ImplGetPopupPosition( aMenuRect, Size() ), Size() ),
+ sal_uInt16 uId = GetMenu()->Execute( pWin, Rectangle( ImplGetPopupPosition( aMenuRect, Size() ), Size() ),
POPUPMENU_EXECUTE_DOWN | POPUPMENU_NOMOUSEUPCLOSE );
if ( aDelData.IsDelete() )
@@ -2313,24 +2313,24 @@ void ToolBox::ExecuteCustomMenu()
// -----------------------------------------------------------------------
// checks override first, useful during calculation of sizes
-BOOL ToolBox::ImplIsFloatingMode() const
+sal_Bool ToolBox::ImplIsFloatingMode() const
{
DBG_ASSERT( !(mpData->mbAssumeDocked && mpData->mbAssumeFloating),
"ToolBox::ImplIsFloatingMode(): cannot assume docked and floating" );
if( mpData->mbAssumeDocked )
- return FALSE;
+ return sal_False;
else if( mpData->mbAssumeFloating )
- return TRUE;
+ return sal_True;
else
return IsFloatingMode();
}
// checks override first, useful during calculation of sizes
-BOOL ToolBox::ImplIsInPopupMode() const
+sal_Bool ToolBox::ImplIsInPopupMode() const
{
if( mpData->mbAssumePopupMode )
- return TRUE;
+ return sal_True;
else
{
ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this );
@@ -2340,7 +2340,7 @@ BOOL ToolBox::ImplIsInPopupMode() const
// -----------------------------------------------------------------------
-void ToolBox::Lock( BOOL bLock )
+void ToolBox::Lock( sal_Bool bLock )
{
ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this );
if( !pWrapper )
@@ -2350,8 +2350,8 @@ void ToolBox::Lock( BOOL bLock )
mpData->mbIsLocked = bLock;
if( !ImplIsFloatingMode() )
{
- mbCalc = TRUE;
- mbFormat = TRUE;
+ mbCalc = sal_True;
+ mbFormat = sal_True;
SetSizePixel( CalcWindowSizePixel(1) );
Invalidate();
}
@@ -2360,7 +2360,7 @@ void ToolBox::Lock( BOOL bLock )
// -----------------------------------------------------------------------
-BOOL ToolBox::AlwaysLocked()
+sal_Bool ToolBox::AlwaysLocked()
{
// read config item to determine toolbox behaviour, used for subtoolbars
@@ -2376,35 +2376,35 @@ BOOL ToolBox::AlwaysLocked()
if ( aNode.isValid() )
{
// feature enabled ?
- BOOL bStatesEnabled = BOOL();
+ sal_Bool bStatesEnabled = sal_Bool();
::com::sun::star::uno::Any aValue = aNode.getNodeValue( OUString::createFromAscii( "StatesEnabled" ) );
if( aValue >>= bStatesEnabled )
{
- if( bStatesEnabled == TRUE )
+ if( bStatesEnabled == sal_True )
{
// now read the locking state
utl::OConfigurationNode aNode2 = utl::OConfigurationTreeRoot::tryCreateWithServiceFactory(
vcl::unohelper::GetMultiServiceFactory(),
OUString::createFromAscii( "/org.openoffice.Office.UI.GlobalSettings/Toolbars/States" ) ); // note: case sensisitive !
- BOOL bLocked = BOOL();
+ sal_Bool bLocked = sal_Bool();
::com::sun::star::uno::Any aValue2 = aNode2.getNodeValue( OUString::createFromAscii( "Locked" ) );
if( aValue2 >>= bLocked )
- nAlwaysLocked = (bLocked == TRUE) ? 1 : 0;
+ nAlwaysLocked = (bLocked == sal_True) ? 1 : 0;
}
}
}
}
- return nAlwaysLocked == 1 ? TRUE : FALSE;
+ return nAlwaysLocked == 1 ? sal_True : sal_False;
}
-BOOL ToolBox::WillUsePopupMode() const
+sal_Bool ToolBox::WillUsePopupMode() const
{
return mpData->mbWillUsePopupMode;
}
-void ToolBox::WillUsePopupMode( BOOL b )
+void ToolBox::WillUsePopupMode( sal_Bool b )
{
mpData->mbWillUsePopupMode = b;
}
@@ -2413,7 +2413,7 @@ void ToolBox::ImplUpdateImageList()
{
if (mpData->mpImageListProvider != NULL)
{
- BOOL bHC = GetSettings().GetStyleSettings().GetHighContrastMode();
+ sal_Bool bHC = GetSettings().GetStyleSettings().GetHighContrastMode();
try
{
ImageListType eType = bHC ? vcl::HIGHCONTRAST_YES : vcl::HIGHCONTRAST_NO;
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index ca92d9ed6c5b..aca39334585a 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -116,12 +116,12 @@ DBG_NAME( Window )
// =======================================================================
-#define IMPL_PAINT_PAINT ((USHORT)0x0001)
-#define IMPL_PAINT_PAINTALL ((USHORT)0x0002)
-#define IMPL_PAINT_PAINTALLCHILDS ((USHORT)0x0004)
-#define IMPL_PAINT_PAINTCHILDS ((USHORT)0x0008)
-#define IMPL_PAINT_ERASE ((USHORT)0x0010)
-#define IMPL_PAINT_CHECKRTL ((USHORT)0x0020)
+#define IMPL_PAINT_PAINT ((sal_uInt16)0x0001)
+#define IMPL_PAINT_PAINTALL ((sal_uInt16)0x0002)
+#define IMPL_PAINT_PAINTALLCHILDS ((sal_uInt16)0x0004)
+#define IMPL_PAINT_PAINTCHILDS ((sal_uInt16)0x0008)
+#define IMPL_PAINT_ERASE ((sal_uInt16)0x0010)
+#define IMPL_PAINT_CHECKRTL ((sal_uInt16)0x0020)
// -----------------------------------------------------------------------
@@ -138,7 +138,7 @@ struct ImplCalcToTopData
struct ImplAccessibleInfos
{
- USHORT nAccessibleRole;
+ sal_uInt16 nAccessibleRole;
String* pAccessibleName;
String* pAccessibleDescription;
@@ -288,12 +288,12 @@ bool Window::ImplCheckUIFont( const Font& rFont )
// -----------------------------------------------------------------------
-void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, BOOL bCallHdl )
+void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, sal_Bool bCallHdl )
{
// reset high contrast to false, so the system can either update it
// or AutoDetectSystemHC can kick in (see below)
StyleSettings aTmpSt( rSettings.GetStyleSettings() );
- aTmpSt.SetHighContrastMode( FALSE );
+ aTmpSt.SetHighContrastMode( sal_False );
rSettings.SetStyleSettings( aTmpSt );
ImplGetFrame()->UpdateSettings( rSettings );
@@ -497,7 +497,7 @@ void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, BOOL bCallHdl )
|| rSettings.GetStyleSettings().GetWindowColor().IsDark() )
{
aStyleSettings = rSettings.GetStyleSettings();
- aStyleSettings.SetHighContrastMode( TRUE );
+ aStyleSettings.SetHighContrastMode( sal_True );
rSettings.SetStyleSettings( aStyleSettings );
}
}
@@ -506,7 +506,7 @@ void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, BOOL bCallHdl )
static const char* pEnvHC = getenv( "SAL_FORCE_HC" );
if( pEnvHC && *pEnvHC )
{
- aStyleSettings.SetHighContrastMode( TRUE );
+ aStyleSettings.SetHighContrastMode( sal_True );
rSettings.SetStyleSettings( aStyleSettings );
}
@@ -630,83 +630,83 @@ void Window::ImplInitWindowData( WindowType nType )
mpWindowImpl->mnDlgCtrlFlags = 0; // DialogControl-Flags
mpWindowImpl->mnLockCount = 0; // LockCount
mpWindowImpl->meAlwaysInputMode = AlwaysInputNone; // neither AlwaysEnableInput nor AlwaysDisableInput called
- mpWindowImpl->mbFrame = FALSE; // TRUE: Window is a frame window
- mpWindowImpl->mbBorderWin = FALSE; // TRUE: Window is a border window
- mpWindowImpl->mbOverlapWin = FALSE; // TRUE: Window is a overlap window
- mpWindowImpl->mbSysWin = FALSE; // TRUE: SystemWindow is the base class
- mpWindowImpl->mbDialog = FALSE; // TRUE: Dialog is the base class
- mpWindowImpl->mbDockWin = FALSE; // TRUE: DockingWindow is the base class
- mpWindowImpl->mbFloatWin = FALSE; // TRUE: FloatingWindow is the base class
- mpWindowImpl->mbPushButton = FALSE; // TRUE: PushButton is the base class
- mpWindowImpl->mbToolBox = FALSE; // TRUE: ToolBox is the base class
- mpWindowImpl->mbMenuFloatingWindow= FALSE; // TRUE: MenuFloatingWindow is the base class
- mpWindowImpl->mbToolbarFloatingWindow= FALSE; // TRUE: ImplPopupFloatWin is the base class, used for subtoolbars
- mpWindowImpl->mbSplitter = FALSE; // TRUE: Splitter is the base class
- mpWindowImpl->mbVisible = FALSE; // TRUE: Show( TRUE ) called
- mpWindowImpl->mbOverlapVisible = FALSE; // TRUE: Hide called for visible window from ImplHideAllOverlapWindow()
- mpWindowImpl->mbDisabled = FALSE; // TRUE: Enable( FALSE ) called
- mpWindowImpl->mbInputDisabled = FALSE; // TRUE: EnableInput( FALSE ) called
- mpWindowImpl->mbDropDisabled = FALSE; // TRUE: Drop is enabled
- mpWindowImpl->mbNoUpdate = FALSE; // TRUE: SetUpdateMode( FALSE ) called
- mpWindowImpl->mbNoParentUpdate = FALSE; // TRUE: SetParentUpdateMode( FALSE ) called
- mpWindowImpl->mbActive = FALSE; // TRUE: Window Active
- mpWindowImpl->mbParentActive = FALSE; // TRUE: OverlapActive from Parent
- mpWindowImpl->mbReallyVisible = FALSE; // TRUE: this and all parents to an overlaped window are visible
- mpWindowImpl->mbReallyShown = FALSE; // TRUE: this and all parents to an overlaped window are shown
- mpWindowImpl->mbInInitShow = FALSE; // TRUE: we are in InitShow
- mpWindowImpl->mbChildNotify = FALSE; // TRUE: ChildNotify
- mpWindowImpl->mbChildPtrOverwrite = FALSE; // TRUE: PointerStyle overwrites Child-Pointer
- mpWindowImpl->mbNoPtrVisible = FALSE; // TRUE: ShowPointer( FALSE ) called
- mpWindowImpl->mbMouseMove = FALSE; // TRUE: BaseMouseMove called
- mpWindowImpl->mbPaintFrame = FALSE; // TRUE: Paint is visible, but not painted
- mpWindowImpl->mbInPaint = FALSE; // TRUE: Inside PaintHdl
- mpWindowImpl->mbMouseButtonDown = FALSE; // TRUE: BaseMouseButtonDown called
- mpWindowImpl->mbMouseButtonUp = FALSE; // TRUE: BaseMouseButtonUp called
- mpWindowImpl->mbKeyInput = FALSE; // TRUE: BaseKeyInput called
- mpWindowImpl->mbKeyUp = FALSE; // TRUE: BaseKeyUp called
- mpWindowImpl->mbCommand = FALSE; // TRUE: BaseCommand called
- mpWindowImpl->mbDefPos = TRUE; // TRUE: Position is not Set
- mpWindowImpl->mbDefSize = TRUE; // TRUE: Size is not Set
- mpWindowImpl->mbCallMove = TRUE; // TRUE: Move must be called by Show
- mpWindowImpl->mbCallResize = TRUE; // TRUE: Resize must be called by Show
- mpWindowImpl->mbWaitSystemResize = TRUE; // TRUE: Wait for System-Resize
- mpWindowImpl->mbInitWinClipRegion = TRUE; // TRUE: Calc Window Clip Region
- mpWindowImpl->mbInitChildRegion = FALSE; // TRUE: InitChildClipRegion
- mpWindowImpl->mbWinRegion = FALSE; // TRUE: Window Region
- mpWindowImpl->mbClipChildren = FALSE; // TRUE: Child-Fenster muessen evt. geclippt werden
- mpWindowImpl->mbClipSiblings = FALSE; // TRUE: Nebeneinanderliegende Child-Fenster muessen evt. geclippt werden
- mpWindowImpl->mbChildTransparent = FALSE; // TRUE: Child-Fenster duerfen transparent einschalten (inkl. Parent-CLIPCHILDREN)
- mpWindowImpl->mbPaintTransparent = FALSE; // TRUE: Paints muessen auf Parent ausgeloest werden
- mpWindowImpl->mbMouseTransparent = FALSE; // TRUE: Window is transparent for Mouse
- mpWindowImpl->mbDlgCtrlStart = FALSE; // TRUE: Ab hier eigenes Dialog-Control
- mpWindowImpl->mbFocusVisible = FALSE; // TRUE: Focus Visible
- mpWindowImpl->mbUseNativeFocus = FALSE;
- mpWindowImpl->mbNativeFocusVisible= FALSE; // TRUE: native Focus Visible
- mpWindowImpl->mbInShowFocus = FALSE; // prevent recursion
- mpWindowImpl->mbInHideFocus = FALSE; // prevent recursion
- mpWindowImpl->mbTrackVisible = FALSE; // TRUE: Tracking Visible
- mpWindowImpl->mbControlForeground = FALSE; // TRUE: Foreground-Property set
- mpWindowImpl->mbControlBackground = FALSE; // TRUE: Background-Property set
- mpWindowImpl->mbAlwaysOnTop = FALSE; // TRUE: immer vor allen anderen normalen Fenstern sichtbar
- mpWindowImpl->mbCompoundControl = FALSE; // TRUE: Zusammengesetztes Control => Listener...
- mpWindowImpl->mbCompoundControlHasFocus = FALSE; // TRUE: Zusammengesetztes Control hat irgendwo den Focus
- mpWindowImpl->mbPaintDisabled = FALSE; // TRUE: Paint soll nicht ausgefuehrt werden
- mpWindowImpl->mbAllResize = FALSE; // TRUE: Auch ResizeEvents mit 0,0 schicken
- mpWindowImpl->mbInDtor = FALSE; // TRUE: Wir befinden uns im Window-Dtor
- mpWindowImpl->mbExtTextInput = FALSE; // TRUE: ExtTextInput-Mode is active
- mpWindowImpl->mbInFocusHdl = FALSE; // TRUE: Innerhalb vom GetFocus-Handler
- mpWindowImpl->mbCreatedWithToolkit = FALSE;
- mpWindowImpl->mbSuppressAccessibilityEvents = FALSE; // TRUE: do not send any accessibility events
- mpWindowImpl->mbDrawSelectionBackground = FALSE; // TRUE: draws transparent window background to indicate (toolbox) selection
- mpWindowImpl->mbIsInTaskPaneList = FALSE; // TRUE: window was added to the taskpanelist in the topmost system window
+ mpWindowImpl->mbFrame = sal_False; // sal_True: Window is a frame window
+ mpWindowImpl->mbBorderWin = sal_False; // sal_True: Window is a border window
+ mpWindowImpl->mbOverlapWin = sal_False; // sal_True: Window is a overlap window
+ mpWindowImpl->mbSysWin = sal_False; // sal_True: SystemWindow is the base class
+ mpWindowImpl->mbDialog = sal_False; // sal_True: Dialog is the base class
+ mpWindowImpl->mbDockWin = sal_False; // sal_True: DockingWindow is the base class
+ mpWindowImpl->mbFloatWin = sal_False; // sal_True: FloatingWindow is the base class
+ mpWindowImpl->mbPushButton = sal_False; // sal_True: PushButton is the base class
+ mpWindowImpl->mbToolBox = sal_False; // sal_True: ToolBox is the base class
+ mpWindowImpl->mbMenuFloatingWindow= sal_False; // sal_True: MenuFloatingWindow is the base class
+ mpWindowImpl->mbToolbarFloatingWindow= sal_False; // sal_True: ImplPopupFloatWin is the base class, used for subtoolbars
+ mpWindowImpl->mbSplitter = sal_False; // sal_True: Splitter is the base class
+ mpWindowImpl->mbVisible = sal_False; // sal_True: Show( sal_True ) called
+ mpWindowImpl->mbOverlapVisible = sal_False; // sal_True: Hide called for visible window from ImplHideAllOverlapWindow()
+ mpWindowImpl->mbDisabled = sal_False; // sal_True: Enable( sal_False ) called
+ mpWindowImpl->mbInputDisabled = sal_False; // sal_True: EnableInput( sal_False ) called
+ mpWindowImpl->mbDropDisabled = sal_False; // sal_True: Drop is enabled
+ mpWindowImpl->mbNoUpdate = sal_False; // sal_True: SetUpdateMode( sal_False ) called
+ mpWindowImpl->mbNoParentUpdate = sal_False; // sal_True: SetParentUpdateMode( sal_False ) called
+ mpWindowImpl->mbActive = sal_False; // sal_True: Window Active
+ mpWindowImpl->mbParentActive = sal_False; // sal_True: OverlapActive from Parent
+ mpWindowImpl->mbReallyVisible = sal_False; // sal_True: this and all parents to an overlaped window are visible
+ mpWindowImpl->mbReallyShown = sal_False; // sal_True: this and all parents to an overlaped window are shown
+ mpWindowImpl->mbInInitShow = sal_False; // sal_True: we are in InitShow
+ mpWindowImpl->mbChildNotify = sal_False; // sal_True: ChildNotify
+ mpWindowImpl->mbChildPtrOverwrite = sal_False; // sal_True: PointerStyle overwrites Child-Pointer
+ mpWindowImpl->mbNoPtrVisible = sal_False; // sal_True: ShowPointer( sal_False ) called
+ mpWindowImpl->mbMouseMove = sal_False; // sal_True: BaseMouseMove called
+ mpWindowImpl->mbPaintFrame = sal_False; // sal_True: Paint is visible, but not painted
+ mpWindowImpl->mbInPaint = sal_False; // sal_True: Inside PaintHdl
+ mpWindowImpl->mbMouseButtonDown = sal_False; // sal_True: BaseMouseButtonDown called
+ mpWindowImpl->mbMouseButtonUp = sal_False; // sal_True: BaseMouseButtonUp called
+ mpWindowImpl->mbKeyInput = sal_False; // sal_True: BaseKeyInput called
+ mpWindowImpl->mbKeyUp = sal_False; // sal_True: BaseKeyUp called
+ mpWindowImpl->mbCommand = sal_False; // sal_True: BaseCommand called
+ mpWindowImpl->mbDefPos = sal_True; // sal_True: Position is not Set
+ mpWindowImpl->mbDefSize = sal_True; // sal_True: Size is not Set
+ mpWindowImpl->mbCallMove = sal_True; // sal_True: Move must be called by Show
+ mpWindowImpl->mbCallResize = sal_True; // sal_True: Resize must be called by Show
+ mpWindowImpl->mbWaitSystemResize = sal_True; // sal_True: Wait for System-Resize
+ mpWindowImpl->mbInitWinClipRegion = sal_True; // sal_True: Calc Window Clip Region
+ mpWindowImpl->mbInitChildRegion = sal_False; // sal_True: InitChildClipRegion
+ mpWindowImpl->mbWinRegion = sal_False; // sal_True: Window Region
+ mpWindowImpl->mbClipChildren = sal_False; // sal_True: Child-Fenster muessen evt. geclippt werden
+ mpWindowImpl->mbClipSiblings = sal_False; // sal_True: Nebeneinanderliegende Child-Fenster muessen evt. geclippt werden
+ mpWindowImpl->mbChildTransparent = sal_False; // sal_True: Child-Fenster duerfen transparent einschalten (inkl. Parent-CLIPCHILDREN)
+ mpWindowImpl->mbPaintTransparent = sal_False; // sal_True: Paints muessen auf Parent ausgeloest werden
+ mpWindowImpl->mbMouseTransparent = sal_False; // sal_True: Window is transparent for Mouse
+ mpWindowImpl->mbDlgCtrlStart = sal_False; // sal_True: Ab hier eigenes Dialog-Control
+ mpWindowImpl->mbFocusVisible = sal_False; // sal_True: Focus Visible
+ mpWindowImpl->mbUseNativeFocus = sal_False;
+ mpWindowImpl->mbNativeFocusVisible= sal_False; // sal_True: native Focus Visible
+ mpWindowImpl->mbInShowFocus = sal_False; // prevent recursion
+ mpWindowImpl->mbInHideFocus = sal_False; // prevent recursion
+ mpWindowImpl->mbTrackVisible = sal_False; // sal_True: Tracking Visible
+ mpWindowImpl->mbControlForeground = sal_False; // sal_True: Foreground-Property set
+ mpWindowImpl->mbControlBackground = sal_False; // sal_True: Background-Property set
+ mpWindowImpl->mbAlwaysOnTop = sal_False; // sal_True: immer vor allen anderen normalen Fenstern sichtbar
+ mpWindowImpl->mbCompoundControl = sal_False; // sal_True: Zusammengesetztes Control => Listener...
+ mpWindowImpl->mbCompoundControlHasFocus = sal_False; // sal_True: Zusammengesetztes Control hat irgendwo den Focus
+ mpWindowImpl->mbPaintDisabled = sal_False; // sal_True: Paint soll nicht ausgefuehrt werden
+ mpWindowImpl->mbAllResize = sal_False; // sal_True: Auch ResizeEvents mit 0,0 schicken
+ mpWindowImpl->mbInDtor = sal_False; // sal_True: Wir befinden uns im Window-Dtor
+ mpWindowImpl->mbExtTextInput = sal_False; // sal_True: ExtTextInput-Mode is active
+ mpWindowImpl->mbInFocusHdl = sal_False; // sal_True: Innerhalb vom GetFocus-Handler
+ mpWindowImpl->mbCreatedWithToolkit = sal_False;
+ mpWindowImpl->mbSuppressAccessibilityEvents = sal_False; // sal_True: do not send any accessibility events
+ mpWindowImpl->mbDrawSelectionBackground = sal_False; // sal_True: draws transparent window background to indicate (toolbox) selection
+ mpWindowImpl->mbIsInTaskPaneList = sal_False; // sal_True: window was added to the taskpanelist in the topmost system window
mpWindowImpl->mnNativeBackground = 0; // initialize later, depends on type
- mpWindowImpl->mbCallHandlersDuringInputDisabled = FALSE; // TRUE: call event handlers even if input is disabled
- mpWindowImpl->mbDisableAccessibleLabelForRelation = FALSE; // TRUE: do not set LabelFor relation on accessible objects
- mpWindowImpl->mbDisableAccessibleLabeledByRelation = FALSE; // TRUE: do not set LabeledBy relation on accessible objects
- mpWindowImpl->mbHelpTextDynamic = FALSE; // TRUE: append help id in HELP_DEBUG case
- mpWindowImpl->mbFakeFocusSet = FALSE; // TRUE: pretend as if the window has focus.
+ mpWindowImpl->mbCallHandlersDuringInputDisabled = sal_False; // sal_True: call event handlers even if input is disabled
+ mpWindowImpl->mbDisableAccessibleLabelForRelation = sal_False; // sal_True: do not set LabelFor relation on accessible objects
+ mpWindowImpl->mbDisableAccessibleLabeledByRelation = sal_False; // sal_True: do not set LabeledBy relation on accessible objects
+ mpWindowImpl->mbHelpTextDynamic = sal_False; // sal_True: append help id in HELP_DEBUG case
+ mpWindowImpl->mbFakeFocusSet = sal_False; // sal_True: pretend as if the window has focus.
- mbEnableRTL = Application::GetSettings().GetLayoutRTL(); // TRUE: this outdev will be mirrored if RTL window layout (UI mirroring) is globally active
+ mbEnableRTL = Application::GetSettings().GetLayoutRTL(); // sal_True: this outdev will be mirrored if RTL window layout (UI mirroring) is globally active
}
// -----------------------------------------------------------------------
@@ -733,7 +733,7 @@ void Window::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSyste
if ( !mpWindowImpl->mbFrame && !mpWindowImpl->mbBorderWin && !mpWindowImpl->mpBorderWindow
&& (nStyle & (WB_BORDER | WB_SYSTEMCHILDWINDOW) ) )
{
- USHORT nBorderTypeStyle = 0;
+ sal_uInt16 nBorderTypeStyle = 0;
if( (nStyle & WB_SYSTEMCHILDWINDOW) )
{
// handle WB_SYSTEMCHILDWINDOW
@@ -751,8 +751,8 @@ void Window::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSyste
}
else if( !mpWindowImpl->mbFrame && ! pParent )
{
- mpWindowImpl->mbOverlapWin = TRUE;
- mpWindowImpl->mbFrame = TRUE;
+ mpWindowImpl->mbOverlapWin = sal_True;
+ mpWindowImpl->mbFrame = sal_True;
}
// insert window in list
@@ -767,7 +767,7 @@ void Window::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSyste
mpWindowImpl->mpOverlapData->mpSaveBackRgn = NULL;
mpWindowImpl->mpOverlapData->mpNextBackWin = NULL;
mpWindowImpl->mpOverlapData->mnSaveBackSize = 0;
- mpWindowImpl->mpOverlapData->mbSaveBack = FALSE;
+ mpWindowImpl->mpOverlapData->mbSaveBack = sal_False;
mpWindowImpl->mpOverlapData->mnTopLevel = 1;
}
@@ -778,7 +778,7 @@ void Window::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSyste
if ( mpWindowImpl->mbFrame )
{
// create frame
- ULONG nFrameStyle = 0;
+ sal_uIntPtr nFrameStyle = 0;
if ( nStyle & WB_MOVEABLE )
nFrameStyle |= SAL_FRAME_STYLE_MOVEABLE;
@@ -884,21 +884,21 @@ void Window::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSyste
mpWindowImpl->mpFrameData->mnMouseCode = 0;
mpWindowImpl->mpFrameData->mnMouseMode = 0;
mpWindowImpl->mpFrameData->meMapUnit = MAP_PIXEL;
- mpWindowImpl->mpFrameData->mbHasFocus = FALSE;
- mpWindowImpl->mpFrameData->mbInMouseMove = FALSE;
- mpWindowImpl->mpFrameData->mbMouseIn = FALSE;
- mpWindowImpl->mpFrameData->mbStartDragCalled = FALSE;
- mpWindowImpl->mpFrameData->mbNeedSysWindow = FALSE;
- mpWindowImpl->mpFrameData->mbMinimized = FALSE;
- mpWindowImpl->mpFrameData->mbStartFocusState = FALSE;
- mpWindowImpl->mpFrameData->mbInSysObjFocusHdl = FALSE;
- mpWindowImpl->mpFrameData->mbInSysObjToTopHdl = FALSE;
- mpWindowImpl->mpFrameData->mbSysObjFocus = FALSE;
+ mpWindowImpl->mpFrameData->mbHasFocus = sal_False;
+ mpWindowImpl->mpFrameData->mbInMouseMove = sal_False;
+ mpWindowImpl->mpFrameData->mbMouseIn = sal_False;
+ mpWindowImpl->mpFrameData->mbStartDragCalled = sal_False;
+ mpWindowImpl->mpFrameData->mbNeedSysWindow = sal_False;
+ mpWindowImpl->mpFrameData->mbMinimized = sal_False;
+ mpWindowImpl->mpFrameData->mbStartFocusState = sal_False;
+ mpWindowImpl->mpFrameData->mbInSysObjFocusHdl = sal_False;
+ mpWindowImpl->mpFrameData->mbInSysObjToTopHdl = sal_False;
+ mpWindowImpl->mpFrameData->mbSysObjFocus = sal_False;
mpWindowImpl->mpFrameData->maPaintTimer.SetTimeout( 30 );
mpWindowImpl->mpFrameData->maPaintTimer.SetTimeoutHdl( LINK( this, Window, ImplHandlePaintHdl ) );
mpWindowImpl->mpFrameData->maResizeTimer.SetTimeout( 50 );
mpWindowImpl->mpFrameData->maResizeTimer.SetTimeoutHdl( LINK( this, Window, ImplHandleResizeTimerHdl ) );
- mpWindowImpl->mpFrameData->mbInternalDragGestureRecognizer = FALSE;
+ mpWindowImpl->mpFrameData->mbInternalDragGestureRecognizer = sal_False;
if ( pRealParent && IsTopWindow() )
{
@@ -943,7 +943,7 @@ void Window::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSyste
// side effect: ImplUpdateGlobalSettings does an ImplGetFrame()->UpdateSettings
ImplUpdateGlobalSettings( *pSVData->maAppData.mpSettings );
OutputDevice::SetSettings( *pSVData->maAppData.mpSettings );
- pSVData->maAppData.mbSettingsInit = TRUE;
+ pSVData->maAppData.mbSettingsInit = sal_True;
}
// If we create a Window with default size, query this
@@ -969,7 +969,7 @@ void Window::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSyste
}
const StyleSettings& rStyleSettings = maSettings.GetStyleSettings();
- USHORT nScreenZoom = rStyleSettings.GetScreenZoom();
+ sal_uInt16 nScreenZoom = rStyleSettings.GetScreenZoom();
mnDPIX = (mpWindowImpl->mpFrameData->mnDPIX*nScreenZoom)/100;
mnDPIY = (mpWindowImpl->mpFrameData->mnDPIY*nScreenZoom)/100;
maFont = rStyleSettings.GetAppFont();
@@ -1030,7 +1030,7 @@ void Window::ImplInsertWindow( Window* pParent )
mpWindowImpl->mpFrameData = pFrameParent->mpWindowImpl->mpFrameData;
mpWindowImpl->mpFrame = pFrameParent->mpWindowImpl->mpFrame;
mpWindowImpl->mpFrameWindow = pFrameParent;
- mpWindowImpl->mbFrame = FALSE;
+ mpWindowImpl->mbFrame = sal_False;
// search overlap window and insert window in list
if ( ImplIsOverlapWindow() )
@@ -1069,7 +1069,7 @@ void Window::ImplInsertWindow( Window* pParent )
// -----------------------------------------------------------------------
-void Window::ImplRemoveWindow( BOOL bRemoveFrameData )
+void Window::ImplRemoveWindow( sal_Bool bRemoveFrameData )
{
// Fenster aus den Listen austragen
if ( !mpWindowImpl->mbFrame )
@@ -1122,7 +1122,7 @@ void Window::ImplRemoveWindow( BOOL bRemoveFrameData )
void Window::ImplCallResize()
{
- mpWindowImpl->mbCallResize = FALSE;
+ mpWindowImpl->mbCallResize = sal_False;
if( GetBackground().IsGradient() )
Invalidate();
@@ -1138,7 +1138,7 @@ void Window::ImplCallResize()
void Window::ImplCallMove()
{
- mpWindowImpl->mbCallMove = FALSE;
+ mpWindowImpl->mbCallMove = sal_False;
if( mpWindowImpl->mbFrame )
{
@@ -1180,12 +1180,12 @@ void Window::ImplCallMove()
// -----------------------------------------------------------------------
-static ULONG ImplAutoHelpID( ResMgr* pResMgr )
+static sal_uIntPtr ImplAutoHelpID( ResMgr* pResMgr )
{
if ( !Application::IsAutoHelpIdEnabled() )
return 0;
- ULONG nHID = 0;
+ sal_uIntPtr nHID = 0;
DBG_ASSERT( pResMgr, "No res mgr for auto help id" );
if( ! pResMgr )
@@ -1221,17 +1221,17 @@ void Window::ImplLoadRes( const ResId& rResId )
nHelpId = ImplAutoHelpID( rResId.GetResMgr() );
SetHelpId( nHelpId );
- ULONG nObjMask = ReadLongRes();
+ sal_uIntPtr nObjMask = ReadLongRes();
// ResourceStyle
- ULONG nRSStyle = ReadLongRes();
+ sal_uIntPtr nRSStyle = ReadLongRes();
// WinBits
ReadLongRes();
// HelpId
ReadLongRes();
- BOOL bPos = FALSE;
- BOOL bSize = FALSE;
+ sal_Bool bPos = sal_False;
+ sal_Bool bSize = sal_False;
Point aPos;
Size aSize;
@@ -1240,7 +1240,7 @@ void Window::ImplLoadRes( const ResId& rResId )
// Groessenangabe aus der Resource verwenden
MapUnit ePosMap = MAP_PIXEL;
- bPos = TRUE;
+ bPos = sal_True;
if ( nObjMask & WINDOW_XYMAPMODE )
ePosMap = (MapUnit)ReadLongRes();
@@ -1255,7 +1255,7 @@ void Window::ImplLoadRes( const ResId& rResId )
// Groessenangabe aus der Resource verwenden
MapUnit eSizeMap = MAP_PIXEL;
- bSize = TRUE;
+ bSize = sal_True;
if ( nObjMask & WINDOW_WHMAPMODE )
eSizeMap = (MapUnit)ReadLongRes();
@@ -1281,25 +1281,25 @@ void Window::ImplLoadRes( const ResId& rResId )
SetSizePixel( aSize );
if ( nRSStyle & RSWND_DISABLED )
- Enable( FALSE );
+ Enable( sal_False );
if ( nObjMask & WINDOW_TEXT )
SetText( ReadStringRes() );
if ( nObjMask & WINDOW_HELPTEXT )
{
SetHelpText( ReadStringRes() );
- mpWindowImpl->mbHelpTextDynamic = TRUE;
+ mpWindowImpl->mbHelpTextDynamic = sal_True;
}
if ( nObjMask & WINDOW_QUICKTEXT )
SetQuickHelpText( ReadStringRes() );
if ( nObjMask & WINDOW_EXTRALONG )
SetData( (void*)ReadLongRes() );
if ( nObjMask & WINDOW_UNIQUEID )
- SetUniqueId( (ULONG)ReadLongRes() );
+ SetUniqueId( (sal_uIntPtr)ReadLongRes() );
if ( nObjMask & WINDOW_BORDER_STYLE )
{
- USHORT nBorderStyle = (USHORT)ReadLongRes();
+ sal_uInt16 nBorderStyle = (sal_uInt16)ReadLongRes();
SetBorderStyle( nBorderStyle );
}
}
@@ -1320,9 +1320,9 @@ ImplWinData* Window::ImplGetWinData() const
mpWindowImpl->mpWinData->mpFocusRect = NULL;
mpWindowImpl->mpWinData->mpTrackRect = NULL;
mpWindowImpl->mpWinData->mnTrackFlags = 0;
- mpWindowImpl->mpWinData->mnIsTopWindow = (USHORT) ~0; // not initialized yet, 0/1 will indicate TopWindow (see IsTopWindow())
- mpWindowImpl->mpWinData->mbMouseOver = FALSE;
- mpWindowImpl->mpWinData->mbEnableNativeWidget = (pNoNWF && *pNoNWF) ? FALSE : TRUE; // TRUE: try to draw this control with native theme API
+ mpWindowImpl->mpWinData->mnIsTopWindow = (sal_uInt16) ~0; // not initialized yet, 0/1 will indicate TopWindow (see IsTopWindow())
+ mpWindowImpl->mpWinData->mbMouseOver = sal_False;
+ mpWindowImpl->mpWinData->mbEnableNativeWidget = (pNoNWF && *pNoNWF) ? sal_False : sal_True; // sal_True: try to draw this control with native theme API
mpWindowImpl->mpWinData->mpSmartHelpId = NULL;
mpWindowImpl->mpWinData->mpSmartUniqueId = NULL;
}
@@ -1335,7 +1335,7 @@ ImplWinData* Window::ImplGetWinData() const
SalGraphics* Window::ImplGetFrameGraphics() const
{
if ( mpWindowImpl->mpFrameWindow->mpGraphics )
- mpWindowImpl->mpFrameWindow->mbInitClipRegion = TRUE;
+ mpWindowImpl->mpFrameWindow->mbInitClipRegion = sal_True;
else
mpWindowImpl->mpFrameWindow->ImplGetGraphics();
mpWindowImpl->mpFrameWindow->mpGraphics->ResetClipRegion();
@@ -1365,7 +1365,7 @@ Window* Window::ImplFindWindow( const Point& rFramePos )
if ( !mpWindowImpl->mbVisible )
return NULL;
- USHORT nHitTest = ImplHitTest( rFramePos );
+ sal_uInt16 nHitTest = ImplHitTest( rFramePos );
if ( nHitTest & WINDOW_HITTEST_INSIDE )
{
// und danach gehen wir noch alle Child-Fenster durch
@@ -1389,7 +1389,7 @@ Window* Window::ImplFindWindow( const Point& rFramePos )
// -----------------------------------------------------------------------
-USHORT Window::ImplHitTest( const Point& rFramePos )
+sal_uInt16 Window::ImplHitTest( const Point& rFramePos )
{
Point aFramePos( rFramePos );
if( ImplIsAntiparallel() )
@@ -1409,7 +1409,7 @@ USHORT Window::ImplHitTest( const Point& rFramePos )
return 0;
}
- USHORT nHitTest = WINDOW_HITTEST_INSIDE;
+ sal_uInt16 nHitTest = WINDOW_HITTEST_INSIDE;
if ( mpWindowImpl->mbMouseTransparent )
nHitTest |= WINDOW_HITTEST_TRANSPARENT;
return nHitTest;
@@ -1417,22 +1417,22 @@ USHORT Window::ImplHitTest( const Point& rFramePos )
// -----------------------------------------------------------------------
-BOOL Window::ImplIsRealParentPath( const Window* pWindow ) const
+sal_Bool Window::ImplIsRealParentPath( const Window* pWindow ) const
{
pWindow = pWindow->GetParent();
while ( pWindow )
{
if ( pWindow == this )
- return TRUE;
+ return sal_True;
pWindow = pWindow->GetParent();
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL Window::ImplIsChild( const Window* pWindow, BOOL bSystemWindow ) const
+sal_Bool Window::ImplIsChild( const Window* pWindow, sal_Bool bSystemWindow ) const
{
do
{
@@ -1442,19 +1442,19 @@ BOOL Window::ImplIsChild( const Window* pWindow, BOOL bSystemWindow ) const
pWindow = pWindow->ImplGetParent();
if ( pWindow == this )
- return TRUE;
+ return sal_True;
}
while ( pWindow );
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL Window::ImplIsWindowOrChild( const Window* pWindow, BOOL bSystemWindow ) const
+sal_Bool Window::ImplIsWindowOrChild( const Window* pWindow, sal_Bool bSystemWindow ) const
{
if ( this == pWindow )
- return TRUE;
+ return sal_True;
return ImplIsChild( pWindow, bSystemWindow );
}
@@ -1484,15 +1484,15 @@ int Window::ImplTestMousePointerSet()
{
// Wenn Mouse gecaptured ist, dann soll MousePointer umgeschaltet werden
if ( IsMouseCaptured() )
- return TRUE;
+ return sal_True;
// Wenn sich Mouse ueber dem Fenster befindet, dann soll MousePointer
// umgeschaltet werden
Rectangle aClientRect( Point( 0, 0 ), GetOutputSizePixel() );
if ( aClientRect.IsInside( GetPointerPosPixel() ) )
- return TRUE;
+ return sal_True;
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -1500,7 +1500,7 @@ int Window::ImplTestMousePointerSet()
PointerStyle Window::ImplGetMousePointer() const
{
PointerStyle ePointerStyle;
- BOOL bWait = FALSE;
+ sal_Bool bWait = sal_False;
if ( IsEnabled() && IsInputEnabled() && ! IsInModalMode() )
ePointerStyle = GetPointer().GetStyle();
@@ -1520,7 +1520,7 @@ PointerStyle Window::ImplGetMousePointer() const
if ( pWindow->mpWindowImpl->mnWaitCount )
{
ePointerStyle = POINTER_WAIT;
- bWait = TRUE;
+ bWait = sal_True;
}
else
{
@@ -1543,11 +1543,11 @@ PointerStyle Window::ImplGetMousePointer() const
void Window::ImplResetReallyVisible()
{
- BOOL bBecameReallyInvisible = mpWindowImpl->mbReallyVisible;
+ sal_Bool bBecameReallyInvisible = mpWindowImpl->mbReallyVisible;
- mbDevOutput = FALSE;
- mpWindowImpl->mbReallyVisible = FALSE;
- mpWindowImpl->mbReallyShown = FALSE;
+ mbDevOutput = sal_False;
+ mpWindowImpl->mbReallyVisible = sal_False;
+ mpWindowImpl->mbReallyShown = sal_False;
// the SHOW/HIDE events serve as indicators to send child creation/destroy events to the access bridge.
// For this, the data member of the event must not be NULL.
@@ -1585,11 +1585,11 @@ void Window::ImplSetReallyVisible()
if( !mpWindowImpl->mbReallyShown )
ImplCallInitShow();
- BOOL bBecameReallyVisible = !mpWindowImpl->mbReallyVisible;
+ sal_Bool bBecameReallyVisible = !mpWindowImpl->mbReallyVisible;
- mbDevOutput = TRUE;
- mpWindowImpl->mbReallyVisible = TRUE;
- mpWindowImpl->mbReallyShown = TRUE;
+ mbDevOutput = sal_True;
+ mpWindowImpl->mbReallyVisible = sal_True;
+ mpWindowImpl->mbReallyShown = sal_True;
// the SHOW/HIDE events serve as indicators to send child creation/destroy events to the access bridge.
// For this, the data member of the event must not be NULL.
@@ -1622,10 +1622,10 @@ void Window::ImplSetReallyVisible()
void Window::ImplCallInitShow()
{
- mpWindowImpl->mbReallyShown = TRUE;
- mpWindowImpl->mbInInitShow = TRUE;
+ mpWindowImpl->mbReallyShown = sal_True;
+ mpWindowImpl->mbInInitShow = sal_True;
StateChanged( STATE_CHANGE_INITSHOW );
- mpWindowImpl->mbInInitShow = FALSE;
+ mpWindowImpl->mbInInitShow = sal_False;
Window* pWindow = mpWindowImpl->mpFirstOverlap;
while ( pWindow )
@@ -1681,7 +1681,7 @@ void Window::ImplInitResolutionSettings()
if ( mpWindowImpl->mbFrame )
{
const StyleSettings& rStyleSettings = maSettings.GetStyleSettings();
- USHORT nScreenZoom = rStyleSettings.GetScreenZoom();
+ sal_uInt16 nScreenZoom = rStyleSettings.GetScreenZoom();
mnDPIX = (mpWindowImpl->mpFrameData->mnDPIX*nScreenZoom)/100;
mnDPIY = (mpWindowImpl->mpFrameData->mnDPIY*nScreenZoom)/100;
SetPointFont( rStyleSettings.GetAppFont() );
@@ -1707,7 +1707,7 @@ void Window::ImplInitResolutionSettings()
void Window::ImplPointToLogic( Font& rFont ) const
{
Size aSize = rFont.GetSize();
- USHORT nScreenFontZoom = maSettings.GetStyleSettings().GetScreenFontZoom();
+ sal_uInt16 nScreenFontZoom = maSettings.GetStyleSettings().GetScreenFontZoom();
if ( aSize.Width() )
{
@@ -1734,7 +1734,7 @@ void Window::ImplPointToLogic( Font& rFont ) const
void Window::ImplLogicToPoint( Font& rFont ) const
{
Size aSize = rFont.GetSize();
- USHORT nScreenFontZoom = maSettings.GetStyleSettings().GetScreenFontZoom();
+ sal_uInt16 nScreenFontZoom = maSettings.GetStyleSettings().GetScreenFontZoom();
if ( IsMapModeEnabled() )
aSize = LogicToPixel( aSize );
@@ -1758,13 +1758,13 @@ void Window::ImplLogicToPoint( Font& rFont ) const
// -----------------------------------------------------------------------
-BOOL Window::ImplSysObjClip( const Region* pOldRegion )
+sal_Bool Window::ImplSysObjClip( const Region* pOldRegion )
{
- BOOL bUpdate = TRUE;
+ sal_Bool bUpdate = sal_True;
if ( mpWindowImpl->mpSysObj )
{
- BOOL bVisibleState = mpWindowImpl->mbReallyVisible;
+ sal_Bool bVisibleState = mpWindowImpl->mbReallyVisible;
if ( bVisibleState )
{
@@ -1785,7 +1785,7 @@ BOOL Window::ImplSysObjClip( const Region* pOldRegion )
Region aRegion = *pWinChildClipRegion;
Rectangle aWinRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
Region aWinRectRegion( aWinRect );
- USHORT nClipFlags = mpWindowImpl->mpSysObj->GetClipRegionType();
+ sal_uInt16 nClipFlags = mpWindowImpl->mpSysObj->GetClipRegionType();
if ( aRegion == aWinRectRegion )
mpWindowImpl->mpSysObj->ResetClipRegion();
@@ -1804,9 +1804,9 @@ BOOL Window::ImplSysObjClip( const Region* pOldRegion )
long nY;
long nWidth;
long nHeight;
- ULONG nRectCount;
+ sal_uIntPtr nRectCount;
ImplRegionInfo aInfo;
- BOOL bRegionRect;
+ sal_Bool bRegionRect;
nRectCount = aRegion.GetRectCount();
mpWindowImpl->mpSysObj->BeginSetClipRegion( nRectCount );
@@ -1820,7 +1820,7 @@ BOOL Window::ImplSysObjClip( const Region* pOldRegion )
}
}
else
- bVisibleState = FALSE;
+ bVisibleState = sal_False;
}
// Visible-Status updaten
@@ -1884,31 +1884,31 @@ void Window::ImplUpdateSysObjClip()
// -----------------------------------------------------------------------
-BOOL Window::ImplSetClipFlagChilds( BOOL bSysObjOnlySmaller )
+sal_Bool Window::ImplSetClipFlagChilds( sal_Bool bSysObjOnlySmaller )
{
- BOOL bUpdate = TRUE;
+ sal_Bool bUpdate = sal_True;
if ( mpWindowImpl->mpSysObj )
{
Region* pOldRegion = NULL;
if ( bSysObjOnlySmaller && !mpWindowImpl->mbInitWinClipRegion )
pOldRegion = new Region( mpWindowImpl->maWinClipRegion );
- mbInitClipRegion = TRUE;
- mpWindowImpl->mbInitWinClipRegion = TRUE;
+ mbInitClipRegion = sal_True;
+ mpWindowImpl->mbInitWinClipRegion = sal_True;
Window* pWindow = mpWindowImpl->mpFirstChild;
while ( pWindow )
{
if ( !pWindow->ImplSetClipFlagChilds( bSysObjOnlySmaller ) )
- bUpdate = FALSE;
+ bUpdate = sal_False;
pWindow = pWindow->mpWindowImpl->mpNext;
}
if ( !ImplSysObjClip( pOldRegion ) )
{
- mbInitClipRegion = TRUE;
- mpWindowImpl->mbInitWinClipRegion = TRUE;
- bUpdate = FALSE;
+ mbInitClipRegion = sal_True;
+ mpWindowImpl->mbInitWinClipRegion = sal_True;
+ bUpdate = sal_False;
}
if ( pOldRegion )
@@ -1916,14 +1916,14 @@ BOOL Window::ImplSetClipFlagChilds( BOOL bSysObjOnlySmaller )
}
else
{
- mbInitClipRegion = TRUE;
- mpWindowImpl->mbInitWinClipRegion = TRUE;
+ mbInitClipRegion = sal_True;
+ mpWindowImpl->mbInitWinClipRegion = sal_True;
Window* pWindow = mpWindowImpl->mpFirstChild;
while ( pWindow )
{
if ( !pWindow->ImplSetClipFlagChilds( bSysObjOnlySmaller ) )
- bUpdate = FALSE;
+ bUpdate = sal_False;
pWindow = pWindow->mpWindowImpl->mpNext;
}
}
@@ -1932,15 +1932,15 @@ BOOL Window::ImplSetClipFlagChilds( BOOL bSysObjOnlySmaller )
// -----------------------------------------------------------------------
-BOOL Window::ImplSetClipFlagOverlapWindows( BOOL bSysObjOnlySmaller )
+sal_Bool Window::ImplSetClipFlagOverlapWindows( sal_Bool bSysObjOnlySmaller )
{
- BOOL bUpdate = ImplSetClipFlagChilds( bSysObjOnlySmaller );
+ sal_Bool bUpdate = ImplSetClipFlagChilds( bSysObjOnlySmaller );
Window* pWindow = mpWindowImpl->mpFirstOverlap;
while ( pWindow )
{
if ( !pWindow->ImplSetClipFlagOverlapWindows( bSysObjOnlySmaller ) )
- bUpdate = FALSE;
+ bUpdate = sal_False;
pWindow = pWindow->mpWindowImpl->mpNext;
}
@@ -1949,18 +1949,18 @@ BOOL Window::ImplSetClipFlagOverlapWindows( BOOL bSysObjOnlySmaller )
// -----------------------------------------------------------------------
-BOOL Window::ImplSetClipFlag( BOOL bSysObjOnlySmaller )
+sal_Bool Window::ImplSetClipFlag( sal_Bool bSysObjOnlySmaller )
{
if ( !ImplIsOverlapWindow() )
{
- BOOL bUpdate = ImplSetClipFlagChilds( bSysObjOnlySmaller );
+ sal_Bool bUpdate = ImplSetClipFlagChilds( bSysObjOnlySmaller );
Window* pParent = ImplGetParent();
if ( pParent &&
((pParent->GetStyle() & WB_CLIPCHILDREN) || (mpWindowImpl->mnParentClipMode & PARENTCLIPMODE_CLIP)) )
{
- pParent->mbInitClipRegion = TRUE;
- pParent->mpWindowImpl->mbInitChildRegion = TRUE;
+ pParent->mbInitClipRegion = sal_True;
+ pParent->mpWindowImpl->mbInitChildRegion = sal_True;
}
// Schwestern muessen ihre ClipRegion auch neu berechnen
@@ -1970,7 +1970,7 @@ BOOL Window::ImplSetClipFlag( BOOL bSysObjOnlySmaller )
while ( pWindow )
{
if ( !pWindow->ImplSetClipFlagChilds( bSysObjOnlySmaller ) )
- bUpdate = FALSE;
+ bUpdate = sal_False;
pWindow = pWindow->mpWindowImpl->mpNext;
}
}
@@ -2050,7 +2050,7 @@ void Window::ImplExcludeOverlapWindows2( Region& rRegion )
// -----------------------------------------------------------------------
-void Window::ImplClipBoundaries( Region& rRegion, BOOL bThis, BOOL bOverlaps )
+void Window::ImplClipBoundaries( Region& rRegion, sal_Bool bThis, sal_Bool bOverlaps )
{
if ( bThis )
ImplIntersectWindowClipRegion( rRegion );
@@ -2085,21 +2085,21 @@ void Window::ImplClipBoundaries( Region& rRegion, BOOL bThis, BOOL bOverlaps )
// -----------------------------------------------------------------------
-BOOL Window::ImplClipChilds( Region& rRegion )
+sal_Bool Window::ImplClipChilds( Region& rRegion )
{
- BOOL bOtherClip = FALSE;
+ sal_Bool bOtherClip = sal_False;
Window* pWindow = mpWindowImpl->mpFirstChild;
while ( pWindow )
{
if ( pWindow->mpWindowImpl->mbReallyVisible )
{
// ParentClipMode-Flags auswerten
- USHORT nClipMode = pWindow->GetParentClipMode();
+ sal_uInt16 nClipMode = pWindow->GetParentClipMode();
if ( !(nClipMode & PARENTCLIPMODE_NOCLIP) &&
((nClipMode & PARENTCLIPMODE_CLIP) || (GetStyle() & WB_CLIPCHILDREN)) )
pWindow->ImplExcludeWindowRegion( rRegion );
else
- bOtherClip = TRUE;
+ bOtherClip = sal_True;
}
pWindow = pWindow->mpWindowImpl->mpNext;
@@ -2153,13 +2153,13 @@ void Window::ImplInitWinClipRegion()
ImplClipSiblings( mpWindowImpl->maWinClipRegion );
// Clip Parent Boundaries
- ImplClipBoundaries( mpWindowImpl->maWinClipRegion, FALSE, TRUE );
+ ImplClipBoundaries( mpWindowImpl->maWinClipRegion, sal_False, sal_True );
// Clip Children
if ( (GetStyle() & WB_CLIPCHILDREN) || mpWindowImpl->mbClipChildren )
- mpWindowImpl->mbInitChildRegion = TRUE;
+ mpWindowImpl->mbInitChildRegion = sal_True;
- mpWindowImpl->mbInitWinClipRegion = FALSE;
+ mpWindowImpl->mbInitWinClipRegion = sal_False;
}
// -----------------------------------------------------------------------
@@ -2184,7 +2184,7 @@ void Window::ImplInitWinChildClipRegion()
ImplClipChilds( *mpWindowImpl->mpChildClipRegion );
}
- mpWindowImpl->mbInitChildRegion = FALSE;
+ mpWindowImpl->mbInitChildRegion = sal_False;
}
// -----------------------------------------------------------------------
@@ -2265,7 +2265,7 @@ void Window::ImplCalcOverlapRegionOverlaps( const Region& rInterRegion, Region&
// -----------------------------------------------------------------------
void Window::ImplCalcOverlapRegion( const Rectangle& rSourceRect, Region& rRegion,
- BOOL bChilds, BOOL bParent, BOOL bSiblings )
+ sal_Bool bChilds, sal_Bool bParent, sal_Bool bSiblings )
{
Region aRegion( rSourceRect );
if ( mpWindowImpl->mbWinRegion )
@@ -2337,13 +2337,13 @@ void Window::ImplCalcOverlapRegion( const Rectangle& rSourceRect, Region& rRegio
// -----------------------------------------------------------------------
-void Window::ImplCallPaint( const Region* pRegion, USHORT nPaintFlags )
+void Window::ImplCallPaint( const Region* pRegion, sal_uInt16 nPaintFlags )
{
// call PrePaint. PrePaint may add to the invalidate region as well as
// other parameters used below.
PrePaint();
- mpWindowImpl->mbPaintFrame = FALSE;
+ mpWindowImpl->mbPaintFrame = sal_False;
if ( nPaintFlags & IMPL_PAINT_PAINTALLCHILDS )
mpWindowImpl->mnPaintFlags |= IMPL_PAINT_PAINT | IMPL_PAINT_PAINTALLCHILDS | (nPaintFlags & IMPL_PAINT_PAINTALL);
@@ -2397,8 +2397,8 @@ void Window::ImplCallPaint( const Region* pRegion, USHORT nPaintFlags )
if ( mpWindowImpl->mpCursor )
mpWindowImpl->mpCursor->ImplHide();
- mbInitClipRegion = TRUE;
- mpWindowImpl->mbInPaint = TRUE;
+ mbInitClipRegion = sal_True;
+ mpWindowImpl->mbInPaint = sal_True;
// Paint-Region zuruecksetzen
Region aPaintRegion( mpWindowImpl->maInvalidateRegion );
@@ -2438,11 +2438,11 @@ void Window::ImplCallPaint( const Region* pRegion, USHORT nPaintFlags )
if ( mpWindowImpl->mbFocusVisible )
ImplInvertFocus( *(mpWindowImpl->mpWinData->mpFocusRect) );
}
- mpWindowImpl->mbInPaint = FALSE;
- mbInitClipRegion = TRUE;
+ mpWindowImpl->mbInPaint = sal_False;
+ mbInitClipRegion = sal_True;
mpWindowImpl->mpPaintRegion = NULL;
if ( mpWindowImpl->mpCursor )
- mpWindowImpl->mpCursor->ImplShow( FALSE );
+ mpWindowImpl->mpCursor->ImplShow( sal_False );
}
}
else
@@ -2468,7 +2468,7 @@ void Window::ImplCallPaint( const Region* pRegion, USHORT nPaintFlags )
// #98943# draw toolbox selection
if( !aSelectionRect.IsEmpty() )
- DrawSelectionBackground( aSelectionRect, 3, FALSE, TRUE, FALSE );
+ DrawSelectionBackground( aSelectionRect, 3, sal_False, sal_True, sal_False );
if ( pChildRegion )
delete pChildRegion;
@@ -2535,14 +2535,14 @@ IMPL_LINK( Window, ImplHandleResizeTimerHdl, void*, EMPTYARG )
// -----------------------------------------------------------------------
-void Window::ImplInvalidateFrameRegion( const Region* pRegion, USHORT nFlags )
+void Window::ImplInvalidateFrameRegion( const Region* pRegion, sal_uInt16 nFlags )
{
// PAINTCHILDS bei allen Parent-Fenster bis zum ersten OverlapWindow
// setzen
if ( !ImplIsOverlapWindow() )
{
Window* pTempWindow = this;
- USHORT nTranspPaint = IsPaintTransparent() ? IMPL_PAINT_PAINT : 0;
+ sal_uInt16 nTranspPaint = IsPaintTransparent() ? IMPL_PAINT_PAINT : 0;
do
{
pTempWindow = pTempWindow->ImplGetParent();
@@ -2600,7 +2600,7 @@ void Window::ImplInvalidateOverlapFrameRegion( const Region& rRegion )
{
Region aRegion = rRegion;
- ImplClipBoundaries( aRegion, TRUE, TRUE );
+ ImplClipBoundaries( aRegion, sal_True, sal_True );
if ( !aRegion.IsEmpty() )
ImplInvalidateFrameRegion( &aRegion, INVALIDATE_CHILDREN );
@@ -2630,7 +2630,7 @@ void Window::ImplInvalidateParentFrameRegion( Region& rRegion )
// -----------------------------------------------------------------------
-void Window::ImplInvalidate( const Region* pRegion, USHORT nFlags )
+void Window::ImplInvalidate( const Region* pRegion, sal_uInt16 nFlags )
{
// Hintergrund-Sicherung zuruecksetzen
@@ -2638,7 +2638,7 @@ void Window::ImplInvalidate( const Region* pRegion, USHORT nFlags )
ImplInvalidateAllOverlapBackgrounds();
// Feststellen, was neu ausgegeben werden muss
- BOOL bInvalidateAll = !pRegion;
+ sal_Bool bInvalidateAll = !pRegion;
// Transparent-Invalidate beruecksichtigen
Window* pOpaqueWindow = this;
@@ -2651,7 +2651,7 @@ void Window::ImplInvalidate( const Region* pRegion, USHORT nFlags )
{
pOpaqueWindow = pTempWindow;
nFlags |= INVALIDATE_CHILDREN;
- bInvalidateAll = FALSE;
+ bInvalidateAll = sal_False;
break;
}
@@ -2663,7 +2663,7 @@ void Window::ImplInvalidate( const Region* pRegion, USHORT nFlags )
}
// Region zusammenbauen
- USHORT nOrgFlags = nFlags;
+ sal_uInt16 nOrgFlags = nFlags;
if ( !(nFlags & (INVALIDATE_CHILDREN | INVALIDATE_NOCHILDREN)) )
{
if ( GetStyle() & WB_CLIPCHILDREN )
@@ -2672,7 +2672,7 @@ void Window::ImplInvalidate( const Region* pRegion, USHORT nFlags )
nFlags |= INVALIDATE_CHILDREN;
}
if ( (nFlags & INVALIDATE_NOCHILDREN) && mpWindowImpl->mpFirstChild )
- bInvalidateAll = FALSE;
+ bInvalidateAll = sal_False;
if ( bInvalidateAll )
ImplInvalidateFrameRegion( NULL, nFlags );
else
@@ -2691,7 +2691,7 @@ void Window::ImplInvalidate( const Region* pRegion, USHORT nFlags )
else
aRegion.Intersect( *pRegion );
}
- ImplClipBoundaries( aRegion, TRUE, TRUE );
+ ImplClipBoundaries( aRegion, sal_True, sal_True );
if ( nFlags & INVALIDATE_NOCHILDREN )
{
nFlags &= ~INVALIDATE_CHILDREN;
@@ -2718,7 +2718,7 @@ void Window::ImplInvalidate( const Region* pRegion, USHORT nFlags )
void Window::ImplMoveInvalidateRegion( const Rectangle& rRect,
long nHorzScroll, long nVertScroll,
- BOOL bChilds )
+ sal_Bool bChilds )
{
if ( (mpWindowImpl->mnPaintFlags & (IMPL_PAINT_PAINT | IMPL_PAINT_PAINTALL)) == IMPL_PAINT_PAINT )
{
@@ -2733,7 +2733,7 @@ void Window::ImplMoveInvalidateRegion( const Rectangle& rRect,
Window* pWindow = mpWindowImpl->mpFirstChild;
while ( pWindow )
{
- pWindow->ImplMoveInvalidateRegion( rRect, nHorzScroll, nVertScroll, TRUE );
+ pWindow->ImplMoveInvalidateRegion( rRect, nHorzScroll, nVertScroll, sal_True );
pWindow = pWindow->mpWindowImpl->mpNext;
}
}
@@ -2743,7 +2743,7 @@ void Window::ImplMoveInvalidateRegion( const Rectangle& rRect,
void Window::ImplMoveAllInvalidateRegions( const Rectangle& rRect,
long nHorzScroll, long nVertScroll,
- BOOL bChilds )
+ sal_Bool bChilds )
{
// Paint-Region auch verschieben, wenn noch Paints anstehen
ImplMoveInvalidateRegion( rRect, nHorzScroll, nVertScroll, bChilds );
@@ -2771,7 +2771,7 @@ void Window::ImplMoveAllInvalidateRegions( const Rectangle& rRect,
if ( !aPaintAllRegion.IsEmpty() )
{
aPaintAllRegion.Move( nHorzScroll, nVertScroll );
- USHORT nPaintFlags = 0;
+ sal_uInt16 nPaintFlags = 0;
if ( bChilds )
mpWindowImpl->mnPaintFlags |= INVALIDATE_CHILDREN;
ImplInvalidateFrameRegion( &aPaintAllRegion, nPaintFlags );
@@ -2781,7 +2781,7 @@ void Window::ImplMoveAllInvalidateRegions( const Rectangle& rRect,
// -----------------------------------------------------------------------
-void Window::ImplValidateFrameRegion( const Region* pRegion, USHORT nFlags )
+void Window::ImplValidateFrameRegion( const Region* pRegion, sal_uInt16 nFlags )
{
if ( !pRegion )
mpWindowImpl->maInvalidateRegion.SetEmpty();
@@ -2826,11 +2826,11 @@ void Window::ImplValidateFrameRegion( const Region* pRegion, USHORT nFlags )
// -----------------------------------------------------------------------
-void Window::ImplValidate( const Region* pRegion, USHORT nFlags )
+void Window::ImplValidate( const Region* pRegion, sal_uInt16 nFlags )
{
// Region zusammenbauen
- BOOL bValidateAll = !pRegion;
- USHORT nOrgFlags = nFlags;
+ sal_Bool bValidateAll = !pRegion;
+ sal_uInt16 nOrgFlags = nFlags;
if ( !(nFlags & (VALIDATE_CHILDREN | VALIDATE_NOCHILDREN)) )
{
if ( GetStyle() & WB_CLIPCHILDREN )
@@ -2839,7 +2839,7 @@ void Window::ImplValidate( const Region* pRegion, USHORT nFlags )
nFlags |= VALIDATE_CHILDREN;
}
if ( (nFlags & VALIDATE_NOCHILDREN) && mpWindowImpl->mpFirstChild )
- bValidateAll = FALSE;
+ bValidateAll = sal_False;
if ( bValidateAll )
ImplValidateFrameRegion( NULL, nFlags );
else
@@ -2848,7 +2848,7 @@ void Window::ImplValidate( const Region* pRegion, USHORT nFlags )
Region aRegion( aRect );
if ( pRegion )
aRegion.Intersect( *pRegion );
- ImplClipBoundaries( aRegion, TRUE, TRUE );
+ ImplClipBoundaries( aRegion, sal_True, sal_True );
if ( nFlags & VALIDATE_NOCHILDREN )
{
nFlags &= ~VALIDATE_CHILDREN;
@@ -2868,7 +2868,7 @@ void Window::ImplValidate( const Region* pRegion, USHORT nFlags )
// -----------------------------------------------------------------------
void Window::ImplScroll( const Rectangle& rRect,
- long nHorzScroll, long nVertScroll, USHORT nFlags )
+ long nHorzScroll, long nVertScroll, sal_uInt16 nFlags )
{
if ( !IsDeviceOutputNecessary() )
return;
@@ -2886,7 +2886,7 @@ void Window::ImplScroll( const Rectangle& rRect,
if ( mpWindowImpl->mpCursor )
mpWindowImpl->mpCursor->ImplHide();
- USHORT nOrgFlags = nFlags;
+ sal_uInt16 nOrgFlags = nFlags;
if ( !(nFlags & (SCROLL_CHILDREN | SCROLL_NOCHILDREN)) )
{
if ( GetStyle() & WB_CLIPCHILDREN )
@@ -2896,14 +2896,14 @@ void Window::ImplScroll( const Rectangle& rRect,
}
Region aInvalidateRegion;
- BOOL bScrollChilds = (nFlags & SCROLL_CHILDREN) != 0;
- BOOL bErase = (nFlags & SCROLL_NOERASE) == 0;
+ sal_Bool bScrollChilds = (nFlags & SCROLL_CHILDREN) != 0;
+ sal_Bool bErase = (nFlags & SCROLL_NOERASE) == 0;
if ( !mpWindowImpl->mpFirstChild )
- bScrollChilds = FALSE;
+ bScrollChilds = sal_False;
// --- RTL --- check if this window requires special action
- BOOL bReMirror = ( ImplIsAntiparallel() );
+ sal_Bool bReMirror = ( ImplIsAntiparallel() );
Rectangle aRectMirror( rRect );
if( bReMirror )
@@ -2918,7 +2918,7 @@ void Window::ImplScroll( const Rectangle& rRect,
if ( !(nFlags & SCROLL_NOINVALIDATE) )
{
- ImplCalcOverlapRegion( aRectMirror, aInvalidateRegion, !bScrollChilds, TRUE, FALSE );
+ ImplCalcOverlapRegion( aRectMirror, aInvalidateRegion, !bScrollChilds, sal_True, sal_False );
// --- RTL ---
// if the scrolling on the device is performed in the opposite direction
@@ -2928,7 +2928,7 @@ void Window::ImplScroll( const Rectangle& rRect,
if ( !aInvalidateRegion.IsEmpty() )
{
aInvalidateRegion.Move( bReMirror ? -nHorzScroll : nHorzScroll, nVertScroll );
- bErase = TRUE;
+ bErase = sal_True;
}
if ( !(nFlags & SCROLL_NOWINDOWINVALIDATE) )
{
@@ -2950,7 +2950,7 @@ void Window::ImplScroll( const Rectangle& rRect,
aRegion.Exclude( aInvalidateRegion );
- ImplClipBoundaries( aRegion, FALSE, TRUE );
+ ImplClipBoundaries( aRegion, sal_False, sal_True );
if ( !bScrollChilds )
{
if ( nOrgFlags & SCROLL_NOCHILDREN )
@@ -3001,7 +3001,7 @@ void Window::ImplScroll( const Rectangle& rRect,
// so it has to be re-mirrored before calling the Paint-handler
mpWindowImpl->mnPaintFlags |= IMPL_PAINT_CHECKRTL;
- USHORT nPaintFlags = INVALIDATE_CHILDREN;
+ sal_uInt16 nPaintFlags = INVALIDATE_CHILDREN;
if ( !bErase )
nPaintFlags |= INVALIDATE_NOERASE;
if ( !bScrollChilds )
@@ -3031,24 +3031,24 @@ void Window::ImplScroll( const Rectangle& rRect,
Update();
if ( mpWindowImpl->mpCursor )
- mpWindowImpl->mpCursor->ImplShow( FALSE );
+ mpWindowImpl->mpCursor->ImplShow( sal_False );
}
// -----------------------------------------------------------------------
-void Window::ImplUpdateAll( BOOL bOverlapWindows )
+void Window::ImplUpdateAll( sal_Bool bOverlapWindows )
{
if ( !mpWindowImpl->mbReallyVisible )
return;
- BOOL bFlush = FALSE;
+ sal_Bool bFlush = sal_False;
if ( mpWindowImpl->mpFrameWindow->mpWindowImpl->mbPaintFrame )
{
Point aPoint( 0, 0 );
Region aRegion( Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) );
ImplInvalidateOverlapFrameRegion( aRegion );
if ( mpWindowImpl->mbFrame || (mpWindowImpl->mpBorderWindow && mpWindowImpl->mpBorderWindow->mpWindowImpl->mbFrame) )
- bFlush = TRUE;
+ bFlush = sal_True;
}
// Ein Update wirkt immer auf das OverlapWindow, damit bei spaeteren
@@ -3107,10 +3107,10 @@ void Window::ImplUpdateWindowPtr()
// -----------------------------------------------------------------------
-void Window::ImplUpdateOverlapWindowPtr( BOOL bNewFrame )
+void Window::ImplUpdateOverlapWindowPtr( sal_Bool bNewFrame )
{
- BOOL bVisible = IsVisible();
- Show( FALSE );
+ sal_Bool bVisible = IsVisible();
+ Show( sal_False );
ImplRemoveWindow( bNewFrame );
Window* pRealParent = mpWindowImpl->mpRealParent;
ImplInsertWindow( ImplGetParent() );
@@ -3131,14 +3131,14 @@ void Window::ImplUpdateOverlapWindowPtr( BOOL bNewFrame )
}
if ( bVisible )
- Show( TRUE );
+ Show( sal_True );
}
// -----------------------------------------------------------------------
-BOOL Window::ImplUpdatePos()
+sal_Bool Window::ImplUpdatePos()
{
- BOOL bSysChild = FALSE;
+ sal_Bool bSysChild = sal_False;
if ( ImplIsOverlapWindow() )
{
@@ -3157,12 +3157,12 @@ BOOL Window::ImplUpdatePos()
while ( pChild )
{
if ( pChild->ImplUpdatePos() )
- bSysChild = TRUE;
+ bSysChild = sal_True;
pChild = pChild->mpWindowImpl->mpNext;
}
if ( mpWindowImpl->mpSysObj )
- bSysChild = TRUE;
+ bSysChild = sal_True;
return bSysChild;
}
@@ -3184,12 +3184,12 @@ void Window::ImplUpdateSysObjPos()
// -----------------------------------------------------------------------
void Window::ImplPosSizeWindow( long nX, long nY,
- long nWidth, long nHeight, USHORT nFlags )
+ long nWidth, long nHeight, sal_uInt16 nFlags )
{
- BOOL bNewPos = FALSE;
- BOOL bNewSize = FALSE;
- BOOL bNewWidth = FALSE;
- BOOL bCopyBits = FALSE;
+ sal_Bool bNewPos = sal_False;
+ sal_Bool bNewSize = sal_False;
+ sal_Bool bNewWidth = sal_False;
+ sal_Bool bCopyBits = sal_False;
long nOldOutOffX = mnOutOffX;
long nOldOutOffY = mnOutOffY;
long nOldOutWidth = mnOutWidth;
@@ -3211,17 +3211,17 @@ void Window::ImplPosSizeWindow( long nX, long nY,
if ( mnOutWidth && mnOutHeight && !mpWindowImpl->mbPaintTransparent &&
!mpWindowImpl->mbInitWinClipRegion && !mpWindowImpl->maWinClipRegion.IsEmpty() &&
!HasPaintEvent() )
- bCopyBits = TRUE;
+ bCopyBits = sal_True;
}
- BOOL bnXRecycled = FALSE; // avoid duplicate mirroring in RTL case
+ sal_Bool bnXRecycled = sal_False; // avoid duplicate mirroring in RTL case
if ( nFlags & WINDOW_POSSIZE_WIDTH )
{
if(!( nFlags & WINDOW_POSSIZE_X ))
{
nX = mpWindowImpl->mnX;
nFlags |= WINDOW_POSSIZE_X;
- bnXRecycled = TRUE; // we're using a mnX which was already mirrored in RTL case
+ bnXRecycled = sal_True; // we're using a mnX which was already mirrored in RTL case
}
if ( nWidth < 0 )
@@ -3229,9 +3229,9 @@ void Window::ImplPosSizeWindow( long nX, long nY,
if ( nWidth != mnOutWidth )
{
mnOutWidth = nWidth;
- bNewSize = TRUE;
- bCopyBits = FALSE;
- bNewWidth = TRUE;
+ bNewSize = sal_True;
+ bCopyBits = sal_False;
+ bNewWidth = sal_True;
}
}
if ( nFlags & WINDOW_POSSIZE_HEIGHT )
@@ -3241,8 +3241,8 @@ void Window::ImplPosSizeWindow( long nX, long nY,
if ( nHeight != mnOutHeight )
{
mnOutHeight = nHeight;
- bNewSize = TRUE;
- bCopyBits = FALSE;
+ bNewSize = sal_True;
+ bCopyBits = sal_False;
}
}
@@ -3292,12 +3292,12 @@ void Window::ImplPosSizeWindow( long nX, long nY,
pOverlapRegion = new Region();
ImplCalcOverlapRegion( Rectangle( Point( mnOutOffX, mnOutOffY ),
Size( mnOutWidth, mnOutHeight ) ),
- *pOverlapRegion, FALSE, TRUE, TRUE );
+ *pOverlapRegion, sal_False, sal_True, sal_True );
}
mpWindowImpl->mnX = nX;
mpWindowImpl->maPos.X() = nOrgX;
mpWindowImpl->mnAbsScreenX = aPtDev.X(); // --- RTL --- (store real screen pos)
- bNewPos = TRUE;
+ bNewPos = sal_True;
}
}
if ( nFlags & WINDOW_POSSIZE_Y )
@@ -3310,11 +3310,11 @@ void Window::ImplPosSizeWindow( long nX, long nY,
pOverlapRegion = new Region();
ImplCalcOverlapRegion( Rectangle( Point( mnOutOffX, mnOutOffY ),
Size( mnOutWidth, mnOutHeight ) ),
- *pOverlapRegion, FALSE, TRUE, TRUE );
+ *pOverlapRegion, sal_False, sal_True, sal_True );
}
mpWindowImpl->mnY = nY;
mpWindowImpl->maPos.Y() = nY;
- bNewPos = TRUE;
+ bNewPos = sal_True;
}
}
@@ -3330,7 +3330,7 @@ void Window::ImplPosSizeWindow( long nX, long nY,
*/
if ( bNewPos || bNewSize )
{
- BOOL bUpdateSysObjPos = FALSE;
+ sal_Bool bUpdateSysObjPos = sal_False;
if ( bNewPos )
bUpdateSysObjPos = ImplUpdatePos();
@@ -3357,7 +3357,7 @@ void Window::ImplPosSizeWindow( long nX, long nY,
}
else
{
- mpWindowImpl->mpClientWindow->mpWindowImpl->mbCallMove = TRUE;
+ mpWindowImpl->mpClientWindow->mpWindowImpl->mbCallMove = sal_True;
}
}
}
@@ -3383,12 +3383,12 @@ void Window::ImplPosSizeWindow( long nX, long nY,
else
{
if ( bNewPos )
- mpWindowImpl->mbCallMove = TRUE;
+ mpWindowImpl->mbCallMove = sal_True;
if ( bNewSize )
- mpWindowImpl->mbCallResize = TRUE;
+ mpWindowImpl->mbCallResize = sal_True;
}
- BOOL bUpdateSysObjClip = FALSE;
+ sal_Bool bUpdateSysObjClip = sal_False;
if ( IsReallyVisible() )
{
if ( bNewPos || bNewSize )
@@ -3399,7 +3399,7 @@ void Window::ImplPosSizeWindow( long nX, long nY,
if ( mpWindowImpl->mpFrameData->mpFirstBackWin )
ImplInvalidateAllOverlapBackgrounds();
// Clip-Flag neu setzen
- bUpdateSysObjClip = !ImplSetClipFlag( TRUE );
+ bUpdateSysObjClip = !ImplSetClipFlag( sal_True );
}
// Fensterinhalt invalidieren ?
@@ -3407,8 +3407,8 @@ void Window::ImplPosSizeWindow( long nX, long nY,
{
if ( bNewPos )
{
- BOOL bInvalidate = FALSE;
- BOOL bParentPaint = TRUE;
+ sal_Bool bInvalidate = sal_False;
+ sal_Bool bParentPaint = sal_True;
if ( !ImplIsOverlapWindow() )
bParentPaint = mpWindowImpl->mpParent->IsPaintEnabled();
if ( bCopyBits && bParentPaint && !HasPaintEvent() )
@@ -3418,7 +3418,7 @@ void Window::ImplPosSizeWindow( long nX, long nY,
Size( mnOutWidth, mnOutHeight ) ) );
if ( mpWindowImpl->mbWinRegion )
aRegion.Intersect( ImplPixelToDevicePixel( mpWindowImpl->maWinRegion ) );
- ImplClipBoundaries( aRegion, FALSE, TRUE );
+ ImplClipBoundaries( aRegion, sal_False, sal_True );
if ( !pOverlapRegion->IsEmpty() )
{
pOverlapRegion->Move( mnOutOffX-nOldOutOffX, mnOutOffY-nOldOutOffY );
@@ -3430,7 +3430,7 @@ void Window::ImplPosSizeWindow( long nX, long nY,
ImplMoveAllInvalidateRegions( Rectangle( Point( nOldOutOffX, nOldOutOffY ),
Size( nOldOutWidth, nOldOutHeight ) ),
mnOutOffX-nOldOutOffX, mnOutOffY-nOldOutOffY,
- TRUE );
+ sal_True );
SalGraphics* pGraphics = ImplGetFrameGraphics();
if ( pGraphics )
{
@@ -3443,10 +3443,10 @@ void Window::ImplPosSizeWindow( long nX, long nY,
SAL_COPYAREA_WINDOWINVALIDATE, this );
}
else
- bInvalidate = TRUE;
+ bInvalidate = sal_True;
}
else
- bInvalidate = TRUE;
+ bInvalidate = sal_True;
if ( !bInvalidate )
{
if ( !pOverlapRegion->IsEmpty() )
@@ -3454,10 +3454,10 @@ void Window::ImplPosSizeWindow( long nX, long nY,
}
}
else
- bInvalidate = TRUE;
+ bInvalidate = sal_True;
}
else
- bInvalidate = TRUE;
+ bInvalidate = sal_True;
if ( bInvalidate )
ImplInvalidateFrameRegion( NULL, INVALIDATE_CHILDREN );
}
@@ -3469,7 +3469,7 @@ void Window::ImplPosSizeWindow( long nX, long nY,
aRegion.Exclude( *pOldRegion );
if ( mpWindowImpl->mbWinRegion )
aRegion.Intersect( ImplPixelToDevicePixel( mpWindowImpl->maWinRegion ) );
- ImplClipBoundaries( aRegion, FALSE, TRUE );
+ ImplClipBoundaries( aRegion, sal_False, sal_True );
if ( !aRegion.IsEmpty() )
ImplInvalidateFrameRegion( &aRegion, INVALIDATE_CHILDREN );
}
@@ -3482,7 +3482,7 @@ void Window::ImplPosSizeWindow( long nX, long nY,
Region aRegion( *pOldRegion );
if ( !mpWindowImpl->mbPaintTransparent )
ImplExcludeWindowRegion( aRegion );
- ImplClipBoundaries( aRegion, FALSE, TRUE );
+ ImplClipBoundaries( aRegion, sal_False, sal_True );
if ( !aRegion.IsEmpty() && !mpWindowImpl->mpBorderWindow )
ImplInvalidateParentFrameRegion( aRegion );
}
@@ -3573,7 +3573,7 @@ void Window::ImplCalcChildOverlapToTop( ImplCalcToTopData* pPrevData )
// -----------------------------------------------------------------------
-void Window::ImplToTop( USHORT nFlags )
+void Window::ImplToTop( sal_uInt16 nFlags )
{
DBG_ASSERT( ImplIsOverlapWindow(), "Window::ImplToTop(): Is not a OverlapWindow" );
@@ -3590,7 +3590,7 @@ void Window::ImplToTop( USHORT nFlags )
// do not bring floating windows on the client to top
if( !ImplGetClientWindow() || !(ImplGetClientWindow()->GetStyle() & WB_SYSTEMFLOATWIN) )
{
- USHORT nSysFlags = 0;
+ sal_uInt16 nSysFlags = 0;
if ( nFlags & TOTOP_RESTOREWHENMIN )
nSysFlags |= SAL_FRAME_TOTOP_RESTOREWHENMIN;
if ( nFlags & TOTOP_FOREGROUNDTASK )
@@ -3613,7 +3613,7 @@ void Window::ImplToTop( USHORT nFlags )
mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpLastOverlap = mpWindowImpl->mpPrev;
// AlwaysOnTop beruecksichtigen
- BOOL bOnTop = IsAlwaysOnTopEnabled();
+ sal_Bool bOnTop = IsAlwaysOnTopEnabled();
Window* pNextWin = mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpFirstOverlap;
if ( !bOnTop )
{
@@ -3626,7 +3626,7 @@ void Window::ImplToTop( USHORT nFlags )
}
// TopLevel abpruefen
- BYTE nTopLevel = mpWindowImpl->mpOverlapData->mnTopLevel;
+ sal_uInt8 nTopLevel = mpWindowImpl->mpOverlapData->mnTopLevel;
while ( pNextWin )
{
if ( (bOnTop != pNextWin->IsAlwaysOnTopEnabled()) ||
@@ -3667,7 +3667,7 @@ void Window::ImplToTop( USHORT nFlags )
// -----------------------------------------------------------------------
-void Window::ImplStartToTop( USHORT nFlags )
+void Window::ImplStartToTop( sal_uInt16 nFlags )
{
ImplCalcToTopData aStartData;
ImplCalcToTopData* pCurData;
@@ -3722,7 +3722,7 @@ void Window::ImplStartToTop( USHORT nFlags )
// -----------------------------------------------------------------------
-void Window::ImplFocusToTop( USHORT nFlags, BOOL bReallyVisible )
+void Window::ImplFocusToTop( sal_uInt16 nFlags, sal_Bool bReallyVisible )
{
// Soll Focus auch geholt werden?
if ( !(nFlags & TOTOP_NOGRABFOCUS) )
@@ -3741,7 +3741,7 @@ void Window::ImplFocusToTop( USHORT nFlags, BOOL bReallyVisible )
pFocusWindow = pFocusWindow->ImplGetParent();
}
if ( (pFocusWindow->mpWindowImpl->mnActivateMode & ACTIVATE_MODE_GRABFOCUS) &&
- !pFocusWindow->HasChildPathFocus( TRUE ) )
+ !pFocusWindow->HasChildPathFocus( sal_True ) )
pFocusWindow->GrabFocus();
}
@@ -3758,8 +3758,8 @@ void Window::ImplShowAllOverlaps()
{
if ( pOverlapWindow->mpWindowImpl->mbOverlapVisible )
{
- pOverlapWindow->Show( TRUE, SHOW_NOACTIVATE );
- pOverlapWindow->mpWindowImpl->mbOverlapVisible = FALSE;
+ pOverlapWindow->Show( sal_True, SHOW_NOACTIVATE );
+ pOverlapWindow->mpWindowImpl->mbOverlapVisible = sal_False;
}
pOverlapWindow = pOverlapWindow->mpWindowImpl->mpNext;
@@ -3775,8 +3775,8 @@ void Window::ImplHideAllOverlaps()
{
if ( pOverlapWindow->IsVisible() )
{
- pOverlapWindow->mpWindowImpl->mbOverlapVisible = TRUE;
- pOverlapWindow->Show( FALSE );
+ pOverlapWindow->mpWindowImpl->mbOverlapVisible = sal_True;
+ pOverlapWindow->Show( sal_False );
}
pOverlapWindow = pOverlapWindow->mpWindowImpl->mpNext;
@@ -3785,24 +3785,24 @@ void Window::ImplHideAllOverlaps()
// -----------------------------------------------------------------------
-void Window::ImplCallMouseMove( USHORT nMouseCode, BOOL bModChanged )
+void Window::ImplCallMouseMove( sal_uInt16 nMouseCode, sal_Bool bModChanged )
{
if ( mpWindowImpl->mpFrameData->mbMouseIn && mpWindowImpl->mpFrameWindow->mpWindowImpl->mbReallyVisible )
{
- ULONG nTime = Time::GetSystemTicks();
+ sal_uIntPtr nTime = Time::GetSystemTicks();
long nX = mpWindowImpl->mpFrameData->mnLastMouseX;
long nY = mpWindowImpl->mpFrameData->mnLastMouseY;
- USHORT nCode = nMouseCode;
- USHORT nMode = mpWindowImpl->mpFrameData->mnMouseMode;
- BOOL bLeave;
+ sal_uInt16 nCode = nMouseCode;
+ sal_uInt16 nMode = mpWindowImpl->mpFrameData->mnMouseMode;
+ sal_Bool bLeave;
// Auf MouseLeave testen
if ( ((nX < 0) || (nY < 0) ||
(nX >= mpWindowImpl->mpFrameWindow->mnOutWidth) ||
(nY >= mpWindowImpl->mpFrameWindow->mnOutHeight)) &&
!ImplGetSVData()->maWinData.mpCaptureWin )
- bLeave = TRUE;
+ bLeave = sal_True;
else
- bLeave = FALSE;
+ bLeave = sal_False;
nMode |= MOUSE_SYNTHETIC;
if ( bModChanged )
nMode |= MOUSE_MODIFIERCHANGED;
@@ -3849,8 +3849,8 @@ void Window::ImplCallFocusChangeActivate( Window* pNewOverlapWindow,
Window* pNewRealWindow;
Window* pOldRealWindow;
Window* pLastRealWindow;
- BOOL bCallActivate = TRUE;
- BOOL bCallDeactivate = TRUE;
+ sal_Bool bCallActivate = sal_True;
+ sal_Bool bCallDeactivate = sal_True;
pOldRealWindow = pOldOverlapWindow->ImplGetWindow();
pNewRealWindow = pNewOverlapWindow->ImplGetWindow();
@@ -3861,7 +3861,7 @@ void Window::ImplCallFocusChangeActivate( Window* pNewOverlapWindow,
!pNewRealWindow->GetActivateMode() )
{
pSVData->maWinData.mpLastDeacWin = pOldOverlapWindow;
- bCallDeactivate = FALSE;
+ bCallDeactivate = sal_False;
}
}
else if ( (pNewRealWindow->GetType() != WINDOW_FLOATINGWINDOW) ||
@@ -3870,15 +3870,15 @@ void Window::ImplCallFocusChangeActivate( Window* pNewOverlapWindow,
if ( pSVData->maWinData.mpLastDeacWin )
{
if ( pSVData->maWinData.mpLastDeacWin == pNewOverlapWindow )
- bCallActivate = FALSE;
+ bCallActivate = sal_False;
else
{
pLastRealWindow = pSVData->maWinData.mpLastDeacWin->ImplGetWindow();
- pSVData->maWinData.mpLastDeacWin->mpWindowImpl->mbActive = FALSE;
+ pSVData->maWinData.mpLastDeacWin->mpWindowImpl->mbActive = sal_False;
pSVData->maWinData.mpLastDeacWin->Deactivate();
if ( pLastRealWindow != pSVData->maWinData.mpLastDeacWin )
{
- pLastRealWindow->mpWindowImpl->mbActive = TRUE;
+ pLastRealWindow->mpWindowImpl->mbActive = sal_True;
pLastRealWindow->Activate();
}
}
@@ -3890,14 +3890,14 @@ void Window::ImplCallFocusChangeActivate( Window* pNewOverlapWindow,
{
if( pOldOverlapWindow->mpWindowImpl->mbActive )
{
- pOldOverlapWindow->mpWindowImpl->mbActive = FALSE;
+ pOldOverlapWindow->mpWindowImpl->mbActive = sal_False;
pOldOverlapWindow->Deactivate();
}
if ( pOldRealWindow != pOldOverlapWindow )
{
if( pOldRealWindow->mpWindowImpl->mbActive )
{
- pOldRealWindow->mpWindowImpl->mbActive = FALSE;
+ pOldRealWindow->mpWindowImpl->mbActive = sal_False;
pOldRealWindow->Deactivate();
}
}
@@ -3906,14 +3906,14 @@ void Window::ImplCallFocusChangeActivate( Window* pNewOverlapWindow,
{
if( ! pNewOverlapWindow->mpWindowImpl->mbActive )
{
- pNewOverlapWindow->mpWindowImpl->mbActive = TRUE;
+ pNewOverlapWindow->mpWindowImpl->mbActive = sal_True;
pNewOverlapWindow->Activate();
}
if ( pNewRealWindow != pNewOverlapWindow )
{
if( ! pNewRealWindow->mpWindowImpl->mbActive )
{
- pNewRealWindow->mpWindowImpl->mbActive = TRUE;
+ pNewRealWindow->mpWindowImpl->mbActive = sal_True;
pNewRealWindow->Activate();
}
}
@@ -3935,7 +3935,7 @@ static bool IsWindowFocused(const WindowImpl& rWinImpl)
}
// -----------------------------------------------------------------------
-void Window::ImplGrabFocus( USHORT nFlags )
+void Window::ImplGrabFocus( sal_uInt16 nFlags )
{
// #143570# no focus for destructing windows
if( mpWindowImpl->mbInDtor )
@@ -3993,13 +3993,13 @@ void Window::ImplGrabFocus( USHORT nFlags )
// which is done using ToTop
ImplSVData* pSVData = ImplGetSVData();
- BOOL bAsyncFocusWaiting = FALSE;
+ sal_Bool bAsyncFocusWaiting = sal_False;
Window *pFrame = pSVData->maWinData.mpFirstFrame;
while( pFrame )
{
if( pFrame != mpWindowImpl->mpFrameWindow && pFrame->mpWindowImpl->mpFrameData->mnFocusId )
{
- bAsyncFocusWaiting = TRUE;
+ bAsyncFocusWaiting = sal_True;
break;
}
pFrame = pFrame->mpWindowImpl->mpFrameData->mpNextFrame;
@@ -4007,7 +4007,7 @@ void Window::ImplGrabFocus( USHORT nFlags )
bool bHasFocus = IsWindowFocused(*mpWindowImpl);
- BOOL bMustNotGrabFocus = FALSE;
+ sal_Bool bMustNotGrabFocus = sal_False;
// #100242#, check parent hierarchy if some floater prohibits grab focus
Window *pParent = this;
@@ -4017,7 +4017,7 @@ void Window::ImplGrabFocus( USHORT nFlags )
// otherwise we cannot set the focus in a floating toolbox
if( ( (pParent->mpWindowImpl->mbFloatWin && ((FloatingWindow*)pParent)->GrabsFocus()) || ( pParent->GetStyle() & WB_SYSTEMFLOATWIN ) ) && !( pParent->GetStyle() & WB_MOVEABLE ) )
{
- bMustNotGrabFocus = TRUE;
+ bMustNotGrabFocus = sal_True;
break;
}
pParent = pParent->mpWindowImpl->mpParent;
@@ -4078,11 +4078,11 @@ void Window::ImplGrabFocus( USHORT nFlags )
{
Window* pNewOverlapWindow = ImplGetFirstOverlapWindow();
Window* pNewRealWindow = pNewOverlapWindow->ImplGetWindow();
- pNewOverlapWindow->mpWindowImpl->mbActive = TRUE;
+ pNewOverlapWindow->mpWindowImpl->mbActive = sal_True;
pNewOverlapWindow->Activate();
if ( pNewRealWindow != pNewOverlapWindow )
{
- pNewRealWindow->mpWindowImpl->mbActive = TRUE;
+ pNewRealWindow->mpWindowImpl->mbActive = sal_True;
pNewRealWindow->Activate();
}
}
@@ -4161,7 +4161,7 @@ void Window::ImplGrabFocus( USHORT nFlags )
else
pParent = pLastParent;
- pParent->mpWindowImpl->mbActive = FALSE;
+ pParent->mpWindowImpl->mbActive = sal_False;
pParent->Deactivate();
pDeactivateParent = pLastParent;
}
@@ -4184,7 +4184,7 @@ void Window::ImplGrabFocus( USHORT nFlags )
else
pParent = pLastParent;
- pParent->mpWindowImpl->mbActive = TRUE;
+ pParent->mpWindowImpl->mbActive = sal_True;
pParent->Activate();
pActivateParent = pLastParent;
}
@@ -4215,7 +4215,7 @@ void Window::ImplGrabFocus( USHORT nFlags )
{
if ( mpWindowImpl->mpCursor )
mpWindowImpl->mpCursor->ImplShow();
- mpWindowImpl->mbInFocusHdl = TRUE;
+ mpWindowImpl->mbInFocusHdl = sal_True;
mpWindowImpl->mnGetFocusFlags = nFlags;
// if we're changing focus due to closing a popup floating window
// notify the new focus window so it can restore the inner focus
@@ -4232,7 +4232,7 @@ void Window::ImplGrabFocus( USHORT nFlags )
if( !aDogTag.IsDelete() )
{
mpWindowImpl->mnGetFocusFlags = 0;
- mpWindowImpl->mbInFocusHdl = FALSE;
+ mpWindowImpl->mbInFocusHdl = sal_False;
}
}
}
@@ -4372,7 +4372,7 @@ Window::~Window()
xCanvasComponent->dispose();
}
- mpWindowImpl->mbInDtor = TRUE;
+ mpWindowImpl->mbInDtor = sal_True;
ImplCallEventListeners( VCLEVENT_OBJECT_DYING );
@@ -4435,7 +4435,7 @@ Window::~Window()
}
}
- UnoWrapperBase* pWrapper = Application::GetUnoWrapper( FALSE );
+ UnoWrapperBase* pWrapper = Application::GetUnoWrapper( sal_False );
if ( pWrapper )
pWrapper->WindowDestroyed( this );
@@ -4471,16 +4471,16 @@ Window::~Window()
pSVData->maWinData.mpDefDialogParent = NULL;
#ifdef DBG_UTIL
- if ( TRUE ) // always perform these tests in non-pro versions
+ if ( sal_True ) // always perform these tests in non-pro versions
{
ByteString aErrorStr;
- BOOL bError = FALSE;
+ sal_Bool bError = sal_False;
Window* pTempWin = mpWindowImpl->mpFrameData->mpFirstOverlap;
while ( pTempWin )
{
if ( ImplIsRealParentPath( pTempWin ) )
{
- bError = TRUE;
+ bError = sal_True;
lcl_appendWindowInfo( aErrorStr, *pTempWin );
}
pTempWin = pTempWin->mpWindowImpl->mpNextOverlap;
@@ -4495,13 +4495,13 @@ Window::~Window()
GetpApp()->Abort( String( aTempStr, RTL_TEXTENCODING_UTF8 ) ); // abort in non-pro version, this must be fixed!
}
- bError = FALSE;
+ bError = sal_False;
pTempWin = pSVData->maWinData.mpFirstFrame;
while ( pTempWin )
{
if ( ImplIsRealParentPath( pTempWin ) )
{
- bError = TRUE;
+ bError = sal_True;
lcl_appendWindowInfo( aErrorStr, *pTempWin );
}
pTempWin = pTempWin->mpWindowImpl->mpFrameData->mpNextFrame;
@@ -4608,11 +4608,11 @@ Window::~Window()
}
// check if the focus window is our child
- BOOL bHasFocussedChild = FALSE;
+ sal_Bool bHasFocussedChild = sal_False;
if( pSVData->maWinData.mpFocusWin && ImplIsRealParentPath( pSVData->maWinData.mpFocusWin ) )
{
// #122232#, this must not happen and is an application bug ! but we try some cleanup to hopefully avoid crashes, see below
- bHasFocussedChild = TRUE;
+ bHasFocussedChild = sal_True;
#ifdef DBG_UTIL
ByteString aTempStr( "Window (" );
aTempStr += ByteString( GetText(), RTL_TEXTENCODING_UTF8 );
@@ -4698,18 +4698,18 @@ Window::~Window()
ImplDelData* pDelData = mpWindowImpl->mpFirstDel;
while ( pDelData )
{
- pDelData->mbDel = TRUE;
+ pDelData->mbDel = sal_True;
pDelData->mpWindow = NULL; // #112873# pDel is not associated with a Window anymore
pDelData = pDelData->mpNext;
}
// Fenster aus den Listen austragen
- ImplRemoveWindow( TRUE );
+ ImplRemoveWindow( sal_True );
// de-register as "top window child" at our parent, if necessary
if ( mpWindowImpl->mbFrame )
{
- BOOL bIsTopWindow = mpWindowImpl->mpWinData && ( mpWindowImpl->mpWinData->mnIsTopWindow == 1 );
+ sal_Bool bIsTopWindow = mpWindowImpl->mpWinData && ( mpWindowImpl->mpWinData->mnIsTopWindow == 1 );
if ( mpWindowImpl->mpRealParent && bIsTopWindow )
{
ImplWinData* pParentWinData = mpWindowImpl->mpRealParent->ImplGetWinData();
@@ -4786,7 +4786,7 @@ void Window::doLazyDelete()
DockingWindow* pDockWin = dynamic_cast<DockingWindow*>(this);
if( pSysWin || ( pDockWin && pDockWin->IsFloatingMode() ) )
{
- Show( FALSE );
+ Show( sal_False );
SetParent( ImplGetDefaultWindow() );
}
vcl::LazyDeletor<Window>::Delete( this );
@@ -4802,7 +4802,7 @@ void Window::MouseMove( const MouseEvent& rMEvt )
NotifyEvent aNEvt( EVENT_MOUSEMOVE, this, &rMEvt );
if ( !Notify( aNEvt ) )
- mpWindowImpl->mbMouseMove = TRUE;
+ mpWindowImpl->mbMouseMove = sal_True;
}
// -----------------------------------------------------------------------
@@ -4815,7 +4815,7 @@ void Window::MouseButtonDown( const MouseEvent& rMEvt )
NotifyEvent aNEvt( EVENT_MOUSEBUTTONDOWN, this, &rMEvt );
if ( !Notify( aNEvt ) )
- mpWindowImpl->mbMouseButtonDown = TRUE;
+ mpWindowImpl->mbMouseButtonDown = sal_True;
}
// -----------------------------------------------------------------------
@@ -4828,7 +4828,7 @@ void Window::MouseButtonUp( const MouseEvent& rMEvt )
NotifyEvent aNEvt( EVENT_MOUSEBUTTONUP, this, &rMEvt );
if ( !Notify( aNEvt ) )
- mpWindowImpl->mbMouseButtonUp = TRUE;
+ mpWindowImpl->mbMouseButtonUp = sal_True;
}
// -----------------------------------------------------------------------
@@ -4841,7 +4841,7 @@ void Window::KeyInput( const KeyEvent& rKEvt )
NotifyEvent aNEvt( EVENT_KEYINPUT, this, &rKEvt );
if ( !Notify( aNEvt ) )
- mpWindowImpl->mbKeyInput = TRUE;
+ mpWindowImpl->mbKeyInput = sal_True;
}
// -----------------------------------------------------------------------
@@ -4854,7 +4854,7 @@ void Window::KeyUp( const KeyEvent& rKEvt )
NotifyEvent aNEvt( EVENT_KEYUP, this, &rKEvt );
if ( !Notify( aNEvt ) )
- mpWindowImpl->mbKeyUp = TRUE;
+ mpWindowImpl->mbKeyUp = sal_True;
}
// -----------------------------------------------------------------------
@@ -4876,7 +4876,7 @@ void Window::Paint( const Rectangle& rRect )
// -----------------------------------------------------------------------
-void Window::Draw( OutputDevice*, const Point&, const Size&, ULONG )
+void Window::Draw( OutputDevice*, const Point&, const Size&, sal_uIntPtr )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
}
@@ -4982,7 +4982,7 @@ void Window::RequestHelp( const HelpEvent& rHEvt )
{
SmartId aSmartId = GetSmartHelpId();
- ULONG nNumHelpId = 0;
+ sal_uIntPtr nNumHelpId = 0;
String aStrHelpId;
if( aSmartId.HasString() )
aStrHelpId = aSmartId.GetStr();
@@ -5020,7 +5020,7 @@ void Window::Command( const CommandEvent& rCEvt )
NotifyEvent aNEvt( EVENT_COMMAND, this, &rCEvt );
if ( !Notify( aNEvt ) )
- mpWindowImpl->mbCommand = TRUE;
+ mpWindowImpl->mbCommand = sal_True;
}
// -----------------------------------------------------------------------
@@ -5036,7 +5036,7 @@ void Window::Tracking( const TrackingEvent& rTEvt )
// -----------------------------------------------------------------------
-void Window::UserEvent( ULONG, void* )
+void Window::UserEvent( sal_uIntPtr, void* )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
}
@@ -5164,7 +5164,7 @@ long Window::PreNotify( NotifyEvent& rNEvt )
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
}
- long bDone = FALSE;
+ long bDone = sal_False;
if ( mpWindowImpl->mpParent && !ImplIsOverlapWindow() )
bDone = mpWindowImpl->mpParent->PreNotify( rNEvt );
@@ -5172,11 +5172,11 @@ long Window::PreNotify( NotifyEvent& rNEvt )
{
if( rNEvt.GetType() == EVENT_GETFOCUS )
{
- BOOL bCompoundFocusChanged = FALSE;
+ sal_Bool bCompoundFocusChanged = sal_False;
if ( mpWindowImpl->mbCompoundControl && !mpWindowImpl->mbCompoundControlHasFocus && HasChildPathFocus() )
{
- mpWindowImpl->mbCompoundControlHasFocus = TRUE;
- bCompoundFocusChanged = TRUE;
+ mpWindowImpl->mbCompoundControlHasFocus = sal_True;
+ bCompoundFocusChanged = sal_True;
}
if ( bCompoundFocusChanged || ( rNEvt.GetWindow() == this ) )
@@ -5184,11 +5184,11 @@ long Window::PreNotify( NotifyEvent& rNEvt )
}
else if( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
- BOOL bCompoundFocusChanged = FALSE;
+ sal_Bool bCompoundFocusChanged = sal_False;
if ( mpWindowImpl->mbCompoundControl && mpWindowImpl->mbCompoundControlHasFocus && !HasChildPathFocus() )
{
- mpWindowImpl->mbCompoundControlHasFocus = FALSE ;
- bCompoundFocusChanged = TRUE;
+ mpWindowImpl->mbCompoundControlHasFocus = sal_False ;
+ bCompoundFocusChanged = sal_True;
}
if ( bCompoundFocusChanged || ( rNEvt.GetWindow() == this ) )
@@ -5253,7 +5253,7 @@ long Window::Notify( NotifyEvent& rNEvt )
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
}
- long nRet = FALSE;
+ long nRet = sal_False;
// check for docking window
// but do nothing if window is docked and locked
@@ -5263,27 +5263,27 @@ long Window::Notify( NotifyEvent& rNEvt )
if ( rNEvt.GetType() == EVENT_MOUSEBUTTONDOWN )
{
const MouseEvent* pMEvt = rNEvt.GetMouseEvent();
- BOOL bHit = pWrapper->GetDragArea().IsInside( pMEvt->GetPosPixel() );
+ sal_Bool bHit = pWrapper->GetDragArea().IsInside( pMEvt->GetPosPixel() );
if ( pMEvt->IsLeft() )
{
if ( pMEvt->IsMod1() && (pMEvt->GetClicks() == 2) )
{
// ctrl double click toggles floating mode
pWrapper->SetFloatingMode( !pWrapper->IsFloatingMode() );
- return TRUE;
+ return sal_True;
}
else if ( pMEvt->GetClicks() == 1 && bHit)
{
// allow start docking during mouse move
pWrapper->ImplEnableStartDocking();
- return TRUE;
+ return sal_True;
}
}
}
else if ( rNEvt.GetType() == EVENT_MOUSEMOVE )
{
const MouseEvent* pMEvt = rNEvt.GetMouseEvent();
- BOOL bHit = pWrapper->GetDragArea().IsInside( pMEvt->GetPosPixel() );
+ sal_Bool bHit = pWrapper->GetDragArea().IsInside( pMEvt->GetPosPixel() );
if ( pMEvt->IsLeft() )
{
// check if a single click initiated this sequence ( ImplStartDockingEnabled() )
@@ -5300,7 +5300,7 @@ long Window::Notify( NotifyEvent& rNEvt )
}
pWrapper->ImplStartDocking( aPos );
}
- return TRUE;
+ return sal_True;
}
}
else if( rNEvt.GetType() == EVENT_KEYINPUT )
@@ -5318,7 +5318,7 @@ long Window::Notify( NotifyEvent& rNEvt )
*/
if( pWrapper->IsFloatingMode() )
ToTop( TOTOP_GRABFOCUSONLY );
- return TRUE;
+ return sal_True;
}
}
}
@@ -5341,7 +5341,7 @@ long Window::Notify( NotifyEvent& rNEvt )
if ( (rNEvt.GetWindow() == this) && (rNEvt.GetType() == EVENT_GETFOCUS) &&
!(GetStyle() & WB_TABSTOP) && !(mpWindowImpl->mnDlgCtrlFlags & WINDOW_DLGCTRL_WANTFOCUS) )
{
- USHORT n = 0;
+ sal_uInt16 n = 0;
Window* pFirstChild = ImplGetDlgWindow( n, DLGWINDOW_FIRST );
if ( pFirstChild )
pFirstChild->ImplControlFocus();
@@ -5360,7 +5360,7 @@ long Window::Notify( NotifyEvent& rNEvt )
// -----------------------------------------------------------------------
-void Window::ImplCallEventListeners( ULONG nEvent, void* pData )
+void Window::ImplCallEventListeners( sal_uIntPtr nEvent, void* pData )
{
// The implementation was moved to CallEventListeners(),
// because derived classes in svtools must be able to
@@ -5373,7 +5373,7 @@ void Window::ImplCallEventListeners( ULONG nEvent, void* pData )
// -----------------------------------------------------------------------
-void Window::CallEventListeners( ULONG nEvent, void* pData )
+void Window::CallEventListeners( sal_uIntPtr nEvent, void* pData )
{
VclWindowEvent aEvent( this, nEvent, pData );
@@ -5445,25 +5445,25 @@ void Window::RemoveChildEventListener( const Link& rEventListener )
// -----------------------------------------------------------------------
-ULONG Window::PostUserEvent( ULONG nEvent, void* pEventData )
+sal_uIntPtr Window::PostUserEvent( sal_uIntPtr nEvent, void* pEventData )
{
- ULONG nEventId;
+ sal_uIntPtr nEventId;
PostUserEvent( nEventId, nEvent, pEventData );
return nEventId;
}
// -----------------------------------------------------------------------
-ULONG Window::PostUserEvent( const Link& rLink, void* pCaller )
+sal_uIntPtr Window::PostUserEvent( const Link& rLink, void* pCaller )
{
- ULONG nEventId;
+ sal_uIntPtr nEventId;
PostUserEvent( nEventId, rLink, pCaller );
return nEventId;
}
// -----------------------------------------------------------------------
-BOOL Window::PostUserEvent( ULONG& rEventId, ULONG nEvent, void* pEventData )
+sal_Bool Window::PostUserEvent( sal_uIntPtr& rEventId, sal_uIntPtr nEvent, void* pEventData )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -5472,23 +5472,23 @@ BOOL Window::PostUserEvent( ULONG& rEventId, ULONG nEvent, void* pEventData )
pSVEvent->mpData = pEventData;
pSVEvent->mpLink = NULL;
pSVEvent->mpWindow = this;
- pSVEvent->mbCall = TRUE;
+ pSVEvent->mbCall = sal_True;
ImplAddDel( &(pSVEvent->maDelData) );
- rEventId = (ULONG)pSVEvent;
+ rEventId = (sal_uIntPtr)pSVEvent;
if ( mpWindowImpl->mpFrame->PostEvent( pSVEvent ) )
- return TRUE;
+ return sal_True;
else
{
rEventId = 0;
ImplRemoveDel( &(pSVEvent->maDelData) );
delete pSVEvent;
- return FALSE;
+ return sal_False;
}
}
// -----------------------------------------------------------------------
-BOOL Window::PostUserEvent( ULONG& rEventId, const Link& rLink, void* pCaller )
+sal_Bool Window::PostUserEvent( sal_uIntPtr& rEventId, const Link& rLink, void* pCaller )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -5497,23 +5497,23 @@ BOOL Window::PostUserEvent( ULONG& rEventId, const Link& rLink, void* pCaller )
pSVEvent->mpData = pCaller;
pSVEvent->mpLink = new Link( rLink );
pSVEvent->mpWindow = this;
- pSVEvent->mbCall = TRUE;
+ pSVEvent->mbCall = sal_True;
ImplAddDel( &(pSVEvent->maDelData) );
- rEventId = (ULONG)pSVEvent;
+ rEventId = (sal_uIntPtr)pSVEvent;
if ( mpWindowImpl->mpFrame->PostEvent( pSVEvent ) )
- return TRUE;
+ return sal_True;
else
{
rEventId = 0;
ImplRemoveDel( &(pSVEvent->maDelData) );
delete pSVEvent;
- return FALSE;
+ return sal_False;
}
}
// -----------------------------------------------------------------------
-void Window::RemoveUserEvent( ULONG nUserEvent )
+void Window::RemoveUserEvent( sal_uIntPtr nUserEvent )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -5530,14 +5530,14 @@ void Window::RemoveUserEvent( ULONG nUserEvent )
pSVEvent->mpWindow = NULL;
}
- pSVEvent->mbCall = FALSE;
+ pSVEvent->mbCall = sal_False;
}
// -----------------------------------------------------------------------
IMPL_LINK( Window, ImplAsyncStateChangedHdl, void*, pState )
{
- StateChanged( (StateChangedType)(ULONG)pState );
+ StateChanged( (StateChangedType)(sal_uIntPtr)pState );
return 0;
}
@@ -5547,28 +5547,28 @@ void Window::PostStateChanged( StateChangedType nState )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
- PostUserEvent( LINK( this, Window, ImplAsyncStateChangedHdl ), (void*)(ULONG)nState );
+ PostUserEvent( LINK( this, Window, ImplAsyncStateChangedHdl ), (void*)(sal_uIntPtr)nState );
}
// -----------------------------------------------------------------------
-BOOL Window::IsLocked( BOOL bChilds ) const
+sal_Bool Window::IsLocked( sal_Bool bChilds ) const
{
if ( mpWindowImpl->mnLockCount != 0 )
- return TRUE;
+ return sal_True;
if ( bChilds || mpWindowImpl->mbChildNotify )
{
Window* pChild = mpWindowImpl->mpFirstChild;
while ( pChild )
{
- if ( pChild->IsLocked( TRUE ) )
- return TRUE;
+ if ( pChild->IsLocked( sal_True ) )
+ return sal_True;
pChild = pChild->mpWindowImpl->mpNext;
}
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -5626,7 +5626,7 @@ SystemWindow* Window::GetSystemWindow() const
// -----------------------------------------------------------------------
-void Window::SetBorderStyle( USHORT nBorderStyle )
+void Window::SetBorderStyle( sal_uInt16 nBorderStyle )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -5669,7 +5669,7 @@ void Window::SetBorderStyle( USHORT nBorderStyle )
// -----------------------------------------------------------------------
-USHORT Window::GetBorderStyle() const
+sal_uInt16 Window::GetBorderStyle() const
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -5717,7 +5717,7 @@ long Window::CalcTitleWidth() const
// -----------------------------------------------------------------------
-void Window::EnableClipSiblings( BOOL bClipSiblings )
+void Window::EnableClipSiblings( sal_Bool bClipSiblings )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -5729,7 +5729,7 @@ void Window::EnableClipSiblings( BOOL bClipSiblings )
// -----------------------------------------------------------------------
-void Window::SetMouseTransparent( BOOL bTransparent )
+void Window::SetMouseTransparent( sal_Bool bTransparent )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -5744,7 +5744,7 @@ void Window::SetMouseTransparent( BOOL bTransparent )
// -----------------------------------------------------------------------
-void Window::SetPaintTransparent( BOOL bTransparent )
+void Window::SetPaintTransparent( sal_Bool bTransparent )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -5771,7 +5771,7 @@ void Window::SetInputContext( const InputContext& rInputContext )
// -----------------------------------------------------------------------
-void Window::EndExtTextInput( USHORT nFlags )
+void Window::EndExtTextInput( sal_uInt16 nFlags )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -5829,24 +5829,24 @@ long Window::GetCursorExtTextInputWidth() const
// -----------------------------------------------------------------------
void Window::SetSettings( const AllSettings& rSettings )
{
- SetSettings( rSettings, FALSE );
+ SetSettings( rSettings, sal_False );
}
-void Window::SetSettings( const AllSettings& rSettings, BOOL bChild )
+void Window::SetSettings( const AllSettings& rSettings, sal_Bool bChild )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
if ( mpWindowImpl->mpBorderWindow )
{
- mpWindowImpl->mpBorderWindow->SetSettings( rSettings, FALSE );
+ mpWindowImpl->mpBorderWindow->SetSettings( rSettings, sal_False );
if ( (mpWindowImpl->mpBorderWindow->GetType() == WINDOW_BORDERWINDOW) &&
((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->mpMenuBarWindow )
- ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->mpMenuBarWindow->SetSettings( rSettings, TRUE );
+ ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->mpMenuBarWindow->SetSettings( rSettings, sal_True );
}
AllSettings aOldSettings = maSettings;
OutputDevice::SetSettings( rSettings );
- ULONG nChangeFlags = aOldSettings.GetChangeFlags( rSettings );
+ sal_uIntPtr nChangeFlags = aOldSettings.GetChangeFlags( rSettings );
// AppFont-Aufloesung und DPI-Aufloesung neu berechnen
ImplInitResolutionSettings();
@@ -5870,20 +5870,20 @@ void Window::SetSettings( const AllSettings& rSettings, BOOL bChild )
// -----------------------------------------------------------------------
-void Window::UpdateSettings( const AllSettings& rSettings, BOOL bChild )
+void Window::UpdateSettings( const AllSettings& rSettings, sal_Bool bChild )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
if ( mpWindowImpl->mpBorderWindow )
{
- mpWindowImpl->mpBorderWindow->UpdateSettings( rSettings, FALSE );
+ mpWindowImpl->mpBorderWindow->UpdateSettings( rSettings, sal_False );
if ( (mpWindowImpl->mpBorderWindow->GetType() == WINDOW_BORDERWINDOW) &&
((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->mpMenuBarWindow )
- ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->mpMenuBarWindow->UpdateSettings( rSettings, TRUE );
+ ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->mpMenuBarWindow->UpdateSettings( rSettings, sal_True );
}
AllSettings aOldSettings = maSettings;
- ULONG nChangeFlags = maSettings.Update( maSettings.GetWindowUpdate(), rSettings );
+ sal_uIntPtr nChangeFlags = maSettings.Update( maSettings.GetWindowUpdate(), rSettings );
nChangeFlags |= SETTINGS_IN_UPDATE_SETTINGS; // Set this flag so the receiver of the data changed
// event can distinguish between the changing of global
// setting and a local change ( with SetSettings )
@@ -5984,7 +5984,7 @@ void Window::GetFontResolution( sal_Int32& nDPIX, sal_Int32& nDPIY ) const
// -----------------------------------------------------------------------
-void Window::SetParentClipMode( USHORT nMode )
+void Window::SetParentClipMode( sal_uInt16 nMode )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -5996,14 +5996,14 @@ void Window::SetParentClipMode( USHORT nMode )
{
mpWindowImpl->mnParentClipMode = nMode;
if ( nMode & PARENTCLIPMODE_CLIP )
- mpWindowImpl->mpParent->mpWindowImpl->mbClipChildren = TRUE;
+ mpWindowImpl->mpParent->mpWindowImpl->mbClipChildren = sal_True;
}
}
}
// -----------------------------------------------------------------------
-USHORT Window::GetParentClipMode() const
+sal_uInt16 Window::GetParentClipMode() const
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -6024,7 +6024,7 @@ void Window::SetWindowRegionPixel()
else if( mpWindowImpl->mbFrame )
{
mpWindowImpl->maWinRegion = Region( REGION_NULL);
- mpWindowImpl->mbWinRegion = FALSE;
+ mpWindowImpl->mbWinRegion = sal_False;
mpWindowImpl->mpFrame->ResetClipRegion();
}
else
@@ -6032,7 +6032,7 @@ void Window::SetWindowRegionPixel()
if ( mpWindowImpl->mbWinRegion )
{
mpWindowImpl->maWinRegion = Region( REGION_NULL );
- mpWindowImpl->mbWinRegion = FALSE;
+ mpWindowImpl->mbWinRegion = sal_False;
ImplSetClipFlag();
if ( IsReallyVisible() )
@@ -6071,9 +6071,9 @@ void Window::SetWindowRegionPixel( const Region& rRegion )
long nY;
long nWidth;
long nHeight;
- ULONG nRectCount;
+ sal_uIntPtr nRectCount;
ImplRegionInfo aInfo;
- BOOL bRegionRect;
+ sal_Bool bRegionRect;
nRectCount = mpWindowImpl->maWinRegion.GetRectCount();
mpWindowImpl->mpFrame->BeginSetClipRegion( nRectCount );
@@ -6093,24 +6093,24 @@ void Window::SetWindowRegionPixel( const Region& rRegion )
}
else
{
- BOOL bInvalidate = FALSE;
+ sal_Bool bInvalidate = sal_False;
if ( rRegion.GetType() == REGION_NULL )
{
if ( mpWindowImpl->mbWinRegion )
{
mpWindowImpl->maWinRegion = Region( REGION_NULL );
- mpWindowImpl->mbWinRegion = FALSE;
+ mpWindowImpl->mbWinRegion = sal_False;
ImplSetClipFlag();
- bInvalidate = TRUE;
+ bInvalidate = sal_True;
}
}
else
{
mpWindowImpl->maWinRegion = rRegion;
- mpWindowImpl->mbWinRegion = TRUE;
+ mpWindowImpl->mbWinRegion = sal_True;
ImplSetClipFlag();
- bInvalidate = TRUE;
+ bInvalidate = sal_True;
}
if ( IsReallyVisible() )
@@ -6141,7 +6141,7 @@ const Region& Window::GetWindowRegionPixel() const
// -----------------------------------------------------------------------
-BOOL Window::IsWindowRegionPixel() const
+sal_Bool Window::IsWindowRegionPixel() const
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -6153,7 +6153,7 @@ BOOL Window::IsWindowRegionPixel() const
// -----------------------------------------------------------------------
-Region Window::GetWindowClipRegionPixel( USHORT nFlags ) const
+Region Window::GetWindowClipRegionPixel( sal_uInt16 nFlags ) const
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -6224,7 +6224,7 @@ void Window::ExpandPaintClipRegion( const Region& rRegion )
if( ! aDevPixRegion.IsEmpty() )
{
mpWindowImpl->mpPaintRegion->Union( aDevPixRegion );
- mbInitClipRegion = TRUE;
+ mbInitClipRegion = sal_True;
}
}
}
@@ -6259,13 +6259,13 @@ void Window::SetParent( Window* pNewParent )
// check if the taskpanelist would change and move the window pointer accordingly
SystemWindow *pSysWin = ImplGetLastSystemWindow(this);
SystemWindow *pNewSysWin = NULL;
- BOOL bChangeTaskPaneList = FALSE;
+ sal_Bool bChangeTaskPaneList = sal_False;
if( pSysWin && pSysWin->ImplIsInTaskPaneList( this ) )
{
pNewSysWin = ImplGetLastSystemWindow( pNewParent );
if( pNewSysWin && pNewSysWin != pSysWin )
{
- bChangeTaskPaneList = TRUE;
+ bChangeTaskPaneList = sal_True;
pSysWin->GetTaskPaneList()->RemoveWindow( this );
}
}
@@ -6294,8 +6294,8 @@ void Window::SetParent( Window* pNewParent )
if ( mpWindowImpl->mbFrame )
mpWindowImpl->mpFrame->SetParent( pNewParent->mpWindowImpl->mpFrame );
- BOOL bVisible = IsVisible();
- Show( FALSE, SHOW_NOFOCUSCHANGE );
+ sal_Bool bVisible = IsVisible();
+ Show( sal_False, SHOW_NOFOCUSCHANGE );
// Testen, ob sich das Overlap-Window aendert
Window* pOldOverlapWindow;
@@ -6312,9 +6312,9 @@ void Window::SetParent( Window* pNewParent )
}
// Fenster in der Hirachie umsetzen
- BOOL bFocusOverlapWin = HasChildPathFocus( TRUE );
- BOOL bFocusWin = HasChildPathFocus();
- BOOL bNewFrame = pNewParent->mpWindowImpl->mpFrameWindow != mpWindowImpl->mpFrameWindow;
+ sal_Bool bFocusOverlapWin = HasChildPathFocus( sal_True );
+ sal_Bool bFocusWin = HasChildPathFocus();
+ sal_Bool bNewFrame = pNewParent->mpWindowImpl->mpFrameWindow != mpWindowImpl->mpFrameWindow;
if ( bNewFrame )
{
if ( mpWindowImpl->mpFrameData->mpFocusWin )
@@ -6336,7 +6336,7 @@ void Window::SetParent( Window* pNewParent )
ImplRemoveWindow( bNewFrame );
ImplInsertWindow( pNewParent );
if ( mpWindowImpl->mnParentClipMode & PARENTCLIPMODE_CLIP )
- pNewParent->mpWindowImpl->mbClipChildren = TRUE;
+ pNewParent->mpWindowImpl->mbClipChildren = sal_True;
ImplUpdateWindowPtr();
if ( ImplUpdatePos() )
ImplUpdateSysObjPos();
@@ -6375,7 +6375,7 @@ void Window::SetParent( Window* pNewParent )
}
// Activate-Status beim naechsten Overlap-Window updaten
- if ( HasChildPathFocus( TRUE ) )
+ if ( HasChildPathFocus( sal_True ) )
ImplCallFocusChangeActivate( pNewOverlapWindow, pOldOverlapWindow );
}
@@ -6411,12 +6411,12 @@ void Window::SetParent( Window* pNewParent )
ImplGetOwnerDrawList().push_back( this );
if ( bVisible )
- Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE );
+ Show( sal_True, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE );
}
// -----------------------------------------------------------------------
-void Window::Show( BOOL bVisible, USHORT nFlags )
+void Window::Show( sal_Bool bVisible, sal_uInt16 nFlags )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -6425,7 +6425,7 @@ void Window::Show( BOOL bVisible, USHORT nFlags )
ImplDelData aDogTag( this );
- BOOL bRealVisibilityChanged = FALSE;
+ sal_Bool bRealVisibilityChanged = sal_False;
mpWindowImpl->mbVisible = (bVisible != 0);
if ( !bVisible )
@@ -6436,16 +6436,16 @@ void Window::Show( BOOL bVisible, USHORT nFlags )
if ( mpWindowImpl->mpBorderWindow )
{
- BOOL bOldUpdate = mpWindowImpl->mpBorderWindow->mpWindowImpl->mbNoParentUpdate;
+ sal_Bool bOldUpdate = mpWindowImpl->mpBorderWindow->mpWindowImpl->mbNoParentUpdate;
if ( mpWindowImpl->mbNoParentUpdate )
- mpWindowImpl->mpBorderWindow->mpWindowImpl->mbNoParentUpdate = TRUE;
- mpWindowImpl->mpBorderWindow->Show( FALSE, nFlags );
+ mpWindowImpl->mpBorderWindow->mpWindowImpl->mbNoParentUpdate = sal_True;
+ mpWindowImpl->mpBorderWindow->Show( sal_False, nFlags );
mpWindowImpl->mpBorderWindow->mpWindowImpl->mbNoParentUpdate = bOldUpdate;
}
else if ( mpWindowImpl->mbFrame )
{
- mpWindowImpl->mbSuppressAccessibilityEvents = TRUE;
- mpWindowImpl->mpFrame->Show( FALSE, FALSE );
+ mpWindowImpl->mbSuppressAccessibilityEvents = sal_True;
+ mpWindowImpl->mpFrame->Show( sal_False, sal_False );
}
StateChanged( STATE_CHANGE_VISIBLE );
@@ -6453,12 +6453,12 @@ void Window::Show( BOOL bVisible, USHORT nFlags )
if ( mpWindowImpl->mbReallyVisible )
{
Region aInvRegion( REGION_EMPTY );
- BOOL bSaveBack = FALSE;
+ sal_Bool bSaveBack = sal_False;
if ( ImplIsOverlapWindow() && !mpWindowImpl->mbFrame )
{
if ( ImplRestoreOverlapBackground( aInvRegion ) )
- bSaveBack = TRUE;
+ bSaveBack = sal_True;
}
if ( !bSaveBack )
@@ -6553,7 +6553,7 @@ void Window::Show( BOOL bVisible, USHORT nFlags )
if ( ImplIsOverlapWindow() && !(nFlags & SHOW_NOACTIVATE) )
{
ImplStartToTop(( nFlags & SHOW_FOREGROUNDTASK ) ? TOTOP_FOREGROUNDTASK : 0 );
- ImplFocusToTop( 0, FALSE );
+ ImplFocusToTop( 0, sal_False );
}
// Hintergrund sichern
@@ -6568,7 +6568,7 @@ void Window::Show( BOOL bVisible, USHORT nFlags )
if ( !mpWindowImpl->mbFrame )
{
- USHORT nInvalidateFlags = INVALIDATE_CHILDREN;
+ sal_uInt16 nInvalidateFlags = INVALIDATE_CHILDREN;
if( ! IsPaintTransparent() )
nInvalidateFlags |= INVALIDATE_NOTRANSPARENT;
ImplInvalidate( NULL, nInvalidateFlags );
@@ -6577,7 +6577,7 @@ void Window::Show( BOOL bVisible, USHORT nFlags )
}
if ( mpWindowImpl->mpBorderWindow )
- mpWindowImpl->mpBorderWindow->Show( TRUE, nFlags );
+ mpWindowImpl->mpBorderWindow->Show( sal_True, nFlags );
else if ( mpWindowImpl->mbFrame )
{
ImplSVData* pSVData = ImplGetSVData();
@@ -6586,11 +6586,11 @@ void Window::Show( BOOL bVisible, USHORT nFlags )
pSVData->mpIntroWindow->Hide();
//DBG_ASSERT( !mpWindowImpl->mbSuppressAccessibilityEvents, "Window::Show() - Frame reactivated");
- mpWindowImpl->mbSuppressAccessibilityEvents = FALSE;
+ mpWindowImpl->mbSuppressAccessibilityEvents = sal_False;
- mpWindowImpl->mbPaintFrame = TRUE;
- BOOL bNoActivate = (nFlags & (SHOW_NOACTIVATE|SHOW_NOFOCUSCHANGE)) ? TRUE : FALSE;
- mpWindowImpl->mpFrame->Show( TRUE, bNoActivate );
+ mpWindowImpl->mbPaintFrame = sal_True;
+ sal_Bool bNoActivate = (nFlags & (SHOW_NOACTIVATE|SHOW_NOFOCUSCHANGE)) ? sal_True : sal_False;
+ mpWindowImpl->mpFrame->Show( sal_True, bNoActivate );
if( aDogTag.IsDelete() )
return;
@@ -6711,10 +6711,10 @@ void Window::Enable( bool bEnable, bool bChild )
if ( mpWindowImpl->mpBorderWindow )
{
- mpWindowImpl->mpBorderWindow->Enable( bEnable, FALSE );
+ mpWindowImpl->mpBorderWindow->Enable( bEnable, sal_False );
if ( (mpWindowImpl->mpBorderWindow->GetType() == WINDOW_BORDERWINDOW) &&
((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->mpMenuBarWindow )
- ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->mpMenuBarWindow->Enable( bEnable, TRUE );
+ ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->mpMenuBarWindow->Enable( bEnable, sal_True );
}
// #i56102# restore app focus win in case the
@@ -6756,7 +6756,7 @@ void Window::Enable( bool bEnable, bool bChild )
void Window::SetCallHandlersOnInputDisabled( bool bCall )
{
- mpWindowImpl->mbCallHandlersDuringInputDisabled = bCall ? TRUE : FALSE;
+ mpWindowImpl->mbCallHandlersDuringInputDisabled = bCall ? sal_True : sal_False;
Window* pChild = mpWindowImpl->mpFirstChild;
while ( pChild )
@@ -6775,17 +6775,17 @@ bool Window::IsCallHandlersOnInputDisabled() const
// -----------------------------------------------------------------------
-void Window::EnableInput( BOOL bEnable, BOOL bChild )
+void Window::EnableInput( sal_Bool bEnable, sal_Bool bChild )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
- BOOL bNotify = (bEnable != mpWindowImpl->mbInputDisabled);
+ sal_Bool bNotify = (bEnable != mpWindowImpl->mbInputDisabled);
if ( mpWindowImpl->mpBorderWindow )
{
- mpWindowImpl->mpBorderWindow->EnableInput( bEnable, FALSE );
+ mpWindowImpl->mpBorderWindow->EnableInput( bEnable, sal_False );
if ( (mpWindowImpl->mpBorderWindow->GetType() == WINDOW_BORDERWINDOW) &&
((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->mpMenuBarWindow )
- ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->mpMenuBarWindow->EnableInput( bEnable, TRUE );
+ ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->mpMenuBarWindow->EnableInput( bEnable, sal_True );
}
if ( (! bEnable && mpWindowImpl->meAlwaysInputMode != AlwaysInputEnabled) ||
@@ -6843,7 +6843,7 @@ void Window::EnableInput( BOOL bEnable, BOOL bChild )
// -----------------------------------------------------------------------
-void Window::EnableInput( BOOL bEnable, BOOL bChild, BOOL bSysWin,
+void Window::EnableInput( sal_Bool bEnable, sal_Bool bChild, sal_Bool bSysWin,
const Window* pExcludeWindow )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -6859,11 +6859,11 @@ void Window::EnableInput( BOOL bEnable, BOOL bChild, BOOL bSysWin,
while ( pSysWin )
{
// Is Window in the path from this window
- if ( ImplGetFirstOverlapWindow()->ImplIsWindowOrChild( pSysWin, TRUE ) )
+ if ( ImplGetFirstOverlapWindow()->ImplIsWindowOrChild( pSysWin, sal_True ) )
{
// Is Window not in the exclude window path or not the
// exclude window, than change the status
- if ( !pExcludeWindow || !pExcludeWindow->ImplIsWindowOrChild( pSysWin, TRUE ) )
+ if ( !pExcludeWindow || !pExcludeWindow->ImplIsWindowOrChild( pSysWin, sal_True ) )
pSysWin->EnableInput( bEnable, bChild );
}
pSysWin = pSysWin->mpWindowImpl->mpNextOverlap;
@@ -6876,11 +6876,11 @@ void Window::EnableInput( BOOL bEnable, BOOL bChild, BOOL bSysWin,
if( pFrameWin->ImplIsFloatingWindow() )
{
// Is Window in the path from this window
- if ( ImplGetFirstOverlapWindow()->ImplIsWindowOrChild( pFrameWin, TRUE ) )
+ if ( ImplGetFirstOverlapWindow()->ImplIsWindowOrChild( pFrameWin, sal_True ) )
{
// Is Window not in the exclude window path or not the
// exclude window, than change the status
- if ( !pExcludeWindow || !pExcludeWindow->ImplIsWindowOrChild( pFrameWin, TRUE ) )
+ if ( !pExcludeWindow || !pExcludeWindow->ImplIsWindowOrChild( pFrameWin, sal_True ) )
pFrameWin->EnableInput( bEnable, bChild );
}
}
@@ -6895,11 +6895,11 @@ void Window::EnableInput( BOOL bEnable, BOOL bChild, BOOL bSysWin,
while( p != rList.end() )
{
// Is Window in the path from this window
- if ( ImplGetFirstOverlapWindow()->ImplIsWindowOrChild( (*p), TRUE ) )
+ if ( ImplGetFirstOverlapWindow()->ImplIsWindowOrChild( (*p), sal_True ) )
{
// Is Window not in the exclude window path or not the
// exclude window, than change the status
- if ( !pExcludeWindow || !pExcludeWindow->ImplIsWindowOrChild( (*p), TRUE ) )
+ if ( !pExcludeWindow || !pExcludeWindow->ImplIsWindowOrChild( (*p), sal_True ) )
(*p)->EnableInput( bEnable, bChild );
}
p++;
@@ -6910,19 +6910,19 @@ void Window::EnableInput( BOOL bEnable, BOOL bChild, BOOL bSysWin,
// -----------------------------------------------------------------------
-void Window::AlwaysEnableInput( BOOL bAlways, BOOL bChild )
+void Window::AlwaysEnableInput( sal_Bool bAlways, sal_Bool bChild )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
if ( mpWindowImpl->mpBorderWindow )
- mpWindowImpl->mpBorderWindow->AlwaysEnableInput( bAlways, FALSE );
+ mpWindowImpl->mpBorderWindow->AlwaysEnableInput( bAlways, sal_False );
if( bAlways && mpWindowImpl->meAlwaysInputMode != AlwaysInputEnabled )
{
mpWindowImpl->meAlwaysInputMode = AlwaysInputEnabled;
if ( bAlways )
- EnableInput( TRUE, FALSE );
+ EnableInput( sal_True, sal_False );
}
else if( ! bAlways && mpWindowImpl->meAlwaysInputMode == AlwaysInputEnabled )
{
@@ -6942,19 +6942,19 @@ void Window::AlwaysEnableInput( BOOL bAlways, BOOL bChild )
// -----------------------------------------------------------------------
-void Window::AlwaysDisableInput( BOOL bAlways, BOOL bChild )
+void Window::AlwaysDisableInput( sal_Bool bAlways, sal_Bool bChild )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
if ( mpWindowImpl->mpBorderWindow )
- mpWindowImpl->mpBorderWindow->AlwaysDisableInput( bAlways, FALSE );
+ mpWindowImpl->mpBorderWindow->AlwaysDisableInput( bAlways, sal_False );
if( bAlways && mpWindowImpl->meAlwaysInputMode != AlwaysInputDisabled )
{
mpWindowImpl->meAlwaysInputMode = AlwaysInputDisabled;
if ( bAlways )
- EnableInput( FALSE, FALSE );
+ EnableInput( sal_False, sal_False );
}
else if( ! bAlways && mpWindowImpl->meAlwaysInputMode == AlwaysInputDisabled )
{
@@ -6974,7 +6974,7 @@ void Window::AlwaysDisableInput( BOOL bAlways, BOOL bChild )
// -----------------------------------------------------------------------
-void Window::SetActivateMode( USHORT nMode )
+void Window::SetActivateMode( sal_uInt16 nMode )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -6989,9 +6989,9 @@ void Window::SetActivateMode( USHORT nMode )
if ( mpWindowImpl->mnActivateMode )
{
if ( (mpWindowImpl->mbActive || (GetType() == WINDOW_BORDERWINDOW)) &&
- !HasChildPathFocus( TRUE ) )
+ !HasChildPathFocus( sal_True ) )
{
- mpWindowImpl->mbActive = FALSE;
+ mpWindowImpl->mbActive = sal_False;
Deactivate();
}
}
@@ -6999,7 +6999,7 @@ void Window::SetActivateMode( USHORT nMode )
{
if ( !mpWindowImpl->mbActive || (GetType() == WINDOW_BORDERWINDOW) )
{
- mpWindowImpl->mbActive = TRUE;
+ mpWindowImpl->mbActive = sal_True;
Activate();
}
}
@@ -7008,7 +7008,7 @@ void Window::SetActivateMode( USHORT nMode )
// -----------------------------------------------------------------------
-void Window::ToTop( USHORT nFlags )
+void Window::ToTop( sal_uInt16 nFlags )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -7018,7 +7018,7 @@ void Window::ToTop( USHORT nFlags )
// -----------------------------------------------------------------------
-void Window::SetZOrder( Window* pRefWindow, USHORT nFlags )
+void Window::SetZOrder( Window* pRefWindow, sal_uInt16 nFlags )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -7136,7 +7136,7 @@ void Window::SetZOrder( Window* pRefWindow, USHORT nFlags )
if ( mpWindowImpl->mbInitWinClipRegion || !mpWindowImpl->maWinClipRegion.IsEmpty() )
{
- BOOL bInitWinClipRegion = mpWindowImpl->mbInitWinClipRegion;
+ sal_Bool bInitWinClipRegion = mpWindowImpl->mbInitWinClipRegion;
ImplSetClipFlag();
// Wenn ClipRegion noch nicht initalisiert wurde, dann
@@ -7195,7 +7195,7 @@ void Window::SetZOrder( Window* pRefWindow, USHORT nFlags )
// -----------------------------------------------------------------------
-void Window::EnableAlwaysOnTop( BOOL bEnable )
+void Window::EnableAlwaysOnTop( sal_Bool bEnable )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -7213,16 +7213,16 @@ void Window::EnableAlwaysOnTop( BOOL bEnable )
// -----------------------------------------------------------------------
void Window::SetPosSizePixel( long nX, long nY,
- long nWidth, long nHeight, USHORT nFlags )
+ long nWidth, long nHeight, sal_uInt16 nFlags )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
- BOOL bHasValidSize = !mpWindowImpl->mbDefSize;
+ sal_Bool bHasValidSize = !mpWindowImpl->mbDefSize;
if ( nFlags & WINDOW_POSSIZE_POS )
- mpWindowImpl->mbDefPos = FALSE;
+ mpWindowImpl->mbDefPos = sal_False;
if ( nFlags & WINDOW_POSSIZE_SIZE )
- mpWindowImpl->mbDefSize = FALSE;
+ mpWindowImpl->mbDefSize = sal_False;
// Oberstes BorderWindow ist das Window, welches positioniert werden soll
Window* pWindow = this;
@@ -7242,7 +7242,7 @@ void Window::SetPosSizePixel( long nX, long nY,
nHeight = pWindow->mnOutHeight;
- USHORT nSysFlags=0;
+ sal_uInt16 nSysFlags=0;
if( nFlags & WINDOW_POSSIZE_WIDTH )
nSysFlags |= SAL_FRAME_POSSIZE_WIDTH;
if( nFlags & WINDOW_POSSIZE_HEIGHT )
@@ -7456,18 +7456,18 @@ Rectangle Window::ImplOutputToUnmirroredAbsoluteScreenPixel( const Rectangle &rR
Rectangle Window::GetWindowExtentsRelative( Window *pRelativeWindow ) const
{
// with decoration
- return ImplGetWindowExtentsRelative( pRelativeWindow, FALSE );
+ return ImplGetWindowExtentsRelative( pRelativeWindow, sal_False );
}
Rectangle Window::GetClientWindowExtentsRelative( Window *pRelativeWindow ) const
{
// without decoration
- return ImplGetWindowExtentsRelative( pRelativeWindow, TRUE );
+ return ImplGetWindowExtentsRelative( pRelativeWindow, sal_True );
}
// -----------------------------------------------------------------------
-Rectangle Window::ImplGetWindowExtentsRelative( Window *pRelativeWindow, BOOL bClientOnly ) const
+Rectangle Window::ImplGetWindowExtentsRelative( Window *pRelativeWindow, sal_Bool bClientOnly ) const
{
SalFrameGeometry g = mpWindowImpl->mpFrame->GetGeometry();
// make sure we use the extent of our border window,
@@ -7497,7 +7497,7 @@ Rectangle Window::ImplGetWindowExtentsRelative( Window *pRelativeWindow, BOOL bC
// -----------------------------------------------------------------------
-void Window::Scroll( long nHorzScroll, long nVertScroll, USHORT nFlags )
+void Window::Scroll( long nHorzScroll, long nVertScroll, sal_uInt16 nFlags )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -7509,7 +7509,7 @@ void Window::Scroll( long nHorzScroll, long nVertScroll, USHORT nFlags )
// -----------------------------------------------------------------------
void Window::Scroll( long nHorzScroll, long nVertScroll,
- const Rectangle& rRect, USHORT nFlags )
+ const Rectangle& rRect, sal_uInt16 nFlags )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -7521,7 +7521,7 @@ void Window::Scroll( long nHorzScroll, long nVertScroll,
// -----------------------------------------------------------------------
-void Window::Invalidate( USHORT nFlags )
+void Window::Invalidate( sal_uInt16 nFlags )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -7533,7 +7533,7 @@ void Window::Invalidate( USHORT nFlags )
// -----------------------------------------------------------------------
-void Window::Invalidate( const Rectangle& rRect, USHORT nFlags )
+void Window::Invalidate( const Rectangle& rRect, sal_uInt16 nFlags )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -7550,7 +7550,7 @@ void Window::Invalidate( const Rectangle& rRect, USHORT nFlags )
// -----------------------------------------------------------------------
-void Window::Invalidate( const Region& rRegion, USHORT nFlags )
+void Window::Invalidate( const Region& rRegion, sal_uInt16 nFlags )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -7569,7 +7569,7 @@ void Window::Invalidate( const Region& rRegion, USHORT nFlags )
// -----------------------------------------------------------------------
-void Window::Validate( USHORT nFlags )
+void Window::Validate( sal_uInt16 nFlags )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -7581,7 +7581,7 @@ void Window::Validate( USHORT nFlags )
// -----------------------------------------------------------------------
-void Window::Validate( const Rectangle& rRect, USHORT nFlags )
+void Window::Validate( const Rectangle& rRect, sal_uInt16 nFlags )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -7598,7 +7598,7 @@ void Window::Validate( const Rectangle& rRect, USHORT nFlags )
// -----------------------------------------------------------------------
-void Window::Validate( const Region& rRegion, USHORT nFlags )
+void Window::Validate( const Region& rRegion, sal_uInt16 nFlags )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -7617,18 +7617,18 @@ void Window::Validate( const Region& rRegion, USHORT nFlags )
// -----------------------------------------------------------------------
-BOOL Window::HasPaintEvent() const
+sal_Bool Window::HasPaintEvent() const
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
if ( !mpWindowImpl->mbReallyVisible )
- return FALSE;
+ return sal_False;
if ( mpWindowImpl->mpFrameWindow->mpWindowImpl->mbPaintFrame )
- return TRUE;
+ return sal_True;
if ( mpWindowImpl->mnPaintFlags & IMPL_PAINT_PAINT )
- return TRUE;
+ return sal_True;
if ( !ImplIsOverlapWindow() )
{
@@ -7637,12 +7637,12 @@ BOOL Window::HasPaintEvent() const
{
pTempWindow = pTempWindow->ImplGetParent();
if ( pTempWindow->mpWindowImpl->mnPaintFlags & (IMPL_PAINT_PAINTCHILDS | IMPL_PAINT_PAINTALLCHILDS) )
- return TRUE;
+ return sal_True;
}
while ( !pTempWindow->ImplIsOverlapWindow() );
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -7660,14 +7660,14 @@ void Window::Update()
if ( !mpWindowImpl->mbReallyVisible )
return;
- BOOL bFlush = FALSE;
+ sal_Bool bFlush = sal_False;
if ( mpWindowImpl->mpFrameWindow->mpWindowImpl->mbPaintFrame )
{
Point aPoint( 0, 0 );
Region aRegion( Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) );
ImplInvalidateOverlapFrameRegion( aRegion );
if ( mpWindowImpl->mbFrame || (mpWindowImpl->mpBorderWindow && mpWindowImpl->mpBorderWindow->mpWindowImpl->mbFrame) )
- bFlush = TRUE;
+ bFlush = sal_True;
}
// Zuerst muessen wir alle Fenster ueberspringen, die Paint-Transparent
@@ -7736,7 +7736,7 @@ void Window::Sync()
// -----------------------------------------------------------------------
-void Window::SetUpdateMode( BOOL bUpdate )
+void Window::SetUpdateMode( sal_Bool bUpdate )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -7755,7 +7755,7 @@ void Window::GrabFocus()
// -----------------------------------------------------------------------
-BOOL Window::HasFocus() const
+sal_Bool Window::HasFocus() const
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -7797,7 +7797,7 @@ void Window::SetFakeFocus( bool bFocus )
// -----------------------------------------------------------------------
-BOOL Window::HasChildPathFocus( BOOL bSystemWindow ) const
+sal_Bool Window::HasChildPathFocus( sal_Bool bSystemWindow ) const
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -7813,7 +7813,7 @@ BOOL Window::HasChildPathFocus( BOOL bSystemWindow ) const
Window* pFocusWin = ImplGetSVData()->maWinData.mpFocusWin;
if ( pFocusWin )
return ImplIsWindowOrChild( pFocusWin, bSystemWindow );
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -7834,7 +7834,7 @@ void Window::CaptureMouse()
if ( pSVData->maWinData.mpCaptureWin != this )
{
pSVData->maWinData.mpCaptureWin = this;
- mpWindowImpl->mpFrame->CaptureMouse( TRUE );
+ mpWindowImpl->mpFrame->CaptureMouse( sal_True );
}
}
@@ -7852,14 +7852,14 @@ void Window::ReleaseMouse()
if ( pSVData->maWinData.mpCaptureWin == this )
{
pSVData->maWinData.mpCaptureWin = NULL;
- mpWindowImpl->mpFrame->CaptureMouse( FALSE );
+ mpWindowImpl->mpFrame->CaptureMouse( sal_False );
ImplGenerateMouseMove();
}
}
// -----------------------------------------------------------------------
-BOOL Window::IsMouseCaptured() const
+sal_Bool Window::IsMouseCaptured() const
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -7884,7 +7884,7 @@ void Window::SetPointer( const Pointer& rPointer )
// -----------------------------------------------------------------------
-void Window::EnableChildPointerOverwrite( BOOL bOverwrite )
+void Window::EnableChildPointerOverwrite( sal_Bool bOverwrite )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -7954,7 +7954,7 @@ Point Window::GetLastPointerPosPixel()
// -----------------------------------------------------------------------
-void Window::ShowPointer( BOOL bVisible )
+void Window::ShowPointer( sal_Bool bVisible )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -7993,7 +7993,7 @@ Window::PointerState Window::GetPointerState()
// -----------------------------------------------------------------------
-BOOL Window::IsMouseOver()
+sal_Bool Window::IsMouseOver()
{
return ImplGetWinData()->mbMouseOver;
}
@@ -8133,7 +8133,7 @@ const XubString& Window::GetHelpText() const
SmartId aSmartId = GetSmartHelpId();
- ULONG nNumHelpId = 0;
+ sal_uIntPtr nNumHelpId = 0;
String aStrHelpId;
if( aSmartId.HasString() )
aStrHelpId = aSmartId.GetStr();
@@ -8152,7 +8152,7 @@ const XubString& Window::GetHelpText() const
((Window*)this)->mpWindowImpl->maHelpText = pHelp->GetHelpText( aStrHelpId, this );
else
((Window*)this)->mpWindowImpl->maHelpText = pHelp->GetHelpText( nNumHelpId, this );
- mpWindowImpl->mbHelpTextDynamic = FALSE;
+ mpWindowImpl->mbHelpTextDynamic = sal_False;
}
}
}
@@ -8170,7 +8170,7 @@ const XubString& Window::GetHelpText() const
aTxt.append( sal_Int32( nNumHelpId ) );
mpWindowImpl->maHelpText = aTxt.makeStringAndClear();
}
- mpWindowImpl->mbHelpTextDynamic = FALSE;
+ mpWindowImpl->mbHelpTextDynamic = sal_False;
}
return mpWindowImpl->maHelpText;
@@ -8188,11 +8188,11 @@ Window* Window::FindWindow( const Point& rPos ) const
// -----------------------------------------------------------------------
-USHORT Window::GetChildCount() const
+sal_uInt16 Window::GetChildCount() const
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
- USHORT nChildCount = 0;
+ sal_uInt16 nChildCount = 0;
Window* pChild = mpWindowImpl->mpFirstChild;
while ( pChild )
{
@@ -8205,11 +8205,11 @@ USHORT Window::GetChildCount() const
// -----------------------------------------------------------------------
-Window* Window::GetChild( USHORT nChild ) const
+Window* Window::GetChild( sal_uInt16 nChild ) const
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
- USHORT nChildCount = 0;
+ sal_uInt16 nChildCount = 0;
Window* pChild = mpWindowImpl->mpFirstChild;
while ( pChild )
{
@@ -8224,7 +8224,7 @@ Window* Window::GetChild( USHORT nChild ) const
// -----------------------------------------------------------------------
-Window* Window::GetWindow( USHORT nType ) const
+Window* Window::GetWindow( sal_uInt16 nType ) const
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -8316,7 +8316,7 @@ Window* Window::GetWindow( USHORT nType ) const
// -----------------------------------------------------------------------
-BOOL Window::IsChild( const Window* pWindow, BOOL bSystemWindow ) const
+sal_Bool Window::IsChild( const Window* pWindow, sal_Bool bSystemWindow ) const
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
DBG_CHKOBJ( pWindow, Window, ImplDbgCheckWindow );
@@ -8329,22 +8329,22 @@ BOOL Window::IsChild( const Window* pWindow, BOOL bSystemWindow ) const
pWindow = pWindow->ImplGetParent();
if ( pWindow == this )
- return TRUE;
+ return sal_True;
}
while ( pWindow );
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL Window::IsWindowOrChild( const Window* pWindow, BOOL bSystemWindow ) const
+sal_Bool Window::IsWindowOrChild( const Window* pWindow, sal_Bool bSystemWindow ) const
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
DBG_CHKOBJ( pWindow, Window, ImplDbgCheckWindow );
if ( this == pWindow )
- return TRUE;
+ return sal_True;
return ImplIsChild( pWindow, bSystemWindow );
}
@@ -8383,7 +8383,7 @@ void Window::SetWindowPeer( ::com::sun::star::uno::Reference< ::com::sun::star::
// -----------------------------------------------------------------------
-::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > Window::GetComponentInterface( BOOL bCreate )
+::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > Window::GetComponentInterface( sal_Bool bCreate )
{
if ( !mpWindowImpl->mxWindowPeer.is() && bCreate )
{
@@ -8518,7 +8518,7 @@ Reference< XDropTarget > Window::GetDropTarget()
Reference< XDragGestureListener > (mpWindowImpl->mpFrameData->mxDropTargetListener, UNO_QUERY));
}
else
- mpWindowImpl->mpFrameData->mbInternalDragGestureRecognizer = TRUE;
+ mpWindowImpl->mpFrameData->mbInternalDragGestureRecognizer = sal_True;
}
@@ -8738,7 +8738,7 @@ Reference< XClipboard > Window::GetPrimarySelection()
// Accessibility
// -----------------------------------------------------------------------
-::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > Window::GetAccessible( BOOL bCreate )
+::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > Window::GetAccessible( sal_Bool bCreate )
{
// do not optimize hierarchy for the top level border win (ie, when there is no parent)
/* // do not optimize accessible hierarchy at all to better reflect real VCL hierarchy
@@ -8758,7 +8758,7 @@ Reference< XClipboard > Window::GetPrimarySelection()
::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > Window::CreateAccessible()
{
- ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > xAcc( GetComponentInterface( TRUE ), ::com::sun::star::uno::UNO_QUERY );
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > xAcc( GetComponentInterface( sal_True ), ::com::sun::star::uno::UNO_QUERY );
return xAcc;
}
@@ -8768,46 +8768,46 @@ void Window::SetAccessible( ::com::sun::star::uno::Reference< ::com::sun::star::
}
// skip all border windows that are no top level frames
-BOOL Window::ImplIsAccessibleCandidate() const
+sal_Bool Window::ImplIsAccessibleCandidate() const
{
if( !mpWindowImpl->mbBorderWin )
- return TRUE;
+ return sal_True;
else
// #101741 do not check for WB_CLOSEABLE because undecorated floaters (like menues!) are closeable
if( mpWindowImpl->mbFrame && mpWindowImpl->mnStyle & (WB_MOVEABLE | WB_SIZEABLE) )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
-BOOL Window::ImplIsAccessibleNativeFrame() const
+sal_Bool Window::ImplIsAccessibleNativeFrame() const
{
if( mpWindowImpl->mbFrame )
// #101741 do not check for WB_CLOSEABLE because undecorated floaters (like menues!) are closeable
if( (mpWindowImpl->mnStyle & (WB_MOVEABLE | WB_SIZEABLE)) )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
else
- return FALSE;
+ return sal_False;
}
-USHORT Window::ImplGetAccessibleCandidateChildWindowCount( USHORT nFirstWindowType ) const
+sal_uInt16 Window::ImplGetAccessibleCandidateChildWindowCount( sal_uInt16 nFirstWindowType ) const
{
- USHORT nChildren = 0;
+ sal_uInt16 nChildren = 0;
Window* pChild = GetWindow( nFirstWindowType );
while ( pChild )
{
if( pChild->ImplIsAccessibleCandidate() )
nChildren++;
else
- nChildren = sal::static_int_cast<USHORT>(nChildren + pChild->ImplGetAccessibleCandidateChildWindowCount( WINDOW_FIRSTCHILD ));
+ nChildren = sal::static_int_cast<sal_uInt16>(nChildren + pChild->ImplGetAccessibleCandidateChildWindowCount( WINDOW_FIRSTCHILD ));
pChild = pChild->mpWindowImpl->mpNext;
}
return nChildren;
}
-Window* Window::ImplGetAccessibleCandidateChild( USHORT nChild, USHORT& rChildCount, USHORT nFirstWindowType, BOOL bTopLevel ) const
+Window* Window::ImplGetAccessibleCandidateChild( sal_uInt16 nChild, sal_uInt16& rChildCount, sal_uInt16 nFirstWindowType, sal_Bool bTopLevel ) const
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -8820,7 +8820,7 @@ Window* Window::ImplGetAccessibleCandidateChild( USHORT nChild, USHORT& rChildCo
Window *pTmpChild = pChild;
if( !pChild->ImplIsAccessibleCandidate() )
- pTmpChild = pChild->ImplGetAccessibleCandidateChild( nChild, rChildCount, WINDOW_FIRSTCHILD, FALSE );
+ pTmpChild = pChild->ImplGetAccessibleCandidateChild( nChild, rChildCount, WINDOW_FIRSTCHILD, sal_False );
if ( nChild == rChildCount )
return pTmpChild;
@@ -8873,9 +8873,9 @@ Window* Window::GetAccessibleParentWindow() const
}
/*
-USHORT Window::GetAccessibleChildWindowCount()
+sal_uInt16 Window::GetAccessibleChildWindowCount()
{
- USHORT nChildren = ImplGetAccessibleCandidateChildWindowCount( WINDOW_FIRSTCHILD );
+ sal_uInt16 nChildren = ImplGetAccessibleCandidateChildWindowCount( WINDOW_FIRSTCHILD );
// Search also for SystemWindows.
Window* pOverlap = GetWindow( WINDOW_OVERLAP );
@@ -8885,9 +8885,9 @@ USHORT Window::GetAccessibleChildWindowCount()
}
*/
-USHORT Window::GetAccessibleChildWindowCount()
+sal_uInt16 Window::GetAccessibleChildWindowCount()
{
- USHORT nChildren = 0;
+ sal_uInt16 nChildren = 0;
Window* pChild = mpWindowImpl->mpFirstChild;
while( pChild )
{
@@ -8933,21 +8933,21 @@ USHORT Window::GetAccessibleChildWindowCount()
}
/*
-Window* Window::GetAccessibleChildWindow( USHORT n )
+Window* Window::GetAccessibleChildWindow( sal_uInt16 n )
{
- USHORT nChildCount; // will be set in ImplGetAccessibleCandidateChild(...)
- Window* pChild = ImplGetAccessibleCandidateChild( n, nChildCount, WINDOW_FIRSTCHILD, TRUE );
+ sal_uInt16 nChildCount; // will be set in ImplGetAccessibleCandidateChild(...)
+ Window* pChild = ImplGetAccessibleCandidateChild( n, nChildCount, WINDOW_FIRSTCHILD, sal_True );
if ( !pChild && ( n >= nChildCount ) )
{
Window* pOverlap = GetWindow( WINDOW_OVERLAP );
- pChild = pOverlap->ImplGetAccessibleCandidateChild( n, nChildCount, WINDOW_FIRSTOVERLAP, FALSE );
+ pChild = pOverlap->ImplGetAccessibleCandidateChild( n, nChildCount, WINDOW_FIRSTOVERLAP, sal_False );
}
return pChild;
}
*/
-Window* Window::GetAccessibleChildWindow( USHORT n )
+Window* Window::GetAccessibleChildWindow( sal_uInt16 n )
{
// report the menubarwindow as a the first child of THE workwindow
if( GetType() == WINDOW_WORKWINDOW && ((WorkWindow *) this)->GetMenuBar() )
@@ -8963,7 +8963,7 @@ Window* Window::GetAccessibleChildWindow( USHORT n )
}
// transform n to child number including invisible children
- USHORT nChildren = n;
+ sal_uInt16 nChildren = n;
Window* pChild = mpWindowImpl->mpFirstChild;
while( pChild )
{
@@ -9011,7 +9011,7 @@ Window* Window::GetAccessibleChildWindow( USHORT n )
}
-void Window::SetAccessibleRole( USHORT nRole )
+void Window::SetAccessibleRole( sal_uInt16 nRole )
{
if ( !mpWindowImpl->mpAccessibleInfos )
mpWindowImpl->mpAccessibleInfos = new ImplAccessibleInfos;
@@ -9020,11 +9020,11 @@ void Window::SetAccessibleRole( USHORT nRole )
mpWindowImpl->mpAccessibleInfos->nAccessibleRole = nRole;
}
-USHORT Window::GetAccessibleRole() const
+sal_uInt16 Window::GetAccessibleRole() const
{
using namespace ::com::sun::star;
- USHORT nRole = mpWindowImpl->mpAccessibleInfos ? mpWindowImpl->mpAccessibleInfos->nAccessibleRole : 0xFFFF;
+ sal_uInt16 nRole = mpWindowImpl->mpAccessibleInfos ? mpWindowImpl->mpAccessibleInfos->nAccessibleRole : 0xFFFF;
if ( nRole == 0xFFFF )
{
switch ( GetType() )
@@ -9254,7 +9254,7 @@ String Window::GetAccessibleDescription() const
return aAccessibleDescription;
}
-BOOL Window::IsAccessibilityEventsSuppressed( BOOL bTraverseParentPath )
+sal_Bool Window::IsAccessibilityEventsSuppressed( sal_Bool bTraverseParentPath )
{
if( !bTraverseParentPath )
return mpWindowImpl->mbSuppressAccessibilityEvents;
@@ -9264,11 +9264,11 @@ BOOL Window::IsAccessibilityEventsSuppressed( BOOL bTraverseParentPath )
while ( pParent && pParent->mpWindowImpl)
{
if( pParent->mpWindowImpl->mbSuppressAccessibilityEvents )
- return TRUE;
+ return sal_True;
else
pParent = pParent->mpWindowImpl->mpParent; // do not use GetParent() to find borderwindows that are frames
}
- return FALSE;
+ return sal_False;
}
}
@@ -9288,9 +9288,9 @@ void Window::RecordLayoutData( vcl::ControlLayoutData* pLayout, const Rectangle&
// returns background color used in this control
// false: could not determine color
-BOOL Window::ImplGetCurrentBackgroundColor( Color& rCol )
+sal_Bool Window::ImplGetCurrentBackgroundColor( Color& rCol )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
switch ( GetType() )
{
@@ -9308,7 +9308,7 @@ BOOL Window::ImplGetCurrentBackgroundColor( Color& rCol )
if( !aWall.IsGradient() && !aWall.IsBitmap() )
rCol = aWall.GetColor();
else
- bRet = FALSE;
+ bRet = sal_False;
}
else
rCol = GetSettings().GetStyleSettings().GetFaceColor();
@@ -9317,21 +9317,21 @@ BOOL Window::ImplGetCurrentBackgroundColor( Color& rCol )
return bRet;
}
-void Window::DrawSelectionBackground( const Rectangle& rRect, USHORT highlight, BOOL bChecked, BOOL bDrawBorder, BOOL bDrawExtBorderOnly )
+void Window::DrawSelectionBackground( const Rectangle& rRect, sal_uInt16 highlight, sal_Bool bChecked, sal_Bool bDrawBorder, sal_Bool bDrawExtBorderOnly )
{
DrawSelectionBackground( rRect, highlight, bChecked, bDrawBorder, bDrawExtBorderOnly, 0, NULL, NULL );
}
-void Window::DrawSelectionBackground( const Rectangle& rRect, USHORT highlight, BOOL bChecked, BOOL bDrawBorder, BOOL bDrawExtBorderOnly, Color* pSelectionTextColor )
+void Window::DrawSelectionBackground( const Rectangle& rRect, sal_uInt16 highlight, sal_Bool bChecked, sal_Bool bDrawBorder, sal_Bool bDrawExtBorderOnly, Color* pSelectionTextColor )
{
DrawSelectionBackground( rRect, highlight, bChecked, bDrawBorder, bDrawExtBorderOnly, 0, pSelectionTextColor, NULL );
}
void Window::DrawSelectionBackground( const Rectangle& rRect,
- USHORT highlight,
- BOOL bChecked,
- BOOL bDrawBorder,
- BOOL bDrawExtBorderOnly,
+ sal_uInt16 highlight,
+ sal_Bool bChecked,
+ sal_Bool bDrawBorder,
+ sal_Bool bDrawExtBorderOnly,
long nCornerRadius,
Color* pSelectionTextColor,
Color* pPaintColor
@@ -9349,8 +9349,8 @@ void Window::DrawSelectionBackground( const Rectangle& rRect,
Color aSelectionBorderCol( pPaintColor ? *pPaintColor : rStyles.GetHighlightColor() );
Color aSelectionFillCol( aSelectionBorderCol );
- BOOL bDark = rStyles.GetFaceColor().IsDark();
- BOOL bBright = ( rStyles.GetFaceColor() == Color( COL_WHITE ) );
+ sal_Bool bDark = rStyles.GetFaceColor().IsDark();
+ sal_Bool bBright = ( rStyles.GetFaceColor() == Color( COL_WHITE ) );
int c1 = aSelectionBorderCol.GetLuminance();
int c2 = GetDisplayBackground().GetColor().GetLuminance();
@@ -9358,7 +9358,7 @@ void Window::DrawSelectionBackground( const Rectangle& rRect,
if( !bDark && !bBright && abs( c2-c1 ) < (pPaintColor ? 40 : 75) )
{
// constrast too low
- USHORT h,s,b;
+ sal_uInt16 h,s,b;
aSelectionFillCol.RGBtoHSB( h, s, b );
if( b > 50 ) b -= 40;
else b += 40;
@@ -9390,7 +9390,7 @@ void Window::DrawSelectionBackground( const Rectangle& rRect,
else
SetLineColor();
- USHORT nPercent = 0;
+ sal_uInt16 nPercent = 0;
if( !highlight )
{
if( bDark )
@@ -9510,7 +9510,7 @@ Window* Window::GetPreferredKeyInputWindow()
}
-BOOL Window::IsScrollable() const
+sal_Bool Window::IsScrollable() const
{
// check for scrollbars
Window *pChild = mpWindowImpl->mpFirstChild;
@@ -9524,24 +9524,24 @@ BOOL Window::IsScrollable() const
return false;
}
-BOOL Window::IsTopWindow() const
+sal_Bool Window::IsTopWindow() const
{
if ( mpWindowImpl->mbInDtor )
- return FALSE;
+ return sal_False;
// topwindows must be frames or they must have a borderwindow which is a frame
if( !mpWindowImpl->mbFrame && (!mpWindowImpl->mpBorderWindow || (mpWindowImpl->mpBorderWindow && !mpWindowImpl->mpBorderWindow->mpWindowImpl->mbFrame) ) )
- return FALSE;
+ return sal_False;
ImplGetWinData();
- if( mpWindowImpl->mpWinData->mnIsTopWindow == (USHORT)~0) // still uninitialized
+ if( mpWindowImpl->mpWinData->mnIsTopWindow == (sal_uInt16)~0) // still uninitialized
{
// #113722#, cache result of expensive queryInterface call
Window *pThisWin = (Window*)this;
Reference< XTopWindow > xTopWindow( pThisWin->GetComponentInterface(), UNO_QUERY );
pThisWin->mpWindowImpl->mpWinData->mnIsTopWindow = xTopWindow.is() ? 1 : 0;
}
- return mpWindowImpl->mpWinData->mnIsTopWindow == 1 ? TRUE : FALSE;
+ return mpWindowImpl->mpWinData->mnIsTopWindow == 1 ? sal_True : sal_False;
}
void Window::ImplMirrorFramePos( Point &pt ) const
@@ -9550,7 +9550,7 @@ void Window::ImplMirrorFramePos( Point &pt ) const
}
// frame based modal counter (dialogs are not modal to the whole application anymore)
-BOOL Window::IsInModalMode() const
+sal_Bool Window::IsInModalMode() const
{
return (mpWindowImpl->mpFrameWindow->mpWindowImpl->mpFrameData->mnModalMode != 0);
}
@@ -9582,16 +9582,16 @@ void Window::ImplDecModalCount()
pFrameWindow = pParent ? pParent->mpWindowImpl->mpFrameWindow : NULL;
}
}
-BOOL Window::ImplIsInTaskPaneList()
+sal_Bool Window::ImplIsInTaskPaneList()
{
return mpWindowImpl->mbIsInTaskPaneList;
}
-void Window::ImplIsInTaskPaneList( BOOL mbIsInTaskList )
+void Window::ImplIsInTaskPaneList( sal_Bool mbIsInTaskList )
{
mpWindowImpl->mbIsInTaskPaneList = mbIsInTaskList;
}
-void Window::ImplNotifyIconifiedState( BOOL bIconified )
+void Window::ImplNotifyIconifiedState( sal_Bool bIconified )
{
mpWindowImpl->mpFrameWindow->ImplCallEventListeners( bIconified ? VCLEVENT_WINDOW_MINIMIZE : VCLEVENT_WINDOW_NORMALIZE );
// #109206# notify client window as well to have toolkit topwindow listeners notified
@@ -9599,15 +9599,15 @@ void Window::ImplNotifyIconifiedState( BOOL bIconified )
mpWindowImpl->mpFrameWindow->mpWindowImpl->mpClientWindow->ImplCallEventListeners( bIconified ? VCLEVENT_WINDOW_MINIMIZE : VCLEVENT_WINDOW_NORMALIZE );
}
-BOOL Window::HasActiveChildFrame()
+sal_Bool Window::HasActiveChildFrame()
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
Window *pFrameWin = ImplGetSVData()->maWinData.mpFirstFrame;
while( pFrameWin )
{
if( pFrameWin != mpWindowImpl->mpFrameWindow )
{
- BOOL bDecorated = FALSE;
+ sal_Bool bDecorated = sal_False;
Window *pChildFrame = pFrameWin->ImplGetWindow();
// #i15285# unfortunately WB_MOVEABLE is the same as WB_TABSTOP which can
// be removed for ToolBoxes to influence the keyboard accessibility
@@ -9619,9 +9619,9 @@ BOOL Window::HasActiveChildFrame()
if( bDecorated || (pFrameWin->mpWindowImpl->mnStyle & (WB_MOVEABLE | WB_SIZEABLE) ) )
if( pChildFrame && pChildFrame->IsVisible() && pChildFrame->IsActive() )
{
- if( ImplIsChild( pChildFrame, TRUE ) )
+ if( ImplIsChild( pChildFrame, sal_True ) )
{
- bRet = TRUE;
+ bRet = sal_True;
break;
}
}
@@ -9636,11 +9636,11 @@ LanguageType Window::GetInputLanguage() const
return mpWindowImpl->mpFrame->GetInputLanguage();
}
-void Window::EnableNativeWidget( BOOL bEnable )
+void Window::EnableNativeWidget( sal_Bool bEnable )
{
static const char* pNoNWF = getenv( "SAL_NO_NWF" );
if( pNoNWF && *pNoNWF )
- bEnable = FALSE;
+ bEnable = sal_False;
if( bEnable != ImplGetWinData()->mbEnableNativeWidget )
{
@@ -9665,7 +9665,7 @@ void Window::EnableNativeWidget( BOOL bEnable )
}
}
-BOOL Window::IsNativeWidgetEnabled() const
+sal_Bool Window::IsNativeWidgetEnabled() const
{
return ImplGetWinData()->mbEnableNativeWidget;
}
@@ -9799,16 +9799,16 @@ Reference< ::com::sun::star::rendering::XSpriteCanvas > Window::GetFullscreenSpr
void Window::ImplPaintToDevice( OutputDevice* i_pTargetOutDev, const Point& i_rPos )
{
- BOOL bRVisible = mpWindowImpl->mbReallyVisible;
+ sal_Bool bRVisible = mpWindowImpl->mbReallyVisible;
mpWindowImpl->mbReallyVisible = mpWindowImpl->mbVisible;
- BOOL bDevOutput = mbDevOutput;
- mbDevOutput = TRUE;
+ sal_Bool bDevOutput = mbDevOutput;
+ mbDevOutput = sal_True;
long nOldDPIX = ImplGetDPIX();
long nOldDPIY = ImplGetDPIY();
mnDPIX = i_pTargetOutDev->ImplGetDPIX();
mnDPIY = i_pTargetOutDev->ImplGetDPIY();
- BOOL bOutput = IsOutputEnabled();
+ sal_Bool bOutput = IsOutputEnabled();
EnableOutput();
DBG_ASSERT( GetMapMode().GetMapUnit() == MAP_PIXEL, "MapMode must be PIXEL based" );
@@ -9941,8 +9941,8 @@ void Window::PaintToDevice( OutputDevice* pDev, const Point& rPos, const Size& /
Hide();
}
- BOOL bVisible = mpWindowImpl->mbVisible;
- mpWindowImpl->mbVisible = TRUE;
+ sal_Bool bVisible = mpWindowImpl->mbVisible;
+ mpWindowImpl->mbVisible = sal_True;
if( mpWindowImpl->mpBorderWindow )
mpWindowImpl->mpBorderWindow->ImplPaintToDevice( pDev, rPos );
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index 02b2713b01cc..2334c3c468f9 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -74,7 +74,7 @@ struct ImplFocusDelData : public ImplDelData
// =======================================================================
-BOOL Window::ImplIsWindowInFront( const Window* pTestWindow ) const
+sal_Bool Window::ImplIsWindowInFront( const Window* pTestWindow ) const
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
DBG_CHKOBJ( pTestWindow, Window, ImplDbgCheckWindow );
@@ -84,11 +84,11 @@ BOOL Window::ImplIsWindowInFront( const Window* pTestWindow ) const
const Window* pTempWindow = pTestWindow;
const Window* pThisWindow = ImplGetFirstOverlapWindow();
if ( pTempWindow == pThisWindow )
- return FALSE;
+ return sal_False;
do
{
if ( pTempWindow == pThisWindow )
- return TRUE;
+ return sal_True;
if ( pTempWindow->mpWindowImpl->mbFrame )
break;
pTempWindow = pTempWindow->mpWindowImpl->mpOverlapWindow;
@@ -98,7 +98,7 @@ BOOL Window::ImplIsWindowInFront( const Window* pTestWindow ) const
do
{
if ( pTempWindow == pTestWindow )
- return FALSE;
+ return sal_False;
if ( pTempWindow->mpWindowImpl->mbFrame )
break;
pTempWindow = pTempWindow->mpWindowImpl->mpOverlapWindow;
@@ -108,8 +108,8 @@ BOOL Window::ImplIsWindowInFront( const Window* pTestWindow ) const
// Fenster auf gleiche Ebene bringen
if ( pThisWindow->mpWindowImpl->mpOverlapWindow != pTestWindow->mpWindowImpl->mpOverlapWindow )
{
- USHORT nThisLevel = 0;
- USHORT nTestLevel = 0;
+ sal_uInt16 nThisLevel = 0;
+ sal_uInt16 nTestLevel = 0;
pTempWindow = pThisWindow;
do
{
@@ -156,12 +156,12 @@ BOOL Window::ImplIsWindowInFront( const Window* pTestWindow ) const
do
{
if ( pTempWindow == pThisWindow )
- return TRUE;
+ return sal_True;
pTempWindow = pTempWindow->mpWindowImpl->mpNext;
}
while ( pTempWindow );
- return FALSE;
+ return sal_False;
}
// =======================================================================
@@ -172,7 +172,7 @@ void Window::ImplSaveOverlapBackground()
if ( !mpWindowImpl->mbFrame )
{
- ULONG nSaveBackSize = mnOutWidth*mnOutHeight;
+ sal_uIntPtr nSaveBackSize = mnOutWidth*mnOutHeight;
if ( nSaveBackSize <= IMPL_MAXSAVEBACKSIZE )
{
if ( nSaveBackSize+mpWindowImpl->mpFrameData->mnAllSaveBackSize <= IMPL_MAXALLSAVEBACKSIZE )
@@ -207,7 +207,7 @@ void Window::ImplSaveOverlapBackground()
// -----------------------------------------------------------------------
-BOOL Window::ImplRestoreOverlapBackground( Region& rInvRegion )
+sal_Bool Window::ImplRestoreOverlapBackground( Region& rInvRegion )
{
if ( mpWindowImpl->mpOverlapData->mpSaveBackDev )
{
@@ -237,10 +237,10 @@ BOOL Window::ImplRestoreOverlapBackground( Region& rInvRegion )
ImplDeleteOverlapBackground();
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -309,7 +309,7 @@ void Window::ImplInvalidateAllOverlapBackgrounds()
// =======================================================================
-Bitmap Window::SnapShot( BOOL bBorder ) const
+Bitmap Window::SnapShot( sal_Bool bBorder ) const
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -348,7 +348,7 @@ Bitmap Window::SnapShot( BOOL bBorder ) const
Bitmap Window::SnapShot() const
{
// Should be merged in the next top level build !!!
- return SnapShot( TRUE );
+ return SnapShot( sal_True );
}
// -----------------------------------------------------------------------
@@ -359,7 +359,7 @@ void Window::ShowFocus( const Rectangle& rRect )
if( mpWindowImpl->mbInShowFocus )
return;
- mpWindowImpl->mbInShowFocus = TRUE;
+ mpWindowImpl->mbInShowFocus = sal_True;
ImplWinData* pWinData = ImplGetWinData();
@@ -373,7 +373,7 @@ void Window::ShowFocus( const Rectangle& rRect )
{
if ( *(pWinData->mpFocusRect) == rRect )
{
- mpWindowImpl->mbInShowFocus = FALSE;
+ mpWindowImpl->mbInShowFocus = sal_False;
return;
}
@@ -386,18 +386,18 @@ void Window::ShowFocus( const Rectangle& rRect )
pWinData->mpFocusRect = new Rectangle( rRect );
else
*(pWinData->mpFocusRect) = rRect;
- mpWindowImpl->mbFocusVisible = TRUE;
+ mpWindowImpl->mbFocusVisible = sal_True;
}
else
{
if( ! mpWindowImpl->mbNativeFocusVisible )
{
- mpWindowImpl->mbNativeFocusVisible = TRUE;
+ mpWindowImpl->mbNativeFocusVisible = sal_True;
if ( !mpWindowImpl->mbInPaint )
Invalidate();
}
}
- mpWindowImpl->mbInShowFocus = FALSE;
+ mpWindowImpl->mbInShowFocus = sal_False;
}
// -----------------------------------------------------------------------
@@ -408,7 +408,7 @@ void Window::HideFocus()
if( mpWindowImpl->mbInHideFocus )
return;
- mpWindowImpl->mbInHideFocus = TRUE;
+ mpWindowImpl->mbInHideFocus = sal_True;
// native themeing can suggest not to use focus rects
if( ! ( mpWindowImpl->mbUseNativeFocus &&
@@ -416,29 +416,29 @@ void Window::HideFocus()
{
if ( !mpWindowImpl->mbFocusVisible )
{
- mpWindowImpl->mbInHideFocus = FALSE;
+ mpWindowImpl->mbInHideFocus = sal_False;
return;
}
if ( !mpWindowImpl->mbInPaint )
ImplInvertFocus( *(ImplGetWinData()->mpFocusRect) );
- mpWindowImpl->mbFocusVisible = FALSE;
+ mpWindowImpl->mbFocusVisible = sal_False;
}
else
{
if( mpWindowImpl->mbNativeFocusVisible )
{
- mpWindowImpl->mbNativeFocusVisible = FALSE;
+ mpWindowImpl->mbNativeFocusVisible = sal_False;
if ( !mpWindowImpl->mbInPaint )
Invalidate();
}
}
- mpWindowImpl->mbInHideFocus = FALSE;
+ mpWindowImpl->mbInHideFocus = sal_False;
}
// -----------------------------------------------------------------------
-void Window::Invert( const Rectangle& rRect, USHORT nFlags )
+void Window::Invert( const Rectangle& rRect, sal_uInt16 nFlags )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -474,14 +474,14 @@ void Window::Invert( const Rectangle& rRect, USHORT nFlags )
// -----------------------------------------------------------------------
-void Window::Invert( const Polygon& rPoly, USHORT nFlags )
+void Window::Invert( const Polygon& rPoly, sal_uInt16 nFlags )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
if ( !IsDeviceOutputNecessary() )
return;
- USHORT nPoints = rPoly.GetSize();
+ sal_uInt16 nPoints = rPoly.GetSize();
if ( nPoints < 2 )
return;
@@ -512,7 +512,7 @@ void Window::Invert( const Polygon& rPoly, USHORT nFlags )
// -----------------------------------------------------------------------
-void Window::ShowTracking( const Rectangle& rRect, USHORT nFlags )
+void Window::ShowTracking( const Rectangle& rRect, sal_uInt16 nFlags )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -537,7 +537,7 @@ void Window::ShowTracking( const Rectangle& rRect, USHORT nFlags )
else
*(pWinData->mpTrackRect) = rRect;
pWinData->mnTrackFlags = nFlags;
- mpWindowImpl->mbTrackVisible = TRUE;
+ mpWindowImpl->mbTrackVisible = sal_True;
}
// -----------------------------------------------------------------------
@@ -551,13 +551,13 @@ void Window::HideTracking()
ImplWinData* pWinData = ImplGetWinData();
if ( !mpWindowImpl->mbInPaint || !(pWinData->mnTrackFlags & SHOWTRACK_WINDOW) )
InvertTracking( *(pWinData->mpTrackRect), pWinData->mnTrackFlags );
- mpWindowImpl->mbTrackVisible = FALSE;
+ mpWindowImpl->mbTrackVisible = sal_False;
}
}
// -----------------------------------------------------------------------
-void Window::InvertTracking( const Rectangle& rRect, USHORT nFlags )
+void Window::InvertTracking( const Rectangle& rRect, sal_uInt16 nFlags )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -598,12 +598,12 @@ void Window::InvertTracking( const Rectangle& rRect, USHORT nFlags )
Point aPoint( mnOutOffX, mnOutOffY );
Region aRegion( Rectangle( aPoint,
Size( mnOutWidth, mnOutHeight ) ) );
- ImplClipBoundaries( aRegion, FALSE, FALSE );
+ ImplClipBoundaries( aRegion, sal_False, sal_False );
ImplSelectClipRegion( aRegion, pGraphics );
}
}
- USHORT nStyle = nFlags & SHOWTRACK_STYLE;
+ sal_uInt16 nStyle = nFlags & SHOWTRACK_STYLE;
if ( nStyle == SHOWTRACK_OBJECT )
pGraphics->Invert( aRect.Left(), aRect.Top(), aRect.GetWidth(), aRect.GetHeight(), SAL_INVERT_TRACKFRAME, this );
else if ( nStyle == SHOWTRACK_SPLIT )
@@ -622,11 +622,11 @@ void Window::InvertTracking( const Rectangle& rRect, USHORT nFlags )
// -----------------------------------------------------------------------
-void Window::InvertTracking( const Polygon& rPoly, USHORT nFlags )
+void Window::InvertTracking( const Polygon& rPoly, sal_uInt16 nFlags )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
- USHORT nPoints = rPoly.GetSize();
+ sal_uInt16 nPoints = rPoly.GetSize();
if ( nPoints < 2 )
return;
@@ -664,7 +664,7 @@ void Window::InvertTracking( const Polygon& rPoly, USHORT nFlags )
Point aPoint( mnOutOffX, mnOutOffY );
Region aRegion( Rectangle( aPoint,
Size( mnOutWidth, mnOutHeight ) ) );
- ImplClipBoundaries( aRegion, FALSE, FALSE );
+ ImplClipBoundaries( aRegion, sal_False, sal_False );
ImplSelectClipRegion( aRegion, pGraphics );
}
}
@@ -701,7 +701,7 @@ IMPL_LINK( Window, ImplTrackTimerHdl, Timer*, pTimer )
// -----------------------------------------------------------------------
-void Window::StartTracking( USHORT nFlags )
+void Window::StartTracking( sal_uInt16 nFlags )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -732,7 +732,7 @@ void Window::StartTracking( USHORT nFlags )
// -----------------------------------------------------------------------
-void Window::EndTracking( USHORT nFlags )
+void Window::EndTracking( sal_uInt16 nFlags )
{
ImplSVData* pSVData = ImplGetSVData();
@@ -775,7 +775,7 @@ void Window::EndTracking( USHORT nFlags )
// -----------------------------------------------------------------------
-BOOL Window::IsTracking() const
+sal_Bool Window::IsTracking() const
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -784,7 +784,7 @@ BOOL Window::IsTracking() const
// -----------------------------------------------------------------------
-void Window::StartAutoScroll( USHORT nFlags )
+void Window::StartAutoScroll( sal_uInt16 nFlags )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -821,7 +821,7 @@ void Window::EndAutoScroll()
// -----------------------------------------------------------------------
-BOOL Window::IsAutoScroll() const
+sal_Bool Window::IsAutoScroll() const
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -847,13 +847,13 @@ void Window::SaveBackground( const Point& rPos, const Size& rSize,
{
const Region aOldClip( rSaveDevice.GetClipRegion() );
const Point aPixOffset( rSaveDevice.LogicToPixel( rDestOff ) );
- const BOOL bMap = rSaveDevice.IsMapModeEnabled();
+ const sal_Bool bMap = rSaveDevice.IsMapModeEnabled();
// move clip region to have the same distance to DestOffset
aClip.Move( aPixOffset.X() - aPixPos.X(), aPixOffset.Y() - aPixPos.Y() );
// set pixel clip region
- rSaveDevice.EnableMapMode( FALSE );
+ rSaveDevice.EnableMapMode( sal_False );
rSaveDevice.SetClipRegion( aClip );
rSaveDevice.EnableMapMode( bMap );
rSaveDevice.DrawOutDev( rDestOff, rSize, rPos, rSize, *this );
@@ -882,13 +882,13 @@ sal_uIntPtr Window::SaveFocus()
// -----------------------------------------------------------------------
-BOOL Window::EndSaveFocus( sal_uIntPtr nSaveId, BOOL bRestore )
+sal_Bool Window::EndSaveFocus( sal_uIntPtr nSaveId, sal_Bool bRestore )
{
if ( !nSaveId )
- return FALSE;
+ return sal_False;
else
{
- BOOL bOK = TRUE;
+ sal_Bool bOK = sal_True;
ImplFocusDelData* pDelData = (ImplFocusDelData*)(void*)nSaveId;
if ( !pDelData->IsDelete() )
{
@@ -951,7 +951,7 @@ void Window::SetZoomedPointFont( const Font& rFont )
long nFontDiff = Abs( GetFont().GetSize().Height()-aMetric.GetSize().Height() );
if ( (aMetric.GetType() == TYPE_RASTER) && (nFontDiff >= 2) )
{
- USHORT nType;
+ sal_uInt16 nType;
if ( aMetric.GetPitch() == PITCH_FIXED )
nType = DEFAULTFONT_FIXED;
else
@@ -1044,7 +1044,7 @@ void Window::SetControlForeground()
if ( mpWindowImpl->mbControlForeground )
{
mpWindowImpl->maControlForeground = Color( COL_TRANSPARENT );
- mpWindowImpl->mbControlForeground = FALSE;
+ mpWindowImpl->mbControlForeground = sal_False;
StateChanged( STATE_CHANGE_CONTROLFOREGROUND );
}
}
@@ -1060,7 +1060,7 @@ void Window::SetControlForeground( const Color& rColor )
if ( mpWindowImpl->mbControlForeground )
{
mpWindowImpl->maControlForeground = Color( COL_TRANSPARENT );
- mpWindowImpl->mbControlForeground = FALSE;
+ mpWindowImpl->mbControlForeground = sal_False;
StateChanged( STATE_CHANGE_CONTROLFOREGROUND );
}
}
@@ -1069,7 +1069,7 @@ void Window::SetControlForeground( const Color& rColor )
if ( mpWindowImpl->maControlForeground != rColor )
{
mpWindowImpl->maControlForeground = rColor;
- mpWindowImpl->mbControlForeground = TRUE;
+ mpWindowImpl->mbControlForeground = sal_True;
StateChanged( STATE_CHANGE_CONTROLFOREGROUND );
}
}
@@ -1084,7 +1084,7 @@ void Window::SetControlBackground()
if ( mpWindowImpl->mbControlBackground )
{
mpWindowImpl->maControlBackground = Color( COL_TRANSPARENT );
- mpWindowImpl->mbControlBackground = FALSE;
+ mpWindowImpl->mbControlBackground = sal_False;
StateChanged( STATE_CHANGE_CONTROLBACKGROUND );
}
}
@@ -1100,7 +1100,7 @@ void Window::SetControlBackground( const Color& rColor )
if ( mpWindowImpl->mbControlBackground )
{
mpWindowImpl->maControlBackground = Color( COL_TRANSPARENT );
- mpWindowImpl->mbControlBackground = FALSE;
+ mpWindowImpl->mbControlBackground = sal_False;
StateChanged( STATE_CHANGE_CONTROLBACKGROUND );
}
}
@@ -1109,7 +1109,7 @@ void Window::SetControlBackground( const Color& rColor )
if ( mpWindowImpl->maControlBackground != rColor )
{
mpWindowImpl->maControlBackground = rColor;
- mpWindowImpl->mbControlBackground = TRUE;
+ mpWindowImpl->mbControlBackground = sal_True;
StateChanged( STATE_CHANGE_CONTROLBACKGROUND );
}
}
@@ -1173,12 +1173,12 @@ long Window::GetDrawPixel( OutputDevice* pDev, long nPixels ) const
// -----------------------------------------------------------------------
-BOOL Window::HandleScrollCommand( const CommandEvent& rCmd,
+sal_Bool Window::HandleScrollCommand( const CommandEvent& rCmd,
ScrollBar* pHScrl, ScrollBar* pVScrl )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( pHScrl || pVScrl )
{
@@ -1186,7 +1186,7 @@ BOOL Window::HandleScrollCommand( const CommandEvent& rCmd,
{
case COMMAND_STARTAUTOSCROLL:
{
- USHORT nFlags = 0;
+ sal_uInt16 nFlags = 0;
if ( pHScrl )
{
if ( (pHScrl->GetVisibleSize() < pHScrl->GetRangeMax()) &&
@@ -1203,7 +1203,7 @@ BOOL Window::HandleScrollCommand( const CommandEvent& rCmd,
if ( nFlags )
{
StartAutoScroll( nFlags );
- bRet = TRUE;
+ bRet = sal_True;
}
}
break;
@@ -1214,7 +1214,7 @@ BOOL Window::HandleScrollCommand( const CommandEvent& rCmd,
if ( pData && (COMMAND_WHEEL_SCROLL == pData->GetMode()) )
{
- ULONG nScrollLines = pData->GetScrollLines();
+ sal_uIntPtr nScrollLines = pData->GetScrollLines();
long nLines;
if ( nScrollLines == COMMAND_WHEEL_PAGESCROLL )
{
@@ -1231,7 +1231,7 @@ BOOL Window::HandleScrollCommand( const CommandEvent& rCmd,
0L,
pData->IsHorz() ? pHScrl : pVScrl,
nLines );
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -1244,7 +1244,7 @@ BOOL Window::HandleScrollCommand( const CommandEvent& rCmd,
{
ImplHandleScroll( pHScrl, pData->GetDeltaX(),
pVScrl, pData->GetDeltaY() );
- bRet = TRUE;
+ bRet = sal_True;
}
}
break;
@@ -1312,7 +1312,7 @@ void Window::ImplHandleScroll( ScrollBar* pHScrl, long nX,
// support for docking
// this is currently handled in ImplDockingWindowWrapper
/*
-void Window::ImplSetFloatingMode( BOOL bFloatMode )
+void Window::ImplSetFloatingMode( sal_Bool bFloatMode )
{
// if the window is docked, put it into a flaoting window
// if it is floating put it back in the old frame
@@ -1325,11 +1325,11 @@ void Window::ImplSetFloatingMode( BOOL bFloatMode )
{
if ( pWrapper->PrepareToggleFloatingMode() )
{
- BOOL bVisible = IsVisible();
+ sal_Bool bVisible = IsVisible();
if ( bFloatMode )
{
- Show( FALSE, SHOW_NOFOCUSCHANGE );
+ Show( sal_False, SHOW_NOFOCUSCHANGE );
pWrapper->maDockPos = GetPosPixel();
@@ -1377,7 +1377,7 @@ void Window::ImplSetFloatingMode( BOOL bFloatMode )
}
else
{
- Show( FALSE, SHOW_NOFOCUSCHANGE );
+ Show( sal_False, SHOW_NOFOCUSCHANGE );
// FloatingDaten wird im FloatingWindow speichern
pWrapper->maFloatPos = mpFloatWin->GetPosPixel();
@@ -1418,7 +1418,7 @@ DockingManager* Window::GetDockingManager()
return ImplGetDockingManager();
}
-void Window::EnableDocking( BOOL bEnable )
+void Window::EnableDocking( sal_Bool bEnable )
{
// update list of dockable windows
if( bEnable )
@@ -1444,12 +1444,12 @@ Window* Window::ImplGetTopmostFrameWindow()
// making these Methods out of line to be able to change them lateron without complete rebuild
// TODO: Set the SmartId in here and remove mpWindowImpl->mnHelpId
-void Window::SetHelpId( ULONG nHelpId )
+void Window::SetHelpId( sal_uIntPtr nHelpId )
{
SetSmartHelpId(SmartId(nHelpId));
}
-ULONG Window::GetHelpId() const
+sal_uIntPtr Window::GetHelpId() const
{
return mpWindowImpl->mnHelpId;
}
@@ -1493,8 +1493,8 @@ SmartId Window::GetSmartHelpId() const
// making these Methods out of line to be able to change them lateron without complete rebuild
// TODO: Set the SmartId in here and remove mpWindowImpl->mnUniqId
-void Window::SetUniqueId( ULONG nUniqueId ) { mpWindowImpl->mnUniqId = nUniqueId; }
-ULONG Window::GetUniqueId() const { return mpWindowImpl->mnUniqId; }
+void Window::SetUniqueId( sal_uIntPtr nUniqueId ) { mpWindowImpl->mnUniqId = nUniqueId; }
+sal_uIntPtr Window::GetUniqueId() const { return mpWindowImpl->mnUniqId; }
void Window::SetSmartUniqueId( const SmartId& aId, SmartIdUpdateMode aMode )
@@ -1607,47 +1607,47 @@ Window* Window::ImplGetFrameWindow() const
return mpWindowImpl->mpFrameWindow;
}
-BOOL Window::ImplIsDockingWindow() const
+sal_Bool Window::ImplIsDockingWindow() const
{
return mpWindowImpl->mbDockWin;
}
-BOOL Window::ImplIsFloatingWindow() const
+sal_Bool Window::ImplIsFloatingWindow() const
{
return mpWindowImpl->mbFloatWin;
}
-BOOL Window::ImplIsToolbox() const
+sal_Bool Window::ImplIsToolbox() const
{
return mpWindowImpl->mbToolBox;
}
-BOOL Window::ImplIsSplitter() const
+sal_Bool Window::ImplIsSplitter() const
{
return mpWindowImpl->mbSplitter;
}
-BOOL Window::ImplIsPushButton() const
+sal_Bool Window::ImplIsPushButton() const
{
return mpWindowImpl->mbPushButton;
}
-BOOL Window::ImplIsOverlapWindow() const
+sal_Bool Window::ImplIsOverlapWindow() const
{
return mpWindowImpl->mbOverlapWin;
}
-void Window::ImplSetActive( BOOL bActive )
+void Window::ImplSetActive( sal_Bool bActive )
{
mpWindowImpl->mbActive = bActive;
}
-BOOL Window::ImplIsMouseTransparent() const
+sal_Bool Window::ImplIsMouseTransparent() const
{
return mpWindowImpl->mbMouseTransparent;
}
-void Window::ImplSetMouseTransparent( BOOL bTransparent )
+void Window::ImplSetMouseTransparent( sal_Bool bTransparent )
{
mpWindowImpl->mbMouseTransparent = bTransparent;
}
@@ -1678,7 +1678,7 @@ void Window::ImplFrameToOutput( Rectangle& rRect )
rRect.Bottom()-=mnOutOffY;
}
-void Window::SetCompoundControl( BOOL bCompound )
+void Window::SetCompoundControl( sal_Bool bCompound )
{
mpWindowImpl->mbCompoundControl = bCompound;
}
@@ -1722,77 +1722,77 @@ WindowType Window::GetType() const
{
return mpWindowImpl->mnType;
}
-BOOL Window::IsSystemWindow() const
+sal_Bool Window::IsSystemWindow() const
{
return mpWindowImpl->mbSysWin;
}
-BOOL Window::IsDialog() const
+sal_Bool Window::IsDialog() const
{
return mpWindowImpl->mbDialog;
}
-BOOL Window::IsMenuFloatingWindow() const
+sal_Bool Window::IsMenuFloatingWindow() const
{
return mpWindowImpl->mbMenuFloatingWindow;
}
-BOOL Window::IsToolbarFloatingWindow() const
+sal_Bool Window::IsToolbarFloatingWindow() const
{
return mpWindowImpl->mbToolbarFloatingWindow;
}
-void Window::EnableAllResize( BOOL bEnable )
+void Window::EnableAllResize( sal_Bool bEnable )
{
mpWindowImpl->mbAllResize = bEnable;
}
-BOOL Window::IsAllResizeEnabled() const
+sal_Bool Window::IsAllResizeEnabled() const
{
return mpWindowImpl->mbAllResize;
}
-BOOL Window::IsClipSiblingsEnabled() const
+sal_Bool Window::IsClipSiblingsEnabled() const
{
return mpWindowImpl->mbClipSiblings;
}
-void Window::EnableChildTransparentMode( BOOL bEnable )
+void Window::EnableChildTransparentMode( sal_Bool bEnable )
{
mpWindowImpl->mbChildTransparent = bEnable;
}
-BOOL Window::IsChildTransparentModeEnabled() const
+sal_Bool Window::IsChildTransparentModeEnabled() const
{
return mpWindowImpl->mbChildTransparent;
}
-BOOL Window::IsMouseTransparent() const
+sal_Bool Window::IsMouseTransparent() const
{
return mpWindowImpl->mbMouseTransparent;
}
-BOOL Window::IsPaintTransparent() const
+sal_Bool Window::IsPaintTransparent() const
{
return mpWindowImpl->mbPaintTransparent;
}
-void Window::SetDialogControlStart( BOOL bStart )
+void Window::SetDialogControlStart( sal_Bool bStart )
{
mpWindowImpl->mbDlgCtrlStart = bStart;
}
-BOOL Window::IsDialogControlStart() const
+sal_Bool Window::IsDialogControlStart() const
{
return mpWindowImpl->mbDlgCtrlStart;
}
-void Window::SetDialogControlFlags( USHORT nFlags )
+void Window::SetDialogControlFlags( sal_uInt16 nFlags )
{
mpWindowImpl->mnDlgCtrlFlags = nFlags;
}
-USHORT Window::GetDialogControlFlags() const
+sal_uInt16 Window::GetDialogControlFlags() const
{
return mpWindowImpl->mnDlgCtrlFlags;
}
@@ -1802,22 +1802,22 @@ const InputContext& Window::GetInputContext() const
return mpWindowImpl->maInputContext;
}
-BOOL Window::IsExtTextInput() const
+sal_Bool Window::IsExtTextInput() const
{
return mpWindowImpl->mbExtTextInput;
}
-void Window::EnableChildNotify( BOOL bEnable )
+void Window::EnableChildNotify( sal_Bool bEnable )
{
mpWindowImpl->mbChildNotify = bEnable;
}
-BOOL Window::IsChildNotify() const
+sal_Bool Window::IsChildNotify() const
{
return mpWindowImpl->mbChildNotify;
}
-BOOL Window::IsControlFont() const
+sal_Bool Window::IsControlFont() const
{
return (mpWindowImpl->mpControlFont != 0);
}
@@ -1827,7 +1827,7 @@ Color Window::GetControlForeground() const
return mpWindowImpl->maControlForeground;
}
-BOOL Window::IsControlForeground() const
+sal_Bool Window::IsControlForeground() const
{
return mpWindowImpl->mbControlForeground;
}
@@ -1837,12 +1837,12 @@ Color Window::GetControlBackground() const
return mpWindowImpl->maControlBackground;
}
-BOOL Window::IsControlBackground() const
+sal_Bool Window::IsControlBackground() const
{
return mpWindowImpl->mbControlBackground;
}
-BOOL Window::IsInPaint() const
+sal_Bool Window::IsInPaint() const
{
return mpWindowImpl->mbInPaint;
}
@@ -1852,128 +1852,128 @@ Window* Window::GetParent() const
return mpWindowImpl->mpRealParent;
}
-BOOL Window::IsVisible() const
+sal_Bool Window::IsVisible() const
{
return mpWindowImpl->mbVisible;
}
-BOOL Window::IsReallyVisible() const
+sal_Bool Window::IsReallyVisible() const
{
return mpWindowImpl->mbReallyVisible;
}
-BOOL Window::IsParentPathVisible() const
+sal_Bool Window::IsParentPathVisible() const
{
return mpWindowImpl->mbReallyVisible;
}
-BOOL Window::IsReallyShown() const
+sal_Bool Window::IsReallyShown() const
{
return mpWindowImpl->mbReallyShown;
}
-BOOL Window::IsInInitShow() const
+sal_Bool Window::IsInInitShow() const
{
return mpWindowImpl->mbInInitShow;
}
-BOOL Window::IsEnabled() const
+sal_Bool Window::IsEnabled() const
{
return !mpWindowImpl->mbDisabled;
}
-BOOL Window::IsInputEnabled() const
+sal_Bool Window::IsInputEnabled() const
{
return !mpWindowImpl->mbInputDisabled;
}
-BOOL Window::IsAlwaysEnableInput() const
+sal_Bool Window::IsAlwaysEnableInput() const
{
return mpWindowImpl->meAlwaysInputMode == AlwaysInputEnabled;
}
-BOOL Window::IsAlwaysDisableInput() const
+sal_Bool Window::IsAlwaysDisableInput() const
{
return mpWindowImpl->meAlwaysInputMode == AlwaysInputDisabled;
}
-USHORT Window::GetActivateMode() const
+sal_uInt16 Window::GetActivateMode() const
{
return mpWindowImpl->mnActivateMode;
}
-BOOL Window::IsAlwaysOnTopEnabled() const
+sal_Bool Window::IsAlwaysOnTopEnabled() const
{
return mpWindowImpl->mbAlwaysOnTop;
}
-BOOL Window::IsDefaultPos() const
+sal_Bool Window::IsDefaultPos() const
{
return mpWindowImpl->mbDefPos;
}
-BOOL Window::IsDefaultSize() const
+sal_Bool Window::IsDefaultSize() const
{
return mpWindowImpl->mbDefSize;
}
-void Window::EnablePaint( BOOL bEnable )
+void Window::EnablePaint( sal_Bool bEnable )
{
mpWindowImpl->mbPaintDisabled = !bEnable;
}
-BOOL Window::IsPaintEnabled() const
+sal_Bool Window::IsPaintEnabled() const
{
return !mpWindowImpl->mbPaintDisabled;
}
-BOOL Window::IsUpdateMode() const
+sal_Bool Window::IsUpdateMode() const
{
return !mpWindowImpl->mbNoUpdate;
}
-void Window::SetParentUpdateMode( BOOL bUpdate )
+void Window::SetParentUpdateMode( sal_Bool bUpdate )
{
mpWindowImpl->mbNoParentUpdate = !bUpdate;
}
-BOOL Window::IsParentUpdateMode() const
+sal_Bool Window::IsParentUpdateMode() const
{
return !mpWindowImpl->mbNoParentUpdate;
}
-BOOL Window::IsActive() const
+sal_Bool Window::IsActive() const
{
return mpWindowImpl->mbActive;
}
-USHORT Window::GetGetFocusFlags() const
+sal_uInt16 Window::GetGetFocusFlags() const
{
return mpWindowImpl->mnGetFocusFlags;
}
-BOOL Window::IsCompoundControl() const
+sal_Bool Window::IsCompoundControl() const
{
return mpWindowImpl->mbCompoundControl;
}
-BOOL Window::HasCompoundControlFocus() const
+sal_Bool Window::HasCompoundControlFocus() const
{
return mpWindowImpl->mbCompoundControlHasFocus;
}
-BOOL Window::IsChildPointerOverwrite() const
+sal_Bool Window::IsChildPointerOverwrite() const
{
return mpWindowImpl->mbChildPtrOverwrite;
}
-BOOL Window::IsPointerVisible() const
+sal_Bool Window::IsPointerVisible() const
{
return !mpWindowImpl->mbNoPtrVisible;
}
-BOOL Window::IsWait() const
+sal_Bool Window::IsWait() const
{
return (mpWindowImpl->mnWaitCount != 0);
}
@@ -1988,7 +1988,7 @@ const Fraction& Window::GetZoom() const
return mpWindowImpl->maZoom;
}
-BOOL Window::IsZoom() const
+sal_Bool Window::IsZoom() const
{
return mpWindowImpl->maZoom.GetNumerator() != mpWindowImpl->maZoom.GetDenominator();
}
@@ -1996,7 +1996,7 @@ BOOL Window::IsZoom() const
void Window::SetHelpText( const XubString& rHelpText )
{
mpWindowImpl->maHelpText = rHelpText;
- mpWindowImpl->mbHelpTextDynamic = TRUE;
+ mpWindowImpl->mbHelpTextDynamic = sal_True;
}
void Window::SetQuickHelpText( const XubString& rHelpText )
@@ -2019,12 +2019,12 @@ void* Window::GetData() const
return mpWindowImpl->mpUserData;
}
-BOOL Window::IsCreatedWithToolkit() const
+sal_Bool Window::IsCreatedWithToolkit() const
{
return mpWindowImpl->mbCreatedWithToolkit;
}
-void Window::SetCreatedWithToolkit( BOOL b )
+void Window::SetCreatedWithToolkit( sal_Bool b )
{
mpWindowImpl->mbCreatedWithToolkit = b;
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index 7b0512a1320b..7498de8a167d 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -133,9 +133,9 @@ long ImplCallEvent( NotifyEvent& rEvt )
// =======================================================================
-static BOOL ImplHandleMouseFloatMode( Window* pChild, const Point& rMousePos,
- USHORT nCode, USHORT nSVEvent,
- BOOL bMouseLeave )
+static sal_Bool ImplHandleMouseFloatMode( Window* pChild, const Point& rMousePos,
+ sal_uInt16 nCode, sal_uInt16 nSVEvent,
+ sal_Bool bMouseLeave )
{
ImplSVData* pSVData = ImplGetSVData();
@@ -146,21 +146,21 @@ static BOOL ImplHandleMouseFloatMode( Window* pChild, const Point& rMousePos,
* #93895# since floats are system windows, coordinates have
* to be converted to float relative for the hittest
*/
- USHORT nHitTest = IMPL_FLOATWIN_HITTEST_OUTSIDE;
+ sal_uInt16 nHitTest = IMPL_FLOATWIN_HITTEST_OUTSIDE;
FloatingWindow* pFloat = pSVData->maWinData.mpFirstFloat->ImplFloatHitTest( pChild, rMousePos, nHitTest );
FloatingWindow* pLastLevelFloat;
- ULONG nPopupFlags;
+ sal_uIntPtr nPopupFlags;
if ( nSVEvent == EVENT_MOUSEMOVE )
{
if ( bMouseLeave )
- return TRUE;
+ return sal_True;
if ( !pFloat || (nHitTest & IMPL_FLOATWIN_HITTEST_RECT) )
{
if ( pSVData->maHelpData.mpHelpWin && !pSVData->maHelpData.mbKeyboardHelp )
ImplDestroyHelpWindow( true );
pChild->ImplGetFrame()->SetPointer( POINTER_ARROW );
- return TRUE;
+ return sal_True;
}
}
else
@@ -176,15 +176,15 @@ static BOOL ImplHandleMouseFloatMode( Window* pChild, const Point& rMousePos,
pLastLevelFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL | FLOATWIN_POPUPMODEEND_CLOSEALL );
// Erstmal ausgebaut als Hack fuer Bug 53378
// if ( nPopupFlags & FLOATWIN_POPUPMODE_PATHMOUSECANCELCLICK )
-// return FALSE;
+// return sal_False;
// else
- return TRUE;
+ return sal_True;
}
else if ( nHitTest & IMPL_FLOATWIN_HITTEST_RECT )
{
if ( !(pFloat->GetPopupModeFlags() & FLOATWIN_POPUPMODE_NOMOUSERECTCLOSE) )
pFloat->ImplSetMouseDown();
- return TRUE;
+ return sal_True;
}
}
else
@@ -195,7 +195,7 @@ static BOOL ImplHandleMouseFloatMode( Window* pChild, const Point& rMousePos,
{
if ( pFloat->ImplIsMouseDown() )
pFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL );
- return TRUE;
+ return sal_True;
}
}
else
@@ -205,7 +205,7 @@ static BOOL ImplHandleMouseFloatMode( Window* pChild, const Point& rMousePos,
if ( !(nPopupFlags & FLOATWIN_POPUPMODE_NOMOUSEUPCLOSE) )
{
pLastLevelFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL | FLOATWIN_POPUPMODEEND_CLOSEALL );
- return TRUE;
+ return sal_True;
}
}
}
@@ -220,21 +220,21 @@ static BOOL ImplHandleMouseFloatMode( Window* pChild, const Point& rMousePos,
{
if ( (nPopupFlags & FLOATWIN_POPUPMODE_NOMOUSEUPCLOSE) &&
(nSVEvent == EVENT_MOUSEBUTTONUP) )
- return TRUE;
+ return sal_True;
pLastLevelFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL | FLOATWIN_POPUPMODEEND_CLOSEALL );
if ( nPopupFlags & FLOATWIN_POPUPMODE_PATHMOUSECANCELCLICK )
- return FALSE;
+ return sal_False;
else
- return TRUE;
+ return sal_True;
}
else
- return TRUE;
+ return sal_True;
}
}
}
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -246,7 +246,7 @@ static void ImplHandleMouseHelpRequest( Window* pChild, const Point& rMousePos )
!( pSVData->maHelpData.mpHelpWin->IsWindowOrChild( pChild ) ||
pChild->IsWindowOrChild( pSVData->maHelpData.mpHelpWin ) ) )
{
- USHORT nHelpMode = 0;
+ sal_uInt16 nHelpMode = 0;
if ( pSVData->maHelpData.mbQuickHelp )
nHelpMode = HELPMODE_QUICK;
if ( pSVData->maHelpData.mbBalloonHelp )
@@ -256,9 +256,9 @@ static void ImplHandleMouseHelpRequest( Window* pChild, const Point& rMousePos )
if ( pChild->IsInputEnabled() && ! pChild->IsInModalMode() )
{
HelpEvent aHelpEvent( rMousePos, nHelpMode );
- pSVData->maHelpData.mbRequestingHelp = TRUE;
+ pSVData->maHelpData.mbRequestingHelp = sal_True;
pChild->RequestHelp( aHelpEvent );
- pSVData->maHelpData.mbRequestingHelp = FALSE;
+ pSVData->maHelpData.mbRequestingHelp = sal_False;
}
// #104172# do not kill keyboard activated tooltips
else if ( pSVData->maHelpData.mpHelpWin && !pSVData->maHelpData.mbKeyboardHelp)
@@ -282,8 +282,8 @@ static void ImplSetMousePointer( Window* pChild )
// -----------------------------------------------------------------------
-static BOOL ImplCallCommand( Window* pChild, USHORT nEvt, void* pData = NULL,
- BOOL bMouse = FALSE, Point* pPos = NULL )
+static sal_Bool ImplCallCommand( Window* pChild, sal_uInt16 nEvt, void* pData = NULL,
+ sal_Bool bMouse = sal_False, Point* pPos = NULL )
{
Point aPos;
if ( pPos )
@@ -303,24 +303,24 @@ static BOOL ImplCallCommand( Window* pChild, USHORT nEvt, void* pData = NULL,
CommandEvent aCEvt( aPos, nEvt, bMouse, pData );
NotifyEvent aNCmdEvt( EVENT_COMMAND, pChild, &aCEvt );
ImplDelData aDelData( pChild );
- BOOL bPreNotify = (ImplCallPreNotify( aNCmdEvt ) != 0);
+ sal_Bool bPreNotify = (ImplCallPreNotify( aNCmdEvt ) != 0);
if ( aDelData.IsDelete() )
- return FALSE;
+ return sal_False;
if ( !bPreNotify )
{
- pChild->ImplGetWindowImpl()->mbCommand = FALSE;
+ pChild->ImplGetWindowImpl()->mbCommand = sal_False;
pChild->Command( aCEvt );
if( aDelData.IsDelete() )
- return FALSE;
+ return sal_False;
pChild->ImplNotifyKeyMouseCommandEventListeners( aNCmdEvt );
if ( aDelData.IsDelete() )
- return FALSE;
+ return sal_False;
if ( pChild->ImplGetWindowImpl()->mbCommand )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -343,24 +343,24 @@ static long ContextMenuEventLink( void* pCEvent, void* )
if( ! pEv->aDelData.IsDelete() )
{
pEv->pWindow->ImplRemoveDel( &pEv->aDelData );
- ImplCallCommand( pEv->pWindow, COMMAND_CONTEXTMENU, NULL, TRUE, &pEv->aChildPos );
+ ImplCallCommand( pEv->pWindow, COMMAND_CONTEXTMENU, NULL, sal_True, &pEv->aChildPos );
}
delete pEv;
return 0;
}
-long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave,
- long nX, long nY, ULONG nMsgTime,
- USHORT nCode, USHORT nMode )
+long ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouseLeave,
+ long nX, long nY, sal_uIntPtr nMsgTime,
+ sal_uInt16 nCode, sal_uInt16 nMode )
{
ImplSVData* pSVData = ImplGetSVData();
Point aMousePos( nX, nY );
Window* pChild;
long nRet;
- USHORT nClicks;
+ sal_uInt16 nClicks;
ImplFrameData* pWinFrameData = pWindow->ImplGetFrameData();
- USHORT nOldCode = pWinFrameData->mnMouseCode;
+ sal_uInt16 nOldCode = pWinFrameData->mnMouseCode;
// we need a mousemove event, befor we get a mousebuttondown or a
// mousebuttonup event
@@ -383,7 +383,7 @@ long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave,
if ( (pWinFrameData->mnLastMouseX != nX) ||
(pWinFrameData->mnLastMouseY != nY) )
{
- ImplHandleMouseEvent( pWindow, EVENT_MOUSEMOVE, FALSE, nX, nY, nMsgTime, nCode, nMode );
+ ImplHandleMouseEvent( pWindow, EVENT_MOUSEMOVE, sal_False, nX, nY, nMsgTime, nCode, nMode );
}
}
@@ -396,7 +396,7 @@ long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave,
pWinFrameData->mnMouseMode = nMode & ~(MOUSE_SYNTHETIC | MOUSE_MODIFIERCHANGED);
if ( bMouseLeave )
{
- pWinFrameData->mbMouseIn = FALSE;
+ pWinFrameData->mbMouseIn = sal_False;
if ( pSVData->maHelpData.mpHelpWin && !pSVData->maHelpData.mbKeyboardHelp )
{
ImplDelData aDelData( pWindow );
@@ -408,7 +408,7 @@ long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave,
}
}
else
- pWinFrameData->mbMouseIn = TRUE;
+ pWinFrameData->mbMouseIn = sal_True;
DBG_ASSERT( !pSVData->maWinData.mpTrackWin ||
(pSVData->maWinData.mpTrackWin == pSVData->maWinData.mpCaptureWin),
@@ -561,7 +561,7 @@ long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave,
!(((nMouseY-nDragH) <= pMouseDownWin->ImplGetFrameData()->mnFirstMouseY) &&
((nMouseY+nDragH) >= pMouseDownWin->ImplGetFrameData()->mnFirstMouseY)) )
{
- pMouseDownWin->ImplGetFrameData()->mbStartDragCalled = TRUE;
+ pMouseDownWin->ImplGetFrameData()->mbStartDragCalled = sal_True;
// Check if drag source provides it's own recognizer
if( pMouseDownWin->ImplGetFrameData()->mbInternalDragGestureRecognizer )
@@ -592,7 +592,7 @@ long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave,
nClicks,
sal_False );
- ULONG nCount = Application::ReleaseSolarMutex();
+ sal_uIntPtr nCount = Application::ReleaseSolarMutex();
// FIXME: where do I get Action from ?
::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragSource > xDragSource = pMouseDownWin->GetDragSource();
@@ -610,7 +610,7 @@ long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave,
}
}
else
- pMouseDownWin->ImplGetFrameData()->mbStartDragCalled = TRUE;
+ pMouseDownWin->ImplGetFrameData()->mbStartDragCalled = sal_True;
}
// test for mouseleave and mouseenter
@@ -624,8 +624,8 @@ long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave,
NotifyEvent aNLeaveEvt( EVENT_MOUSEMOVE, pMouseMoveWin, &aMLeaveEvt );
ImplDelData aDelData;
ImplDelData aDelData2;
- pWinFrameData->mbInMouseMove = TRUE;
- pMouseMoveWin->ImplGetWinData()->mbMouseOver = FALSE;
+ pWinFrameData->mbInMouseMove = sal_True;
+ pMouseMoveWin->ImplGetWinData()->mbMouseOver = sal_False;
pMouseMoveWin->ImplAddDel( &aDelData );
// Durch MouseLeave kann auch dieses Fenster zerstoert
// werden
@@ -640,7 +640,7 @@ long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave,
}
pWinFrameData->mpMouseMoveWin = NULL;
- pWinFrameData->mbInMouseMove = FALSE;
+ pWinFrameData->mbInMouseMove = sal_False;
if ( pChild )
{
@@ -658,7 +658,7 @@ long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave,
}
pWinFrameData->mpMouseMoveWin = pChild;
if( pChild )
- pChild->ImplGetWinData()->mbMouseOver = TRUE;
+ pChild->ImplGetWinData()->mbMouseOver = sal_True;
// MouseLeave
if ( !pChild )
@@ -670,7 +670,7 @@ long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave,
if ( nSVEvent == EVENT_MOUSEBUTTONDOWN )
{
const MouseSettings& rMSettings = pChild->GetSettings().GetMouseSettings();
- ULONG nDblClkTime = rMSettings.GetDoubleClickTime();
+ sal_uIntPtr nDblClkTime = rMSettings.GetDoubleClickTime();
long nDblClkW = rMSettings.GetDoubleClickWidth();
long nDblClkH = rMSettings.GetDoubleClickHeight();
//long nMouseX = nX;
@@ -687,7 +687,7 @@ long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave,
((nMouseY+nDblClkH) >= pChild->ImplGetFrameData()->mnFirstMouseY) )
{
pChild->ImplGetFrameData()->mnClickCount++;
- pChild->ImplGetFrameData()->mbStartDragCalled = TRUE;
+ pChild->ImplGetFrameData()->mbStartDragCalled = sal_True;
}
else
{
@@ -726,7 +726,7 @@ long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave,
if ( !aDelData.IsDelete() )
{
pChild->ImplRemoveDel( &aDelData );
- pChild->ImplGetFrameData()->mbStartDragCalled = TRUE;
+ pChild->ImplGetFrameData()->mbStartDragCalled = sal_True;
}
return 1;
}
@@ -735,15 +735,15 @@ long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave,
}
// call handler
- BOOL bDrag = FALSE;
- BOOL bCallHelpRequest = TRUE;
+ sal_Bool bDrag = sal_False;
+ sal_Bool bCallHelpRequest = sal_True;
DBG_ASSERT( pChild, "ImplHandleMouseEvent: pChild is NULL" );
ImplDelData aDelData;
NotifyEvent aNEvt( nSVEvent, pChild, &aMEvt );
pChild->ImplAddDel( &aDelData );
if ( nSVEvent == EVENT_MOUSEMOVE )
- pChild->ImplGetFrameData()->mbInMouseMove = TRUE;
+ pChild->ImplGetFrameData()->mbInMouseMove = sal_True;
// bring window into foreground on mouseclick
if ( nSVEvent == EVENT_MOUSEBUTTONDOWN )
@@ -773,7 +773,7 @@ long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave,
(pSVData->maWinData.mnTrackFlags & STARTTRACK_SCROLLREPEAT) )
pSVData->maWinData.mpTrackTimer->Start();
}
- bCallHelpRequest = FALSE;
+ bCallHelpRequest = sal_False;
nRet = 1;
}
else
@@ -784,16 +784,16 @@ long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave,
pChild->ToTop( TOTOP_NOGRABFOCUS );
if( aDelData.IsDelete() )
- bCallHelpRequest = FALSE;
+ bCallHelpRequest = sal_False;
else
{
// if the MouseMove handler changes the help window's visibility
// the HelpRequest handler should not be called anymore
Window* pOldHelpTextWin = pSVData->maHelpData.mpHelpWin;
- pChild->ImplGetWindowImpl()->mbMouseMove = FALSE;
+ pChild->ImplGetWindowImpl()->mbMouseMove = sal_False;
pChild->MouseMove( aMEvt );
if ( pOldHelpTextWin != pSVData->maHelpData.mpHelpWin )
- bCallHelpRequest = FALSE;
+ bCallHelpRequest = sal_False;
}
}
}
@@ -804,7 +804,7 @@ long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave,
nRet = 1;
else
{
- pChild->ImplGetWindowImpl()->mbMouseButtonDown = FALSE;
+ pChild->ImplGetWindowImpl()->mbMouseButtonDown = sal_False;
pChild->MouseButtonDown( aMEvt );
}
}
@@ -817,7 +817,7 @@ long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave,
}
else
{
- pChild->ImplGetWindowImpl()->mbMouseButtonUp = FALSE;
+ pChild->ImplGetWindowImpl()->mbMouseButtonUp = sal_False;
pChild->MouseButtonUp( aMEvt );
}
}
@@ -832,7 +832,7 @@ long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave,
if ( nSVEvent == EVENT_MOUSEMOVE )
- pChild->ImplGetWindowImpl()->mpFrameData->mbInMouseMove = FALSE;
+ pChild->ImplGetWindowImpl()->mpFrameData->mbInMouseMove = sal_False;
if ( nSVEvent == EVENT_MOUSEMOVE )
{
@@ -870,11 +870,11 @@ long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave,
if ( /*(nRet == 0) &&*/ (nClicks == 1) && (nSVEvent == EVENT_MOUSEBUTTONDOWN) &&
(nCode == MOUSE_MIDDLE) )
{
- USHORT nMiddleAction = pChild->GetSettings().GetMouseSettings().GetMiddleButtonAction();
+ sal_uInt16 nMiddleAction = pChild->GetSettings().GetMouseSettings().GetMiddleButtonAction();
if ( nMiddleAction == MOUSE_MIDDLE_AUTOSCROLL )
- nRet = !ImplCallCommand( pChild, COMMAND_STARTAUTOSCROLL, NULL, TRUE, &aChildPos );
+ nRet = !ImplCallCommand( pChild, COMMAND_STARTAUTOSCROLL, NULL, sal_True, &aChildPos );
else if ( nMiddleAction == MOUSE_MIDDLE_PASTESELECTION )
- nRet = !ImplCallCommand( pChild, COMMAND_PASTESELECTION, NULL, TRUE, &aChildPos );
+ nRet = !ImplCallCommand( pChild, COMMAND_PASTESELECTION, NULL, sal_True, &aChildPos );
}
else
{
@@ -883,7 +883,7 @@ long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave,
if ( (nCode == rMSettings.GetContextMenuCode()) &&
(nClicks == rMSettings.GetContextMenuClicks()) )
{
- BOOL bContextMenu;
+ sal_Bool bContextMenu;
if ( rMSettings.GetContextMenuDown() )
bContextMenu = (nSVEvent == EVENT_MOUSEBUTTONDOWN);
else
@@ -907,7 +907,7 @@ long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave,
Application::PostUserEvent( Link( pEv, ContextMenuEventLink ) );
}
else
- nRet = ! ImplCallCommand( pChild, COMMAND_CONTEXTMENU, NULL, TRUE, &aChildPos );
+ nRet = ! ImplCallCommand( pChild, COMMAND_CONTEXTMENU, NULL, sal_True, &aChildPos );
}
}
}
@@ -962,20 +962,20 @@ static Window* ImplGetKeyInputWindow( Window* pWindow )
// -----------------------------------------------------------------------
-static long ImplHandleKey( Window* pWindow, USHORT nSVEvent,
- USHORT nKeyCode, USHORT nCharCode, USHORT nRepeat, BOOL bForward )
+static long ImplHandleKey( Window* pWindow, sal_uInt16 nSVEvent,
+ sal_uInt16 nKeyCode, sal_uInt16 nCharCode, sal_uInt16 nRepeat, sal_Bool bForward )
{
ImplSVData* pSVData = ImplGetSVData();
KeyCode aKeyCode( nKeyCode, nKeyCode );
- USHORT nEvCode = aKeyCode.GetCode();
+ sal_uInt16 nEvCode = aKeyCode.GetCode();
// allow application key listeners to remove the key event
- // but make sure we're not forwarding external KeyEvents, (ie where bForward is FALSE)
+ // but make sure we're not forwarding external KeyEvents, (ie where bForward is sal_False)
// becasue those are coming back from the listener itself and MUST be processed
KeyEvent aKeyEvent( (xub_Unicode)nCharCode, aKeyCode, nRepeat );
if( bForward )
{
- USHORT nVCLEvent;
+ sal_uInt16 nVCLEvent;
switch( nSVEvent )
{
case EVENT_KEYINPUT:
@@ -998,11 +998,11 @@ static long ImplHandleKey( Window* pWindow, USHORT nSVEvent,
if( Application::GetSettings().GetMiscSettings().GetEnableLocalizedDecimalSep() )
{
String aSep( pWindow->GetSettings().GetLocaleDataWrapper().getNumDecimalSep() );
- nCharCode = (USHORT) aSep.GetChar(0);
+ nCharCode = (sal_uInt16) aSep.GetChar(0);
}
}
- BOOL bCtrlF6 = (aKeyCode.GetCode() == KEY_F6) && aKeyCode.IsMod1();
+ sal_Bool bCtrlF6 = (aKeyCode.GetCode() == KEY_F6) && aKeyCode.IsMod1();
// determine last input time
pSVData->maAppData.mnLastInputTime = Time::GetSystemTicks();
@@ -1038,7 +1038,7 @@ static long ImplHandleKey( Window* pWindow, USHORT nSVEvent,
if ( pSVData->maWinData.mpTrackWin )
{
- USHORT nOrigCode = aKeyCode.GetCode();
+ sal_uInt16 nOrigCode = aKeyCode.GetCode();
if ( (nOrigCode == KEY_ESCAPE) && !(pSVData->maWinData.mnTrackFlags & STARTTRACK_NOKEYCANCEL) )
{
@@ -1048,7 +1048,7 @@ static long ImplHandleKey( Window* pWindow, USHORT nSVEvent,
FloatingWindow* pLastLevelFloat = pSVData->maWinData.mpFirstFloat->ImplFindLastLevelFloat();
if ( !(pLastLevelFloat->GetPopupModeFlags() & FLOATWIN_POPUPMODE_NOKEYCLOSE) )
{
- USHORT nEscCode = aKeyCode.GetCode();
+ sal_uInt16 nEscCode = aKeyCode.GetCode();
if ( nEscCode == KEY_ESCAPE )
pLastLevelFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL | FLOATWIN_POPUPMODEEND_CLOSEALL );
@@ -1071,7 +1071,7 @@ static long ImplHandleKey( Window* pWindow, USHORT nSVEvent,
FloatingWindow* pLastLevelFloat = pSVData->maWinData.mpFirstFloat->ImplFindLastLevelFloat();
if ( !(pLastLevelFloat->GetPopupModeFlags() & FLOATWIN_POPUPMODE_NOKEYCLOSE) )
{
- USHORT nCode = aKeyCode.GetCode();
+ sal_uInt16 nCode = aKeyCode.GetCode();
if ( (nCode == KEY_ESCAPE) || bCtrlF6)
{
@@ -1106,19 +1106,19 @@ static long ImplHandleKey( Window* pWindow, USHORT nSVEvent,
KeyEvent aKeyEvt( (xub_Unicode)nCharCode, aKeyCode, nRepeat );
NotifyEvent aNotifyEvt( nSVEvent, pChild, &aKeyEvt );
- BOOL bKeyPreNotify = (ImplCallPreNotify( aNotifyEvt ) != 0);
+ sal_Bool bKeyPreNotify = (ImplCallPreNotify( aNotifyEvt ) != 0);
long nRet = 1;
if ( !bKeyPreNotify && !aDelData.IsDelete() )
{
if ( nSVEvent == EVENT_KEYINPUT )
{
- pChild->ImplGetWindowImpl()->mbKeyInput = FALSE;
+ pChild->ImplGetWindowImpl()->mbKeyInput = sal_False;
pChild->KeyInput( aKeyEvt );
}
else
{
- pChild->ImplGetWindowImpl()->mbKeyUp = FALSE;
+ pChild->ImplGetWindowImpl()->mbKeyUp = sal_False;
pChild->KeyUp( aKeyEvt );
}
// #82968#
@@ -1135,10 +1135,10 @@ static long ImplHandleKey( Window* pWindow, USHORT nSVEvent,
{
if ( !bKeyPreNotify && pChild->ImplGetWindowImpl()->mbKeyInput )
{
- USHORT nCode = aKeyCode.GetCode();
+ sal_uInt16 nCode = aKeyCode.GetCode();
// #101999# is focus in or below toolbox
- BOOL bToolboxFocus=FALSE;
+ sal_Bool bToolboxFocus=sal_False;
if( (nCode == KEY_F1) && aKeyCode.IsShift() )
{
Window *pWin = pWindow->ImplGetWindowImpl()->mpFrameData->mpFocusWin;
@@ -1146,7 +1146,7 @@ static long ImplHandleKey( Window* pWindow, USHORT nSVEvent,
{
if( pWin->ImplGetWindowImpl()->mbToolBox )
{
- bToolboxFocus = TRUE;
+ bToolboxFocus = sal_True;
break;
}
else
@@ -1156,7 +1156,7 @@ static long ImplHandleKey( Window* pWindow, USHORT nSVEvent,
// ContextMenu
if ( (nCode == KEY_CONTEXTMENU) || ((nCode == KEY_F10) && aKeyCode.IsShift() && !aKeyCode.IsMod1() && !aKeyCode.IsMod2() ) )
- nRet = !ImplCallCommand( pChild, COMMAND_CONTEXTMENU, NULL, FALSE );
+ nRet = !ImplCallCommand( pChild, COMMAND_CONTEXTMENU, NULL, sal_False );
else if ( ( (nCode == KEY_F2) && aKeyCode.IsShift() ) || ( (nCode == KEY_F1) && aKeyCode.IsMod1() ) ||
// #101999# no active help when focus in toolbox, simulate BallonHelp instead
( (nCode == KEY_F1) && aKeyCode.IsShift() && bToolboxFocus ) )
@@ -1169,10 +1169,10 @@ static long ImplHandleKey( Window* pWindow, USHORT nSVEvent,
aPos = pChild->OutputToScreenPixel( aPos );
HelpEvent aHelpEvent( aPos, HELPMODE_BALLOON );
- aHelpEvent.SetKeyboardActivated( TRUE );
- pSVData->maHelpData.mbSetKeyboardHelp = TRUE;
+ aHelpEvent.SetKeyboardActivated( sal_True );
+ pSVData->maHelpData.mbSetKeyboardHelp = sal_True;
pChild->RequestHelp( aHelpEvent );
- pSVData->maHelpData.mbSetKeyboardHelp = FALSE;
+ pSVData->maHelpData.mbSetKeyboardHelp = sal_False;
}
else if ( (nCode == KEY_F1) || (nCode == KEY_HELP) )
{
@@ -1219,7 +1219,7 @@ static long ImplHandleKey( Window* pWindow, USHORT nSVEvent,
ImplDelData aChildDelData( pChild );
KeyEvent aKEvt( (xub_Unicode)nCharCode, aKeyCode, nRepeat );
NotifyEvent aNEvt( nSVEvent, pChild, &aKEvt );
- BOOL bPreNotify = (ImplCallPreNotify( aNEvt ) != 0);
+ sal_Bool bPreNotify = (ImplCallPreNotify( aNEvt ) != 0);
if ( aChildDelData.IsDelete() )
return 1;
@@ -1227,12 +1227,12 @@ static long ImplHandleKey( Window* pWindow, USHORT nSVEvent,
{
if ( nSVEvent == EVENT_KEYINPUT )
{
- pChild->ImplGetWindowImpl()->mbKeyInput = FALSE;
+ pChild->ImplGetWindowImpl()->mbKeyInput = sal_False;
pChild->KeyInput( aKEvt );
}
else
{
- pChild->ImplGetWindowImpl()->mbKeyUp = FALSE;
+ pChild->ImplGetWindowImpl()->mbKeyUp = sal_False;
pChild->KeyUp( aKEvt );
}
// #82968#
@@ -1253,8 +1253,8 @@ static long ImplHandleKey( Window* pWindow, USHORT nSVEvent,
static long ImplHandleExtTextInput( Window* pWindow,
const XubString& rText,
- const USHORT* pTextAttr,
- ULONG nCursorPos, USHORT nCursorFlags )
+ const sal_uInt16* pTextAttr,
+ sal_uIntPtr nCursorPos, sal_uInt16 nCursorFlags )
{
ImplSVData* pSVData = ImplGetSVData();
Window* pChild = NULL;
@@ -1279,7 +1279,7 @@ static long ImplHandleExtTextInput( Window* pWindow,
ImplWinData* pWinData = pChild->ImplGetWinData();
if ( !pChild->ImplGetWindowImpl()->mbExtTextInput )
{
- pChild->ImplGetWindowImpl()->mbExtTextInput = TRUE;
+ pChild->ImplGetWindowImpl()->mbExtTextInput = sal_True;
if ( !pWinData->mpExtOldText )
pWinData->mpExtOldText = new UniString;
else
@@ -1298,7 +1298,7 @@ static long ImplHandleExtTextInput( Window* pWindow,
return 0;
// Test for changes
- BOOL bOnlyCursor = FALSE;
+ sal_Bool bOnlyCursor = sal_False;
xub_StrLen nMinLen = Min( pWinData->mpExtOldText->Len(), rText.Len() );
xub_StrLen nDeltaStart = 0;
while ( nDeltaStart < nMinLen )
@@ -1327,7 +1327,7 @@ static long ImplHandleExtTextInput( Window* pWindow,
}
if ( (nDeltaStart >= nMinLen) &&
(pWinData->mpExtOldText->Len() == rText.Len()) )
- bOnlyCursor = TRUE;
+ bOnlyCursor = sal_True;
// Call Event and store the information
CommandExtTextInputData aData( rText, pTextAttr,
@@ -1342,8 +1342,8 @@ static long ImplHandleExtTextInput( Window* pWindow,
}
if ( pTextAttr )
{
- pWinData->mpExtOldAttrAry = new USHORT[rText.Len()];
- memcpy( pWinData->mpExtOldAttrAry, pTextAttr, rText.Len()*sizeof( USHORT ) );
+ pWinData->mpExtOldAttrAry = new sal_uInt16[rText.Len()];
+ memcpy( pWinData->mpExtOldAttrAry, pTextAttr, rText.Len()*sizeof( sal_uInt16 ) );
}
return !ImplCallCommand( pChild, COMMAND_EXTTEXTINPUT, &aData );
}
@@ -1358,7 +1358,7 @@ static long ImplHandleEndExtTextInput( Window* /* pWindow */ )
if ( pChild )
{
- pChild->ImplGetWindowImpl()->mbExtTextInput = FALSE;
+ pChild->ImplGetWindowImpl()->mbExtTextInput = sal_False;
pSVData->maWinData.mpExtTextInputWin = NULL;
ImplWinData* pWinData = pChild->ImplGetWinData();
if ( pWinData->mpExtOldText )
@@ -1435,26 +1435,26 @@ static long ImplHandleInputContextChange( Window* pWindow, LanguageType eNewLang
// -----------------------------------------------------------------------
-static BOOL ImplCallWheelCommand( Window* pWindow, const Point& rPos,
+static sal_Bool ImplCallWheelCommand( Window* pWindow, const Point& rPos,
const CommandWheelData* pWheelData )
{
Point aCmdMousePos = pWindow->ImplFrameToOutput( rPos );
- CommandEvent aCEvt( aCmdMousePos, COMMAND_WHEEL, TRUE, pWheelData );
+ CommandEvent aCEvt( aCmdMousePos, COMMAND_WHEEL, sal_True, pWheelData );
NotifyEvent aNCmdEvt( EVENT_COMMAND, pWindow, &aCEvt );
ImplDelData aDelData( pWindow );
- BOOL bPreNotify = (ImplCallPreNotify( aNCmdEvt ) != 0);
+ sal_Bool bPreNotify = (ImplCallPreNotify( aNCmdEvt ) != 0);
if ( aDelData.IsDelete() )
- return FALSE;
+ return sal_False;
if ( !bPreNotify )
{
- pWindow->ImplGetWindowImpl()->mbCommand = FALSE;
+ pWindow->ImplGetWindowImpl()->mbCommand = sal_False;
pWindow->Command( aCEvt );
if ( aDelData.IsDelete() )
- return FALSE;
+ return sal_False;
if ( pWindow->ImplGetWindowImpl()->mbCommand )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -1471,8 +1471,8 @@ static long ImplHandleWheelEvent( Window* pWindow, const SalWheelMouseEvent& rEv
if( aDogTag.IsDelete() )
return 0;
- USHORT nMode;
- USHORT nCode = rEvt.mnCode;
+ sal_uInt16 nMode;
+ sal_uInt16 nCode = rEvt.mnCode;
bool bHorz = rEvt.mbHorz;
bool bPixel = rEvt.mbDeltaIsPixel;
if ( nCode & KEY_MOD1 )
@@ -1489,7 +1489,7 @@ static long ImplHandleWheelEvent( Window* pWindow, const SalWheelMouseEvent& rEv
CommandWheelData aWheelData( rEvt.mnDelta, rEvt.mnNotchDelta, rEvt.mnScrollLines, nMode, nCode, bHorz, bPixel );
Point aMousePos( rEvt.mnX, rEvt.mnY );
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
// first check any floating window ( eg. drop down listboxes)
bool bIsFloat = false;
@@ -1497,7 +1497,7 @@ static long ImplHandleWheelEvent( Window* pWindow, const SalWheelMouseEvent& rEv
if ( pSVData->maWinData.mpFirstFloat && !pSVData->maWinData.mpCaptureWin &&
!pSVData->maWinData.mpFirstFloat->ImplIsFloatPopupModeWindow( pWindow ) )
{
- USHORT nHitTest = IMPL_FLOATWIN_HITTEST_OUTSIDE;
+ sal_uInt16 nHitTest = IMPL_FLOATWIN_HITTEST_OUTSIDE;
pMouseWindow = pSVData->maWinData.mpFirstFloat->ImplFloatHitTest( pWindow, aMousePos, nHitTest );
}
// then try the window directly beneath the mouse
@@ -1551,7 +1551,7 @@ static long ImplHandleWheelEvent( Window* pWindow, const SalWheelMouseEvent& rEv
FloatingWindow* pLastLevelFloat = pSVData->maWinData.mpFirstFloat->ImplFindLastLevelFloat();
if( pLastLevelFloat )
{
- ULONG nPopupFlags = pLastLevelFloat->GetPopupModeFlags();
+ sal_uIntPtr nPopupFlags = pLastLevelFloat->GetPopupModeFlags();
if ( nPopupFlags & FLOATWIN_POPUPMODE_ALLMOUSEBUTTONCLOSE )
{
pLastLevelFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL | FLOATWIN_POPUPMODEEND_CLOSEALL );
@@ -1563,7 +1563,7 @@ static long ImplHandleWheelEvent( Window* pWindow, const SalWheelMouseEvent& rEv
}
// -----------------------------------------------------------------------
-#define IMPL_PAINT_CHECKRTL ((USHORT)0x0020)
+#define IMPL_PAINT_CHECKRTL ((sal_uInt16)0x0020)
static void ImplHandlePaint( Window* pWindow, const Rectangle& rBoundRect, bool bImmediateUpdate )
{
@@ -1602,7 +1602,7 @@ static void KillOwnPopups( Window* pWindow )
ImplSVData* pSVData = ImplGetSVData();
Window *pParent = pWindow->ImplGetWindowImpl()->mpFrameWindow;
Window *pChild = pSVData->maWinData.mpFirstFloat;
- if ( pChild && pParent->ImplIsWindowOrChild( pChild, TRUE ) )
+ if ( pChild && pParent->ImplIsWindowOrChild( pChild, sal_True ) )
{
if ( !(pSVData->maWinData.mpFirstFloat->GetPopupModeFlags() & FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE) )
pSVData->maWinData.mpFirstFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL | FLOATWIN_POPUPMODEEND_CLOSEALL );
@@ -1629,7 +1629,7 @@ void ImplHandleResize( Window* pWindow, long nNewWidth, long nNewHeight )
{
pWindow->mnOutWidth = nNewWidth;
pWindow->mnOutHeight = nNewHeight;
- pWindow->ImplGetWindowImpl()->mbWaitSystemResize = FALSE;
+ pWindow->ImplGetWindowImpl()->mbWaitSystemResize = sal_False;
if ( pWindow->IsReallyVisible() )
pWindow->ImplSetClipFlag();
if ( pWindow->IsVisible() || pWindow->ImplGetWindow()->ImplGetWindowImpl()->mbAllResize ||
@@ -1660,13 +1660,13 @@ void ImplHandleResize( Window* pWindow, long nNewWidth, long nNewHeight )
pWindow->ImplCallResize(); // otherwise menues cannot be positioned
}
else
- pWindow->ImplGetWindowImpl()->mbCallResize = TRUE;
+ pWindow->ImplGetWindowImpl()->mbCallResize = sal_True;
}
}
pWindow->ImplGetWindowImpl()->mpFrameData->mbNeedSysWindow = (nNewWidth < IMPL_MIN_NEEDSYSWIN) ||
(nNewHeight < IMPL_MIN_NEEDSYSWIN);
- BOOL bMinimized = (nNewWidth <= 0) || (nNewHeight <= 0);
+ sal_Bool bMinimized = (nNewWidth <= 0) || (nNewHeight <= 0);
if( bMinimized != pWindow->ImplGetWindowImpl()->mpFrameData->mbMinimized )
pWindow->ImplGetWindowImpl()->mpFrameWindow->ImplNotifyIconifiedState( bMinimized );
pWindow->ImplGetWindowImpl()->mpFrameData->mbMinimized = bMinimized;
@@ -1692,7 +1692,7 @@ static void ImplHandleMove( Window* pWindow )
if ( pWindow->IsVisible() )
pWindow->ImplCallMove();
else
- pWindow->ImplGetWindowImpl()->mbCallMove = TRUE; // make sure the framepos will be updated on the next Show()
+ pWindow->ImplGetWindowImpl()->mbCallMove = sal_True; // make sure the framepos will be updated on the next Show()
if ( pWindow->ImplGetWindowImpl()->mbFrame && pWindow->ImplGetWindowImpl()->mpClientWindow )
pWindow->ImplGetWindowImpl()->mpClientWindow->ImplCallMove(); // notify client to update geometry
@@ -1709,7 +1709,7 @@ static void ImplHandleMoveResize( Window* pWindow, long nNewWidth, long nNewHeig
// -----------------------------------------------------------------------
-static void ImplActivateFloatingWindows( Window* pWindow, BOOL bActive )
+static void ImplActivateFloatingWindows( Window* pWindow, sal_Bool bActive )
{
// Zuerst alle ueberlappenden Fenster ueberpruefen
Window* pTempWindow = pWindow->ImplGetWindowImpl()->mpFirstOverlap;
@@ -1737,7 +1737,7 @@ IMPL_LINK( Window, ImplAsyncFocusHdl, void*, EMPTYARG )
// Wenn Status erhalten geblieben ist, weil wir den Focus in der
// zwischenzeit schon wiederbekommen haben, brauchen wir auch
// nichts machen
- BOOL bHasFocus = ImplGetWindowImpl()->mpFrameData->mbHasFocus || ImplGetWindowImpl()->mpFrameData->mbSysObjFocus;
+ sal_Bool bHasFocus = ImplGetWindowImpl()->mpFrameData->mbHasFocus || ImplGetWindowImpl()->mpFrameData->mbSysObjFocus;
// Dann die zeitverzoegerten Funktionen ausfuehren
if ( bHasFocus )
@@ -1748,21 +1748,21 @@ IMPL_LINK( Window, ImplAsyncFocusHdl, void*, EMPTYARG )
if ( ImplGetWindowImpl()->mpFrameData->mpFocusWin )
{
- BOOL bHandled = FALSE;
+ sal_Bool bHandled = sal_False;
if ( ImplGetWindowImpl()->mpFrameData->mpFocusWin->IsInputEnabled() &&
! ImplGetWindowImpl()->mpFrameData->mpFocusWin->IsInModalMode() )
{
if ( ImplGetWindowImpl()->mpFrameData->mpFocusWin->IsEnabled() )
{
ImplGetWindowImpl()->mpFrameData->mpFocusWin->GrabFocus();
- bHandled = TRUE;
+ bHandled = sal_True;
}
else if( ImplGetWindowImpl()->mpFrameData->mpFocusWin->ImplHasDlgCtrl() )
{
// #109094# if the focus is restored to a disabled dialog control (was disabled meanwhile)
// try to move it to the next control
ImplGetWindowImpl()->mpFrameData->mpFocusWin->ImplDlgCtrlNextWindow();
- bHandled = TRUE;
+ bHandled = sal_True;
}
}
if ( !bHandled )
@@ -1803,11 +1803,11 @@ IMPL_LINK( Window, ImplAsyncFocusHdl, void*, EMPTYARG )
Window* pOldOverlapWindow = pOldFocusWindow->ImplGetFirstOverlapWindow();
Window* pOldRealWindow = pOldOverlapWindow->ImplGetWindow();
- pOldOverlapWindow->ImplGetWindowImpl()->mbActive = FALSE;
+ pOldOverlapWindow->ImplGetWindowImpl()->mbActive = sal_False;
pOldOverlapWindow->Deactivate();
if ( pOldRealWindow != pOldOverlapWindow )
{
- pOldRealWindow->ImplGetWindowImpl()->mbActive = FALSE;
+ pOldRealWindow->ImplGetWindowImpl()->mbActive = sal_False;
pOldRealWindow->Deactivate();
}
}
@@ -1843,7 +1843,7 @@ IMPL_LINK( Window, ImplAsyncFocusHdl, void*, EMPTYARG )
static void ImplHandleGetFocus( Window* pWindow )
{
- pWindow->ImplGetWindowImpl()->mpFrameData->mbHasFocus = TRUE;
+ pWindow->ImplGetWindowImpl()->mpFrameData->mbHasFocus = sal_True;
// Focus-Events zeitverzoegert ausfuehren, damit bei SystemChildFenstern
// nicht alles flackert, wenn diese den Focus bekommen
@@ -1887,7 +1887,7 @@ static void ImplHandleLoseFocus( Window* pWindow )
pSVData->maWinData.mpFirstFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL | FLOATWIN_POPUPMODEEND_CLOSEALL );
}
- pWindow->ImplGetWindowImpl()->mpFrameData->mbHasFocus = FALSE;
+ pWindow->ImplGetWindowImpl()->mpFrameData->mbHasFocus = sal_False;
// Focus-Events zeitverzoegert ausfuehren, damit bei SystemChildFenstern
// nicht alles flackert, wenn diese den Focus bekommen
@@ -2008,9 +2008,9 @@ static void ImplHandleUserEvent( ImplSVEvent* pSVEvent )
// =======================================================================
-static USHORT ImplGetMouseMoveMode( SalMouseEvent* pEvent )
+static sal_uInt16 ImplGetMouseMoveMode( SalMouseEvent* pEvent )
{
- USHORT nMode = 0;
+ sal_uInt16 nMode = 0;
if ( !pEvent->mnCode )
nMode |= MOUSE_SIMPLEMOVE;
if ( (pEvent->mnCode & MOUSE_LEFT) && !(pEvent->mnCode & KEY_MOD1) )
@@ -2022,9 +2022,9 @@ static USHORT ImplGetMouseMoveMode( SalMouseEvent* pEvent )
// -----------------------------------------------------------------------
-static USHORT ImplGetMouseButtonMode( SalMouseEvent* pEvent )
+static sal_uInt16 ImplGetMouseButtonMode( SalMouseEvent* pEvent )
{
- USHORT nMode = 0;
+ sal_uInt16 nMode = 0;
if ( pEvent->mnButton == MOUSE_LEFT )
nMode |= MOUSE_SIMPLECLICK;
if ( (pEvent->mnButton == MOUSE_LEFT) && !(pEvent->mnCode & (MOUSE_MIDDLE | MOUSE_RIGHT)) )
@@ -2042,7 +2042,7 @@ static USHORT ImplGetMouseButtonMode( SalMouseEvent* pEvent )
inline long ImplHandleSalMouseLeave( Window* pWindow, SalMouseEvent* pEvent )
{
- return ImplHandleMouseEvent( pWindow, EVENT_MOUSEMOVE, TRUE,
+ return ImplHandleMouseEvent( pWindow, EVENT_MOUSEMOVE, sal_True,
pEvent->mnX, pEvent->mnY,
pEvent->mnTime, pEvent->mnCode,
ImplGetMouseMoveMode( pEvent ) );
@@ -2052,7 +2052,7 @@ inline long ImplHandleSalMouseLeave( Window* pWindow, SalMouseEvent* pEvent )
inline long ImplHandleSalMouseMove( Window* pWindow, SalMouseEvent* pEvent )
{
- return ImplHandleMouseEvent( pWindow, EVENT_MOUSEMOVE, FALSE,
+ return ImplHandleMouseEvent( pWindow, EVENT_MOUSEMOVE, sal_False,
pEvent->mnX, pEvent->mnY,
pEvent->mnTime, pEvent->mnCode,
ImplGetMouseMoveMode( pEvent ) );
@@ -2062,7 +2062,7 @@ inline long ImplHandleSalMouseMove( Window* pWindow, SalMouseEvent* pEvent )
inline long ImplHandleSalMouseButtonDown( Window* pWindow, SalMouseEvent* pEvent )
{
- return ImplHandleMouseEvent( pWindow, EVENT_MOUSEBUTTONDOWN, FALSE,
+ return ImplHandleMouseEvent( pWindow, EVENT_MOUSEBUTTONDOWN, sal_False,
pEvent->mnX, pEvent->mnY,
pEvent->mnTime,
#ifdef MACOSX
@@ -2077,7 +2077,7 @@ inline long ImplHandleSalMouseButtonDown( Window* pWindow, SalMouseEvent* pEvent
inline long ImplHandleSalMouseButtonUp( Window* pWindow, SalMouseEvent* pEvent )
{
- return ImplHandleMouseEvent( pWindow, EVENT_MOUSEBUTTONUP, FALSE,
+ return ImplHandleMouseEvent( pWindow, EVENT_MOUSEBUTTONUP, sal_False,
pEvent->mnX, pEvent->mnY,
pEvent->mnTime,
#ifdef MACOSX
@@ -2092,12 +2092,12 @@ inline long ImplHandleSalMouseButtonUp( Window* pWindow, SalMouseEvent* pEvent )
static long ImplHandleSalMouseActivate( Window* /*pWindow*/, SalMouseActivateEvent* /*pEvent*/ )
{
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-static long ImplHandleMenuEvent( Window* pWindow, SalMenuEvent* pEvent, USHORT nEvent )
+static long ImplHandleMenuEvent( Window* pWindow, SalMenuEvent* pEvent, sal_uInt16 nEvent )
{
// Find SystemWindow and its Menubar and let it dispatch the command
long nRet = 0;
@@ -2147,11 +2147,11 @@ static void ImplHandleSalKeyMod( Window* pWindow, SalKeyModEvent* pEvent )
if ( pTrackWin )
pWindow = pTrackWin;
#ifdef MACOSX
- USHORT nOldCode = pWindow->ImplGetWindowImpl()->mpFrameData->mnMouseCode & (KEY_SHIFT | KEY_MOD1 | KEY_MOD2 | KEY_MOD3);
+ sal_uInt16 nOldCode = pWindow->ImplGetWindowImpl()->mpFrameData->mnMouseCode & (KEY_SHIFT | KEY_MOD1 | KEY_MOD2 | KEY_MOD3);
#else
- USHORT nOldCode = pWindow->ImplGetWindowImpl()->mpFrameData->mnMouseCode & (KEY_SHIFT | KEY_MOD1 | KEY_MOD2);
+ sal_uInt16 nOldCode = pWindow->ImplGetWindowImpl()->mpFrameData->mnMouseCode & (KEY_SHIFT | KEY_MOD1 | KEY_MOD2);
#endif
- USHORT nNewCode = pEvent->mnCode;
+ sal_uInt16 nNewCode = pEvent->mnCode;
if ( nOldCode != nNewCode )
{
#ifdef MACOSX
@@ -2159,7 +2159,7 @@ static void ImplHandleSalKeyMod( Window* pWindow, SalKeyModEvent* pEvent )
#else
nNewCode |= pWindow->ImplGetWindowImpl()->mpFrameData->mnMouseCode & ~(KEY_SHIFT | KEY_MOD1 | KEY_MOD2);
#endif
- pWindow->ImplGetWindowImpl()->mpFrameWindow->ImplCallMouseMove( nNewCode, TRUE );
+ pWindow->ImplGetWindowImpl()->mpFrameWindow->ImplCallMouseMove( nNewCode, sal_True );
}
// #105224# send commandevent to allow special treatment of Ctrl-LeftShift/Ctrl-RightShift etc.
@@ -2191,7 +2191,7 @@ static void ImplHandleInputLanguageChange( Window* pWindow )
// -----------------------------------------------------------------------
-static void ImplHandleSalSettings( Window* pWindow, USHORT nEvent )
+static void ImplHandleSalSettings( Window* pWindow, sal_uInt16 nEvent )
{
// Application Notification werden nur fuer das erste Window ausgeloest
ImplSVData* pSVData = ImplGetSVData();
@@ -2211,7 +2211,7 @@ static void ImplHandleSalSettings( Window* pWindow, USHORT nEvent )
}
else
{
- USHORT nType;
+ sal_uInt16 nType;
switch ( nEvent )
{
case SALEVENT_VOLUMECHANGED:
@@ -2225,7 +2225,7 @@ static void ImplHandleSalSettings( Window* pWindow, USHORT nEvent )
nType = DATACHANGED_DISPLAY;
break;
case SALEVENT_FONTCHANGED:
- OutputDevice::ImplUpdateAllFontData( TRUE );
+ OutputDevice::ImplUpdateAllFontData( sal_True );
nType = DATACHANGED_FONTS;
break;
case SALEVENT_DATETIMECHANGED:
@@ -2275,7 +2275,7 @@ static void ImplHandleSalExtTextInputPos( Window* pWindow, SalExtTextInputPosEve
static long ImplHandleShowDialog( Window* pWindow, int nDialogId )
{
if( ! pWindow )
- return FALSE;
+ return sal_False;
if( pWindow->GetType() == WINDOW_BORDERWINDOW )
{
@@ -2339,8 +2339,8 @@ static void ImplHandleSalSurroundingTextRequest( Window *pWindow,
// -----------------------------------------------------------------------
static void ImplHandleSurroundingTextSelectionChange( Window *pWindow,
- ULONG nStart,
- ULONG nEnd )
+ sal_uIntPtr nStart,
+ sal_uIntPtr nEnd )
{
Window* pChild = ImplGetKeyInputWindow( pWindow );
if( pChild )
@@ -2362,7 +2362,7 @@ static void ImplHandleStartReconversion( Window *pWindow )
// -----------------------------------------------------------------------
long ImplWindowFrameProc( Window* pWindow, SalFrame* /*pFrame*/,
- USHORT nEvent, const void* pEvent )
+ sal_uInt16 nEvent, const void* pEvent )
{
DBG_TESTSOLARMUTEX();
@@ -2437,28 +2437,28 @@ long ImplWindowFrameProc( Window* pWindow, SalFrame* /*pFrame*/,
{
SalKeyEvent* pKeyEvt = (SalKeyEvent*)pEvent;
nRet = ImplHandleKey( pWindow, EVENT_KEYINPUT,
- pKeyEvt->mnCode, pKeyEvt->mnCharCode, pKeyEvt->mnRepeat, TRUE );
+ pKeyEvt->mnCode, pKeyEvt->mnCharCode, pKeyEvt->mnRepeat, sal_True );
}
break;
case SALEVENT_EXTERNALKEYINPUT:
{
KeyEvent* pKeyEvt = (KeyEvent*) pEvent;
nRet = ImplHandleKey( pWindow, EVENT_KEYINPUT,
- pKeyEvt->GetKeyCode().GetFullCode(), pKeyEvt->GetCharCode(), pKeyEvt->GetRepeat(), FALSE );
+ pKeyEvt->GetKeyCode().GetFullCode(), pKeyEvt->GetCharCode(), pKeyEvt->GetRepeat(), sal_False );
}
break;
case SALEVENT_KEYUP:
{
SalKeyEvent* pKeyEvt = (SalKeyEvent*)pEvent;
nRet = ImplHandleKey( pWindow, EVENT_KEYUP,
- pKeyEvt->mnCode, pKeyEvt->mnCharCode, pKeyEvt->mnRepeat, TRUE );
+ pKeyEvt->mnCode, pKeyEvt->mnCharCode, pKeyEvt->mnRepeat, sal_True );
}
break;
case SALEVENT_EXTERNALKEYUP:
{
KeyEvent* pKeyEvt = (KeyEvent*) pEvent;
nRet = ImplHandleKey( pWindow, EVENT_KEYUP,
- pKeyEvt->GetKeyCode().GetFullCode(), pKeyEvt->GetCharCode(), pKeyEvt->GetRepeat(), FALSE );
+ pKeyEvt->GetKeyCode().GetFullCode(), pKeyEvt->GetCharCode(), pKeyEvt->GetRepeat(), sal_False );
}
break;
case SALEVENT_KEYMODCHANGE:
@@ -2545,15 +2545,15 @@ long ImplWindowFrameProc( Window* pWindow, SalFrame* /*pFrame*/,
{
// Message-Schleife beenden
Application::Quit();
- return FALSE;
+ return sal_False;
}
else
{
bInQueryExit = false;
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
case SALEVENT_SETTINGSCHANGED:
@@ -2609,7 +2609,7 @@ long ImplWindowFrameProc( Window* pWindow, SalFrame* /*pFrame*/,
break;
#ifdef DBG_UTIL
default:
- DBG_ERROR1( "ImplWindowFrameProc(): unknown event (%lu)", (ULONG)nEvent );
+ DBG_ERROR1( "ImplWindowFrameProc(): unknown event (%lu)", (sal_uIntPtr)nEvent );
break;
#endif
}
diff --git a/vcl/source/window/wrkwin.cxx b/vcl/source/window/wrkwin.cxx
index 8fb2f2f8346a..24726a9177ea 100644
--- a/vcl/source/window/wrkwin.cxx
+++ b/vcl/source/window/wrkwin.cxx
@@ -46,8 +46,8 @@
// =======================================================================
-#define WORKWIN_WINDOWSTATE_FULLSCREEN ((ULONG)0x00010000)
-#define WORKWIN_WINDOWSTATE_ALL ((ULONG)0x00FF0000)
+#define WORKWIN_WINDOWSTATE_FULLSCREEN ((sal_uIntPtr)0x00010000)
+#define WORKWIN_WINDOWSTATE_ALL ((sal_uIntPtr)0x00FF0000)
// =======================================================================
@@ -56,17 +56,17 @@ void WorkWindow::ImplInitWorkWindowData()
mnIcon = 0; // Should be removed in the next top level update - now in SystemWindow
mnPresentationFlags = 0;
- mbPresentationMode = FALSE;
- mbPresentationVisible = FALSE;
- mbPresentationFull = FALSE;
- mbFullScreenMode = FALSE;
+ mbPresentationMode = sal_False;
+ mbPresentationVisible = sal_False;
+ mbPresentationFull = sal_False;
+ mbFullScreenMode = sal_False;
}
// -----------------------------------------------------------------------
void WorkWindow::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSystemParentData )
{
- USHORT nFrameStyle = BORDERWINDOW_STYLE_FRAME;
+ sal_uInt16 nFrameStyle = BORDERWINDOW_STYLE_FRAME;
if ( nStyle & WB_APP )
nFrameStyle |= BORDERWINDOW_STYLE_APP;
@@ -139,7 +139,7 @@ WorkWindow::WorkWindow( Window* pParent, const ::com::sun::star::uno::Any& aSyst
SystemWindow( WINDOW_WORKWINDOW )
{
ImplInitWorkWindowData();
- mbSysChild = TRUE;
+ mbSysChild = sal_True;
ImplInit( pParent, nStyle, aSystemWorkWindowToken );
}
@@ -149,7 +149,7 @@ WorkWindow::WorkWindow( SystemParentData* pParent ) :
SystemWindow( WINDOW_WORKWINDOW )
{
ImplInitWorkWindowData();
- mbSysChild = TRUE;
+ mbSysChild = sal_True;
ImplInit( NULL, 0, pParent );
}
@@ -178,7 +178,7 @@ WorkWindow::~WorkWindow()
// -----------------------------------------------------------------------
-void WorkWindow::ShowFullScreenMode( BOOL bFullScreenMode, sal_Int32 nDisplay )
+void WorkWindow::ShowFullScreenMode( sal_Bool bFullScreenMode, sal_Int32 nDisplay )
{
if ( !mbFullScreenMode == !bFullScreenMode )
return;
@@ -192,34 +192,34 @@ void WorkWindow::ShowFullScreenMode( BOOL bFullScreenMode, sal_Int32 nDisplay )
mbFullScreenMode = bFullScreenMode != 0;
if ( !mbSysChild )
{
- mpWindowImpl->mpFrameWindow->mpWindowImpl->mbWaitSystemResize = TRUE;
+ mpWindowImpl->mpFrameWindow->mpWindowImpl->mbWaitSystemResize = sal_True;
ImplGetFrame()->ShowFullScreen( bFullScreenMode, nDisplay );
}
}
// -----------------------------------------------------------------------
-void WorkWindow::StartPresentationMode( BOOL bPresentation, USHORT nFlags, sal_Int32 nDisplay )
+void WorkWindow::StartPresentationMode( sal_Bool bPresentation, sal_uInt16 nFlags, sal_Int32 nDisplay )
{
if ( !bPresentation == !mbPresentationMode )
return;
if ( bPresentation )
{
- mbPresentationMode = TRUE;
+ mbPresentationMode = sal_True;
mbPresentationVisible = IsVisible();
mbPresentationFull = mbFullScreenMode;
mnPresentationFlags = nFlags;
if ( !(mnPresentationFlags & PRESENTATION_NOFULLSCREEN) )
- ShowFullScreenMode( TRUE, nDisplay );
+ ShowFullScreenMode( sal_True, nDisplay );
if ( !mbSysChild )
{
if ( mnPresentationFlags & PRESENTATION_HIDEALLAPPS )
- mpWindowImpl->mpFrame->SetAlwaysOnTop( TRUE );
+ mpWindowImpl->mpFrame->SetAlwaysOnTop( sal_True );
if ( !(mnPresentationFlags & PRESENTATION_NOAUTOSHOW) )
ToTop();
- mpWindowImpl->mpFrame->StartPresentation( TRUE );
+ mpWindowImpl->mpFrame->StartPresentation( sal_True );
}
if ( !(mnPresentationFlags & PRESENTATION_NOAUTOSHOW) )
@@ -230,22 +230,22 @@ void WorkWindow::StartPresentationMode( BOOL bPresentation, USHORT nFlags, sal_I
Show( mbPresentationVisible );
if ( !mbSysChild )
{
- mpWindowImpl->mpFrame->StartPresentation( FALSE );
+ mpWindowImpl->mpFrame->StartPresentation( sal_False );
if ( mnPresentationFlags & PRESENTATION_HIDEALLAPPS )
- mpWindowImpl->mpFrame->SetAlwaysOnTop( FALSE );
+ mpWindowImpl->mpFrame->SetAlwaysOnTop( sal_False );
}
ShowFullScreenMode( mbPresentationFull, nDisplay );
- mbPresentationMode = FALSE;
- mbPresentationVisible = FALSE;
- mbPresentationFull = FALSE;
+ mbPresentationMode = sal_False;
+ mbPresentationVisible = sal_False;
+ mbPresentationFull = sal_False;
mnPresentationFlags = 0;
}
}
// -----------------------------------------------------------------------
-BOOL WorkWindow::IsMinimized() const
+sal_Bool WorkWindow::IsMinimized() const
{
//return mpWindowImpl->mpFrameData->mbMinimized;
SalFrameState aState;
@@ -255,15 +255,15 @@ BOOL WorkWindow::IsMinimized() const
// -----------------------------------------------------------------------
-BOOL WorkWindow::SetPluginParent( SystemParentData* pParent )
+sal_Bool WorkWindow::SetPluginParent( SystemParentData* pParent )
{
DBG_ASSERT( ! mbPresentationMode && ! mbFullScreenMode, "SetPluginParent in fullscreen or presentation mode !" );
bool bWasDnd = Window::ImplStopDnd();
- BOOL bShown = IsVisible();
- Show( FALSE );
- BOOL bRet = mpWindowImpl->mpFrame->SetPluginParent( pParent );
+ sal_Bool bShown = IsVisible();
+ Show( sal_False );
+ sal_Bool bRet = mpWindowImpl->mpFrame->SetPluginParent( pParent );
Show( bShown );
if( bWasDnd )
@@ -272,7 +272,7 @@ BOOL WorkWindow::SetPluginParent( SystemParentData* pParent )
return bRet;
}
-void WorkWindow::ImplSetFrameState( ULONG aFrameState )
+void WorkWindow::ImplSetFrameState( sal_uIntPtr aFrameState )
{
SalFrameState aState;
aState.mnMask = SAL_FRAMESTATE_MASK_STATE;
@@ -291,9 +291,9 @@ void WorkWindow::Restore()
ImplSetFrameState( SAL_FRAMESTATE_NORMAL );
}
-BOOL WorkWindow::Close()
+sal_Bool WorkWindow::Close()
{
- BOOL bCanClose = SystemWindow::Close();
+ sal_Bool bCanClose = SystemWindow::Close();
// Ist es das Applikationsfenster, dann beende die Applikation
if ( bCanClose && ( ImplGetSVData()->maWinData.mpAppWin == this ) )
@@ -302,14 +302,14 @@ BOOL WorkWindow::Close()
return bCanClose;
}
-void WorkWindow::Maximize( BOOL bMaximize )
+void WorkWindow::Maximize( sal_Bool bMaximize )
{
ImplSetFrameState( bMaximize ? SAL_FRAMESTATE_MAXIMIZED : SAL_FRAMESTATE_NORMAL );
}
-BOOL WorkWindow::IsMaximized() const
+sal_Bool WorkWindow::IsMaximized() const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SalFrameState aState;
if( mpWindowImpl->mpFrame->GetWindowState( &aState ) )
@@ -317,7 +317,7 @@ BOOL WorkWindow::IsMaximized() const
if( aState.mnState & (SAL_FRAMESTATE_MAXIMIZED |
SAL_FRAMESTATE_MAXIMIZED_HORZ |
SAL_FRAMESTATE_MAXIMIZED_VERT ) )
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
}
diff --git a/vcl/win/inc/salbmp.h b/vcl/win/inc/salbmp.h
index 7a31add2ae19..07655d6b7a65 100644
--- a/vcl/win/inc/salbmp.h
+++ b/vcl/win/inc/salbmp.h
@@ -49,16 +49,16 @@ private:
Size maSize;
HGLOBAL mhDIB;
HBITMAP mhDDB;
- USHORT mnBitCount;
+ sal_uInt16 mnBitCount;
public:
HGLOBAL ImplGethDIB() const { return mhDIB; }
HBITMAP ImplGethDDB() const { return mhDDB; }
- static HGLOBAL ImplCreateDIB( const Size& rSize, USHORT nBitCount, const BitmapPalette& rPal );
+ static HGLOBAL ImplCreateDIB( const Size& rSize, sal_uInt16 nBitCount, const BitmapPalette& rPal );
static HANDLE ImplCopyDIBOrDDB( HANDLE hHdl, bool bDIB );
- static USHORT ImplGetDIBColorCount( HGLOBAL hDIB );
+ static sal_uInt16 ImplGetDIBColorCount( HGLOBAL hDIB );
static void ImplDecodeRLEBuffer( const BYTE* pSrcBuf, BYTE* pDstBuf,
const Size& rSizePixel, bool bRLE4 );
@@ -70,15 +70,15 @@ public:
public:
bool Create( HANDLE hBitmap, bool bDIB, bool bCopyHandle );
- virtual bool Create( const Size& rSize, USHORT nBitCount, const BitmapPalette& rPal );
+ virtual bool Create( const Size& rSize, sal_uInt16 nBitCount, const BitmapPalette& rPal );
virtual bool Create( const SalBitmap& rSalBmpImpl );
virtual bool Create( const SalBitmap& rSalBmpImpl, SalGraphics* pGraphics );
- virtual bool Create( const SalBitmap& rSalBmpImpl, USHORT nNewBitCount );
+ virtual bool Create( const SalBitmap& rSalBmpImpl, sal_uInt16 nNewBitCount );
virtual void Destroy();
virtual Size GetSize() const { return maSize; }
- virtual USHORT GetBitCount() const { return mnBitCount; }
+ virtual sal_uInt16 GetBitCount() const { return mnBitCount; }
virtual BitmapBuffer* AcquireBuffer( bool bReadOnly );
virtual void ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly );
diff --git a/vcl/win/inc/saldata.hxx b/vcl/win/inc/saldata.hxx
index ec67272ed07f..6de4d4a44abe 100644
--- a/vcl/win/inc/saldata.hxx
+++ b/vcl/win/inc/saldata.hxx
@@ -84,7 +84,7 @@ public:
void initKeyCodeMap();
// checks if the menuhandle was created by VCL
- BOOL IsKnownMenuHandle( HMENU hMenu );
+ sal_Bool IsKnownMenuHandle( HMENU hMenu );
public:
HINSTANCE mhInst; // default instance handle
@@ -97,12 +97,12 @@ public:
long* mpDitherDiff; // Dither mapping table
BYTE* mpDitherLow; // Dither mapping table
BYTE* mpDitherHigh; // Dither mapping table
- ULONG mnTimerMS; // Current Time (in MS) of the Timer
- ULONG mnTimerOrgMS; // Current Original Time (in MS)
+ sal_uIntPtr mnTimerMS; // Current Time (in MS) of the Timer
+ sal_uIntPtr mnTimerOrgMS; // Current Original Time (in MS)
DWORD mnNextTimerTime;
DWORD mnLastEventTime;
UINT mnTimerId; // windows timer id
- BOOL mbInTimerProc; // timer event is currently being dispatched
+ sal_Bool mbInTimerProc; // timer event is currently being dispatched
HHOOK mhSalObjMsgHook; // hook to get interesting msg for SalObject
HWND mhWantLeaveMsg; // window handle, that want a MOUSELEAVE message
AutoTimer* mpMouseLeaveTimer; // Timer for MouseLeave Test
@@ -118,25 +118,25 @@ public:
COLORREF maStockBrushColorAry[MAX_STOCKBRUSH];
HPEN mhStockPenAry[MAX_STOCKPEN];
HBRUSH mhStockBrushAry[MAX_STOCKBRUSH];
- USHORT mnStockPenCount; // count of static pens
- USHORT mnStockBrushCount; // count of static brushes
+ sal_uInt16 mnStockPenCount; // count of static pens
+ sal_uInt16 mnStockBrushCount; // count of static brushes
WPARAM mnSalObjWantKeyEvt; // KeyEvent, welcher vom SalObj-Hook verarbeitet werden soll
BYTE mnCacheDCInUse; // count of CacheDC in use
- BOOL mbObjClassInit; // is SALOBJECTCLASS initialised
- BOOL mbInPalChange; // is in WM_QUERYNEWPALETTE
+ sal_Bool mbObjClassInit; // is SALOBJECTCLASS initialised
+ sal_Bool mbInPalChange; // is in WM_QUERYNEWPALETTE
DWORD mnAppThreadId; // Id from Applikation-Thread
- WIN_BOOL mbScrSvrEnabled; // ScreenSaver enabled
+ BOOL mbScrSvrEnabled; // ScreenSaver enabled
int mnSageStatus; // status of Sage-DLL (DISABLE_AGENT == nicht vorhanden)
SysAgt_Enable_PROC mpSageEnableProc; // funktion to deactivate the system agent
SalIcon* mpFirstIcon; // icon cache, points to first icon, NULL if none
TempFontItem* mpTempFontItem;
- BOOL mbThemeChanged; // true if visual theme was changed: throw away theme handles
+ sal_Bool mbThemeChanged; // true if visual theme was changed: throw away theme handles
// for GdiPlus GdiplusStartup/GdiplusShutdown
ULONG_PTR gdiplusToken;
std::set< HMENU > mhMenuSet; // keeps track of menu handles created by VCL, used by IsKnownMenuHandle()
- std::map< UINT,USHORT > maVKMap; // map some dynamic VK_* entries
+ std::map< UINT,sal_uInt16 > maVKMap; // map some dynamic VK_* entries
};
inline void SetSalData( SalData* pData ) { ImplGetSVData()->mpSalData = (void*)pData; }
@@ -154,10 +154,10 @@ struct SalShlData
UINT mnWheelScrollChars; // WheelScrollChars
UINT mnWheelMsgId; // Wheel-Message-Id fuer W95
WORD mnVersion; // System-Version (311 == 3.11)
- WIN_BOOL mbWNT; // kein W16/W95/W98 sondern ein NT
- WIN_BOOL mbW40; // Is System-Version >= 4.0
- WIN_BOOL mbWXP; // Windows XP
- WIN_BOOL mbWPrinter; // true: use unicode printer functions
+ BOOL mbWNT; // kein W16/W95/W98 sondern ein NT
+ BOOL mbW40; // Is System-Version >= 4.0
+ BOOL mbWXP; // Windows XP
+ BOOL mbWPrinter; // true: use unicode printer functions
// false: use anis compat printer functions
OSVERSIONINFO maVersionInfo;
};
@@ -184,8 +184,8 @@ struct HDCCache
};
void ImplClearHDCCache( SalData* pData );
-HDC ImplGetCachedDC( ULONG nID, HBITMAP hBmp = 0 );
-void ImplReleaseCachedDC( ULONG nID );
+HDC ImplGetCachedDC( sal_uIntPtr nID, HBITMAP hBmp = 0 );
+void ImplReleaseCachedDC( sal_uIntPtr nID );
bool ImplAddTempFont( SalData&, const String& rFontFileURL );
void ImplReleaseTempFonts( SalData& );
@@ -196,7 +196,7 @@ void ImplReleaseTempFonts( SalData& );
HCURSOR ImplLoadSalCursor( int nId );
HBITMAP ImplLoadSalBitmap( int nId );
-BOOL ImplLoadSalIcon( int nId, HICON& rIcon, HICON& rSmallIcon );
+sal_Bool ImplLoadSalIcon( int nId, HICON& rIcon, HICON& rSmallIcon );
// SALGDI.CXX
void ImplInitSalGDI();
@@ -208,11 +208,11 @@ void ImplFreeSalGDI();
// \\WIN\SOURCE\APP\SALINST.CXX
void ImplSalYieldMutexAcquireWithWait();
-BOOL ImplSalYieldMutexTryToAcquire();
+sal_Bool ImplSalYieldMutexTryToAcquire();
void ImplSalYieldMutexAcquire();
void ImplSalYieldMutexRelease();
-ULONG ImplSalReleaseYieldMutex();
-void ImplSalAcquireYieldMutex( ULONG nCount );
+sal_uIntPtr ImplSalReleaseYieldMutex();
+void ImplSalAcquireYieldMutex( sal_uIntPtr nCount );
// \\WIN\SOURCE\WINDOW\SALFRAME.CXX
LRESULT CALLBACK SalFrameWndProcA( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam );
@@ -223,16 +223,16 @@ void CALLBACK SalTimerProc( HWND hWnd, UINT nMsg, UINT_PTR nId, DWORD nTime )
// \WIN\SOURCE\WINDOW\SALFRAME.CXX
void SalTestMouseLeave();
-BOOL ImplWriteLastError( DWORD lastError, const char *szApiCall );
+sal_Bool ImplWriteLastError( DWORD lastError, const char *szApiCall );
// \WIN\SOURCE\WINDOW\SALFRAME.CXX
long ImplHandleSalObjKeyMsg( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam );
long ImplHandleSalObjSysCharMsg( HWND hWnd, WPARAM wParam, LPARAM lParam );
-BOOL ImplHandleGlobalMsg( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam, LRESULT& rlResult );
+sal_Bool ImplHandleGlobalMsg( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam, LRESULT& rlResult );
// \WIN\SOURCE\WINDOW\SALOBJ.CXX
WinSalObject* ImplFindSalObject( HWND hWndChild );
-BOOL ImplSalPreDispatchMsg( MSG* pMsg );
+sal_Bool ImplSalPreDispatchMsg( MSG* pMsg );
void ImplSalPostDispatchMsg( MSG* pMsg, LRESULT nDispatchResult );
// \WIN\SOURCE\GDI\SALGDI3.CXX
@@ -242,7 +242,7 @@ bool ImplIsFontAvailable( HDC hDC, const UniString& rName );
// \WIN\SOURCE\APP\SALDATA.CXX
rtl_TextEncoding ImplSalGetSystemEncoding();
-ByteString ImplSalGetWinAnsiString( const UniString& rStr, BOOL bFileName = FALSE );
+ByteString ImplSalGetWinAnsiString( const UniString& rStr, sal_Bool bFileName = FALSE );
UniString ImplSalGetUniString( const sal_Char* pStr, xub_StrLen nLen = STRING_LEN );
int ImplSalWICompareAscii( const wchar_t* pStr1, const char* pStr2 );
@@ -343,10 +343,10 @@ int ImplSalWICompareAscii( const wchar_t* pStr1, const char* pStr2 );
// A/W-Wrapper
LONG ImplSetWindowLong( HWND hWnd, int nIndex, DWORD dwNewLong );
LONG ImplGetWindowLong( HWND hWnd, int nIndex );
-WIN_BOOL ImplPostMessage( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam );
-WIN_BOOL ImplSendMessage( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam );
-WIN_BOOL ImplGetMessage( LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax );
-WIN_BOOL ImplPeekMessage( LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax, UINT wRemoveMsg );
+BOOL ImplPostMessage( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam );
+BOOL ImplSendMessage( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam );
+BOOL ImplGetMessage( LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax );
+BOOL ImplPeekMessage( LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax, UINT wRemoveMsg );
LONG ImplDispatchMessage( CONST MSG *lpMsg );
inline void SetWindowPtr( HWND hWnd, WinSalFrame* pThis )
diff --git a/vcl/win/inc/salframe.h b/vcl/win/inc/salframe.h
index f9aa8ef9dc4b..cfb26847db02 100644
--- a/vcl/win/inc/salframe.h
+++ b/vcl/win/inc/salframe.h
@@ -62,33 +62,33 @@ public:
int mnFullScreenShowState; // fullscreen restore show state
UINT mnInputLang; // current Input Language
UINT mnInputCodePage; // current Input CodePage
- ULONG mnStyle; // style
- BOOL mbGraphics; // is Graphics used
- BOOL mbCaption; // has window a caption
- BOOL mbBorder; // has window a border
- BOOL mbFixBorder; // has window a fixed border
- BOOL mbSizeBorder; // has window a sizeable border
- BOOL mbNoIcon; // is an window without an icon
- BOOL mbFloatWin; // is a FloatingWindow
- BOOL mbFullScreen; // TRUE: in full screen mode
- BOOL mbPresentation; // TRUE: Presentation Mode running
- BOOL mbInShow; // innerhalb eines Show-Aufrufs
- BOOL mbRestoreMaximize; // Restore-Maximize
- BOOL mbInMoveMsg; // Move-Message wird verarbeitet
- BOOL mbInSizeMsg; // Size-Message wird verarbeitet
- BOOL mbFullScreenToolWin; // WS_EX_TOOLWINDOW reset in FullScreenMode
- BOOL mbDefPos; // default-position
- BOOL mbOverwriteState; // TRUE: WindowState darf umgesetzt werden
- BOOL mbIME; // TRUE: We are in IME Mode
- BOOL mbHandleIME; // TRUE: Wir handeln die IME-Messages
- BOOL mbSpezIME; // TRUE: Spez IME
- BOOL mbAtCursorIME; // TRUE: Wir behandeln nur einige IME-Messages
- BOOL mbCandidateMode; // TRUE: Wir befinden uns im Candidate-Modus
- static BOOL mbInReparent; // TRUE: ignore focus lost and gain due to reparenting
+ sal_uIntPtr mnStyle; // style
+ sal_Bool mbGraphics; // is Graphics used
+ sal_Bool mbCaption; // has window a caption
+ sal_Bool mbBorder; // has window a border
+ sal_Bool mbFixBorder; // has window a fixed border
+ sal_Bool mbSizeBorder; // has window a sizeable border
+ sal_Bool mbNoIcon; // is an window without an icon
+ sal_Bool mbFloatWin; // is a FloatingWindow
+ sal_Bool mbFullScreen; // TRUE: in full screen mode
+ sal_Bool mbPresentation; // TRUE: Presentation Mode running
+ sal_Bool mbInShow; // innerhalb eines Show-Aufrufs
+ sal_Bool mbRestoreMaximize; // Restore-Maximize
+ sal_Bool mbInMoveMsg; // Move-Message wird verarbeitet
+ sal_Bool mbInSizeMsg; // Size-Message wird verarbeitet
+ sal_Bool mbFullScreenToolWin; // WS_EX_TOOLWINDOW reset in FullScreenMode
+ sal_Bool mbDefPos; // default-position
+ sal_Bool mbOverwriteState; // TRUE: WindowState darf umgesetzt werden
+ sal_Bool mbIME; // TRUE: We are in IME Mode
+ sal_Bool mbHandleIME; // TRUE: Wir handeln die IME-Messages
+ sal_Bool mbSpezIME; // TRUE: Spez IME
+ sal_Bool mbAtCursorIME; // TRUE: Wir behandeln nur einige IME-Messages
+ sal_Bool mbCandidateMode; // TRUE: Wir befinden uns im Candidate-Modus
+ static sal_Bool mbInReparent; // TRUE: ignore focus lost and gain due to reparenting
RGNDATA* mpClipRgnData;
RECT* mpNextClipRect;
- BOOL mbFirstClipRect;
+ sal_Bool mbFirstClipRect;
sal_Int32 mnDisplay; // Display used for Fullscreen, 0 is primary monitor
void updateScreenNumber();
@@ -98,37 +98,37 @@ public:
virtual SalGraphics* GetGraphics();
virtual void ReleaseGraphics( SalGraphics* pGraphics );
- virtual BOOL PostEvent( void* pData );
+ virtual sal_Bool PostEvent( void* pData );
virtual void SetTitle( const XubString& rTitle );
- virtual void SetIcon( USHORT nIcon );
+ virtual void SetIcon( sal_uInt16 nIcon );
virtual void SetMenu( SalMenu* pSalMenu );
virtual void DrawMenuBar();
virtual void SetExtendedFrameStyle( SalExtStyle nExtStyle );
- virtual void Show( BOOL bVisible, BOOL bNoActivate = FALSE );
- virtual void Enable( BOOL bEnable );
+ virtual void Show( sal_Bool bVisible, sal_Bool bNoActivate = FALSE );
+ virtual void Enable( sal_Bool bEnable );
virtual void SetMinClientSize( long nWidth, long nHeight );
virtual void SetMaxClientSize( long nWidth, long nHeight );
- virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, USHORT nFlags );
+ virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags );
virtual void GetClientSize( long& rWidth, long& rHeight );
virtual void GetWorkArea( Rectangle& rRect );
virtual SalFrame* GetParent() const;
virtual void SetWindowState( const SalFrameState* pState );
- virtual BOOL GetWindowState( SalFrameState* pState );
- virtual void ShowFullScreen( BOOL bFullScreen, sal_Int32 nDisplay );
- virtual void StartPresentation( BOOL bStart );
- virtual void SetAlwaysOnTop( BOOL bOnTop );
- virtual void ToTop( USHORT nFlags );
+ virtual sal_Bool GetWindowState( SalFrameState* pState );
+ virtual void ShowFullScreen( sal_Bool bFullScreen, sal_Int32 nDisplay );
+ virtual void StartPresentation( sal_Bool bStart );
+ virtual void SetAlwaysOnTop( sal_Bool bOnTop );
+ virtual void ToTop( sal_uInt16 nFlags );
virtual void SetPointer( PointerStyle ePointerStyle );
- virtual void CaptureMouse( BOOL bMouse );
+ virtual void CaptureMouse( sal_Bool bMouse );
virtual void SetPointerPos( long nX, long nY );
using SalFrame::Flush;
virtual void Flush();
virtual void Sync();
virtual void SetInputContext( SalInputContext* pContext );
- virtual void EndExtTextInput( USHORT nFlags );
- virtual String GetKeyName( USHORT nKeyCode );
- virtual String GetSymbolKeyName( const XubString& rFontName, USHORT nKeyCode );
- virtual BOOL MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode );
+ virtual void EndExtTextInput( sal_uInt16 nFlags );
+ virtual String GetKeyName( sal_uInt16 nKeyCode );
+ virtual String GetSymbolKeyName( const XubString& rFontName, sal_uInt16 nKeyCode );
+ virtual sal_Bool MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode );
virtual LanguageType GetInputLanguage();
virtual SalBitmap* SnapShot();
virtual void UpdateSettings( AllSettings& rSettings );
@@ -140,7 +140,7 @@ public:
virtual void SetBackgroundBitmap( SalBitmap* );
virtual void SetScreenNumber( unsigned int );
virtual void ResetClipRegion();
- virtual void BeginSetClipRegion( ULONG nRects );
+ virtual void BeginSetClipRegion( sal_uIntPtr nRects );
virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight );
virtual void EndSetClipRegion();
};
diff --git a/vcl/win/inc/salgdi.h b/vcl/win/inc/salgdi.h
index 4b97eeb98c0b..b0e251eb19ca 100644
--- a/vcl/win/inc/salgdi.h
+++ b/vcl/win/inc/salgdi.h
@@ -58,8 +58,8 @@ class ImplWinFontData : public ImplFontData
{
public:
ImplWinFontData( const ImplDevFontAttributes&,
- int nFontHeight, WIN_BYTE eWinCharSet,
- WIN_BYTE nPitchAndFamily );
+ int nFontHeight, BYTE eWinCharSet,
+ BYTE nPitchAndFamily );
~ImplWinFontData();
virtual ImplFontData* Clone() const;
@@ -70,8 +70,8 @@ public:
bool HasChar( sal_uInt32 cChar ) const;
- WIN_BYTE GetCharSet() const { return meWinCharSet; }
- WIN_BYTE GetPitchAndFamily() const { return mnPitchAndFamily; }
+ BYTE GetCharSet() const { return meWinCharSet; }
+ BYTE GetPitchAndFamily() const { return mnPitchAndFamily; }
bool IsGlyphApiDisabled() const { return mbDisableGlyphApi; }
bool SupportsKorean() const { return mbHasKoreanRange; }
bool SupportsCJK() const { return mbHasCJKSupport; }
@@ -107,8 +107,8 @@ private:
// TODO: get rid of the members below needed to work with the Win9x non-unicode API
BYTE* mpFontCharSets; // all Charsets for the current font (used on W98 for kerning)
BYTE mnFontCharSetCount; // Number of Charsets of the current font; 0 - if not queried
- WIN_BYTE meWinCharSet;
- WIN_BYTE mnPitchAndFamily;
+ BYTE meWinCharSet;
+ BYTE mnPitchAndFamily;
bool mbAliasSymbolsHigh;
bool mbAliasSymbolsLow;
private:
@@ -153,23 +153,23 @@ public:
RGNDATA* mpClipRgnData; // ClipRegion-Data
RGNDATA* mpStdClipRgnData; // Cache Standard-ClipRegion-Data
RECT* mpNextClipRect; // Naechstes ClipRegion-Rect
- BOOL mbFirstClipRect; // Flag for first cliprect to insert
+ sal_Bool mbFirstClipRect; // Flag for first cliprect to insert
LOGFONTA* mpLogFont; // LOG-Font which is currently selected (only W9x)
ImplFontAttrCache* mpFontAttrCache; // Cache font attributes from files in so/share/fonts
BYTE* mpFontCharSets; // All Charsets for the current font
BYTE mnFontCharSetCount; // Number of Charsets of the current font; 0 - if not queried
- BOOL mbFontKernInit; // FALSE: FontKerns must be queried
+ sal_Bool mbFontKernInit; // FALSE: FontKerns must be queried
KERNINGPAIR* mpFontKernPairs; // Kerning Pairs of the current Font
- ULONG mnFontKernPairCount;// Number of Kerning Pairs of the current Font
+ sal_uIntPtr mnFontKernPairCount;// Number of Kerning Pairs of the current Font
int mnPenWidth; // Linienbreite
- BOOL mbStockPen; // is Pen a stockpen
- BOOL mbStockBrush; // is Brush a stcokbrush
- BOOL mbPen; // is Pen (FALSE == NULL_PEN)
- BOOL mbBrush; // is Brush (FALSE == NULL_BRUSH)
- BOOL mbPrinter; // is Printer
- BOOL mbVirDev; // is VirDev
- BOOL mbWindow; // is Window
- BOOL mbScreen; // is Screen compatible
+ sal_Bool mbStockPen; // is Pen a stockpen
+ sal_Bool mbStockBrush; // is Brush a stcokbrush
+ sal_Bool mbPen; // is Pen (FALSE == NULL_PEN)
+ sal_Bool mbBrush; // is Brush (FALSE == NULL_BRUSH)
+ sal_Bool mbPrinter; // is Printer
+ sal_Bool mbVirDev; // is VirDev
+ sal_Bool mbWindow; // is Window
+ sal_Bool mbScreen; // is Screen compatible
bool mbXORMode; // _every_ output with RasterOp XOR
// remember RGB values for SetLineColor/SetFillColor
@@ -183,25 +183,25 @@ public:
virtual ~WinSalGraphics();
protected:
- virtual BOOL unionClipRegion( long nX, long nY, long nWidth, long nHeight );
+ virtual sal_Bool unionClipRegion( long nX, long nY, long nWidth, long nHeight );
virtual bool unionClipRegion( const ::basegfx::B2DPolyPolygon& );
// draw --> LineColor and FillColor and RasterOp and ClipRegion
virtual void drawPixel( long nX, long nY );
virtual void drawPixel( long nX, long nY, SalColor nSalColor );
virtual void drawLine( long nX1, long nY1, long nX2, long nY2 );
virtual void drawRect( long nX, long nY, long nWidth, long nHeight );
- virtual void drawPolyLine( ULONG nPoints, const SalPoint* pPtAry );
- virtual void drawPolygon( ULONG nPoints, const SalPoint* pPtAry );
+ virtual void drawPolyLine( sal_uIntPtr nPoints, const SalPoint* pPtAry );
+ virtual void drawPolygon( sal_uIntPtr nPoints, const SalPoint* pPtAry );
virtual void drawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pPoints, PCONSTSALPOINT* pPtAry );
virtual bool drawPolyPolygon( const ::basegfx::B2DPolyPolygon&, double fTransparency );
virtual bool drawPolyLine( const ::basegfx::B2DPolygon&, const ::basegfx::B2DVector& rLineWidth, basegfx::B2DLineJoin);
- virtual sal_Bool drawPolyLineBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry );
- virtual sal_Bool drawPolygonBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry );
+ virtual sal_Bool drawPolyLineBezier( sal_uIntPtr nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry );
+ virtual sal_Bool drawPolygonBezier( sal_uIntPtr nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry );
virtual sal_Bool drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt32* pPoints, const SalPoint* const* pPtAry, const BYTE* const* pFlgAry );
// CopyArea --> No RasterOp, but ClipRegion
virtual void copyArea( long nDestX, long nDestY, long nSrcX, long nSrcY, long nSrcWidth,
- long nSrcHeight, USHORT nFlags );
+ long nSrcHeight, sal_uInt16 nFlags );
// CopyBits and DrawBitmap --> RasterOp and ClipRegion
// CopyBits() --> pSrcGraphics == NULL, then CopyBits on same Graphics
@@ -222,20 +222,20 @@ protected:
// invert --> ClipRegion (only Windows or VirDevs)
virtual void invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags);
- virtual void invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nFlags );
+ virtual void invert( sal_uIntPtr nPoints, const SalPoint* pPtAry, SalInvert nFlags );
- virtual BOOL drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize );
+ virtual sal_Bool drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uIntPtr nSize );
// native widget rendering methods that require mirroring
- virtual BOOL hitTestNativeControl( ControlType nType, ControlPart nPart, const Region& rControlRegion,
- const Point& aPos, BOOL& rIsInside );
- virtual BOOL drawNativeControl( ControlType nType, ControlPart nPart, const Region& rControlRegion,
+ virtual sal_Bool hitTestNativeControl( ControlType nType, ControlPart nPart, const Region& rControlRegion,
+ const Point& aPos, sal_Bool& rIsInside );
+ virtual sal_Bool drawNativeControl( ControlType nType, ControlPart nPart, const Region& rControlRegion,
ControlState nState, const ImplControlValue& aValue,
const rtl::OUString& aCaption );
- virtual BOOL drawNativeControlText( ControlType nType, ControlPart nPart, const Region& rControlRegion,
+ virtual sal_Bool drawNativeControlText( ControlType nType, ControlPart nPart, const Region& rControlRegion,
ControlState nState, const ImplControlValue& aValue,
const rtl::OUString& aCaption );
- virtual BOOL getNativeControlRegion( ControlType nType, ControlPart nPart, const Region& rControlRegion, ControlState nState,
+ virtual sal_Bool getNativeControlRegion( ControlType nType, ControlPart nPart, const Region& rControlRegion, ControlState nState,
const ImplControlValue& aValue, const rtl::OUString& aCaption,
Region &rNativeBoundingRegion, Region &rNativeContentRegion );
@@ -250,7 +250,7 @@ public:
// get device resolution
virtual void GetResolution( long& rDPIX, long& rDPIY );
// get the depth of the device
- virtual USHORT GetBitCount();
+ virtual sal_uInt16 GetBitCount();
// get the width of the device
virtual long GetGraphicsWidth() const;
@@ -258,7 +258,7 @@ public:
virtual void ResetClipRegion();
// begin setting the clip region, add rectangles to the
// region with the UnionClipRegion call
- virtual void BeginSetClipRegion( ULONG nCount );
+ virtual void BeginSetClipRegion( sal_uIntPtr nCount );
// all rectangles were added and the clip region should be set now
virtual void EndSetClipRegion();
@@ -280,12 +280,12 @@ public:
// set the text color to a specific color
virtual void SetTextColor( SalColor nSalColor );
// set the font
- virtual USHORT SetFont( ImplFontSelectData*, int nFallbackLevel );
+ virtual sal_uInt16 SetFont( ImplFontSelectData*, int nFallbackLevel );
// get the current font's etrics
virtual void GetFontMetric( ImplFontMetricData* );
// get kernign pairs of the current font
// return only PairCount if (pKernPairs == NULL)
- virtual ULONG GetKernPairs( ULONG nPairs, ImplKernPairData* pKernPairs );
+ virtual sal_uIntPtr GetKernPairs( sal_uIntPtr nPairs, ImplKernPairData* pKernPairs );
// get the repertoire of the current font
virtual ImplFontCharMap* GetImplFontCharMap() const;
// graphics must fill supplied font list
@@ -306,7 +306,7 @@ public:
// rInfo: additional outgoing information
// implementation note: encoding 0 with glyph id 0 should be added implicitly
// as "undefined character"
- virtual BOOL CreateFontSubset( const rtl::OUString& rToFile,
+ virtual sal_Bool CreateFontSubset( const rtl::OUString& rToFile,
const ImplFontData*,
long* pGlyphIDs,
sal_uInt8* pEncoding,
@@ -344,15 +344,15 @@ public:
Ucs2UIntMap& rUnicodeEnc );
virtual int GetMinKashidaWidth();
- virtual BOOL GetGlyphBoundRect( long nIndex, Rectangle& );
- virtual BOOL GetGlyphOutline( long nIndex, ::basegfx::B2DPolyPolygon& );
+ virtual sal_Bool GetGlyphBoundRect( long nIndex, Rectangle& );
+ virtual sal_Bool GetGlyphOutline( long nIndex, ::basegfx::B2DPolyPolygon& );
virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel );
virtual void DrawServerFontLayout( const ServerFontLayout& );
virtual bool supportsOperation( OutDevSupportType ) const;
// Query the platform layer for control support
- virtual BOOL IsNativeControlSupported( ControlType nType, ControlPart nPart );
+ virtual sal_Bool IsNativeControlSupported( ControlType nType, ControlPart nPart );
virtual SystemGraphicsData GetGraphicsData() const;
virtual SystemFontData GetSysFontData( int nFallbacklevel ) const;
@@ -370,7 +370,7 @@ void ImplGetLogFontFromFontSelect( HDC hDC, const ImplFontSelectData*,
// - Defines -
// -----------
-#define MAX_64KSALPOINTS ((((USHORT)0xFFFF)-8)/sizeof(POINTS))
+#define MAX_64KSALPOINTS ((((sal_uInt16)0xFFFF)-8)/sizeof(POINTS))
// -----------
// - Inlines -
diff --git a/vcl/win/inc/salinst.h b/vcl/win/inc/salinst.h
index f3005e3ad30b..85f107e1fe12 100644
--- a/vcl/win/inc/salinst.h
+++ b/vcl/win/inc/salinst.h
@@ -46,19 +46,19 @@ public:
HWND mhComWnd; // window, for communication (between threads and the main thread)
SalYieldMutex* mpSalYieldMutex; // Sal-Yield-Mutex
vos::OMutex* mpSalWaitMutex; // Sal-Wait-Mutex
- USHORT mnYieldWaitCount; // Wait-Count
+ sal_uInt16 mnYieldWaitCount; // Wait-Count
public:
WinSalInstance();
virtual ~WinSalInstance();
- virtual SalFrame* CreateChildFrame( SystemParentData* pParent, ULONG nStyle );
- virtual SalFrame* CreateFrame( SalFrame* pParent, ULONG nStyle );
+ virtual SalFrame* CreateChildFrame( SystemParentData* pParent, sal_uIntPtr nStyle );
+ virtual SalFrame* CreateFrame( SalFrame* pParent, sal_uIntPtr nStyle );
virtual void DestroyFrame( SalFrame* pFrame );
- virtual SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, BOOL bShow = TRUE );
+ virtual SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, sal_Bool bShow = TRUE );
virtual void DestroyObject( SalObject* pObject );
virtual SalVirtualDevice* CreateVirtualDevice( SalGraphics* pGraphics,
long nDX, long nDY,
- USHORT nBitCount, const SystemGraphicsData *pData );
+ sal_uInt16 nBitCount, const SystemGraphicsData *pData );
virtual void DestroyVirtualDevice( SalVirtualDevice* pDevice );
virtual SalInfoPrinter* CreateInfoPrinter( SalPrinterQueueInfo* pQueueInfo,
@@ -75,11 +75,11 @@ public:
virtual SalSystem* CreateSalSystem();
virtual SalBitmap* CreateSalBitmap();
virtual vos::IMutex* GetYieldMutex();
- virtual ULONG ReleaseYieldMutex();
- virtual void AcquireYieldMutex( ULONG nCount );
+ virtual sal_uIntPtr ReleaseYieldMutex();
+ virtual void AcquireYieldMutex( sal_uIntPtr nCount );
virtual void Yield( bool bWait, bool bHandleAllCurrentEvents );
- virtual bool AnyInput( USHORT nType );
- virtual SalMenu* CreateMenu( BOOL bMenuBar );
+ virtual bool AnyInput( sal_uInt16 nType );
+ virtual SalMenu* CreateMenu( sal_Bool bMenuBar );
virtual void DestroyMenu( SalMenu* );
virtual SalMenuItem* CreateMenuItem( const SalItemParams* pItemData );
virtual void DestroyMenuItem( SalMenuItem* );
@@ -94,10 +94,10 @@ public:
// - Prototypen -
// --------------
-SalFrame* ImplSalCreateFrame( WinSalInstance* pInst, HWND hWndParent, ULONG nSalFrameStyle );
+SalFrame* ImplSalCreateFrame( WinSalInstance* pInst, HWND hWndParent, sal_uIntPtr nSalFrameStyle );
SalObject* ImplSalCreateObject( WinSalInstance* pInst, WinSalFrame* pParent );
-HWND ImplSalReCreateHWND( HWND hWndParent, HWND oldhWnd, BOOL bAsChild );
-void ImplSalStartTimer( ULONG nMS, BOOL bMutex = FALSE );
+HWND ImplSalReCreateHWND( HWND hWndParent, HWND oldhWnd, sal_Bool bAsChild );
+void ImplSalStartTimer( sal_uIntPtr nMS, sal_Bool bMutex = FALSE );
void ImplSalPrinterAbortJobAsync( HDC hPrnDC );
#endif // _SV_SALINST_H
diff --git a/vcl/win/inc/salmenu.h b/vcl/win/inc/salmenu.h
index 7f1774b61975..c9442ced8936 100644
--- a/vcl/win/inc/salmenu.h
+++ b/vcl/win/inc/salmenu.h
@@ -38,22 +38,22 @@ class WinSalMenu : public SalMenu
public:
WinSalMenu();
virtual ~WinSalMenu();
- virtual BOOL VisibleMenuBar(); // must return TRUE to actually DISPLAY native menu bars
+ virtual sal_Bool VisibleMenuBar(); // must return TRUE to actually DISPLAY native menu bars
// otherwise only menu messages are processed (eg, OLE on Windows)
virtual void InsertItem( SalMenuItem* pSalMenuItem, unsigned nPos );
virtual void RemoveItem( unsigned nPos );
virtual void SetSubMenu( SalMenuItem* pSalMenuItem, SalMenu* pSubMenu, unsigned nPos );
virtual void SetFrame( const SalFrame* pFrame );
- virtual void CheckItem( unsigned nPos, BOOL bCheck );
- virtual void EnableItem( unsigned nPos, BOOL bEnable );
+ virtual void CheckItem( unsigned nPos, sal_Bool bCheck );
+ virtual void EnableItem( unsigned nPos, sal_Bool bEnable );
virtual void SetItemText( unsigned nPos, SalMenuItem* pSalMenuItem, const XubString& rText );
virtual void SetItemImage( unsigned nPos, SalMenuItem* pSalMenuItem, const Image& rImage );
virtual void SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, const KeyCode& rKeyCode, const XubString& rKeyName );
virtual void GetSystemMenuData( SystemMenuData* pData );
HMENU mhMenu; // the menu handle
- BOOL mbMenuBar; // true for menu bars
+ sal_Bool mbMenuBar; // true for menu bars
HWND mhWnd; // the window handle where the menubar is attached, may be NULL
WinSalMenu *mpParentMenu; // the parent menu
};
diff --git a/vcl/win/inc/salobj.h b/vcl/win/inc/salobj.h
index 11ae96931321..402c2c2be3ce 100644
--- a/vcl/win/inc/salobj.h
+++ b/vcl/win/inc/salobj.h
@@ -45,7 +45,7 @@ public:
RGNDATA* mpClipRgnData; // ClipRegion-Data
RGNDATA* mpStdClipRgnData; // Cache Standard-ClipRegion-Data
RECT* mpNextClipRect; // Naechstes ClipRegion-Rect
- BOOL mbFirstClipRect; // Flag for first cliprect to insert
+ sal_Bool mbFirstClipRect; // Flag for first cliprect to insert
WinSalObject* mpNextObject; // pointer to next object
@@ -53,13 +53,13 @@ public:
virtual ~WinSalObject();
virtual void ResetClipRegion();
- virtual USHORT GetClipRegionType();
- virtual void BeginSetClipRegion( ULONG nRects );
+ virtual sal_uInt16 GetClipRegionType();
+ virtual void BeginSetClipRegion( sal_uIntPtr nRects );
virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight );
virtual void EndSetClipRegion();
virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight );
- virtual void Show( BOOL bVisible );
- virtual void Enable( BOOL nEnable );
+ virtual void Show( sal_Bool bVisible );
+ virtual void Enable( sal_Bool nEnable );
virtual void GrabFocus();
virtual void SetBackground();
virtual void SetBackground( SalColor nSalColor );
diff --git a/vcl/win/inc/salprn.h b/vcl/win/inc/salprn.h
index 57ae8eae55e3..14141b6e7e6b 100644
--- a/vcl/win/inc/salprn.h
+++ b/vcl/win/inc/salprn.h
@@ -36,7 +36,7 @@
// -----------------
// WNT3
-#define SAL_DRIVERDATA_SYSSIGN ((ULONG)0x574E5433)
+#define SAL_DRIVERDATA_SYSSIGN ((sal_uIntPtr)0x574E5433)
#define SAL_DRIVERDATA_VERSION_A 1
#define SAL_DRIVERDATA_VERSION_W 2
@@ -44,9 +44,9 @@
struct SalDriverData
{
- ULONG mnSysSignature;
- USHORT mnVersion;
- USHORT mnDriverOffset;
+ sal_uIntPtr mnSysSignature;
+ sal_uInt16 mnVersion;
+ sal_uInt16 mnDriverOffset;
BYTE maDriverData[1];
};
@@ -66,23 +66,23 @@ public:
XubString maDeviceName; // printer device name
XubString maPortName; // printer port name
HDC mhDC; // printer hdc
- BOOL mbGraphics; // is Graphics used
+ sal_Bool mbGraphics; // is Graphics used
public:
WinSalInfoPrinter();
virtual ~WinSalInfoPrinter();
virtual SalGraphics* GetGraphics();
virtual void ReleaseGraphics( SalGraphics* pGraphics );
- virtual BOOL Setup( SalFrame* pFrame, ImplJobSetup* pSetupData );
- virtual BOOL SetPrinterData( ImplJobSetup* pSetupData );
- virtual BOOL SetData( ULONG nFlags, ImplJobSetup* pSetupData );
+ virtual sal_Bool Setup( SalFrame* pFrame, ImplJobSetup* pSetupData );
+ virtual sal_Bool SetPrinterData( ImplJobSetup* pSetupData );
+ virtual sal_Bool SetData( sal_uIntPtr nFlags, ImplJobSetup* pSetupData );
virtual void GetPageInfo( const ImplJobSetup* pSetupData,
long& rOutWidth, long& rOutHeight,
long& rPageOffX, long& rPageOffY,
long& rPageWidth, long& rPageHeight );
- virtual ULONG GetCapabilities( const ImplJobSetup* pSetupData, USHORT nType );
- virtual ULONG GetPaperBinCount( const ImplJobSetup* pSetupData );
- virtual String GetPaperBinName( const ImplJobSetup* pSetupData, ULONG nPaperBin );
+ virtual sal_uIntPtr GetCapabilities( const ImplJobSetup* pSetupData, sal_uInt16 nType );
+ virtual sal_uIntPtr GetPaperBinCount( const ImplJobSetup* pSetupData );
+ virtual String GetPaperBinName( const ImplJobSetup* pSetupData, sal_uIntPtr nPaperBin );
virtual void InitPaperFormats( const ImplJobSetup* pSetupData );
virtual int GetLandscapeAngle( const ImplJobSetup* pSetupData );
};
@@ -98,10 +98,10 @@ public:
WinSalInfoPrinter* mpInfoPrinter; // pointer to the compatible InfoPrinter
WinSalPrinter* mpNextPrinter; // next printing printer
HDC mhDC; // printer hdc
- ULONG mnError; // Error Code
- ULONG mnCopies; // Kopien
- BOOL mbCollate; // Sortierte Kopien
- BOOL mbAbort; // Job Aborted
+ sal_uIntPtr mnError; // Error Code
+ sal_uIntPtr mnCopies; // Kopien
+ sal_Bool mbCollate; // Sortierte Kopien
+ sal_Bool mbAbort; // Job Aborted
bool mbValid;
@@ -110,18 +110,18 @@ public:
virtual ~WinSalPrinter();
using SalPrinter::StartJob;
- virtual BOOL StartJob( const XubString* pFileName,
+ virtual sal_Bool StartJob( const XubString* pFileName,
const XubString& rJobName,
const XubString& rAppName,
- ULONG nCopies,
+ sal_uIntPtr nCopies,
bool bCollate,
bool bDirect,
ImplJobSetup* pSetupData );
- virtual BOOL EndJob();
- virtual BOOL AbortJob();
- virtual SalGraphics* StartPage( ImplJobSetup* pSetupData, BOOL bNewJobData );
- virtual BOOL EndPage();
- virtual ULONG GetErrorCode();
+ virtual sal_Bool EndJob();
+ virtual sal_Bool AbortJob();
+ virtual SalGraphics* StartPage( ImplJobSetup* pSetupData, sal_Bool bNewJobData );
+ virtual sal_Bool EndPage();
+ virtual sal_uIntPtr GetErrorCode();
void markInvalid();
bool isValid() const { return mbValid; }
diff --git a/vcl/win/inc/salsys.h b/vcl/win/inc/salsys.h
index b6eadc6e6818..51a8c0443b58 100644
--- a/vcl/win/inc/salsys.h
+++ b/vcl/win/inc/salsys.h
@@ -83,7 +83,7 @@ public:
const std::vector<DisplayMonitor>& getMonitors()
{ initMonitors(); return m_aMonitors;}
- BOOL handleMonitorCallback( sal_IntPtr /*HMONITOR*/,
+ sal_Bool handleMonitorCallback( sal_IntPtr /*HMONITOR*/,
sal_IntPtr /*HDC*/,
sal_IntPtr /*LPRECT*/ );
};
diff --git a/vcl/win/inc/saltimer.h b/vcl/win/inc/saltimer.h
index c24af459aa97..38f861fad441 100644
--- a/vcl/win/inc/saltimer.h
+++ b/vcl/win/inc/saltimer.h
@@ -37,7 +37,7 @@ public:
virtual ~WinSalTimer();
// overload all pure virtual methods
- void Start( ULONG nMS );
+ void Start( sal_uIntPtr nMS );
void Stop();
};
diff --git a/vcl/win/inc/salvd.h b/vcl/win/inc/salvd.h
index d0f32a6460a9..24aa8b99ba01 100644
--- a/vcl/win/inc/salvd.h
+++ b/vcl/win/inc/salvd.h
@@ -45,16 +45,16 @@ public:
HBITMAP mhDefBmp; // Default Bitmap
WinSalGraphics* mpGraphics; // current VirDev graphics
WinSalVirtualDevice* mpNext; // next VirDev
- USHORT mnBitCount; // BitCount (0 or 1)
- BOOL mbGraphics; // is Graphics used
- BOOL mbForeignDC; // uses a foreign DC instead of a bitmap
+ sal_uInt16 mnBitCount; // BitCount (0 or 1)
+ sal_Bool mbGraphics; // is Graphics used
+ sal_Bool mbForeignDC; // uses a foreign DC instead of a bitmap
WinSalVirtualDevice();
virtual ~WinSalVirtualDevice();
virtual SalGraphics* GetGraphics();
virtual void ReleaseGraphics( SalGraphics* pGraphics );
- virtual BOOL SetSize( long nNewDX, long nNewDY );
+ virtual sal_Bool SetSize( long nNewDX, long nNewDY );
virtual void GetSize( long& rWidth, long& rHeight );
};
diff --git a/vcl/win/inc/wincomp.hxx b/vcl/win/inc/wincomp.hxx
index 61e04779dbce..141ea4106238 100644
--- a/vcl/win/inc/wincomp.hxx
+++ b/vcl/win/inc/wincomp.hxx
@@ -129,17 +129,17 @@ inline DWORD GetWindowExStyle( HWND hWnd )
return GetWindowLong( hWnd, GWL_EXSTYLE );
}
-inline WIN_BOOL IsMinimized( HWND hWnd )
+inline BOOL IsMinimized( HWND hWnd )
{
return IsIconic( hWnd );
}
-inline WIN_BOOL IsMaximized( HWND hWnd )
+inline BOOL IsMaximized( HWND hWnd )
{
return IsZoomed( hWnd );
}
-inline void SetWindowFont( HWND hWnd, HFONT hFont, WIN_BOOL bRedraw )
+inline void SetWindowFont( HWND hWnd, HFONT hFont, BOOL bRedraw )
{
SendMessage( hWnd, WM_SETFONT, (WPARAM)hFont, MAKELPARAM((UINT)bRedraw,0) );
}
diff --git a/vcl/win/source/app/saldata.cxx b/vcl/win/source/app/saldata.cxx
index bb8a198a96e6..1da1387edfe0 100644
--- a/vcl/win/source/app/saldata.cxx
+++ b/vcl/win/source/app/saldata.cxx
@@ -54,7 +54,7 @@ rtl_TextEncoding ImplSalGetSystemEncoding()
// -----------------------------------------------------------------------
-ByteString ImplSalGetWinAnsiString( const UniString& rStr, BOOL bFileName )
+ByteString ImplSalGetWinAnsiString( const UniString& rStr, sal_Bool bFileName )
{
rtl_TextEncoding eEncoding = ImplSalGetSystemEncoding();
if ( bFileName )
@@ -137,7 +137,7 @@ LONG ImplGetWindowLong( HWND hWnd, int nIndex )
// -----------------------------------------------------------------------
-WIN_BOOL ImplPostMessage( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam )
+BOOL ImplPostMessage( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam )
{
if ( aSalShlData.mbWNT )
return PostMessageW( hWnd, nMsg, wParam, lParam );
@@ -147,9 +147,9 @@ WIN_BOOL ImplPostMessage( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam )
// -----------------------------------------------------------------------
-WIN_BOOL ImplSendMessage( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam )
+BOOL ImplSendMessage( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam )
{
- WIN_BOOL bRet;
+ BOOL bRet;
if ( aSalShlData.mbWNT )
bRet = SendMessageW( hWnd, nMsg, wParam, lParam );
else
@@ -160,7 +160,7 @@ WIN_BOOL ImplSendMessage( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam )
// -----------------------------------------------------------------------
-WIN_BOOL ImplGetMessage( LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax )
+BOOL ImplGetMessage( LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax )
{
if ( aSalShlData.mbWNT )
return GetMessageW( lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax );
@@ -170,7 +170,7 @@ WIN_BOOL ImplGetMessage( LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFi
// -----------------------------------------------------------------------
-WIN_BOOL ImplPeekMessage( LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax, UINT wRemoveMsg )
+BOOL ImplPeekMessage( LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax, UINT wRemoveMsg )
{
if ( aSalShlData.mbWNT )
return PeekMessageW( lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax, wRemoveMsg );
diff --git a/vcl/win/source/app/salinfo.cxx b/vcl/win/source/app/salinfo.cxx
index b7ea81d313ae..808504c9542e 100644
--- a/vcl/win/source/app/salinfo.cxx
+++ b/vcl/win/source/app/salinfo.cxx
@@ -70,7 +70,7 @@ WinSalSystem::~WinSalSystem()
// -----------------------------------------------------------------------
-static WIN_BOOL CALLBACK ImplEnumMonitorProc( HMONITOR hMonitor,
+static BOOL CALLBACK ImplEnumMonitorProc( HMONITOR hMonitor,
HDC hDC,
LPRECT lpRect,
LPARAM dwData )
@@ -81,7 +81,7 @@ static WIN_BOOL CALLBACK ImplEnumMonitorProc( HMONITOR hMonitor,
reinterpret_cast<sal_IntPtr>(lpRect) );
}
-BOOL WinSalSystem::handleMonitorCallback( sal_IntPtr hMonitor, sal_IntPtr, sal_IntPtr )
+sal_Bool WinSalSystem::handleMonitorCallback( sal_IntPtr hMonitor, sal_IntPtr, sal_IntPtr )
{
MONITORINFOEXW aInfo;
aInfo.cbSize = sizeof( aInfo );
@@ -106,7 +106,7 @@ BOOL WinSalSystem::handleMonitorCallback( sal_IntPtr hMonitor, sal_IntPtr, sal_I
m_nPrimary = it->second;
}
}
- return TRUE;
+ return sal_True;
}
void WinSalSystem::clearMonitors()
diff --git a/vcl/win/source/app/salinst.cxx b/vcl/win/source/app/salinst.cxx
index 97dbb5285cca..1a536348ce54 100644
--- a/vcl/win/source/app/salinst.cxx
+++ b/vcl/win/source/app/salinst.cxx
@@ -107,7 +107,7 @@ class SalYieldMutex : public vos::OMutex
{
public: // for ImplSalYield()
WinSalInstance* mpInstData;
- ULONG mnCount;
+ sal_uIntPtr mnCount;
DWORD mnThreadId;
public:
@@ -117,7 +117,7 @@ public:
virtual void SAL_CALL release();
virtual sal_Bool SAL_CALL tryToAcquire();
- ULONG GetAcquireCount( ULONG nThreadId );
+ sal_uIntPtr GetAcquireCount( sal_uIntPtr nThreadId );
};
// -----------------------------------------------------------------------
@@ -196,7 +196,7 @@ sal_Bool SAL_CALL SalYieldMutex::tryToAcquire()
// -----------------------------------------------------------------------
-ULONG SalYieldMutex::GetAcquireCount( ULONG nThreadId )
+sal_uIntPtr SalYieldMutex::GetAcquireCount( sal_uIntPtr nThreadId )
{
if ( nThreadId == mnThreadId )
return mnCount;
@@ -222,7 +222,7 @@ void ImplSalYieldMutexAcquireWithWait()
{
// Wenn wir den Mutex nicht bekommen, muessen wir solange
// warten, bis wir Ihn bekommen
- BOOL bAcquire = FALSE;
+ sal_Bool bAcquire = FALSE;
do
{
if ( pInst->mpSalYieldMutex->tryToAcquire() )
@@ -255,7 +255,7 @@ void ImplSalYieldMutexAcquireWithWait()
// -----------------------------------------------------------------------
-BOOL ImplSalYieldMutexTryToAcquire()
+sal_Bool ImplSalYieldMutexTryToAcquire()
{
WinSalInstance* pInst = GetSalData()->mpFirstInstance;
if ( pInst )
@@ -287,15 +287,15 @@ void ImplSalYieldMutexRelease()
// -----------------------------------------------------------------------
-ULONG ImplSalReleaseYieldMutex()
+sal_uIntPtr ImplSalReleaseYieldMutex()
{
WinSalInstance* pInst = GetSalData()->mpFirstInstance;
if ( !pInst )
return 0;
SalYieldMutex* pYieldMutex = pInst->mpSalYieldMutex;
- ULONG nCount = pYieldMutex->GetAcquireCount( GetCurrentThreadId() );
- ULONG n = nCount;
+ sal_uIntPtr nCount = pYieldMutex->GetAcquireCount( GetCurrentThreadId() );
+ sal_uIntPtr n = nCount;
while ( n )
{
pYieldMutex->release();
@@ -307,7 +307,7 @@ ULONG ImplSalReleaseYieldMutex()
// -----------------------------------------------------------------------
-void ImplSalAcquireYieldMutex( ULONG nCount )
+void ImplSalAcquireYieldMutex( sal_uIntPtr nCount )
{
WinSalInstance* pInst = GetSalData()->mpFirstInstance;
if ( !pInst )
@@ -682,14 +682,14 @@ vos::IMutex* WinSalInstance::GetYieldMutex()
// -----------------------------------------------------------------------
-ULONG WinSalInstance::ReleaseYieldMutex()
+sal_uIntPtr WinSalInstance::ReleaseYieldMutex()
{
return ImplSalReleaseYieldMutex();
}
// -----------------------------------------------------------------------
-void WinSalInstance::AcquireYieldMutex( ULONG nCount )
+void WinSalInstance::AcquireYieldMutex( sal_uIntPtr nCount )
{
ImplSalAcquireYieldMutex( nCount );
}
@@ -711,7 +711,7 @@ static void ImplSalDispatchMessage( MSG* pMsg )
// -----------------------------------------------------------------------
-void ImplSalYield( BOOL bWait, BOOL bHandleAllCurrentEvents )
+void ImplSalYield( sal_Bool bWait, sal_Bool bHandleAllCurrentEvents )
{
MSG aMsg;
bool bWasMsg = false, bOneEvent = false;
@@ -746,8 +746,8 @@ void WinSalInstance::Yield( bool bWait, bool bHandleAllCurrentEvents )
SalYieldMutex* pYieldMutex = mpSalYieldMutex;
SalData* pSalData = GetSalData();
DWORD nCurThreadId = GetCurrentThreadId();
- ULONG nCount = pYieldMutex->GetAcquireCount( nCurThreadId );
- ULONG n = nCount;
+ sal_uIntPtr nCount = pYieldMutex->GetAcquireCount( nCurThreadId );
+ sal_uIntPtr n = nCount;
while ( n )
{
pYieldMutex->release();
@@ -804,7 +804,7 @@ LRESULT CALLBACK SalComWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lPar
rDef = FALSE;
break;
case SAL_MSG_THREADYIELD:
- ImplSalYield( (BOOL)wParam, (BOOL)lParam );
+ ImplSalYield( (sal_Bool)wParam, (sal_Bool)lParam );
rDef = FALSE;
break;
// If we get this message, because another GetMessage() call
@@ -819,11 +819,11 @@ LRESULT CALLBACK SalComWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lPar
rDef = FALSE;
break;
case SAL_MSG_STARTTIMER:
- ImplSalStartTimer( (ULONG) lParam, FALSE );
+ ImplSalStartTimer( (sal_uIntPtr) lParam, FALSE );
rDef = FALSE;
break;
case SAL_MSG_CREATEFRAME:
- nRet = (LRESULT)ImplSalCreateFrame( GetSalData()->mpFirstInstance, (HWND)lParam, (ULONG)wParam );
+ nRet = (LRESULT)ImplSalCreateFrame( GetSalData()->mpFirstInstance, (HWND)lParam, (sal_uIntPtr)wParam );
rDef = FALSE;
break;
case SAL_MSG_RECREATEHWND:
@@ -938,7 +938,7 @@ LRESULT CALLBACK SalComWndProcW( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lPa
// -----------------------------------------------------------------------
-bool WinSalInstance::AnyInput( USHORT nType )
+bool WinSalInstance::AnyInput( sal_uInt16 nType )
{
MSG aMsg;
@@ -1020,7 +1020,7 @@ bool WinSalInstance::AnyInput( USHORT nType )
// -----------------------------------------------------------------------
-void SalTimer::Start( ULONG nMS )
+void SalTimer::Start( sal_uIntPtr nMS )
{
// Um auf Main-Thread umzuschalten
SalData* pSalData = GetSalData();
@@ -1037,7 +1037,7 @@ void SalTimer::Start( ULONG nMS )
// -----------------------------------------------------------------------
-SalFrame* WinSalInstance::CreateChildFrame( SystemParentData* pSystemParentData, ULONG nSalFrameStyle )
+SalFrame* WinSalInstance::CreateChildFrame( SystemParentData* pSystemParentData, sal_uIntPtr nSalFrameStyle )
{
// Um auf Main-Thread umzuschalten
return (SalFrame*)ImplSendMessage( mhComWnd, SAL_MSG_CREATEFRAME, nSalFrameStyle, (LPARAM)pSystemParentData->hWnd );
@@ -1045,7 +1045,7 @@ SalFrame* WinSalInstance::CreateChildFrame( SystemParentData* pSystemParentData,
// -----------------------------------------------------------------------
-SalFrame* WinSalInstance::CreateFrame( SalFrame* pParent, ULONG nSalFrameStyle )
+SalFrame* WinSalInstance::CreateFrame( SalFrame* pParent, sal_uIntPtr nSalFrameStyle )
{
// Um auf Main-Thread umzuschalten
HWND hWndParent;
@@ -1067,7 +1067,7 @@ void WinSalInstance::DestroyFrame( SalFrame* pFrame )
SalObject* WinSalInstance::CreateObject( SalFrame* pParent,
SystemWindowData* /*pWindowData*/, // SystemWindowData meaningless on Windows
- BOOL /*bShow*/ )
+ sal_Bool /*bShow*/ )
{
// Um auf Main-Thread umzuschalten
return (SalObject*)ImplSendMessage( mhComWnd, SAL_MSG_CREATEOBJECT, 0, (LPARAM)static_cast<WinSalFrame*>(pParent) );
diff --git a/vcl/win/source/app/salshl.cxx b/vcl/win/source/app/salshl.cxx
index 0f3b0c41e258..578b3cb804bd 100644
--- a/vcl/win/source/app/salshl.cxx
+++ b/vcl/win/source/app/salshl.cxx
@@ -43,15 +43,15 @@ extern "C"
{
#ifdef __MINGW32__
-BOOL WINAPI DllMain( HINSTANCE hInst, DWORD nReason, LPVOID pReserved )
+sal_Bool WINAPI DllMain( HINSTANCE hInst, DWORD nReason, LPVOID pReserved )
#else
#ifdef ICC
int _CRT_init(void);
#else
-WIN_BOOL WINAPI _CRT_INIT( HINSTANCE hInst, DWORD nReason, LPVOID pReserved );
+BOOL WINAPI _CRT_INIT( HINSTANCE hInst, DWORD nReason, LPVOID pReserved );
#endif
-WIN_BOOL WINAPI LibMain( HINSTANCE hInst, DWORD nReason, LPVOID pReserved )
+BOOL WINAPI LibMain( HINSTANCE hInst, DWORD nReason, LPVOID pReserved )
#endif
{
// Unsere DLL-Initialisierung
@@ -102,7 +102,7 @@ HBITMAP ImplLoadSalBitmap( int nId )
// -----------------------------------------------------------------------
-BOOL ImplLoadSalIcon( int nId, HICON& rIcon, HICON& rSmallIcon )
+sal_Bool ImplLoadSalIcon( int nId, HICON& rIcon, HICON& rSmallIcon )
{
DBG_ASSERT( aSalShlData.mhInst, "no DLL instance handle" );
diff --git a/vcl/win/source/app/saltimer.cxx b/vcl/win/source/app/saltimer.cxx
index d512be753f9c..43e4989e4924 100644
--- a/vcl/win/source/app/saltimer.cxx
+++ b/vcl/win/source/app/saltimer.cxx
@@ -42,7 +42,7 @@
// =======================================================================
-void ImplSalStartTimer( ULONG nMS, BOOL bMutex )
+void ImplSalStartTimer( sal_uIntPtr nMS, sal_Bool bMutex )
{
SalData* pSalData = GetSalData();
@@ -51,7 +51,7 @@ void ImplSalStartTimer( ULONG nMS, BOOL bMutex )
if ( !bMutex )
pSalData->mnTimerOrgMS = nMS;
- // Periode darf nicht zu gross sein, da Windows mit USHORT arbeitet
+ // Periode darf nicht zu gross sein, da Windows mit sal_uInt16 arbeitet
if ( nMS > MAX_SYSPERIOD )
nMS = MAX_SYSPERIOD;
@@ -70,7 +70,7 @@ WinSalTimer::~WinSalTimer()
{
}
-void WinSalTimer::Start( ULONG nMS )
+void WinSalTimer::Start( sal_uIntPtr nMS )
{
// switch to main thread
SalData* pSalData = GetSalData();
diff --git a/vcl/win/source/gdi/salbmp.cxx b/vcl/win/source/gdi/salbmp.cxx
index 444df039dd69..97b2683ff1f8 100644
--- a/vcl/win/source/gdi/salbmp.cxx
+++ b/vcl/win/source/gdi/salbmp.cxx
@@ -119,7 +119,7 @@ bool WinSalBitmap::Create( HANDLE hBitmap, bool bDIB, bool bCopyHandle )
// ------------------------------------------------------------------
-bool WinSalBitmap::Create( const Size& rSize, USHORT nBitCount, const BitmapPalette& rPal )
+bool WinSalBitmap::Create( const Size& rSize, sal_uInt16 nBitCount, const BitmapPalette& rPal )
{
bool bRet = FALSE;
@@ -212,7 +212,7 @@ bool WinSalBitmap::Create( const SalBitmap& rSSalBmp, SalGraphics* pSGraphics )
// ------------------------------------------------------------------
-bool WinSalBitmap::Create( const SalBitmap& rSSalBmp, USHORT nNewBitCount )
+bool WinSalBitmap::Create( const SalBitmap& rSSalBmp, sal_uInt16 nNewBitCount )
{
bool bRet = FALSE;
@@ -277,9 +277,9 @@ void WinSalBitmap::Destroy()
// ------------------------------------------------------------------
-USHORT WinSalBitmap::ImplGetDIBColorCount( HGLOBAL hDIB )
+sal_uInt16 WinSalBitmap::ImplGetDIBColorCount( HGLOBAL hDIB )
{
- USHORT nColors = 0;
+ sal_uInt16 nColors = 0;
if( hDIB )
{
@@ -291,7 +291,7 @@ USHORT WinSalBitmap::ImplGetDIBColorCount( HGLOBAL hDIB )
if( pBIH->biBitCount <= 8 )
{
if ( pBIH->biClrUsed )
- nColors = (USHORT) pBIH->biClrUsed;
+ nColors = (sal_uInt16) pBIH->biClrUsed;
else
nColors = 1 << pBIH->biBitCount;
}
@@ -307,7 +307,7 @@ USHORT WinSalBitmap::ImplGetDIBColorCount( HGLOBAL hDIB )
// ------------------------------------------------------------------
-HGLOBAL WinSalBitmap::ImplCreateDIB( const Size& rSize, USHORT nBits, const BitmapPalette& rPal )
+HGLOBAL WinSalBitmap::ImplCreateDIB( const Size& rSize, sal_uInt16 nBits, const BitmapPalette& rPal )
{
DBG_ASSERT( nBits == 1 || nBits == 4 || nBits == 8 || nBits == 16 || nBits == 24, "Unsupported BitCount!" );
@@ -315,8 +315,8 @@ HGLOBAL WinSalBitmap::ImplCreateDIB( const Size& rSize, USHORT nBits, const Bitm
if ( rSize.Width() && rSize.Height() )
{
- const ULONG nImageSize = AlignedWidth4Bytes( nBits * rSize.Width() ) * rSize.Height();
- const USHORT nColors = ( nBits <= 8 ) ? ( 1 << nBits ) : 0;
+ const sal_uIntPtr nImageSize = AlignedWidth4Bytes( nBits * rSize.Width() ) * rSize.Height();
+ const sal_uInt16 nColors = ( nBits <= 8 ) ? ( 1 << nBits ) : 0;
hDIB = GlobalAlloc( GHND, sizeof( BITMAPINFOHEADER ) + nColors * sizeof( RGBQUAD ) + nImageSize );
@@ -339,7 +339,7 @@ HGLOBAL WinSalBitmap::ImplCreateDIB( const Size& rSize, USHORT nBits, const Bitm
if ( nColors )
{
- const USHORT nMinCount = Min( nColors, rPal.GetEntryCount() );
+ const sal_uInt16 nMinCount = Min( nColors, rPal.GetEntryCount() );
if( nMinCount )
memcpy( pBI->bmiColors, rPal.ImplGetColorBuffer(), nMinCount * sizeof( RGBQUAD ) );
@@ -360,7 +360,7 @@ HANDLE WinSalBitmap::ImplCopyDIBOrDDB( HANDLE hHdl, bool bDIB )
if ( bDIB && hHdl )
{
- const ULONG nSize = GlobalSize( hHdl );
+ const sal_uIntPtr nSize = GlobalSize( hHdl );
if ( (hCopy = GlobalAlloc( GHND, nSize )) != 0 )
{
@@ -418,8 +418,8 @@ BitmapBuffer* WinSalBitmap::AcquireBuffer( bool /*bReadOnly*/ )
{
PBITMAPINFO pNewBI = (PBITMAPINFO) GlobalLock( hNewDIB );
PBITMAPINFOHEADER pNewBIH = (PBITMAPINFOHEADER) pNewBI;
- const USHORT nColorCount = ImplGetDIBColorCount( hNewDIB );
- const ULONG nOffset = *(DWORD*) pBI + nColorCount * sizeof( RGBQUAD );
+ const sal_uInt16 nColorCount = ImplGetDIBColorCount( hNewDIB );
+ const sal_uIntPtr nOffset = *(DWORD*) pBI + nColorCount * sizeof( RGBQUAD );
BYTE* pOldBits = (PBYTE) pBI + nOffset;
BYTE* pNewBits = (PBYTE) pNewBI + nOffset;
@@ -452,11 +452,11 @@ BitmapBuffer* WinSalBitmap::AcquireBuffer( bool /*bReadOnly*/ )
pBuffer->mnWidth = maSize.Width();
pBuffer->mnHeight = maSize.Height();
pBuffer->mnScanlineSize = AlignedWidth4Bytes( maSize.Width() * pBIH->biBitCount );
- pBuffer->mnBitCount = (USHORT) pBIH->biBitCount;
+ pBuffer->mnBitCount = (sal_uInt16) pBIH->biBitCount;
if( pBuffer->mnBitCount <= 8 )
{
- const USHORT nPalCount = ImplGetDIBColorCount( mhDIB );
+ const sal_uInt16 nPalCount = ImplGetDIBColorCount( mhDIB );
pBuffer->maPalette.SetEntryCount( nPalCount );
memcpy( pBuffer->maPalette.ImplGetColorBuffer(), pBI->bmiColors, nPalCount * sizeof( RGBQUAD ) );
@@ -464,7 +464,7 @@ BitmapBuffer* WinSalBitmap::AcquireBuffer( bool /*bReadOnly*/ )
}
else if( ( pBIH->biBitCount == 16 ) || ( pBIH->biBitCount == 32 ) )
{
- ULONG nOffset = 0UL;
+ sal_uIntPtr nOffset = 0UL;
if( pBIH->biCompression == BI_BITFIELDS )
{
@@ -508,7 +508,7 @@ void WinSalBitmap::ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly )
if( !bReadOnly && !!pBuffer->maPalette )
{
PBITMAPINFO pBI = (PBITMAPINFO) GlobalLock( mhDIB );
- const USHORT nCount = pBuffer->maPalette.GetEntryCount();
+ const sal_uInt16 nCount = pBuffer->maPalette.GetEntryCount();
memcpy( pBI->bmiColors, pBuffer->maPalette.ImplGetColorBuffer(), nCount * sizeof( RGBQUAD ) );
GlobalUnlock( mhDIB );
@@ -529,12 +529,12 @@ void WinSalBitmap::ImplDecodeRLEBuffer( const BYTE* pSrcBuf, BYTE* pDstBuf,
HPBYTE pRLE = (HPBYTE) pSrcBuf;
HPBYTE pDIB = (HPBYTE) pDstBuf;
HPBYTE pRow = (HPBYTE) pDstBuf;
- ULONG nWidthAl = AlignedWidth4Bytes( rSizePixel.Width() * ( bRLE4 ? 4UL : 8UL ) );
+ sal_uIntPtr nWidthAl = AlignedWidth4Bytes( rSizePixel.Width() * ( bRLE4 ? 4UL : 8UL ) );
HPBYTE pLast = pDIB + rSizePixel.Height() * nWidthAl - 1;
- ULONG nCountByte;
- ULONG nRunByte;
- ULONG nX = 0;
- ULONG i;
+ sal_uIntPtr nCountByte;
+ sal_uIntPtr nRunByte;
+ sal_uIntPtr nX = 0;
+ sal_uIntPtr i;
BYTE cTmp;
bool bEndDecoding = FALSE;
diff --git a/vcl/win/source/gdi/salgdi.cxx b/vcl/win/source/gdi/salgdi.cxx
index eb260eb808c6..f58050a1890f 100644
--- a/vcl/win/source/gdi/salgdi.cxx
+++ b/vcl/win/source/gdi/salgdi.cxx
@@ -189,7 +189,7 @@ void ImplInitSalGDI()
HBITMAP hBmpOld = (HBITMAP) ::SelectObject( hMemDC, hMemBmp );
HBRUSH hMemBrush = ::CreateSolidBrush( PALETTERGB( 175, 171, 169 ) );
HBRUSH hBrushOld = (HBRUSH) ::SelectObject( hMemDC, hMemBrush );
- BOOL bDither16 = TRUE;
+ sal_Bool bDither16 = TRUE;
::PatBlt( hMemDC, 0, 0, 8, 8, PATCOPY );
const COLORREF aCol( ::GetPixel( hMemDC, 0, 0 ) );
@@ -240,13 +240,13 @@ void ImplInitSalGDI()
BYTE nR, nG, nB;
PALETTEENTRY* pPalEntry;
LOGPALETTE* pLogPal;
- const USHORT nDitherPalCount = DITHER_PAL_COUNT;
- ULONG nTotalCount = DITHER_MAX_SYSCOLOR + nDitherPalCount + DITHER_EXTRA_COLORS;
+ const sal_uInt16 nDitherPalCount = DITHER_PAL_COUNT;
+ sal_uIntPtr nTotalCount = DITHER_MAX_SYSCOLOR + nDitherPalCount + DITHER_EXTRA_COLORS;
// create logical palette
pLogPal = (LOGPALETTE*) new char[ sizeof( LOGPALETTE ) + ( nTotalCount * sizeof( PALETTEENTRY ) ) ];
pLogPal->palVersion = 0x0300;
- pLogPal->palNumEntries = (USHORT) nTotalCount;
+ pLogPal->palNumEntries = (sal_uInt16) nTotalCount;
pPalEntry = pLogPal->palPalEntry;
// Standard colors
@@ -404,7 +404,7 @@ static int ImplIsPaletteEntry( BYTE nRed, BYTE nGreen, BYTE nBlue )
PALETTEENTRY* pPalEntry = aImplSalSysPalEntryAry;
// standard palette color?
- for ( USHORT i = 0; i < DITHER_MAX_SYSCOLOR; i++, pPalEntry++ )
+ for ( sal_uInt16 i = 0; i < DITHER_MAX_SYSCOLOR; i++, pPalEntry++ )
{
if( pPalEntry->peRed == nRed && pPalEntry->peGreen == nGreen && pPalEntry->peBlue == nBlue )
return TRUE;
@@ -551,7 +551,7 @@ void ImplSalDeInitGraphics( WinSalGraphics* pData )
// =======================================================================
-HDC ImplGetCachedDC( ULONG nID, HBITMAP hBmp )
+HDC ImplGetCachedDC( sal_uIntPtr nID, HBITMAP hBmp )
{
SalData* pSalData = GetSalData();
HDCCache* pC = &pSalData->mpHDCCache[ nID ];
@@ -585,7 +585,7 @@ HDC ImplGetCachedDC( ULONG nID, HBITMAP hBmp )
// =======================================================================
-void ImplReleaseCachedDC( ULONG nID )
+void ImplReleaseCachedDC( sal_uIntPtr nID )
{
SalData* pSalData = GetSalData();
HDCCache* pC = &pSalData->mpHDCCache[ nID ];
@@ -598,7 +598,7 @@ void ImplReleaseCachedDC( ULONG nID )
void ImplClearHDCCache( SalData* pData )
{
- for( ULONG i = 0; i < CACHESIZE_HDC; i++ )
+ for( sal_uIntPtr i = 0; i < CACHESIZE_HDC; i++ )
{
HDCCache* pC = &pData->mpHDCCache[ i ];
@@ -621,21 +621,21 @@ void ImplClearHDCCache( SalData* pData )
// might also contain bezier control points for the PolyDraw() GDI method
// Make sure pWinPointAry and pWinFlagAry are big enough
void ImplPreparePolyDraw( bool bCloseFigures,
- ULONG nPoly,
- const ULONG* pPoints,
+ sal_uIntPtr nPoly,
+ const sal_uIntPtr* pPoints,
const SalPoint* const* pPtAry,
const BYTE* const* pFlgAry,
POINT* pWinPointAry,
BYTE* pWinFlagAry )
{
- ULONG nCurrPoly;
+ sal_uIntPtr nCurrPoly;
for( nCurrPoly=0; nCurrPoly<nPoly; ++nCurrPoly )
{
const POINT* pCurrPoint = reinterpret_cast<const POINT*>( *pPtAry++ );
const BYTE* pCurrFlag = *pFlgAry++;
- const ULONG nCurrPoints = *pPoints++;
+ const sal_uIntPtr nCurrPoints = *pPoints++;
const bool bHaveFlagArray( pCurrFlag );
- ULONG nCurrPoint;
+ sal_uIntPtr nCurrPoint;
if( nCurrPoints )
{
@@ -691,11 +691,11 @@ void ImplPreparePolyDraw( bool bCloseFigures,
// =======================================================================
// #100127# draw an array of points which might also contain bezier control points
-void ImplRenderPath( HDC hdc, ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry )
+void ImplRenderPath( HDC hdc, sal_uIntPtr nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry )
{
if( nPoints )
{
- USHORT i;
+ sal_uInt16 i;
// TODO: profile whether the following options are faster:
// a) look ahead and draw consecutive bezier or line segments by PolyBezierTo/PolyLineTo resp.
// b) convert our flag array to window's and use PolyDraw
@@ -805,9 +805,9 @@ void WinSalGraphics::GetResolution( long& rDPIX, long& rDPIY )
// -----------------------------------------------------------------------
-USHORT WinSalGraphics::GetBitCount()
+sal_uInt16 WinSalGraphics::GetBitCount()
{
- return (USHORT)GetDeviceCaps( mhDC, BITSPIXEL );
+ return (sal_uInt16)GetDeviceCaps( mhDC, BITSPIXEL );
}
// -----------------------------------------------------------------------
@@ -849,7 +849,7 @@ void WinSalGraphics::ResetClipRegion()
// -----------------------------------------------------------------------
-void WinSalGraphics::BeginSetClipRegion( ULONG nRectCount )
+void WinSalGraphics::BeginSetClipRegion( sal_uIntPtr nRectCount )
{
if ( mhRegion )
{
@@ -857,7 +857,7 @@ void WinSalGraphics::BeginSetClipRegion( ULONG nRectCount )
mhRegion = 0;
}
- ULONG nRectBufSize = sizeof(RECT)*nRectCount;
+ sal_uIntPtr nRectBufSize = sizeof(RECT)*nRectCount;
if ( nRectCount < SAL_CLIPRECT_COUNT )
{
if ( !mpStdClipRgnData )
@@ -878,7 +878,7 @@ void WinSalGraphics::BeginSetClipRegion( ULONG nRectCount )
// -----------------------------------------------------------------------
-BOOL WinSalGraphics::unionClipRegion( long nX, long nY, long nWidth, long nHeight )
+sal_Bool WinSalGraphics::unionClipRegion( long nX, long nY, long nWidth, long nHeight )
{
if ( nWidth && nHeight )
{
@@ -946,7 +946,7 @@ void WinSalGraphics::EndSetClipRegion()
}
else
{
- ULONG nSize = mpClipRgnData->rdh.nRgnSize+sizeof(RGNDATAHEADER);
+ sal_uIntPtr nSize = mpClipRgnData->rdh.nRgnSize+sizeof(RGNDATAHEADER);
mhRegion = ExtCreateRegion( NULL, nSize, mpClipRgnData );
// if ExtCreateRegion(...) is not supported
@@ -960,7 +960,7 @@ void WinSalGraphics::EndSetClipRegion()
mhRegion = CreateRectRgn( pRect->left, pRect->top, pRect->right, pRect->bottom );
pRect++;
- for( ULONG n = 1; n < pHeader->nCount; n++, pRect++ )
+ for( sal_uIntPtr n = 1; n < pHeader->nCount; n++, pRect++ )
{
HRGN hRgn = CreateRectRgn( pRect->left, pRect->top, pRect->right, pRect->bottom );
CombineRgn( mhRegion, mhRegion, hRgn, RGN_OR );
@@ -1008,14 +1008,14 @@ void WinSalGraphics::SetLineColor( SalColor nSalColor )
SALCOLOR_GREEN( nSalColor ),
SALCOLOR_BLUE( nSalColor ) );
HPEN hNewPen = 0;
- BOOL bStockPen = FALSE;
+ sal_Bool bStockPen = FALSE;
// search for stock pen (only screen, because printer have problems,
// when we use stock objects)
if ( !mbPrinter )
{
SalData* pSalData = GetSalData();
- for ( USHORT i = 0; i < pSalData->mnStockPenCount; i++ )
+ for ( sal_uInt16 i = 0; i < pSalData->mnStockPenCount; i++ )
{
if ( nPenColor == pSalData->maStockPenColorAry[i] )
{
@@ -1092,13 +1092,13 @@ void WinSalGraphics::SetFillColor( SalColor nSalColor )
BYTE nBlue = SALCOLOR_BLUE( nSalColor );
COLORREF nBrushColor = PALETTERGB( nRed, nGreen, nBlue );
HBRUSH hNewBrush = 0;
- BOOL bStockBrush = FALSE;
+ sal_Bool bStockBrush = FALSE;
// search for stock brush (only screen, because printer have problems,
// when we use stock objects)
if ( !mbPrinter )
{
- for ( USHORT i = 0; i < pSalData->mnStockBrushCount; i++ )
+ for ( sal_uInt16 i = 0; i < pSalData->mnStockBrushCount; i++ )
{
if ( nBrushColor == pSalData->maStockBrushColorAry[ i ] )
{
@@ -1318,7 +1318,7 @@ void WinSalGraphics::drawRect( long nX, long nY, long nWidth, long nHeight )
// -----------------------------------------------------------------------
-void WinSalGraphics::drawPolyLine( ULONG nPoints, const SalPoint* pPtAry )
+void WinSalGraphics::drawPolyLine( sal_uIntPtr nPoints, const SalPoint* pPtAry )
{
// Unter NT koennen wir das Array direkt weiterreichen
DBG_ASSERT( sizeof( POINT ) == sizeof( SalPoint ),
@@ -1333,7 +1333,7 @@ void WinSalGraphics::drawPolyLine( ULONG nPoints, const SalPoint* pPtAry )
// -----------------------------------------------------------------------
-void WinSalGraphics::drawPolygon( ULONG nPoints, const SalPoint* pPtAry )
+void WinSalGraphics::drawPolygon( sal_uIntPtr nPoints, const SalPoint* pPtAry )
{
// Unter NT koennen wir das Array direkt weiterreichen
DBG_ASSERT( sizeof( POINT ) == sizeof( SalPoint ),
@@ -1421,7 +1421,7 @@ void WinSalGraphics::drawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pPoint
// -----------------------------------------------------------------------
-sal_Bool WinSalGraphics::drawPolyLineBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry )
+sal_Bool WinSalGraphics::drawPolyLineBezier( sal_uIntPtr nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry )
{
#ifdef USE_GDI_BEZIERS
// Unter NT koennen wir das Array direkt weiterreichen
@@ -1438,7 +1438,7 @@ sal_Bool WinSalGraphics::drawPolyLineBezier( ULONG nPoints, const SalPoint* pPtA
// -----------------------------------------------------------------------
-sal_Bool WinSalGraphics::drawPolygonBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry )
+sal_Bool WinSalGraphics::drawPolygonBezier( sal_uIntPtr nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry )
{
#ifdef USE_GDI_BEZIERS
// Unter NT koennen wir das Array direkt weiterreichen
@@ -1497,8 +1497,8 @@ sal_Bool WinSalGraphics::drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt
DBG_ASSERT( sizeof( POINT ) == sizeof( SalPoint ),
"WinSalGraphics::DrawPolyPolygonBezier(): POINT != SalPoint" );
- ULONG nCurrPoly, nTotalPoints;
- const ULONG* pCurrPoints = pPoints;
+ sal_uIntPtr nCurrPoly, nTotalPoints;
+ const sal_uIntPtr* pCurrPoints = pPoints;
for( nCurrPoly=0, nTotalPoints=0; nCurrPoly<nPoly; ++nCurrPoly )
nTotalPoints += *pCurrPoints++;
@@ -1550,11 +1550,11 @@ sal_Bool WinSalGraphics::drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt
#define POSTSCRIPT_BOUNDINGSEARCH 0x1000 // we only try to get the BoundingBox
// in the first 4096 bytes
-static BYTE* ImplSearchEntry( BYTE* pSource, BYTE* pDest, ULONG nComp, ULONG nSize )
+static BYTE* ImplSearchEntry( BYTE* pSource, BYTE* pDest, sal_uIntPtr nComp, sal_uIntPtr nSize )
{
while ( nComp-- >= nSize )
{
- ULONG i;
+ sal_uIntPtr i;
for ( i = 0; i < nSize; i++ )
{
if ( ( pSource[i]&~0x20 ) != ( pDest[i]&~0x20 ) )
@@ -1567,9 +1567,9 @@ static BYTE* ImplSearchEntry( BYTE* pSource, BYTE* pDest, ULONG nComp, ULONG nSi
return NULL;
}
-static BOOL ImplGetBoundingBox( double* nNumb, BYTE* pSource, ULONG nSize )
+static sal_Bool ImplGetBoundingBox( double* nNumb, BYTE* pSource, sal_uIntPtr nSize )
{
- BOOL bRetValue = FALSE;
+ sal_Bool bRetValue = FALSE;
BYTE* pDest = ImplSearchEntry( pSource, (BYTE*)"%%BoundingBox:", nSize, 14 );
if ( pDest )
{
@@ -1584,9 +1584,9 @@ static BOOL ImplGetBoundingBox( double* nNumb, BYTE* pSource, ULONG nSize )
for ( i = 0; ( i < 4 ) && nSizeLeft; i++ )
{
int nDivision = 1;
- BOOL bDivision = FALSE;
- BOOL bNegative = FALSE;
- BOOL bValid = TRUE;
+ sal_Bool bDivision = FALSE;
+ sal_Bool bNegative = FALSE;
+ sal_Bool bValid = TRUE;
while ( ( --nSizeLeft ) && ( *pDest == ' ' ) || ( *pDest == 0x9 ) ) pDest++;
BYTE nByte = *pDest;
@@ -1629,9 +1629,9 @@ static BOOL ImplGetBoundingBox( double* nNumb, BYTE* pSource, ULONG nSize )
return bRetValue;
}
-BOOL WinSalGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize )
+sal_Bool WinSalGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uIntPtr nSize )
{
- BOOL bRetValue = FALSE;
+ sal_Bool bRetValue = FALSE;
if ( mbPrinter )
{
@@ -1645,7 +1645,7 @@ BOOL WinSalGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void*
{
OStringBuffer aBuf( POSTSCRIPT_BUFSIZE );
- // reserve place for a USHORT
+ // reserve place for a sal_uInt16
aBuf.append( "aa" );
// #107797# Write out EPS encapsulation header
@@ -1723,7 +1723,7 @@ BOOL WinSalGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void*
// #107797# Write out buffer
// ----------------------------------------------------------------------------------
- *((USHORT*)aBuf.getStr()) = (USHORT)( aBuf.getLength() - 2 );
+ *((sal_uInt16*)aBuf.getStr()) = (sal_uInt16)( aBuf.getLength() - 2 );
Escape ( mhDC, nEscape, aBuf.getLength(), (LPTSTR)aBuf.getStr(), 0 );
@@ -1731,7 +1731,7 @@ BOOL WinSalGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void*
// ----------------------------------------------------------------------------------
double dM11 = nWidth / ( nBoundingBox[2] - nBoundingBox[0] );
double dM22 = nHeight / (nBoundingBox[1] - nBoundingBox[3] );
- // reserve a USHORT again
+ // reserve a sal_uInt16 again
aBuf.setLength( 2 );
aBuf.append( "\n\n[" );
aBuf.append( dM11 );
@@ -1743,14 +1743,14 @@ BOOL WinSalGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void*
aBuf.append( nY - ( dM22 * nBoundingBox[3] ) );
aBuf.append( "] concat\n"
"%%BeginDocument:\n" );
- *((USHORT*)aBuf.getStr()) = (USHORT)( aBuf.getLength() - 2 );
+ *((sal_uInt16*)aBuf.getStr()) = (sal_uInt16)( aBuf.getLength() - 2 );
Escape ( mhDC, nEscape, aBuf.getLength(), (LPTSTR)aBuf.getStr(), 0 );
// #107797# Write out actual EPS content
// ----------------------------------------------------------------------------------
- ULONG nToDo = nSize;
- ULONG nDoNow;
+ sal_uIntPtr nToDo = nSize;
+ sal_uIntPtr nDoNow;
while ( nToDo )
{
nDoNow = nToDo;
@@ -1758,9 +1758,9 @@ BOOL WinSalGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void*
nDoNow = POSTSCRIPT_BUFSIZE - 2;
// the following is based on the string buffer allocation
// of size POSTSCRIPT_BUFSIZE at construction time of aBuf
- *((USHORT*)aBuf.getStr()) = (USHORT)nDoNow;
+ *((sal_uInt16*)aBuf.getStr()) = (sal_uInt16)nDoNow;
memcpy( (void*)(aBuf.getStr() + 2), (BYTE*)pPtr + nSize - nToDo, nDoNow );
- ULONG nResult = Escape ( mhDC, nEscape, nDoNow + 2, (LPTSTR)aBuf.getStr(), 0 );
+ sal_uIntPtr nResult = Escape ( mhDC, nEscape, nDoNow + 2, (LPTSTR)aBuf.getStr(), 0 );
if (!nResult )
break;
nToDo -= nResult;
@@ -1769,13 +1769,13 @@ BOOL WinSalGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void*
// #107797# Write out EPS encapsulation footer
// ----------------------------------------------------------------------------------
- // reserve a USHORT again
+ // reserve a sal_uInt16 again
aBuf.setLength( 2 );
aBuf.append( "%%EndDocument\n"
"count op_count_salWin sub {pop} repeat\n"
"countdictstack dict_count_salWin sub {end} repeat\n"
"b4_Inc_state_salWin restore\n\n" );
- *((USHORT*)aBuf.getStr()) = (USHORT)( aBuf.getLength() - 2 );
+ *((sal_uInt16*)aBuf.getStr()) = (sal_uInt16)( aBuf.getLength() - 2 );
Escape ( mhDC, nEscape, aBuf.getLength(), (LPTSTR)aBuf.getStr(), 0 );
bRetValue = TRUE;
}
diff --git a/vcl/win/source/gdi/salgdi2.cxx b/vcl/win/source/gdi/salgdi2.cxx
index 803c0886f429..e10d3e1c2864 100644
--- a/vcl/win/source/gdi/salgdi2.cxx
+++ b/vcl/win/source/gdi/salgdi2.cxx
@@ -147,7 +147,7 @@ void ImplCalcOutSideRgn( const RECT& rSrcRect,
void WinSalGraphics::copyArea( long nDestX, long nDestY,
long nSrcX, long nSrcY,
long nSrcWidth, long nSrcHeight,
- USHORT nFlags )
+ sal_uInt16 nFlags )
{
bool bRestoreClipRgn = false;
HRGN hOldClipRgn = 0;
@@ -344,14 +344,14 @@ void WinSalGraphics::copyArea( long nDestX, long nDestY,
void ImplDrawBitmap( HDC hDC,
const SalTwoRect* pPosAry, const WinSalBitmap& rSalBitmap,
- BOOL bPrinter, int nDrawMode )
+ sal_Bool bPrinter, int nDrawMode )
{
if( hDC )
{
HGLOBAL hDrawDIB;
HBITMAP hDrawDDB = rSalBitmap.ImplGethDDB();
WinSalBitmap* pTmpSalBmp = NULL;
- BOOL bPrintDDB = ( bPrinter && hDrawDDB );
+ sal_Bool bPrintDDB = ( bPrinter && hDrawDDB );
if( bPrintDDB )
{
@@ -385,7 +385,7 @@ void ImplDrawBitmap( HDC hDC,
HDC hBmpDC = ImplGetCachedDC( CACHED_HDC_DRAW, hDrawDDB );
COLORREF nOldBkColor = RGB(0xFF,0xFF,0xFF);
COLORREF nOldTextColor = RGB(0,0,0);
- BOOL bMono = ( rSalBitmap.GetBitCount() == 1 );
+ sal_Bool bMono = ( rSalBitmap.GetBitCount() == 1 );
if( bMono )
{
@@ -667,7 +667,7 @@ SalBitmap* WinSalGraphics::getBitmap( long nX, long nY, long nDX, long nDY )
HDC hDC = mhDC;
HBITMAP hBmpBitmap = CreateCompatibleBitmap( hDC, nDX, nDY );
HDC hBmpDC = ImplGetCachedDC( CACHED_HDC_1, hBmpBitmap );
- BOOL bRet;
+ sal_Bool bRet;
DWORD err = 0;
bRet = BitBlt( hBmpDC, 0, 0, (int) nDX, (int) nDY, hDC, (int) nX, (int) nY, SRCCOPY ) ? TRUE : FALSE;
@@ -754,7 +754,7 @@ void WinSalGraphics::invert( long nX, long nY, long nWidth, long nHeight, SalInv
// -----------------------------------------------------------------------
-void WinSalGraphics::invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nSalFlags )
+void WinSalGraphics::invert( sal_uIntPtr nPoints, const SalPoint* pPtAry, SalInvert nSalFlags )
{
HPEN hPen;
HPEN hOldPen;
diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx
index d1b5a9cfdeae..ada39acae35b 100644
--- a/vcl/win/source/gdi/salgdi3.cxx
+++ b/vcl/win/source/gdi/salgdi3.cxx
@@ -128,7 +128,7 @@ private:
FontAttrMap aFontAttributes;
rtl::OUString aCacheFileName;
String aBaseURL;
- BOOL bModified;
+ sal_Bool bModified;
protected:
String OptimizeURL( const String& rURL ) const;
@@ -644,7 +644,7 @@ static CharSet ImplCharSetToSal( BYTE nCharSet )
if ( nCharSet == OEM_CHARSET )
{
- UINT nCP = (USHORT)GetOEMCP();
+ UINT nCP = (sal_uInt16)GetOEMCP();
switch ( nCP )
{
// It is unclear why these two (undefined?) code page numbers are
@@ -1093,7 +1093,7 @@ void ImplSalLogFontToFontW( HDC hDC, const LOGFONTW& rLogFont, Font& rFont )
// =======================================================================
ImplWinFontData::ImplWinFontData( const ImplDevFontAttributes& rDFS,
- int nHeight, WIN_BYTE eWinCharSet, WIN_BYTE nPitchAndFamily )
+ int nHeight, BYTE eWinCharSet, BYTE nPitchAndFamily )
: ImplFontData( rDFS, 0 ),
meWinCharSet( eWinCharSet ),
mnPitchAndFamily( nPitchAndFamily ),
@@ -1686,7 +1686,7 @@ HFONT WinSalGraphics::ImplDoSetFont( ImplFontSelectData* i_pFont, float& o_rFont
return hNewFont;
}
-USHORT WinSalGraphics::SetFont( ImplFontSelectData* pFont, int nFallbackLevel )
+sal_uInt16 WinSalGraphics::SetFont( ImplFontSelectData* pFont, int nFallbackLevel )
{
// return early if there is no new font
if( !pFont )
@@ -1880,12 +1880,12 @@ static void ImplGetAllFontCharSets( WinSalGraphics* pData )
static void ImplAddKerningPairs( WinSalGraphics* pData )
{
- ULONG nPairs = ::GetKerningPairsA( pData->mhDC, 0, NULL );
+ sal_uIntPtr nPairs = ::GetKerningPairsA( pData->mhDC, 0, NULL );
if ( !nPairs )
return;
CHARSETINFO aInfo;
- if ( !TranslateCharsetInfo( (DWORD*)(ULONG)GetTextCharset( pData->mhDC ), &aInfo, TCI_SRCCHARSET ) )
+ if ( !TranslateCharsetInfo( (DWORD*)(sal_uIntPtr)GetTextCharset( pData->mhDC ), &aInfo, TCI_SRCCHARSET ) )
return;
if ( !pData->mpFontKernPairs )
@@ -1900,15 +1900,15 @@ static void ImplAddKerningPairs( WinSalGraphics* pData )
}
UINT nCP = aInfo.ciACP;
- ULONG nOldPairs = pData->mnFontKernPairCount;
+ sal_uIntPtr nOldPairs = pData->mnFontKernPairCount;
KERNINGPAIR* pTempPair = pData->mpFontKernPairs+pData->mnFontKernPairCount;
nPairs = ::GetKerningPairsA( pData->mhDC, nPairs, pTempPair );
- for ( ULONG i = 0; i < nPairs; i++ )
+ for ( sal_uIntPtr i = 0; i < nPairs; i++ )
{
unsigned char aBuf[2];
wchar_t nChar;
int nLen;
- BOOL bAdd = TRUE;
+ sal_Bool bAdd = TRUE;
// None-ASCII?, then we must convert the char
if ( (pTempPair->wFirst > 125) || (pTempPair->wFirst == 92) )
@@ -1952,7 +1952,7 @@ static void ImplAddKerningPairs( WinSalGraphics* pData )
// TODO: get rid of linear search!
KERNINGPAIR* pTempPair2 = pData->mpFontKernPairs;
- for ( ULONG j = 0; j < nOldPairs; j++ )
+ for ( sal_uIntPtr j = 0; j < nOldPairs; j++ )
{
if ( (pTempPair2->wFirst == pTempPair->wFirst) &&
(pTempPair2->wSecond == pTempPair->wSecond) )
@@ -1977,7 +1977,7 @@ static void ImplAddKerningPairs( WinSalGraphics* pData )
// -----------------------------------------------------------------------
-ULONG WinSalGraphics::GetKernPairs( ULONG nPairs, ImplKernPairData* pKernPairs )
+sal_uIntPtr WinSalGraphics::GetKernPairs( sal_uIntPtr nPairs, ImplKernPairData* pKernPairs )
{
DBG_ASSERT( sizeof( KERNINGPAIR ) == sizeof( ImplKernPairData ),
"WinSalGraphics::GetKernPairs(): KERNINGPAIR != ImplKernPairData" );
@@ -2442,8 +2442,8 @@ bool WinSalGraphics::AddTempDevFont( ImplDevFontList* pFontList,
*/
ImplWinFontData* pFontData = new ImplWinFontData( aDFA, 0,
- sal::static_int_cast<WIN_BYTE>(nPreferedCharSet),
- sal::static_int_cast<WIN_BYTE>(TMPF_VECTOR|TMPF_TRUETYPE) );
+ sal::static_int_cast<BYTE>(nPreferedCharSet),
+ sal::static_int_cast<BYTE>(TMPF_VECTOR|TMPF_TRUETYPE) );
pFontData->SetFontId( reinterpret_cast<sal_IntPtr>(pFontData) );
pFontList->Add( pFontData );
return true;
@@ -2566,7 +2566,7 @@ void WinSalGraphics::GetDevFontSubstList( OutputDevice* )
// -----------------------------------------------------------------------
-BOOL WinSalGraphics::GetGlyphBoundRect( long nIndex, Rectangle& rRect )
+sal_Bool WinSalGraphics::GetGlyphBoundRect( long nIndex, Rectangle& rRect )
{
HDC hDC = mhDC;
@@ -2603,12 +2603,12 @@ BOOL WinSalGraphics::GetGlyphBoundRect( long nIndex, Rectangle& rRect )
// -----------------------------------------------------------------------
-BOOL WinSalGraphics::GetGlyphOutline( long nIndex,
+sal_Bool WinSalGraphics::GetGlyphOutline( long nIndex,
::basegfx::B2DPolyPolygon& rB2DPolyPoly )
{
rB2DPolyPoly.clear();
- BOOL bRet = FALSE;
+ sal_Bool bRet = FALSE;
HDC hDC = mhDC;
// use unity matrix
@@ -2658,7 +2658,7 @@ BOOL WinSalGraphics::GetGlyphOutline( long nIndex,
// get start point; next start points are end points
// of previous segment
- USHORT nPnt = 0;
+ sal_uInt16 nPnt = 0;
long nX = IntTimes256FromFixed( pHeader->pfxStart.x );
long nY = IntTimes256FromFixed( pHeader->pfxStart.y );
@@ -2678,7 +2678,7 @@ BOOL WinSalGraphics::GetGlyphOutline( long nIndex,
nPtSize = 2 * nNeededSize;
pPoints = new Point[ nPtSize ];
pFlags = new BYTE[ nPtSize ];
- for( USHORT i = 0; i < nPnt; ++i )
+ for( sal_uInt16 i = 0; i < nPnt; ++i )
{
pPoints[ i ] = pOldPoints[ i ];
pFlags[ i ] = pOldFlags[ i ];
@@ -2857,7 +2857,7 @@ int ScopedTrueTypeFont::open(void * pBuffer, sal_uInt32 nLen,
return OpenTTFontBuffer(pBuffer, nLen, nFaceNum, &m_pFont);
}
-BOOL WinSalGraphics::CreateFontSubset( const rtl::OUString& rToFile,
+sal_Bool WinSalGraphics::CreateFontSubset( const rtl::OUString& rToFile,
const ImplFontData* pFont, long* pGlyphIDs, sal_uInt8* pEncoding,
sal_Int32* pGlyphWidths, int nGlyphCount, FontSubsetInfo& rInfo )
{
@@ -2950,7 +2950,7 @@ BOOL WinSalGraphics::CreateFontSubset( const rtl::OUString& rToFile,
// subset TTF-glyphs and get their properties
// take care that subset fonts require the NotDef glyph in pos 0
int nOrigCount = nGlyphCount;
- USHORT aShortIDs[ 256 ];
+ sal_uInt16 aShortIDs[ 256 ];
sal_uInt8 aTempEncs[ 256 ];
int nNotDef=-1, i;
@@ -2970,7 +2970,7 @@ BOOL WinSalGraphics::CreateFontSubset( const rtl::OUString& rToFile,
nGlyphIdx = ::MapChar( aSftTTF.get(), cChar, bVertical );
}
}
- aShortIDs[i] = static_cast<USHORT>( nGlyphIdx );
+ aShortIDs[i] = static_cast<sal_uInt16>( nGlyphIdx );
if( !nGlyphIdx )
if( nNotDef < 0 )
nNotDef = i; // first NotDef glyph found
@@ -3041,7 +3041,7 @@ const void* WinSalGraphics::GetEmbedFontData( const ImplFontData* pFont,
nFNLen--;
if( nFNLen == 0 )
*pDataLen = 0;
- rInfo.m_aPSName = String( reinterpret_cast<const sal_Unicode*>(aFaceName), sal::static_int_cast<USHORT>(nFNLen) );
+ rInfo.m_aPSName = String( reinterpret_cast<const sal_Unicode*>(aFaceName), sal::static_int_cast<sal_uInt16>(nFNLen) );
rInfo.m_nAscent = +aTm.tmAscent;
rInfo.m_nDescent = -aTm.tmDescent;
rInfo.m_aFontBBox = Rectangle( Point( -aTm.tmOverhang, -aTm.tmDescent ),
diff --git a/vcl/win/source/gdi/salnativewidgets-luna.cxx b/vcl/win/source/gdi/salnativewidgets-luna.cxx
index be5d7f8360bc..f5634fc64380 100644
--- a/vcl/win/source/gdi/salnativewidgets-luna.cxx
+++ b/vcl/win/source/gdi/salnativewidgets-luna.cxx
@@ -78,7 +78,7 @@ private:
public:
VisualStylesAPI();
~VisualStylesAPI();
- BOOL IsAvailable() { return (mhModule != NULL); }
+ sal_Bool IsAvailable() { return (mhModule != NULL); }
HTHEME OpenThemeData( HWND hwnd, LPCWSTR pszClassList );
HRESULT CloseThemeData( HTHEME hTheme );
@@ -215,7 +215,7 @@ static HTHEME getThemeHandle( HWND hWnd, LPCWSTR name )
* Returns TRUE if the platform supports native
* drawing of the control defined by nPart
*/
-BOOL WinSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart nPart )
+sal_Bool WinSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart nPart )
{
HTHEME hTheme = NULL;
@@ -315,16 +315,16 @@ BOOL WinSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart nP
* aPos was or was not inside the native widget specified by the
* nType/nPart combination.
*/
-BOOL WinSalGraphics::hitTestNativeControl( ControlType,
+sal_Bool WinSalGraphics::hitTestNativeControl( ControlType,
ControlPart,
const Region&,
const Point&,
- BOOL& )
+ sal_Bool& )
{
return FALSE;
}
-BOOL ImplDrawTheme( HTHEME hTheme, HDC hDC, int iPart, int iState, RECT rc, const OUString& aStr)
+sal_Bool ImplDrawTheme( HTHEME hTheme, HDC hDC, int iPart, int iState, RECT rc, const OUString& aStr)
{
HRESULT hr = vsAPI.DrawThemeBackground( hTheme, hDC, iPart, iState, &rc, 0);
@@ -419,7 +419,7 @@ void ImplConvertSpinbuttonValues( int nControlPart, const ControlState& rState,
// ----
-BOOL ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc,
+sal_Bool ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc,
ControlType nType,
ControlPart nPart,
ControlState nState,
@@ -556,7 +556,7 @@ BOOL ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc,
SpinbuttonValue *pValue = (SpinbuttonValue*) aValue.getOptionalVal();
if( pValue )
{
- BOOL bOk = FALSE;
+ sal_Bool bOk = FALSE;
RECT rect;
ImplConvertSpinbuttonValues( pValue->mnUpperPart, pValue->mnUpperState, pValue->maUpperRect, &iPart, &iState, &rect );
@@ -581,7 +581,7 @@ BOOL ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc,
SpinbuttonValue *pValue = (SpinbuttonValue*) aValue.getOptionalVal();
if( pValue )
{
- BOOL bOk = FALSE;
+ sal_Bool bOk = FALSE;
RECT rect;
ImplConvertSpinbuttonValues( pValue->mnUpperPart, pValue->mnUpperState, pValue->maUpperRect, &iPart, &iState, &rect );
@@ -686,7 +686,7 @@ BOOL ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc,
if( nType == CTRL_RADIOBUTTON )
{
iPart = BP_RADIOBUTTON;
- BOOL bChecked = ( aValue.getTristateVal() == BUTTONVALUE_ON );
+ sal_Bool bChecked = ( aValue.getTristateVal() == BUTTONVALUE_ON );
if( nState & CTRL_STATE_PRESSED )
iState = bChecked ? RBS_CHECKEDPRESSED : RBS_UNCHECKEDPRESSED;
@@ -833,7 +833,7 @@ BOOL ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc,
if( nPart == PART_BUTTON )
{
iPart = TP_BUTTON;
- BOOL bChecked = ( aValue.getTristateVal() == BUTTONVALUE_ON );
+ sal_Bool bChecked = ( aValue.getTristateVal() == BUTTONVALUE_ON );
if( !(nState & CTRL_STATE_ENABLED) )
//iState = TS_DISABLED;
// disabled buttons are typically not painted at all but we need visual
@@ -961,14 +961,14 @@ BOOL ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc,
* aValue: An optional value (tristate/numerical/string)
* aCaption: A caption or title string (like button text etc)
*/
-BOOL WinSalGraphics::drawNativeControl( ControlType nType,
+sal_Bool WinSalGraphics::drawNativeControl( ControlType nType,
ControlPart nPart,
const Region& rControlRegion,
ControlState nState,
const ImplControlValue& aValue,
const OUString& aCaption )
{
- BOOL bOk = false;
+ sal_Bool bOk = false;
HTHEME hTheme = NULL;
switch( nType )
@@ -1078,7 +1078,7 @@ BOOL WinSalGraphics::drawNativeControl( ControlType nType,
* aValue: An optional value (tristate/numerical/string)
* aCaption: A caption or title string (like button text etc)
*/
-BOOL WinSalGraphics::drawNativeControlText( ControlType,
+sal_Bool WinSalGraphics::drawNativeControlText( ControlType,
ControlPart,
const Region&,
ControlState,
@@ -1102,7 +1102,7 @@ BOOL WinSalGraphics::drawNativeControlText( ControlType,
* aValue: An optional value (tristate/numerical/string)
* aCaption: A caption or title string (like button text etc)
*/
-BOOL WinSalGraphics::getNativeControlRegion( ControlType nType,
+sal_Bool WinSalGraphics::getNativeControlRegion( ControlType nType,
ControlPart nPart,
const Region& rControlRegion,
ControlState nState,
@@ -1111,7 +1111,7 @@ BOOL WinSalGraphics::getNativeControlRegion( ControlType nType,
Region &rNativeBoundingRegion,
Region &rNativeContentRegion )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = FALSE;
HDC hDC = GetDC( mhWnd );
if( nType == CTRL_TOOLBAR )
diff --git a/vcl/win/source/gdi/salprn.cxx b/vcl/win/source/gdi/salprn.cxx
index 9d8d41723f64..8d8af1bb245f 100644
--- a/vcl/win/source/gdi/salprn.cxx
+++ b/vcl/win/source/gdi/salprn.cxx
@@ -128,9 +128,9 @@ static LPDEVMODEW SAL_DEVMODE_W( const ImplJobSetup* pSetupData )
// =======================================================================
-static ULONG ImplWinQueueStatusToSal( DWORD nWinStatus )
+static sal_uIntPtr ImplWinQueueStatusToSal( DWORD nWinStatus )
{
- ULONG nStatus = 0;
+ sal_uIntPtr nStatus = 0;
if ( nWinStatus & PRINTER_STATUS_PAUSED )
nStatus |= QUEUE_STATUS_PAUSED;
if ( nWinStatus & PRINTER_STATUS_ERROR )
@@ -192,7 +192,7 @@ static void getPrinterQueueInfoOldStyle( ImplPrnQueueList* pList )
DWORD n;
DWORD nBytes = 0;
DWORD nInfoPrn2;
- BOOL bFound = FALSE;
+ sal_Bool bFound = FALSE;
PRINTER_INFO_2* pWinInfo2 = NULL;
PRINTER_INFO_2* pGetInfo2;
EnumPrintersA( PRINTER_ENUM_LOCAL, NULL, 2, NULL, 0, &nBytes, &nInfoPrn2 );
@@ -262,7 +262,7 @@ static void getPrinterQueueInfoOldStyle( ImplPrnQueueList* pList )
pTmp = pPortName;
while ( *pTmp != ',' )
pTmp++;
- XubString aDriver( ImplSalGetUniString( pPortName, (USHORT)(pTmp-pPortName) ) );
+ XubString aDriver( ImplSalGetUniString( pPortName, (sal_uInt16)(pTmp-pPortName) ) );
pPortName = pTmp;
// get port names
@@ -273,11 +273,11 @@ static void getPrinterQueueInfoOldStyle( ImplPrnQueueList* pList )
while ( *pTmp && (*pTmp != ',') )
pTmp++;
- String aPortName( ImplSalGetUniString( pPortName, (USHORT)(pTmp-pPortName) ) );
+ String aPortName( ImplSalGetUniString( pPortName, (sal_uInt16)(pTmp-pPortName) ) );
// create new entry
// look up if printer was already found in first loop
- BOOL bAdd = TRUE;
+ sal_Bool bAdd = TRUE;
if ( pWinInfo2 )
{
pGetInfo2 = pWinInfo2;
@@ -446,7 +446,7 @@ void WinSalInstance::DeletePrinterQueueInfo( SalPrinterQueueInfo* pInfo )
XubString WinSalInstance::GetDefaultPrinter()
{
static bool bGetDefPrtAPI = true;
- static BOOL(WINAPI*pGetDefaultPrinter)(LPWSTR,LPDWORD) = NULL;
+ static sal_Bool(WINAPI*pGetDefaultPrinter)(LPWSTR,LPDWORD) = NULL;
// try to use GetDefaultPrinter API (not available prior to W2000)
if( bGetDefPrtAPI )
{
@@ -463,7 +463,7 @@ XubString WinSalInstance::GetDefaultPrinter()
pFunc = osl_getFunctionSymbol( pLib, queryFuncName.pData );
}
- pGetDefaultPrinter = (BOOL(WINAPI*)(LPWSTR,LPDWORD)) pFunc;
+ pGetDefaultPrinter = (sal_Bool(WINAPI*)(LPWSTR,LPDWORD)) pFunc;
}
}
if( pGetDefaultPrinter )
@@ -533,8 +533,8 @@ static DWORD ImplDeviceCaps( WinSalInfoPrinter* pPrinter, WORD nCaps,
// -----------------------------------------------------------------------
-static BOOL ImplTestSalJobSetup( WinSalInfoPrinter* pPrinter,
- ImplJobSetup* pSetupData, BOOL bDelete )
+static sal_Bool ImplTestSalJobSetup( WinSalInfoPrinter* pPrinter,
+ ImplJobSetup* pSetupData, sal_Bool bDelete )
{
if ( pSetupData && pSetupData->mpDriverData )
{
@@ -658,8 +658,8 @@ static BOOL ImplTestSalJobSetup( WinSalInfoPrinter* pPrinter,
// -----------------------------------------------------------------------
-static BOOL ImplUpdateSalJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup* pSetupData,
- BOOL bIn, WinSalFrame* pVisibleDlgParent )
+static sal_Bool ImplUpdateSalJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup* pSetupData,
+ sal_Bool bIn, WinSalFrame* pVisibleDlgParent )
{
ByteString aPrinterNameA = ImplSalGetWinAnsiString( pPrinter->maDeviceName, TRUE );
HANDLE hPrn;
@@ -682,7 +682,7 @@ static BOOL ImplUpdateSalJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS
LONG nSysJobSize = -1;
HWND hWnd = 0;
DWORD nMode = DM_OUT_BUFFER;
- ULONG nDriverDataLen = 0;
+ sal_uIntPtr nDriverDataLen = 0;
SalDriverData* pOutBuffer = NULL;
BYTE* pInBuffer = NULL;
@@ -708,7 +708,7 @@ static BOOL ImplUpdateSalJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS
pOutBuffer->mnSysSignature = SAL_DRIVERDATA_SYSSIGN;
pOutBuffer->mnVersion = aSalShlData.mbWPrinter ? SAL_DRIVERDATA_VERSION_W : SAL_DRIVERDATA_VERSION_A;
// calculate driver data offset including structure padding
- pOutBuffer->mnDriverOffset = sal::static_int_cast<USHORT>(
+ pOutBuffer->mnDriverOffset = sal::static_int_cast<sal_uInt16>(
(char*)pOutBuffer->maDriverData -
(char*)pOutBuffer );
@@ -727,7 +727,7 @@ static BOOL ImplUpdateSalJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS
}
// Release mutex, in the other case we don't get paints and so on
- ULONG nMutexCount=0;
+ sal_uIntPtr nMutexCount=0;
if ( pVisibleDlgParent )
nMutexCount = ImplSalReleaseYieldMutex();
@@ -807,7 +807,7 @@ static BOOL ImplUpdateSalJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS
#define CHOOSE_DEVMODE(i)\
(pDevModeW ? pDevModeW->i : pDevModeA->i)
-static void ImplDevModeToJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup* pSetupData, ULONG nFlags )
+static void ImplDevModeToJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup* pSetupData, sal_uIntPtr nFlags )
{
if ( !pSetupData || !pSetupData->mpDriverData )
return;
@@ -826,7 +826,7 @@ static void ImplDevModeToJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS
// PaperBin
if ( nFlags & SAL_JOBSET_PAPERBIN )
{
- ULONG nCount = ImplDeviceCaps( pPrinter, DC_BINS, NULL, pSetupData );
+ sal_uIntPtr nCount = ImplDeviceCaps( pPrinter, DC_BINS, NULL, pSetupData );
if ( nCount && (nCount != GDI_ERROR) )
{
@@ -835,11 +835,11 @@ static void ImplDevModeToJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS
pSetupData->mnPaperBin = 0;
// search the right bin and assign index to mnPaperBin
- for( ULONG i = 0; i < nCount; i++ )
+ for( sal_uIntPtr i = 0; i < nCount; i++ )
{
if( CHOOSE_DEVMODE(dmDefaultSource) == pBins[ i ] )
{
- pSetupData->mnPaperBin = (USHORT)i;
+ pSetupData->mnPaperBin = (sal_uInt16)i;
break;
}
}
@@ -858,9 +858,9 @@ static void ImplDevModeToJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS
}
else
{
- ULONG nPaperCount = ImplDeviceCaps( pPrinter, DC_PAPERS, NULL, pSetupData );
+ sal_uIntPtr nPaperCount = ImplDeviceCaps( pPrinter, DC_PAPERS, NULL, pSetupData );
WORD* pPapers = NULL;
- ULONG nPaperSizeCount = ImplDeviceCaps( pPrinter, DC_PAPERSIZE, NULL, pSetupData );
+ sal_uIntPtr nPaperSizeCount = ImplDeviceCaps( pPrinter, DC_PAPERSIZE, NULL, pSetupData );
POINT* pPaperSizes = NULL;
if ( nPaperCount && (nPaperCount != GDI_ERROR) )
{
@@ -874,7 +874,7 @@ static void ImplDevModeToJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS
}
if( nPaperSizeCount == nPaperCount && pPaperSizes && pPapers )
{
- for( ULONG i = 0; i < nPaperCount; i++ )
+ for( sal_uIntPtr i = 0; i < nPaperCount; i++ )
{
if( pPapers[ i ] == CHOOSE_DEVMODE(dmPaperSize) )
{
@@ -1075,7 +1075,7 @@ static void ImplDevModeToJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS
// -----------------------------------------------------------------------
-static void ImplJobSetupToDevMode( WinSalInfoPrinter* pPrinter, ImplJobSetup* pSetupData, ULONG nFlags )
+static void ImplJobSetupToDevMode( WinSalInfoPrinter* pPrinter, ImplJobSetup* pSetupData, sal_uIntPtr nFlags )
{
if ( !pSetupData || !pSetupData->mpDriverData )
return;
@@ -1095,7 +1095,7 @@ static void ImplJobSetupToDevMode( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS
// PaperBin
if ( nFlags & SAL_JOBSET_PAPERBIN )
{
- ULONG nCount = ImplDeviceCaps( pPrinter, DC_BINS, NULL, pSetupData );
+ sal_uIntPtr nCount = ImplDeviceCaps( pPrinter, DC_BINS, NULL, pSetupData );
if ( nCount && (nCount != GDI_ERROR) )
{
@@ -1273,9 +1273,9 @@ static void ImplJobSetupToDevMode( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS
default:
{
short nPaper = 0;
- ULONG nPaperCount = ImplDeviceCaps( pPrinter, DC_PAPERS, NULL, pSetupData );
+ sal_uIntPtr nPaperCount = ImplDeviceCaps( pPrinter, DC_PAPERS, NULL, pSetupData );
WORD* pPapers = NULL;
- ULONG nPaperSizeCount = ImplDeviceCaps( pPrinter, DC_PAPERSIZE, NULL, pSetupData );
+ sal_uIntPtr nPaperSizeCount = ImplDeviceCaps( pPrinter, DC_PAPERSIZE, NULL, pSetupData );
POINT* pPaperSizes = NULL;
DWORD nLandscapeAngle = ImplDeviceCaps( pPrinter, DC_ORIENTATION, NULL, pSetupData );
if ( nPaperCount && (nPaperCount != GDI_ERROR) )
@@ -1292,7 +1292,7 @@ static void ImplJobSetupToDevMode( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS
{
PaperInfo aInfo(pSetupData->mnPaperWidth, pSetupData->mnPaperHeight);
// compare paper formats and select a good match
- for ( ULONG i = 0; i < nPaperCount; i++ )
+ for ( sal_uIntPtr i = 0; i < nPaperCount; i++ )
{
if ( aInfo.sloppyEqual(PaperInfo(pPaperSizes[i].x*10, pPaperSizes[i].y*10)))
{
@@ -1307,7 +1307,7 @@ static void ImplJobSetupToDevMode( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS
if ( !nPaper && nLandscapeAngle != 0 )
{
PaperInfo aRotatedInfo(pSetupData->mnPaperHeight, pSetupData->mnPaperWidth);
- for ( ULONG i = 0; i < nPaperCount; i++ )
+ for ( sal_uIntPtr i = 0; i < nPaperCount; i++ )
{
if ( aRotatedInfo.sloppyEqual(PaperInfo(pPaperSizes[i].x*10, pPaperSizes[i].y*10)) )
{
@@ -1463,7 +1463,7 @@ static WinSalGraphics* ImplCreateSalPrnGraphics( HDC hDC )
// -----------------------------------------------------------------------
-static BOOL ImplUpdateSalPrnIC( WinSalInfoPrinter* pPrinter, ImplJobSetup* pSetupData )
+static sal_Bool ImplUpdateSalPrnIC( WinSalInfoPrinter* pPrinter, ImplJobSetup* pSetupData )
{
HDC hNewDC = ImplCreateSalPrnIC( pPrinter, pSetupData );
if ( !hNewDC )
@@ -1623,7 +1623,7 @@ void WinSalInfoPrinter::ReleaseGraphics( SalGraphics* )
// -----------------------------------------------------------------------
-BOOL WinSalInfoPrinter::Setup( SalFrame* pFrame, ImplJobSetup* pSetupData )
+sal_Bool WinSalInfoPrinter::Setup( SalFrame* pFrame, ImplJobSetup* pSetupData )
{
if ( ImplUpdateSalJobSetup( this, pSetupData, TRUE, static_cast<WinSalFrame*>(pFrame) ) )
{
@@ -1636,7 +1636,7 @@ BOOL WinSalInfoPrinter::Setup( SalFrame* pFrame, ImplJobSetup* pSetupData )
// -----------------------------------------------------------------------
-BOOL WinSalInfoPrinter::SetPrinterData( ImplJobSetup* pSetupData )
+sal_Bool WinSalInfoPrinter::SetPrinterData( ImplJobSetup* pSetupData )
{
if ( !ImplTestSalJobSetup( this, pSetupData, FALSE ) )
return FALSE;
@@ -1645,7 +1645,7 @@ BOOL WinSalInfoPrinter::SetPrinterData( ImplJobSetup* pSetupData )
// -----------------------------------------------------------------------
-BOOL WinSalInfoPrinter::SetData( ULONG nFlags, ImplJobSetup* pSetupData )
+sal_Bool WinSalInfoPrinter::SetData( sal_uIntPtr nFlags, ImplJobSetup* pSetupData )
{
ImplJobSetupToDevMode( this, pSetupData, nFlags );
if ( ImplUpdateSalJobSetup( this, pSetupData, TRUE, NULL ) )
@@ -1659,7 +1659,7 @@ BOOL WinSalInfoPrinter::SetData( ULONG nFlags, ImplJobSetup* pSetupData )
// -----------------------------------------------------------------------
-ULONG WinSalInfoPrinter::GetPaperBinCount( const ImplJobSetup* pSetupData )
+sal_uIntPtr WinSalInfoPrinter::GetPaperBinCount( const ImplJobSetup* pSetupData )
{
DWORD nRet = ImplDeviceCaps( this, DC_BINS, NULL, pSetupData );
if ( nRet && (nRet != GDI_ERROR) )
@@ -1670,7 +1670,7 @@ ULONG WinSalInfoPrinter::GetPaperBinCount( const ImplJobSetup* pSetupData )
// -----------------------------------------------------------------------
-XubString WinSalInfoPrinter::GetPaperBinName( const ImplJobSetup* pSetupData, ULONG nPaperBin )
+XubString WinSalInfoPrinter::GetPaperBinName( const ImplJobSetup* pSetupData, sal_uIntPtr nPaperBin )
{
XubString aPaperBinName;
@@ -1700,7 +1700,7 @@ XubString WinSalInfoPrinter::GetPaperBinName( const ImplJobSetup* pSetupData, UL
// -----------------------------------------------------------------------
-ULONG WinSalInfoPrinter::GetCapabilities( const ImplJobSetup* pSetupData, USHORT nType )
+sal_uIntPtr WinSalInfoPrinter::GetCapabilities( const ImplJobSetup* pSetupData, sal_uInt16 nType )
{
DWORD nRet;
@@ -1785,11 +1785,11 @@ void WinSalInstance::DestroyPrinter( SalPrinter* pPrinter )
// =======================================================================
-WIN_BOOL CALLBACK SalPrintAbortProc( HDC hPrnDC, int /* nError */ )
+BOOL CALLBACK SalPrintAbortProc( HDC hPrnDC, int /* nError */ )
{
SalData* pSalData = GetSalData();
WinSalPrinter* pPrinter;
- BOOL bWhile = TRUE;
+ sal_Bool bWhile = TRUE;
int i = 0;
do
@@ -1826,19 +1826,19 @@ WIN_BOOL CALLBACK SalPrintAbortProc( HDC hPrnDC, int /* nError */ )
// -----------------------------------------------------------------------
-static LPDEVMODEA ImplSalSetCopies( LPDEVMODEA pDevMode, ULONG nCopies, BOOL bCollate )
+static LPDEVMODEA ImplSalSetCopies( LPDEVMODEA pDevMode, sal_uIntPtr nCopies, sal_Bool bCollate )
{
LPDEVMODEA pNewDevMode = pDevMode;
if ( pDevMode && (nCopies > 1) )
{
if ( nCopies > 32765 )
nCopies = 32765;
- ULONG nDevSize = pDevMode->dmSize+pDevMode->dmDriverExtra;
+ sal_uIntPtr nDevSize = pDevMode->dmSize+pDevMode->dmDriverExtra;
pNewDevMode = (LPDEVMODEA)rtl_allocateMemory( nDevSize );
memcpy( pNewDevMode, pDevMode, nDevSize );
pDevMode = pNewDevMode;
pDevMode->dmFields |= DM_COPIES;
- pDevMode->dmCopies = (short)(USHORT)nCopies;
+ pDevMode->dmCopies = (short)(sal_uInt16)nCopies;
if ( aSalShlData.mbW40 )
{
pDevMode->dmFields |= DM_COLLATE;
@@ -1852,19 +1852,19 @@ static LPDEVMODEA ImplSalSetCopies( LPDEVMODEA pDevMode, ULONG nCopies, BOOL bCo
return pNewDevMode;
}
-static LPDEVMODEW ImplSalSetCopies( LPDEVMODEW pDevMode, ULONG nCopies, BOOL bCollate )
+static LPDEVMODEW ImplSalSetCopies( LPDEVMODEW pDevMode, sal_uIntPtr nCopies, sal_Bool bCollate )
{
LPDEVMODEW pNewDevMode = pDevMode;
if ( pDevMode && (nCopies > 1) )
{
if ( nCopies > 32765 )
nCopies = 32765;
- ULONG nDevSize = pDevMode->dmSize+pDevMode->dmDriverExtra;
+ sal_uIntPtr nDevSize = pDevMode->dmSize+pDevMode->dmDriverExtra;
pNewDevMode = (LPDEVMODEW)rtl_allocateMemory( nDevSize );
memcpy( pNewDevMode, pDevMode, nDevSize );
pDevMode = pNewDevMode;
pDevMode->dmFields |= DM_COPIES;
- pDevMode->dmCopies = (short)(USHORT)nCopies;
+ pDevMode->dmCopies = (short)(sal_uInt16)nCopies;
if ( aSalShlData.mbW40 )
{
pDevMode->dmFields |= DM_COLLATE;
@@ -1960,10 +1960,10 @@ static int lcl_StartDocA( HDC hDC, DOCINFOA* pInfo, WinSalPrinter* pPrt )
return nRet;
}
-BOOL WinSalPrinter::StartJob( const XubString* pFileName,
+sal_Bool WinSalPrinter::StartJob( const XubString* pFileName,
const XubString& rJobName,
const XubString&,
- ULONG nCopies,
+ sal_uIntPtr nCopies,
bool bCollate,
bool /*bDirect*/,
ImplJobSetup* pSetupData )
@@ -2052,7 +2052,7 @@ BOOL WinSalPrinter::StartJob( const XubString* pFileName,
// Wegen Telocom Balloon Fax-Treiber, der uns unsere Messages
// ansonsten oefters schickt, versuchen wir vorher alle
// zu verarbeiten und dann eine Dummy-Message reinstellen
- BOOL bWhile = TRUE;
+ sal_Bool bWhile = TRUE;
int i = 0;
do
{
@@ -2180,7 +2180,7 @@ BOOL WinSalPrinter::StartJob( const XubString* pFileName,
// -----------------------------------------------------------------------
-BOOL WinSalPrinter::EndJob()
+sal_Bool WinSalPrinter::EndJob()
{
DWORD err = 0;
HDC hDC = mhDC;
@@ -2200,7 +2200,7 @@ BOOL WinSalPrinter::EndJob()
// call, however the real solution is supposed to be the threading
// framework yet to come.
SalData* pSalData = GetSalData();
- ULONG nAcquire = pSalData->mpFirstInstance->ReleaseYieldMutex();
+ sal_uIntPtr nAcquire = pSalData->mpFirstInstance->ReleaseYieldMutex();
CATCH_DRIVER_EX_BEGIN;
if( ::EndDoc( hDC ) <= 0 )
err = GetLastError();
@@ -2216,7 +2216,7 @@ BOOL WinSalPrinter::EndJob()
// -----------------------------------------------------------------------
-BOOL WinSalPrinter::AbortJob()
+sal_Bool WinSalPrinter::AbortJob()
{
mbAbort = TRUE;
@@ -2273,7 +2273,7 @@ void ImplSalPrinterAbortJobAsync( HDC hPrnDC )
// -----------------------------------------------------------------------
-SalGraphics* WinSalPrinter::StartPage( ImplJobSetup* pSetupData, BOOL bNewJobData )
+SalGraphics* WinSalPrinter::StartPage( ImplJobSetup* pSetupData, sal_Bool bNewJobData )
{
if( ! isValid() || mhDC == 0 )
return NULL;
@@ -2328,7 +2328,7 @@ SalGraphics* WinSalPrinter::StartPage( ImplJobSetup* pSetupData, BOOL bNewJobDat
// -----------------------------------------------------------------------
-BOOL WinSalPrinter::EndPage()
+sal_Bool WinSalPrinter::EndPage()
{
HDC hDC = mhDC;
if ( hDC && mpGraphics )
@@ -2358,7 +2358,7 @@ BOOL WinSalPrinter::EndPage()
// -----------------------------------------------------------------------
-ULONG WinSalPrinter::GetErrorCode()
+sal_uIntPtr WinSalPrinter::GetErrorCode()
{
return mnError;
}
diff --git a/vcl/win/source/gdi/salvd.cxx b/vcl/win/source/gdi/salvd.cxx
index 816a8fef1141..3a6e89059a69 100644
--- a/vcl/win/source/gdi/salvd.cxx
+++ b/vcl/win/source/gdi/salvd.cxx
@@ -38,7 +38,7 @@
// =======================================================================
static HBITMAP ImplCreateVirDevBitmap( HDC hDC, long nDX, long nDY,
- USHORT nBitCount )
+ sal_uInt16 nBitCount )
{
HBITMAP hBitmap;
@@ -78,14 +78,14 @@ static HBITMAP ImplCreateVirDevBitmap( HDC hDC, long nDX, long nDY,
SalVirtualDevice* WinSalInstance::CreateVirtualDevice( SalGraphics* pSGraphics,
long nDX, long nDY,
- USHORT nBitCount,
+ sal_uInt16 nBitCount,
const SystemGraphicsData* pData )
{
WinSalGraphics* pGraphics = static_cast<WinSalGraphics*>(pSGraphics);
HDC hDC = NULL;
HBITMAP hBmp = NULL;
- BOOL bOk = FALSE;
+ sal_Bool bOk = FALSE;
if( pData )
{
@@ -226,7 +226,7 @@ void WinSalVirtualDevice::ReleaseGraphics( SalGraphics* )
// -----------------------------------------------------------------------
-BOOL WinSalVirtualDevice::SetSize( long nDX, long nDY )
+sal_Bool WinSalVirtualDevice::SetSize( long nDX, long nDY )
{
if( mbForeignDC || !mhBmp )
return TRUE; // ???
diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx
index ba19f2255646..1737d12de1b0 100644..100755
--- a/vcl/win/source/gdi/winlayout.cxx
+++ b/vcl/win/source/gdi/winlayout.cxx
@@ -1250,7 +1250,7 @@ static bool InitUSP()
DWORD nHandle;
DWORD nBufSize = ::GetFileVersionInfoSizeW( const_cast<LPWSTR>(reinterpret_cast<LPCWSTR>(pModuleFileCStr)), &nHandle );
char* pBuffer = (char*)alloca( nBufSize );
- WIN_BOOL bRC = ::GetFileVersionInfoW( const_cast<LPWSTR>(reinterpret_cast<LPCWSTR>(pModuleFileCStr)), nHandle, nBufSize, pBuffer );
+ BOOL bRC = ::GetFileVersionInfoW( const_cast<LPWSTR>(reinterpret_cast<LPCWSTR>(pModuleFileCStr)), nHandle, nBufSize, pBuffer );
VS_FIXEDFILEINFO* pFixedFileInfo = NULL;
UINT nFixedFileSize = 0;
if( bRC )
diff --git a/vcl/win/source/gdi/wntgdi.cxx b/vcl/win/source/gdi/wntgdi.cxx
index eb53fb4d8699..68a37cf8186f 100644
--- a/vcl/win/source/gdi/wntgdi.cxx
+++ b/vcl/win/source/gdi/wntgdi.cxx
@@ -40,7 +40,7 @@
extern "C"
{
-BOOL WINAPI WIN_Rectangle( HDC hDC, int X1, int Y1, int X2, int Y2 )
+sal_Bool WINAPI WIN_Rectangle( HDC hDC, int X1, int Y1, int X2, int Y2 )
{
return Rectangle( hDC, X1, Y1, X2, Y2 );
}
@@ -50,7 +50,7 @@ BOOL WINAPI WIN_Rectangle( HDC hDC, int X1, int Y1, int X2, int Y2 )
extern "C"
{
-BOOL WINAPI WIN_Polygon( HDC hDC, CONST POINT * ppt, int ncnt )
+sal_Bool WINAPI WIN_Polygon( HDC hDC, CONST POINT * ppt, int ncnt )
{
return Polygon( hDC, ppt, ncnt );
}
@@ -60,7 +60,7 @@ BOOL WINAPI WIN_Polygon( HDC hDC, CONST POINT * ppt, int ncnt )
extern "C"
{
-BOOL WINAPI WIN_PolyPolygon( HDC hDC, CONST POINT * ppt, LPINT npcnt, int ncnt )
+sal_Bool WINAPI WIN_PolyPolygon( HDC hDC, CONST POINT * ppt, LPINT npcnt, int ncnt )
{
return PolyPolygon( hDC, ppt, npcnt, ncnt );
}
diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx
index 7314fd2b6164..6fecfdf398b3 100644
--- a/vcl/win/source/window/salframe.cxx
+++ b/vcl/win/source/window/salframe.cxx
@@ -128,8 +128,8 @@ void MyOutputDebugString( char *s) { OutputDebugString( s ); }
// misssing prototypes and constants for LayeredWindows
extern "C" {
- //WINUSERAPI BOOL WINAPI SetLayeredWindowAttributes(HWND,COLORREF,BYTE,DWORD);
- typedef BOOL ( WINAPI * SetLayeredWindowAttributes_Proc_T ) (HWND,COLORREF,BYTE,DWORD);
+ //WINUSERAPI sal_Bool WINAPI SetLayeredWindowAttributes(HWND,COLORREF,BYTE,DWORD);
+ typedef sal_Bool ( WINAPI * SetLayeredWindowAttributes_Proc_T ) (HWND,COLORREF,BYTE,DWORD);
static SetLayeredWindowAttributes_Proc_T lpfnSetLayeredWindowAttributes;
};
@@ -137,7 +137,7 @@ extern "C" {
const unsigned int WM_USER_SYSTEM_WINDOW_ACTIVATED = RegisterWindowMessageA("SYSTEM_WINDOW_ACTIVATED");
-BOOL WinSalFrame::mbInReparent = FALSE;
+sal_Bool WinSalFrame::mbInReparent = FALSE;
// =======================================================================
@@ -168,7 +168,7 @@ static void ImplSaveFrameState( WinSalFrame* pFrame )
// Position, Groesse und Status fuer GetWindowState() merken
if ( !pFrame->mbFullScreen )
{
- BOOL bVisible = (GetWindowStyle( pFrame->mhWnd ) & WS_VISIBLE) != 0;
+ sal_Bool bVisible = (GetWindowStyle( pFrame->mhWnd ) & WS_VISIBLE) != 0;
if ( IsIconic( pFrame->mhWnd ) )
{
pFrame->maState.mnState |= SAL_FRAMESTATE_MINIMIZED;
@@ -333,13 +333,13 @@ void ImplSalGetWorkArea( HWND hWnd, RECT *pRect, const RECT *pParentRect )
// =======================================================================
SalFrame* ImplSalCreateFrame( WinSalInstance* pInst,
- HWND hWndParent, ULONG nSalFrameStyle )
+ HWND hWndParent, sal_uIntPtr nSalFrameStyle )
{
WinSalFrame* pFrame = new WinSalFrame;
HWND hWnd;
DWORD nSysStyle = 0;
DWORD nExSysStyle = 0;
- BOOL bSubFrame = FALSE;
+ sal_Bool bSubFrame = FALSE;
if( getenv( "SAL_SYNCHRONIZE" ) ) // no buffering of drawing commands
GdiSetBatchLimit( 1 );
@@ -586,11 +586,11 @@ SalFrame* ImplSalCreateFrame( WinSalInstance* pInst,
// helper that only creates the HWND
// to allow for easy reparenting of system windows, (i.e. destroy and create new)
-HWND ImplSalReCreateHWND( HWND hWndParent, HWND oldhWnd, BOOL bAsChild )
+HWND ImplSalReCreateHWND( HWND hWndParent, HWND oldhWnd, sal_Bool bAsChild )
{
HINSTANCE hInstance = GetSalData()->mhInst;
- ULONG nSysStyle = GetWindowLong( oldhWnd, GWL_STYLE );
- ULONG nExSysStyle = GetWindowLong( oldhWnd, GWL_EXSTYLE );
+ sal_uIntPtr nSysStyle = GetWindowLong( oldhWnd, GWL_STYLE );
+ sal_uIntPtr nExSysStyle = GetWindowLong( oldhWnd, GWL_EXSTYLE );
if( bAsChild )
{
@@ -621,7 +621,7 @@ HWND ImplSalReCreateHWND( HWND hWndParent, HWND oldhWnd, BOOL bAsChild )
// Uebersetzungstabelle von System-Keycodes in StarView-Keycodes
#define KEY_TAB_SIZE 146
-static USHORT aImplTranslateKeyTab[KEY_TAB_SIZE] =
+static sal_uInt16 aImplTranslateKeyTab[KEY_TAB_SIZE] =
{
// StarView-Code System-Code Index
0, // 0
@@ -918,7 +918,7 @@ static void ImplSalCalcFullScreenSize( const WinSalFrame* pFrame,
// -----------------------------------------------------------------------
-static void ImplSalFrameFullScreenPos( WinSalFrame* pFrame, BOOL bAlways = FALSE )
+static void ImplSalFrameFullScreenPos( WinSalFrame* pFrame, sal_Bool bAlways = FALSE )
{
if ( bAlways || !IsIconic( pFrame->mhWnd ) )
{
@@ -1182,9 +1182,9 @@ void WinSalFrame::ReleaseGraphics( SalGraphics* pGraphics )
// -----------------------------------------------------------------------
-BOOL WinSalFrame::PostEvent( void* pData )
+sal_Bool WinSalFrame::PostEvent( void* pData )
{
- return (BOOL)ImplPostMessage( mhWnd, SAL_MSG_USEREVENT, 0, (LPARAM)pData );
+ return (sal_Bool)ImplPostMessage( mhWnd, SAL_MSG_USEREVENT, 0, (LPARAM)pData );
}
// -----------------------------------------------------------------------
@@ -1202,7 +1202,7 @@ void WinSalFrame::SetTitle( const XubString& rTitle )
// -----------------------------------------------------------------------
-void WinSalFrame::SetIcon( USHORT nIcon )
+void WinSalFrame::SetIcon( sal_uInt16 nIcon )
{
// If we have a window without an Icon (for example a dialog), ignore this call
if ( mbNoIcon )
@@ -1259,7 +1259,7 @@ SalFrame* WinSalFrame::GetParent() const
// -----------------------------------------------------------------------
-static void ImplSalShow( HWND hWnd, BOOL bVisible, BOOL bNoActivate )
+static void ImplSalShow( HWND hWnd, sal_Bool bVisible, sal_Bool bNoActivate )
{
WinSalFrame* pFrame = GetWindowPtr( hWnd );
if ( !pFrame )
@@ -1374,7 +1374,7 @@ void WinSalFrame::SetExtendedFrameStyle( SalExtStyle )
// -----------------------------------------------------------------------
-void WinSalFrame::Show( BOOL bVisible, BOOL bNoActivate )
+void WinSalFrame::Show( sal_Bool bVisible, sal_Bool bNoActivate )
{
// Post this Message to the window, because this only works
// in the thread of the window, which has create this window.
@@ -1387,7 +1387,7 @@ void WinSalFrame::Show( BOOL bVisible, BOOL bNoActivate )
// -----------------------------------------------------------------------
-void WinSalFrame::Enable( BOOL bEnable )
+void WinSalFrame::Enable( sal_Bool bEnable )
{
EnableWindow( mhWnd, bEnable );
}
@@ -1409,9 +1409,9 @@ void WinSalFrame::SetMaxClientSize( long nWidth, long nHeight )
// -----------------------------------------------------------------------
void WinSalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight,
- USHORT nFlags )
+ sal_uInt16 nFlags )
{
- BOOL bVisible = (GetWindowStyle( mhWnd ) & WS_VISIBLE) != 0;
+ sal_Bool bVisible = (GetWindowStyle( mhWnd ) & WS_VISIBLE) != 0;
if ( !bVisible )
{
Window *pClientWin = GetWindow()->ImplGetClientWindow();
@@ -1426,7 +1426,7 @@ void WinSalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight,
ShowWindow( mhWnd, SW_RESTORE );
}
- USHORT nEvent = 0;
+ sal_uInt16 nEvent = 0;
UINT nPosSize = 0;
RECT aClientRect, aWindowRect;
GetClientRect( mhWnd, &aClientRect ); // x,y always 0,0, but width and height without border
@@ -1578,7 +1578,7 @@ void WinSalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight,
// Adjust Window in the screen
- BOOL bCheckOffScreen = TRUE;
+ sal_Bool bCheckOffScreen = TRUE;
// but don't do this for floaters or ownerdraw windows that are currently moved interactively
if( (mnStyle & SAL_FRAME_STYLE_FLOAT) && !(mnStyle & SAL_FRAME_STYLE_OWNERDRAWDECORATION) )
@@ -1621,7 +1621,7 @@ void WinSalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight,
// -----------------------------------------------------------------------
-static void ImplSetParentFrame( WinSalFrame* pThis, HWND hNewParentWnd, BOOL bAsChild )
+static void ImplSetParentFrame( WinSalFrame* pThis, HWND hNewParentWnd, sal_Bool bAsChild )
{
// save hwnd, will be overwritten in WM_CREATE during createwindow
HWND hWndOld = pThis->mhWnd;
@@ -1654,8 +1654,8 @@ static void ImplSetParentFrame( WinSalFrame* pThis, HWND hNewParentWnd, BOOL bAs
pObject = pObject->mpNextObject;
}
- BOOL bNeedGraphics = pThis->mbGraphics;
- BOOL bNeedCacheDC = FALSE;
+ sal_Bool bNeedGraphics = pThis->mbGraphics;
+ sal_Bool bNeedCacheDC = FALSE;
HFONT hFont = NULL;
HPEN hPen = NULL;
@@ -1895,8 +1895,8 @@ void WinSalFrame::SetWindowState( const SalFrameState* pState )
GetWindowPlacement( mhWnd, &aPlacement );
// Status setzen
- BOOL bVisible = (GetWindowStyle( mhWnd ) & WS_VISIBLE) != 0;
- BOOL bUpdateHiddenFramePos = FALSE;
+ sal_Bool bVisible = (GetWindowStyle( mhWnd ) & WS_VISIBLE) != 0;
+ sal_Bool bUpdateHiddenFramePos = FALSE;
if ( !bVisible )
{
aPlacement.showCmd = SW_HIDE;
@@ -1969,7 +1969,7 @@ void WinSalFrame::SetWindowState( const SalFrameState* pState )
// -----------------------------------------------------------------------
-BOOL WinSalFrame::GetWindowState( SalFrameState* pState )
+sal_Bool WinSalFrame::GetWindowState( SalFrameState* pState )
{
if ( maState.mnWidth && maState.mnHeight )
{
@@ -2019,7 +2019,7 @@ void WinSalFrame::SetScreenNumber( unsigned int nNewScreen )
// -----------------------------------------------------------------------
-void WinSalFrame::ShowFullScreen( BOOL bFullScreen, sal_Int32 nDisplay )
+void WinSalFrame::ShowFullScreen( sal_Bool bFullScreen, sal_Int32 nDisplay )
{
if ( (mbFullScreen == bFullScreen) && (!bFullScreen || (mnDisplay == nDisplay)) )
return;
@@ -2052,7 +2052,7 @@ void WinSalFrame::ShowFullScreen( BOOL bFullScreen, sal_Int32 nDisplay )
{
// wenn ShowState wieder hergestellt werden muss, hiden wir zuerst
// das Fenster, damit es nicht so sehr flackert
- BOOL bVisible = (GetWindowStyle( mhWnd ) & WS_VISIBLE) != 0;
+ sal_Bool bVisible = (GetWindowStyle( mhWnd ) & WS_VISIBLE) != 0;
if ( bVisible && (mnShowState != mnFullScreenShowState) )
ShowWindow( mhWnd, SW_HIDE );
@@ -2084,7 +2084,7 @@ void WinSalFrame::ShowFullScreen( BOOL bFullScreen, sal_Int32 nDisplay )
// -----------------------------------------------------------------------
-void WinSalFrame::StartPresentation( BOOL bStart )
+void WinSalFrame::StartPresentation( sal_Bool bStart )
{
if ( mbPresentation == bStart )
return;
@@ -2139,7 +2139,7 @@ void WinSalFrame::StartPresentation( BOOL bStart )
// -----------------------------------------------------------------------
-void WinSalFrame::SetAlwaysOnTop( BOOL bOnTop )
+void WinSalFrame::SetAlwaysOnTop( sal_Bool bOnTop )
{
HWND hWnd;
if ( bOnTop )
@@ -2151,7 +2151,7 @@ void WinSalFrame::SetAlwaysOnTop( BOOL bOnTop )
// -----------------------------------------------------------------------
-static void ImplSalToTop( HWND hWnd, USHORT nFlags )
+static void ImplSalToTop( HWND hWnd, sal_uInt16 nFlags )
{
WinSalFrame* pToTopFrame = GetWindowPtr( hWnd );
if( pToTopFrame && (pToTopFrame->mnStyle & SAL_FRAME_STYLE_SYSTEMCHILD) != 0 )
@@ -2207,7 +2207,7 @@ static void ImplSalToTop( HWND hWnd, USHORT nFlags )
// -----------------------------------------------------------------------
-void WinSalFrame::ToTop( USHORT nFlags )
+void WinSalFrame::ToTop( sal_uInt16 nFlags )
{
nFlags &= ~SAL_FRAME_TOTOP_GRABFOCUS; // this flag is not needed on win32
// Post this Message to the window, because this only works
@@ -2358,7 +2358,7 @@ void WinSalFrame::SetPointer( PointerStyle ePointerStyle )
// -----------------------------------------------------------------------
-void WinSalFrame::CaptureMouse( BOOL bCapture )
+void WinSalFrame::CaptureMouse( sal_Bool bCapture )
{
// Send this Message to the window, because CaptureMouse() only work
// in the thread of the window, which has create this window
@@ -2400,7 +2400,7 @@ void WinSalFrame::Sync()
static void ImplSalFrameSetInputContext( HWND hWnd, const SalInputContext* pContext )
{
WinSalFrame* pFrame = GetWindowPtr( hWnd );
- BOOL bIME = (pContext->mnOptions & SAL_INPUTCONTEXT_TEXT) != 0;
+ sal_Bool bIME = (pContext->mnOptions & SAL_INPUTCONTEXT_TEXT) != 0;
if ( bIME )
{
if ( !pFrame->mbIME )
@@ -2467,7 +2467,7 @@ void WinSalFrame::SetInputContext( SalInputContext* pContext )
// -----------------------------------------------------------------------
-static void ImplSalFrameEndExtTextInput( HWND hWnd, USHORT nFlags )
+static void ImplSalFrameEndExtTextInput( HWND hWnd, sal_uInt16 nFlags )
{
HIMC hIMC = ImmGetContext( hWnd );
if ( hIMC )
@@ -2485,7 +2485,7 @@ static void ImplSalFrameEndExtTextInput( HWND hWnd, USHORT nFlags )
// -----------------------------------------------------------------------
-void WinSalFrame::EndExtTextInput( USHORT nFlags )
+void WinSalFrame::EndExtTextInput( sal_uInt16 nFlags )
{
// Must be called in the main thread!
ImplSendMessage( mhWnd, SAL_MSG_ENDEXTTEXTINPUT, (WPARAM)nFlags, 0 );
@@ -2585,7 +2585,7 @@ static void ImplGetKeyNameText( LONG lParam, sal_Unicode* pBuf,
// -----------------------------------------------------------------------
-XubString WinSalFrame::GetKeyName( USHORT nKeyCode )
+XubString WinSalFrame::GetKeyName( sal_uInt16 nKeyCode )
{
static const int nMaxKeyLen = 350;
sal_Unicode aKeyBuf[ nMaxKeyLen ];
@@ -2595,26 +2595,26 @@ XubString WinSalFrame::GetKeyName( USHORT nKeyCode )
if ( nKeyCode & KEY_MOD1 )
{
nSysCode = MapVirtualKey( VK_CONTROL, 0 );
- nSysCode = (nSysCode << 16) | (((ULONG)1) << 25);
+ nSysCode = (nSysCode << 16) | (((sal_uIntPtr)1) << 25);
ImplGetKeyNameText( nSysCode, aKeyBuf, nKeyBufLen, nMaxKeyLen, "Ctrl" );
}
if ( nKeyCode & KEY_MOD2 )
{
nSysCode = MapVirtualKey( VK_MENU, 0 );
- nSysCode = (nSysCode << 16) | (((ULONG)1) << 25);
+ nSysCode = (nSysCode << 16) | (((sal_uIntPtr)1) << 25);
ImplGetKeyNameText( nSysCode, aKeyBuf, nKeyBufLen, nMaxKeyLen, "Alt" );
}
if ( nKeyCode & KEY_SHIFT )
{
nSysCode = MapVirtualKey( VK_SHIFT, 0 );
- nSysCode = (nSysCode << 16) | (((ULONG)1) << 25);
+ nSysCode = (nSysCode << 16) | (((sal_uIntPtr)1) << 25);
ImplGetKeyNameText( nSysCode, aKeyBuf, nKeyBufLen, nMaxKeyLen, "Shift" );
}
- USHORT nCode = nKeyCode & 0x0FFF;
- ULONG nSysCode2 = 0;
+ sal_uInt16 nCode = nKeyCode & 0x0FFF;
+ sal_uIntPtr nSysCode2 = 0;
sal_Char* pReplace = NULL;
sal_Unicode cSVCode = 0;
sal_Char aFBuf[4];
@@ -2653,42 +2653,42 @@ XubString WinSalFrame::GetKeyName( USHORT nKeyCode )
{
case KEY_DOWN:
nSysCode = VK_DOWN;
- nSysCode2 = (((ULONG)1) << 24);
+ nSysCode2 = (((sal_uIntPtr)1) << 24);
pReplace = "Down";
break;
case KEY_UP:
nSysCode = VK_UP;
- nSysCode2 = (((ULONG)1) << 24);
+ nSysCode2 = (((sal_uIntPtr)1) << 24);
pReplace = "Up";
break;
case KEY_LEFT:
nSysCode = VK_LEFT;
- nSysCode2 = (((ULONG)1) << 24);
+ nSysCode2 = (((sal_uIntPtr)1) << 24);
pReplace = "Left";
break;
case KEY_RIGHT:
nSysCode = VK_RIGHT;
- nSysCode2 = (((ULONG)1) << 24);
+ nSysCode2 = (((sal_uIntPtr)1) << 24);
pReplace = "Right";
break;
case KEY_HOME:
nSysCode = VK_HOME;
- nSysCode2 = (((ULONG)1) << 24);
+ nSysCode2 = (((sal_uIntPtr)1) << 24);
pReplace = "Home";
break;
case KEY_END:
nSysCode = VK_END;
- nSysCode2 = (((ULONG)1) << 24);
+ nSysCode2 = (((sal_uIntPtr)1) << 24);
pReplace = "End";
break;
case KEY_PAGEUP:
nSysCode = VK_PRIOR;
- nSysCode2 = (((ULONG)1) << 24);
+ nSysCode2 = (((sal_uIntPtr)1) << 24);
pReplace = "Page Up";
break;
case KEY_PAGEDOWN:
nSysCode = VK_NEXT;
- nSysCode2 = (((ULONG)1) << 24);
+ nSysCode2 = (((sal_uIntPtr)1) << 24);
pReplace = "Page Down";
break;
case KEY_RETURN:
@@ -2713,12 +2713,12 @@ XubString WinSalFrame::GetKeyName( USHORT nKeyCode )
break;
case KEY_INSERT:
nSysCode = VK_INSERT;
- nSysCode2 = (((ULONG)1) << 24);
+ nSysCode2 = (((sal_uIntPtr)1) << 24);
pReplace = "Insert";
break;
case KEY_DELETE:
nSysCode = VK_DELETE;
- nSysCode2 = (((ULONG)1) << 24);
+ nSysCode2 = (((sal_uIntPtr)1) << 24);
pReplace = "Delete";
break;
@@ -2773,12 +2773,12 @@ XubString WinSalFrame::GetKeyName( USHORT nKeyCode )
if( !nKeyBufLen )
return XubString();
- return XubString( aKeyBuf, sal::static_int_cast< USHORT >(nKeyBufLen) );
+ return XubString( aKeyBuf, sal::static_int_cast< sal_uInt16 >(nKeyBufLen) );
}
// -----------------------------------------------------------------------
-XubString WinSalFrame::GetSymbolKeyName( const XubString&, USHORT nKeyCode )
+XubString WinSalFrame::GetSymbolKeyName( const XubString&, sal_uInt16 nKeyCode )
{
return GetKeyName( nKeyCode );
}
@@ -2881,14 +2881,14 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings )
&nType, aValueBuf, &nValueSize ) == ERROR_SUCCESS )
{
if ( nType == REG_SZ )
- aMouseSettings.SetMenuDelay( (ULONG)ImplA2I( aValueBuf ) );
+ aMouseSettings.SetMenuDelay( (sal_uIntPtr)ImplA2I( aValueBuf ) );
}
RegCloseKey( hRegKey );
}
StyleSettings aStyleSettings = rSettings.GetStyleSettings();
- BOOL bCompBorder = (aStyleSettings.GetOptions() & (STYLE_OPTION_MACSTYLE | STYLE_OPTION_UNIXSTYLE)) == 0;
+ sal_Bool bCompBorder = (aStyleSettings.GetOptions() & (STYLE_OPTION_MACSTYLE | STYLE_OPTION_UNIXSTYLE)) == 0;
// TODO: once those options vanish: just set bCompBorder to TRUE
// to have the system colors read
aStyleSettings.SetScrollBarSize( GetSystemMetrics( SM_CXVSCROLL ) );
@@ -2972,9 +2972,9 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings )
// Checked-Color berechnen
Color aColor1 = aStyleSettings.GetFaceColor();
Color aColor2 = aStyleSettings.GetLightColor();
- BYTE nRed = (BYTE)(((USHORT)aColor1.GetRed() + (USHORT)aColor2.GetRed())/2);
- BYTE nGreen = (BYTE)(((USHORT)aColor1.GetGreen() + (USHORT)aColor2.GetGreen())/2);
- BYTE nBlue = (BYTE)(((USHORT)aColor1.GetBlue() + (USHORT)aColor2.GetBlue())/2);
+ BYTE nRed = (BYTE)(((sal_uInt16)aColor1.GetRed() + (sal_uInt16)aColor2.GetRed())/2);
+ BYTE nGreen = (BYTE)(((sal_uInt16)aColor1.GetGreen() + (sal_uInt16)aColor2.GetGreen())/2);
+ BYTE nBlue = (BYTE)(((sal_uInt16)aColor1.GetBlue() + (sal_uInt16)aColor2.GetBlue())/2);
aStyleSettings.SetCheckedColor( Color( nRed, nGreen, nBlue ) );
}
@@ -3071,10 +3071,10 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings )
aStyleSettings.SetInfoFont( aAppFont );
aStyleSettings.SetToolFont( aAppFont );
- WIN_BOOL bDragFull;
+ BOOL bDragFull;
if ( SystemParametersInfo( SPI_GETDRAGFULLWINDOWS, 0, &bDragFull, 0 ) )
{
- ULONG nDragFullOptions = aStyleSettings.GetDragFullOptions();
+ sal_uIntPtr nDragFullOptions = aStyleSettings.GetDragFullOptions();
if ( bDragFull )
nDragFullOptions |= DRAGFULL_OPTION_WINDOWMOVE | DRAGFULL_OPTION_WINDOWSIZE | DRAGFULL_OPTION_DOCKING | DRAGFULL_OPTION_SPLIT;
else
@@ -3097,7 +3097,7 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings )
{
if ( nType == REG_SZ )
{
- nValue = (ULONG)ImplA2I( aValueBuf );
+ nValue = (sal_uIntPtr)ImplA2I( aValueBuf );
if ( (nValue > 1000) && (nValue < 10000) )
{
MiscSettings aMiscSettings = rSettings.GetMiscSettings();
@@ -3128,7 +3128,7 @@ SalBitmap* WinSalFrame::SnapShot()
HDC hDC = GetWindowDC( mhWnd );
HBITMAP hBmpBitmap = CreateCompatibleBitmap( hDC, nDX, nDY );
HDC hBmpDC = ImplGetCachedDC( CACHED_HDC_1, hBmpBitmap );
- BOOL bRet;
+ sal_Bool bRet;
bRet = BitBlt( hBmpDC, 0, 0, nDX, nDY, hDC, 0, 0, SRCCOPY ) ? TRUE : FALSE;
ImplReleaseCachedDC( CACHED_HDC_1 );
@@ -3213,11 +3213,11 @@ void WinSalFrame::ResetClipRegion()
// -----------------------------------------------------------------------
-void WinSalFrame::BeginSetClipRegion( ULONG nRects )
+void WinSalFrame::BeginSetClipRegion( sal_uIntPtr nRects )
{
if( mpClipRgnData )
delete [] (BYTE*)mpClipRgnData;
- ULONG nRectBufSize = sizeof(RECT)*nRects;
+ sal_uIntPtr nRectBufSize = sizeof(RECT)*nRects;
mpClipRgnData = (RGNDATA*)new BYTE[sizeof(RGNDATA)-1+nRectBufSize];
mpClipRgnData->rdh.dwSize = sizeof( RGNDATAHEADER );
mpClipRgnData->rdh.iType = RDH_RECTANGLES;
@@ -3289,7 +3289,7 @@ void WinSalFrame::EndSetClipRegion()
}
else
{
- ULONG nSize = mpClipRgnData->rdh.nRgnSize+sizeof(RGNDATAHEADER);
+ sal_uIntPtr nSize = mpClipRgnData->rdh.nRgnSize+sizeof(RGNDATAHEADER);
hRegion = ExtCreateRegion( NULL, nSize, mpClipRgnData );
}
delete [] (BYTE*)mpClipRgnData;
@@ -3334,8 +3334,8 @@ static long ImplHandleMouseMsg( HWND hWnd, UINT nMsg,
}
SalMouseEvent aMouseEvt;
long nRet;
- USHORT nEvent = 0;
- BOOL bCall = TRUE;
+ sal_uInt16 nEvent = 0;
+ sal_Bool bCall = TRUE;
aMouseEvt.mnX = (short)LOWORD( lParam );
aMouseEvt.mnY = (short)HIWORD( lParam );
@@ -3569,9 +3569,9 @@ static long ImplHandleWheelMsg( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lPar
// -----------------------------------------------------------------------
-static USHORT ImplSalGetKeyCode( WPARAM wParam )
+static sal_uInt16 ImplSalGetKeyCode( WPARAM wParam )
{
- USHORT nKeyCode;
+ sal_uInt16 nKeyCode;
// convert KeyCode
if ( wParam < KEY_TAB_SIZE )
@@ -3579,7 +3579,7 @@ static USHORT ImplSalGetKeyCode( WPARAM wParam )
else
{
SalData* pSalData = GetSalData();
- std::map< UINT, USHORT >::const_iterator it = pSalData->maVKMap.find( (UINT)wParam );
+ std::map< UINT, sal_uInt16 >::const_iterator it = pSalData->maVKMap.find( (UINT)wParam );
if( it != pSalData->maVKMap.end() )
nKeyCode = it->second;
else
@@ -3593,7 +3593,7 @@ static USHORT ImplSalGetKeyCode( WPARAM wParam )
static UINT ImplStrToNum( const sal_Char* pStr )
{
- USHORT n = 0;
+ sal_uInt16 n = 0;
// Solange es sich um eine Ziffer handelt, String umwandeln
while( (*pStr >= 48) && (*pStr <= 57) )
@@ -3610,7 +3610,7 @@ static UINT ImplStrToNum( const sal_Char* pStr )
static void ImplUpdateInputLang( WinSalFrame* pFrame )
{
- BOOL bLanguageChange = FALSE;
+ sal_Bool bLanguageChange = FALSE;
UINT nLang = LOWORD( GetKeyboardLayout( 0 ) );
if ( nLang && nLang != pFrame->mnInputLang )
{
@@ -3692,9 +3692,9 @@ LanguageType WinSalFrame::GetInputLanguage()
// -----------------------------------------------------------------------
-BOOL WinSalFrame::MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode )
+sal_Bool WinSalFrame::MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = FALSE;
HKL hkl = 0;
// just use the passed language identifier, do not try to load additional keyboard support
@@ -3734,14 +3734,14 @@ BOOL WinSalFrame::MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangT
static long ImplHandleKeyMsg( HWND hWnd, UINT nMsg,
WPARAM wParam, LPARAM lParam, LRESULT& rResult )
{
- static BOOL bIgnoreCharMsg = FALSE;
+ static sal_Bool bIgnoreCharMsg = FALSE;
static WPARAM nDeadChar = 0;
static WPARAM nLastVKChar = 0;
- static USHORT nLastChar = 0;
- static USHORT nLastModKeyCode = 0;
+ static sal_uInt16 nLastChar = 0;
+ static sal_uInt16 nLastModKeyCode = 0;
static bool bWaitForModKeyRelease = false;
- USHORT nRepeat = LOWORD( lParam )-1;
- USHORT nModCode = 0;
+ sal_uInt16 nRepeat = LOWORD( lParam )-1;
+ sal_uInt16 nModCode = 0;
// Key wurde evtl. durch SysChild an uns weitergeleitet und
// darf somit dann nicht doppelt verarbeitet werden
@@ -3801,11 +3801,11 @@ static long ImplHandleKeyMsg( HWND hWnd, UINT nMsg,
SalKeyEvent aKeyEvt;
if ( (wParam >= '0') && (wParam <= '9') )
- aKeyEvt.mnCode = sal::static_int_cast<USHORT>(KEYGROUP_NUM + wParam - '0');
+ aKeyEvt.mnCode = sal::static_int_cast<sal_uInt16>(KEYGROUP_NUM + wParam - '0');
else if ( (wParam >= 'A') && (wParam <= 'Z') )
- aKeyEvt.mnCode = sal::static_int_cast<USHORT>(KEYGROUP_ALPHA + wParam - 'A');
+ aKeyEvt.mnCode = sal::static_int_cast<sal_uInt16>(KEYGROUP_ALPHA + wParam - 'A');
else if ( (wParam >= 'a') && (wParam <= 'z') )
- aKeyEvt.mnCode = sal::static_int_cast<USHORT>(KEYGROUP_ALPHA + wParam - 'a');
+ aKeyEvt.mnCode = sal::static_int_cast<sal_uInt16>(KEYGROUP_ALPHA + wParam - 'a');
else if ( wParam == 0x0D ) // RETURN
aKeyEvt.mnCode = KEY_RETURN;
else if ( wParam == 0x1B ) // ESCAPE
@@ -3873,7 +3873,7 @@ static long ImplHandleKeyMsg( HWND hWnd, UINT nMsg,
aModEvt.mnCode = nModCode;
aModEvt.mnModKeyCode = 0; // no command events will be sent if this member is 0
- USHORT tmpCode = 0;
+ sal_uInt16 tmpCode = 0;
if( GetKeyState( VK_LSHIFT ) & 0x8000 )
tmpCode |= MODKEY_LSHIFT;
if( GetKeyState( VK_RSHIFT ) & 0x8000 )
@@ -3907,11 +3907,11 @@ static long ImplHandleKeyMsg( HWND hWnd, UINT nMsg,
else
{
SalKeyEvent aKeyEvt;
- USHORT nEvent;
+ sal_uInt16 nEvent;
MSG aCharMsg;
- WIN_BOOL bCharPeek = FALSE;
+ BOOL bCharPeek = FALSE;
UINT nCharMsg = WM_CHAR;
- BOOL bKeyUp = (nMsg == WM_KEYUP) || (nMsg == WM_SYSKEYUP);
+ sal_Bool bKeyUp = (nMsg == WM_KEYUP) || (nMsg == WM_SYSKEYUP);
nLastModKeyCode = 0; // make sure no modkey messages are sent if they belong to a hotkey (see above)
aKeyEvt.mnCharCode = 0;
@@ -4026,8 +4026,8 @@ long ImplHandleSalObjKeyMsg( HWND hWnd, UINT nMsg,
if ( !pFrame )
return 0;
- USHORT nRepeat = LOWORD( lParam )-1;
- USHORT nModCode = 0;
+ sal_uInt16 nRepeat = LOWORD( lParam )-1;
+ sal_uInt16 nModCode = 0;
// determine modifiers
if ( GetKeyState( VK_SHIFT ) & 0x8000 )
@@ -4040,8 +4040,8 @@ long ImplHandleSalObjKeyMsg( HWND hWnd, UINT nMsg,
if ( (wParam != VK_SHIFT) && (wParam != VK_CONTROL) && (wParam != VK_MENU) )
{
SalKeyEvent aKeyEvt;
- USHORT nEvent;
- BOOL bKeyUp = (nMsg == WM_KEYUP) || (nMsg == WM_SYSKEYUP);
+ sal_uInt16 nEvent;
+ sal_Bool bKeyUp = (nMsg == WM_KEYUP) || (nMsg == WM_SYSKEYUP);
// convert KeyCode
aKeyEvt.mnCode = ImplSalGetKeyCode( wParam );
@@ -4076,9 +4076,9 @@ long ImplHandleSalObjSysCharMsg( HWND hWnd, WPARAM wParam, LPARAM lParam )
if ( !pFrame )
return 0;
- USHORT nRepeat = LOWORD( lParam )-1;
- USHORT nModCode = 0;
- USHORT cKeyCode = (USHORT)wParam;
+ sal_uInt16 nRepeat = LOWORD( lParam )-1;
+ sal_uInt16 nModCode = 0;
+ sal_uInt16 cKeyCode = (sal_uInt16)wParam;
// determine modifiers
if ( GetKeyState( VK_SHIFT ) & 0x8000 )
@@ -4110,7 +4110,7 @@ long ImplHandleSalObjSysCharMsg( HWND hWnd, WPARAM wParam, LPARAM lParam )
static bool ImplHandlePaintMsg( HWND hWnd )
{
- BOOL bMutex = FALSE;
+ sal_Bool bMutex = FALSE;
if ( ImplSalYieldMutexTryToAcquire() )
bMutex = TRUE;
@@ -4462,7 +4462,7 @@ static long ImplHandleShutDownMsg( HWND hWnd )
static void ImplHandleSettingsChangeMsg( HWND hWnd, UINT nMsg,
WPARAM wParam, LPARAM lParam )
{
- USHORT nSalEvent = SALEVENT_SETTINGSCHANGED;
+ sal_uInt16 nSalEvent = SALEVENT_SETTINGSCHANGED;
if ( nMsg == WM_DEVMODECHANGE )
nSalEvent = SALEVENT_PRINTERCHANGED;
@@ -4566,7 +4566,7 @@ static void ImplHandleForcePalette( HWND hWnd )
// -----------------------------------------------------------------------
-static LRESULT ImplHandlePalette( BOOL bFrame, HWND hWnd, UINT nMsg,
+static LRESULT ImplHandlePalette( sal_Bool bFrame, HWND hWnd, UINT nMsg,
WPARAM wParam, LPARAM lParam, int& rDef )
{
SalData* pSalData = GetSalData();
@@ -4584,7 +4584,7 @@ static LRESULT ImplHandlePalette( BOOL bFrame, HWND hWnd, UINT nMsg,
return 0;
}
- BOOL bReleaseMutex = FALSE;
+ sal_Bool bReleaseMutex = FALSE;
if ( (nMsg == WM_QUERYNEWPALETTE) || (nMsg == WM_PALETTECHANGED) )
{
// Da Windows diese Messages auch sendet, muss hier auch die
@@ -4603,8 +4603,8 @@ static LRESULT ImplHandlePalette( BOOL bFrame, HWND hWnd, UINT nMsg,
HDC hDC;
HPALETTE hOldPal;
UINT nCols;
- BOOL bStdDC;
- BOOL bUpdate;
+ sal_Bool bStdDC;
+ sal_Bool bUpdate;
pSalData->mbInPalChange = TRUE;
@@ -4797,7 +4797,7 @@ static int ImplHandleMinMax( HWND hWnd, LPARAM lParam )
// the pointer is stored in every item, so if no position
// is specified we just use the first item (ie, pos=0)
// if bByPosition is FALSE then nPos denotes a menu id instead of a position
-static WinSalMenuItem* ImplGetSalMenuItem( HMENU hMenu, UINT nPos, BOOL bByPosition=TRUE )
+static WinSalMenuItem* ImplGetSalMenuItem( HMENU hMenu, UINT nPos, sal_Bool bByPosition=TRUE )
{
DWORD err=0;
@@ -4952,9 +4952,9 @@ static int ImplDrawItem(HWND, WPARAM wParam, LPARAM lParam )
COLORREF clrPrevText, clrPrevBkgnd;
HFONT hfntOld;
HBRUSH hbrOld;
- BOOL fChecked = (pDI->itemState & ODS_CHECKED) ? TRUE : FALSE;
- BOOL fSelected = (pDI->itemState & ODS_SELECTED) ? TRUE : FALSE;
- BOOL fDisabled = (pDI->itemState & (ODS_DISABLED | ODS_GRAYED)) ? TRUE : FALSE;
+ sal_Bool fChecked = (pDI->itemState & ODS_CHECKED) ? TRUE : FALSE;
+ sal_Bool fSelected = (pDI->itemState & ODS_SELECTED) ? TRUE : FALSE;
+ sal_Bool fDisabled = (pDI->itemState & (ODS_DISABLED | ODS_GRAYED)) ? TRUE : FALSE;
// Set the appropriate foreground and background colors.
RECT aRect = pDI->rcItem;
@@ -5098,7 +5098,7 @@ static int ImplHandleMenuActivate( HWND hWnd, WPARAM wParam, LPARAM )
HMENU hMenu = (HMENU) wParam;
// WORD nPos = LOWORD (lParam);
- // BOOL bWindowMenu = (BOOL) HIWORD(lParam);
+ // sal_Bool bWindowMenu = (sal_Bool) HIWORD(lParam);
// Send activate and deactivate together, so we have not keep track of opened menues
// this will be enough to have the menues updated correctly
@@ -5133,7 +5133,7 @@ static int ImplHandleMenuSelect( HWND hWnd, WPARAM wParam, LPARAM lParam )
if( !GetSalData()->IsKnownMenuHandle( hMenu ) )
return 0;
- BOOL bByPosition = FALSE;
+ sal_Bool bByPosition = FALSE;
if( nFlags & MF_POPUP )
bByPosition = TRUE;
@@ -5233,8 +5233,8 @@ static int ImplHandleSysCommand( HWND hWnd, WPARAM wParam, LPARAM lParam )
if ( pFrame->mbFullScreen )
{
- WIN_BOOL bMaximize = IsZoomed( pFrame->mhWnd );
- WIN_BOOL bMinimize = IsIconic( pFrame->mhWnd );
+ BOOL bMaximize = IsZoomed( pFrame->mhWnd );
+ BOOL bMinimize = IsIconic( pFrame->mhWnd );
if ( (nCommand == SC_SIZE) ||
(!bMinimize && (nCommand == SC_MOVE)) ||
(!bMaximize && (nCommand == SC_MAXIMIZE)) ||
@@ -5298,7 +5298,7 @@ static int ImplHandleSysCommand( HWND hWnd, WPARAM wParam, LPARAM lParam )
if ( ((cKeyCode >= 48) && (cKeyCode <= 57)) ||
((cKeyCode >= 97) && (cKeyCode <= 122)) )
{
- USHORT nModCode = 0;
+ sal_uInt16 nModCode = 0;
if ( GetKeyState( VK_SHIFT ) & 0x8000 )
nModCode |= KEY_SHIFT;
if ( GetKeyState( VK_CONTROL ) & 0x8000 )
@@ -5387,9 +5387,9 @@ static void ImplUpdateIMECursorPos( WinSalFrame* pFrame, HIMC hIMC )
// -----------------------------------------------------------------------
-static BOOL ImplHandleIMEStartComposition( HWND hWnd )
+static sal_Bool ImplHandleIMEStartComposition( HWND hWnd )
{
- BOOL bDef = TRUE;
+ sal_Bool bDef = TRUE;
ImplSalYieldMutexAcquireWithWait();
@@ -5417,10 +5417,10 @@ static BOOL ImplHandleIMEStartComposition( HWND hWnd )
// -----------------------------------------------------------------------
-static BOOL ImplHandleIMECompositionInput( WinSalFrame* pFrame,
+static sal_Bool ImplHandleIMECompositionInput( WinSalFrame* pFrame,
HIMC hIMC, LPARAM lParam )
{
- BOOL bDef = TRUE;
+ sal_Bool bDef = TRUE;
// Init Event
SalExtTextInputEvent aEvt;
@@ -5461,7 +5461,7 @@ static BOOL ImplHandleIMECompositionInput( WinSalFrame* pFrame,
{
bDef = FALSE;
- USHORT* pSalAttrAry = NULL;
+ sal_uInt16* pSalAttrAry = NULL;
LONG nTextLen = ImmGetCompositionStringW( hIMC, GCS_COMPSTR, 0, 0 ) / sizeof( WCHAR );
if ( nTextLen > 0 )
{
@@ -5470,23 +5470,23 @@ static BOOL ImplHandleIMECompositionInput( WinSalFrame* pFrame,
aEvt.maText = XubString( reinterpret_cast<const xub_Unicode*>(pTextBuf), (xub_StrLen)nTextLen );
delete [] pTextBuf;
- WIN_BYTE* pAttrBuf = NULL;
+ BYTE* pAttrBuf = NULL;
LONG nAttrLen = ImmGetCompositionStringW( hIMC, GCS_COMPATTR, 0, 0 );
if ( nAttrLen > 0 )
{
- pAttrBuf = new WIN_BYTE[nAttrLen];
+ pAttrBuf = new BYTE[nAttrLen];
ImmGetCompositionStringW( hIMC, GCS_COMPATTR, pAttrBuf, nAttrLen );
}
if ( pAttrBuf )
{
xub_StrLen nTextLen = aEvt.maText.Len();
- pSalAttrAry = new USHORT[nTextLen];
- memset( pSalAttrAry, 0, nTextLen*sizeof( USHORT ) );
+ pSalAttrAry = new sal_uInt16[nTextLen];
+ memset( pSalAttrAry, 0, nTextLen*sizeof( sal_uInt16 ) );
for ( xub_StrLen i = 0; (i < nTextLen) && (i < nAttrLen); i++ )
{
- WIN_BYTE nWinAttr = pAttrBuf[i];
- USHORT nSalAttr;
+ BYTE nWinAttr = pAttrBuf[i];
+ sal_uInt16 nSalAttr;
if ( nWinAttr == ATTR_TARGET_CONVERTED )
{
nSalAttr = SAL_EXTTEXTINPUT_ATTR_BOLDUNDERLINE;
@@ -5549,9 +5549,9 @@ static BOOL ImplHandleIMECompositionInput( WinSalFrame* pFrame,
// -----------------------------------------------------------------------
-static BOOL ImplHandleIMEComposition( HWND hWnd, LPARAM lParam )
+static sal_Bool ImplHandleIMEComposition( HWND hWnd, LPARAM lParam )
{
- BOOL bDef = TRUE;
+ sal_Bool bDef = TRUE;
ImplSalYieldMutexAcquireWithWait();
WinSalFrame* pFrame = GetWindowPtr( hWnd );
@@ -5597,9 +5597,9 @@ static BOOL ImplHandleIMEComposition( HWND hWnd, LPARAM lParam )
// -----------------------------------------------------------------------
-static BOOL ImplHandleIMEEndComposition( HWND hWnd )
+static sal_Bool ImplHandleIMEEndComposition( HWND hWnd )
{
- BOOL bDef = TRUE;
+ sal_Bool bDef = TRUE;
ImplSalYieldMutexAcquireWithWait();
@@ -5785,8 +5785,8 @@ static LRESULT ImplHandleIMEConfirmReconvertString( HWND hWnd, LPARAM lParam )
pFrame->CallCallback( SALEVENT_SURROUNDINGTEXTREQUEST, (void*)&aEvt );
- ULONG nTmpStart = pReconvertString->dwCompStrOffset / sizeof(WCHAR);
- ULONG nTmpEnd = nTmpStart + pReconvertString->dwCompStrLen;
+ sal_uIntPtr nTmpStart = pReconvertString->dwCompStrOffset / sizeof(WCHAR);
+ sal_uIntPtr nTmpEnd = nTmpStart + pReconvertString->dwCompStrLen;
if( nTmpStart != aEvt.mnStart || nTmpEnd != aEvt.mnEnd )
{
@@ -6174,11 +6174,11 @@ LRESULT CALLBACK SalFrameWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lP
rDef = FALSE;
break;
case SAL_MSG_TOTOP:
- ImplSalToTop( hWnd, (USHORT)wParam );
+ ImplSalToTop( hWnd, (sal_uInt16)wParam );
rDef = FALSE;
break;
case SAL_MSG_SHOW:
- ImplSalShow( hWnd, (BOOL)wParam, (BOOL)lParam );
+ ImplSalShow( hWnd, (sal_Bool)wParam, (sal_Bool)lParam );
rDef = FALSE;
break;
case SAL_MSG_SETINPUTCONTEXT:
@@ -6186,7 +6186,7 @@ LRESULT CALLBACK SalFrameWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lP
rDef = FALSE;
break;
case SAL_MSG_ENDEXTTEXTINPUT:
- ImplSalFrameEndExtTextInput( hWnd, (USHORT)(ULONG)(void*)wParam );
+ ImplSalFrameEndExtTextInput( hWnd, (sal_uInt16)(sal_uIntPtr)(void*)wParam );
rDef = FALSE;
break;
@@ -6353,11 +6353,11 @@ LRESULT CALLBACK SalFrameWndProcW( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM l
// -----------------------------------------------------------------------
-BOOL ImplHandleGlobalMsg( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam, LRESULT& rlResult )
+sal_Bool ImplHandleGlobalMsg( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam, LRESULT& rlResult )
{
// handle all messages concerning all frames so they get processed only once
// Must work for Unicode and none Unicode
- BOOL bResult = FALSE;
+ sal_Bool bResult = FALSE;
if ( (nMsg == WM_PALETTECHANGED) || (nMsg == SAL_MSG_POSTPALCHANGED) )
{
int bDef = TRUE;
@@ -6376,7 +6376,7 @@ BOOL ImplHandleGlobalMsg( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam, LR
// -----------------------------------------------------------------------
-BOOL ImplWriteLastError( DWORD lastError, const char *szApiCall )
+sal_Bool ImplWriteLastError( DWORD lastError, const char *szApiCall )
{
static int first=1;
// if VCL_LOGFILE_ENABLED is set, Win32 API error messages can be written
@@ -6384,7 +6384,7 @@ BOOL ImplWriteLastError( DWORD lastError, const char *szApiCall )
static char *logEnabled = getenv("VCL_LOGFILE_ENABLED");
if( logEnabled )
{
- BOOL bSuccess = FALSE;
+ sal_Bool bSuccess = FALSE;
static char *szTmp = getenv("TMP");
if( !szTmp || !*szTmp )
szTmp = getenv("TEMP");
diff --git a/vcl/win/source/window/salmenu.cxx b/vcl/win/source/window/salmenu.cxx
index 1eb75969ea38..bbb0b4288a4e 100644
--- a/vcl/win/source/window/salmenu.cxx
+++ b/vcl/win/source/window/salmenu.cxx
@@ -47,7 +47,7 @@ static DWORD myerr=0;
// =======================================================================
-BOOL SalData::IsKnownMenuHandle( HMENU hMenu )
+sal_Bool SalData::IsKnownMenuHandle( HMENU hMenu )
{
if( mhMenuSet.find( hMenu ) == mhMenuSet.end() )
return FALSE;
@@ -59,7 +59,7 @@ BOOL SalData::IsKnownMenuHandle( HMENU hMenu )
// WinSalInst factory methods
-SalMenu* WinSalInstance::CreateMenu( BOOL bMenuBar )
+SalMenu* WinSalInstance::CreateMenu( sal_Bool bMenuBar )
{
WinSalMenu *pSalMenu = new WinSalMenu();
@@ -168,7 +168,7 @@ WinSalMenu::~WinSalMenu()
::DestroyMenu( mhMenu );
}
-BOOL WinSalMenu::VisibleMenuBar()
+sal_Bool WinSalMenu::VisibleMenuBar()
{
// The Win32 implementation never shows a native
// menubar. Thus, native menues are only visible
@@ -294,13 +294,13 @@ void WinSalMenu::SetSubMenu( SalMenuItem* pSalMenuItem, SalMenu* pSubMenu, unsig
}
}
-void WinSalMenu::CheckItem( unsigned nPos, BOOL bCheck )
+void WinSalMenu::CheckItem( unsigned nPos, sal_Bool bCheck )
{
if( -1 != ::CheckMenuItem( mhMenu, nPos, MF_BYPOSITION|(bCheck ? MF_CHECKED : MF_UNCHECKED) ) )
ImplDrawMenuBar( this );
}
-void WinSalMenu::EnableItem( unsigned nPos, BOOL bEnable )
+void WinSalMenu::EnableItem( unsigned nPos, sal_Bool bEnable )
{
if( -1 != ::EnableMenuItem( mhMenu, nPos, MF_BYPOSITION|(bEnable ? MF_ENABLED : (MF_DISABLED|MF_GRAYED) ) ) )
ImplDrawMenuBar( this );
diff --git a/vcl/win/source/window/salobj.cxx b/vcl/win/source/window/salobj.cxx
index 2f657968284f..54858cd820dd 100644
--- a/vcl/win/source/window/salobj.cxx
+++ b/vcl/win/source/window/salobj.cxx
@@ -42,7 +42,7 @@
// =======================================================================
-static BOOL ImplIsSysWindowOrChild( HWND hWndParent, HWND hWndChild )
+static sal_Bool ImplIsSysWindowOrChild( HWND hWndParent, HWND hWndChild )
{
if ( hWndParent == hWndChild )
return TRUE;
@@ -161,7 +161,7 @@ LRESULT CALLBACK SalSysMsgProc( int nCode, WPARAM wParam, LPARAM lParam )
// -----------------------------------------------------------------------
-BOOL ImplSalPreDispatchMsg( MSG* pMsg )
+sal_Bool ImplSalPreDispatchMsg( MSG* pMsg )
{
// Used for Unicode and none Unicode
SalData* pSalData = GetSalData();
@@ -186,7 +186,7 @@ BOOL ImplSalPreDispatchMsg( MSG* pMsg )
// SysKeys werden als WM_SYSCOMMAND verarbeitet
// Char-Events verarbeiten wir nicht, da wir nur
// Accelerator relevante Keys verarbeiten wollen
- BOOL bWantedKeyCode = FALSE;
+ sal_Bool bWantedKeyCode = FALSE;
// A-Z, 0-9 nur in Verbindung mit Control-Taste
if ( ((pMsg->wParam >= 65) && (pMsg->wParam <= 90)) ||
((pMsg->wParam >= 48) && (pMsg->wParam <= 57)) )
@@ -214,13 +214,13 @@ BOOL ImplSalPreDispatchMsg( MSG* pMsg )
{
pSalData->mnSalObjWantKeyEvt = 0;
- USHORT nKeyCode = LOWORD( pMsg->wParam );
+ sal_uInt16 nKeyCode = LOWORD( pMsg->wParam );
// Nur 0-9 und A-Z
if ( ((nKeyCode >= 48) && (nKeyCode <= 57)) ||
((nKeyCode >= 65) && (nKeyCode <= 90)) ||
((nKeyCode >= 97) && (nKeyCode <= 122)) )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = FALSE;
ImplSalYieldMutexAcquireWithWait();
pObject = ImplFindSalObject( pMsg->hwnd );
if ( pObject )
@@ -338,7 +338,7 @@ LRESULT CALLBACK SalSysObjWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM l
{
pSysObj = GetSalObjWindowPtr( hWnd );
HWND hFocusWnd = ::GetFocus();
- USHORT nEvent;
+ sal_uInt16 nEvent;
if ( hFocusWnd && ImplIsSysWindowOrChild( hWnd, hFocusWnd ) )
nEvent = SALOBJ_EVENT_GETFOCUS;
else
@@ -682,16 +682,16 @@ void WinSalObject::ResetClipRegion()
// -----------------------------------------------------------------------
-USHORT WinSalObject::GetClipRegionType()
+sal_uInt16 WinSalObject::GetClipRegionType()
{
return SAL_OBJECT_CLIP_INCLUDERECTS;
}
// -----------------------------------------------------------------------
-void WinSalObject::BeginSetClipRegion( ULONG nRectCount )
+void WinSalObject::BeginSetClipRegion( sal_uIntPtr nRectCount )
{
- ULONG nRectBufSize = sizeof(RECT)*nRectCount;
+ sal_uIntPtr nRectBufSize = sizeof(RECT)*nRectCount;
if ( nRectCount < SAL_CLIPRECT_COUNT )
{
if ( !mpStdClipRgnData )
@@ -763,7 +763,7 @@ void WinSalObject::EndSetClipRegion()
}
else
{
- ULONG nSize = mpClipRgnData->rdh.nRgnSize+sizeof(RGNDATAHEADER);
+ sal_uIntPtr nSize = mpClipRgnData->rdh.nRgnSize+sizeof(RGNDATAHEADER);
hRegion = ExtCreateRegion( NULL, nSize, mpClipRgnData );
if ( mpClipRgnData != mpStdClipRgnData )
delete [] (BYTE*)mpClipRgnData;
@@ -777,8 +777,8 @@ void WinSalObject::EndSetClipRegion()
void WinSalObject::SetPosSize( long nX, long nY, long nWidth, long nHeight )
{
- ULONG nStyle = 0;
- BOOL bVisible = (GetWindowStyle( mhWnd ) & WS_VISIBLE) != 0;
+ sal_uIntPtr nStyle = 0;
+ sal_Bool bVisible = (GetWindowStyle( mhWnd ) & WS_VISIBLE) != 0;
if ( bVisible )
{
ShowWindow( mhWnd, SW_HIDE );
@@ -791,7 +791,7 @@ void WinSalObject::SetPosSize( long nX, long nY, long nWidth, long nHeight )
// -----------------------------------------------------------------------
-void WinSalObject::Show( BOOL bVisible )
+void WinSalObject::Show( sal_Bool bVisible )
{
if ( bVisible )
ShowWindow( mhWnd, SW_SHOWNORMAL );
@@ -801,7 +801,7 @@ void WinSalObject::Show( BOOL bVisible )
// -----------------------------------------------------------------------
-void WinSalObject::Enable( BOOL bEnable )
+void WinSalObject::Enable( sal_Bool bEnable )
{
EnableWindow( mhWnd, bEnable );
}